diff options
author | Marius <mariausol@gmail.com> | 2012-07-17 18:00:13 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-07-17 18:00:13 +0300 |
commit | 82f7cb1e09b15555a886ef02ead563aac3f2e392 (patch) | |
tree | 4379d6d64abd5bd59e8b0a9077826ff3272f3568 /tex/context/base/strc-pag.lua | |
parent | c30a841cef093918b475e0ea95ecf9fc9f30697d (diff) | |
download | context-82f7cb1e09b15555a886ef02ead563aac3f2e392.tar.gz |
beta 2012.07.17 16:42
Diffstat (limited to 'tex/context/base/strc-pag.lua')
-rw-r--r-- | tex/context/base/strc-pag.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tex/context/base/strc-pag.lua b/tex/context/base/strc-pag.lua index 460d4ff00..e154c4d26 100644 --- a/tex/context/base/strc-pag.lua +++ b/tex/context/base/strc-pag.lua @@ -69,6 +69,9 @@ function pages.save(prefixdata,numberdata) end end +-- We can set th epagenumber but as it only get incremented in the page +-- builder we have to make sure it starts at least at 1. + function counters.specials.userpage() local r = texcount.realpageno if r > 0 then @@ -78,8 +81,15 @@ function counters.specials.userpage() if trace_pages then report_pages("forcing pagenumber of realpage %s to %s",r,t.number) end + return end end + local u = texcount.userpageno + if u == 0 then + report_pages("forcing pagenumber of realpage %s to %s (probably a bug)",r,1) + counter.setvalue("userpage",1) + texcount.userpageno = 1 + end end local function convertnumber(str,n) |