summaryrefslogtreecommitdiff
path: root/tex/context/base/layo-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/layo-ini.lua')
-rw-r--r--tex/context/base/layo-ini.lua25
1 files changed, 9 insertions, 16 deletions
diff --git a/tex/context/base/layo-ini.lua b/tex/context/base/layo-ini.lua
index 56ced2c0b..d35d7ef69 100644
--- a/tex/context/base/layo-ini.lua
+++ b/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