diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-08-02 21:03:52 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-08-02 21:03:52 +0200 |
commit | 3668eb2ecc0f7dcc6c44fd1e971cbe37fa010fd6 (patch) | |
tree | 1bb01a58b6f193a42fc99189e5437313650ee39f /tex/context/base/mkiv/strc-pag.lua | |
parent | 1873d112b56f49e40ece29916ede51933412bca8 (diff) | |
download | context-3668eb2ecc0f7dcc6c44fd1e971cbe37fa010fd6.tar.gz |
2019-08-02 19:47:00
Diffstat (limited to 'tex/context/base/mkiv/strc-pag.lua')
-rw-r--r-- | tex/context/base/mkiv/strc-pag.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/strc-pag.lua b/tex/context/base/mkiv/strc-pag.lua index a9933a21f..216b5f705 100644 --- a/tex/context/base/mkiv/strc-pag.lua +++ b/tex/context/base/mkiv/strc-pag.lua @@ -316,6 +316,11 @@ function pages.in_body(n) return texgetcount("pagebodymode") > 0 end +function pages.fraction(n) + local lastpage = texgetcount("lastpageno") -- can be cached + return lastpage > 1 and (texgetcount("realpageno")-1)/(lastpage-1) or 1 +end + -- move to strc-pag.lua function counters.analyze(name,counterspecification) |