From 16aa5a7c87f18a2483d0d61795899f886781b51c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 18 Apr 2015 22:52:45 +0000 Subject: context, from www.pragma-ade.com/context/beta/cont-tmf.zip (18apr15) git-svn-id: svn://tug.org/texlive/trunk@36923 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/context/base/page-run.mkiv | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Master/texmf-dist/tex/context/base/page-run.mkiv') 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 -- cgit v1.2.3