diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/layo-ini.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/layo-ini.lua | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/context/base/layo-ini.lua b/Master/texmf-dist/tex/context/base/layo-ini.lua index 56ced2c0bc8..d35d7ef6965 100644 --- a/Master/texmf-dist/tex/context/base/layo-ini.lua +++ b/Master/texmf-dist/tex/context/base/layo-ini.lua @@ -6,17 +6,10 @@ if not modules then modules = { } end modules ['layo-ini'] = { license = "see context related readme files" } --- We need to share information between the TeX and Lua end --- about the typographical model. This happens here. --- --- Code might move. +-- We need to share information between the TeX and Lua end about the typographical +-- model. This happens here. This code might move. --- conditionals.layoutisdoublesided --- conditionals.layoutissinglesided --- texcount.pagenoshift --- texcount.realpageno - -local texcount = tex.count +local texgetcount = tex.getcount local conditionals = tex.conditionals layouts = { @@ -33,14 +26,14 @@ function status.leftorrightpagection(left,right) return left, right elseif conditionals.layoutissinglesided then return left, right - elseif texcount.pagenoshift % 2 == 0 then - if texcount.realpageno % 2 == 0 then + elseif texgetcount("pagenoshift") % 2 == 0 then + if texgetcount("realpageno") % 2 == 0 then return right, left else return left, right end else - if texcount.realpageno % 2 == 0 then + if texgetcount("realpageno") % 2 == 0 then return left, right else return right, left @@ -53,9 +46,9 @@ function status.isleftpage() return false elseif conditionals.layoutissinglesided then return false - elseif texcount.pagenoshift % 2 == 0 then - return texcount.realpageno % 2 == 0 + elseif texgetcount("pagenoshift") % 2 == 0 then + return texgetcount("realpageno") % 2 == 0 else - return not texcount.realpageno % 2 == 0 + return not texgetcount("realpageno") % 2 == 0 end end |