summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/page-run.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/page-run.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/page-run.mkiv14
1 files changed, 8 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/context/base/page-run.mkiv b/Master/texmf-dist/tex/context/base/page-run.mkiv
index 1f2551ebc17..9adcb23c7b3 100644
--- a/Master/texmf-dist/tex/context/base/page-run.mkiv
+++ b/Master/texmf-dist/tex/context/base/page-run.mkiv
@@ -74,9 +74,11 @@
\startluacode
local format, concat = string.format, table.concat
+local todimen = number.todimen
+local texdimen = tex.dimen
-local function todimen(name,unit,fmt)
- return number.todimen(tex.dimen[name],unit,fmt)
+local function asdimen(name,unit)
+ return todimen(texdimen[name],unit,"%0.4f") -- 4 is more than enough, even 3 would be okay
end
local function checkedoptions(options)
@@ -122,7 +124,7 @@ function commands.showlayoutvariables(options)
for i=1,#dimensions do
local d = dimensions[i]
if options[d] then
- context("%s%s",todimen(name,d,"%0.4f"),d)
+ context("%s%s",asdimen(name,d),d)
context.NC()
end
end
@@ -143,7 +145,7 @@ function commands.showlayoutvariables(options)
for i=1,#dimensions do
local d = dimensions[i]
if options[d] then
- result[#result+1] = format("%12s%s",todimen(name,d,"%0.4f"),d)
+ result[#result+1] = format("%12s%s",asdimen(name,d),d)
end
end
commands.writestatus("layout",format("%-24s %s",interfaces.interfacedcommand(name),concat(result," ")))
@@ -297,8 +299,8 @@ end
\unexpanded\gdef\showmargins
{\starttabulate
- \NC asynchrone \NC \doifoddpageelse {odd} {even} \NC \NR
- \NC synchrone \NC \doifrightpageelse {right} {left} \NC \NR
+ \NC asynchrone \NC \doifelseoddpage {odd} {even} \NC \NR
+ \NC synchrone \NC \doifelserightpage {right} {left} \NC \NR
\NC right margin \NC \the\rightmarginwidth \NC \NR
\NC left margin \NC \the\leftmarginwidth \NC \NR
\NC outer margin \NC \the\outermarginwidth \NC \NR