diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua index 77f11918b46..7227f9dba8a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua @@ -76,6 +76,7 @@ local v_layer = variables.layer local v_lefttoright = variables.lefttoright local v_righttoleft = variables.righttoleft local v_title = variables.title +local v_nomenubar = variables.nomenubar local positive = register(pageliteral("/GSpositive gs")) local negative = register(pageliteral("/GSnegative gs")) @@ -195,6 +196,10 @@ function codeinjections.setupidentity(specification) end end +function codeinjections.getidentityvariable(name) + return identity[name] +end + local done = false -- using "setupidentity = function() end" fails as the meaning is frozen in register local function setupidentity() @@ -327,7 +332,10 @@ local plusspecs = { direction = "L2R", }, [v_righttoleft] ={ - direction = "R2R", + direction = "R2L", + }, + [v_nomenubar] ={ + nomenubar = true, }, } @@ -393,6 +401,11 @@ local pagespecs = { duplex = "Simplex", paper = true, }, + [v_nomenubar] = { + mode = "UseNone", + layout = "auto", + nomenubar = true, + }, } local pagespec, topoffset, leftoffset, height, width, doublesided = "default", 0, 0, 0, 0, false @@ -472,6 +485,7 @@ local function documentspecification() local paper = spec.paper local title = spec.title local direction = spec.direction + local nomenubar = spec.nomenubar if layout then addtocatalog("PageLayout",pdfconstant(layout)) end @@ -490,7 +504,7 @@ local function documentspecification() prints = pdfarray(flattened(pages.toranges(marked))) end end - if fit or fixed or duplex or copies or paper or prints or title or direction then + if fit or fixed or duplex or copies or paper or prints or title or direction or nomenubar then addtocatalog("ViewerPreferences",pdfdictionary { FitWindow = fit and true or nil, PrintScaling = fixed and pdfconstant("None") or nil, @@ -500,6 +514,7 @@ local function documentspecification() PrintPageRange = prints or nil, DisplayDocTitle = title and true or nil, Direction = direction and pdfconstant(direction) or nil, + HideMenubar = nomenubar and true or nil, }) end addtoinfo ("Trapped", pdfconstant("False")) -- '/Trapped' in /Info, 'Trapped' in XMP @@ -510,11 +525,7 @@ end -- temp hack: the mediabox is not under our control and has a precision of 5 digits local factor = number.dimenfactors.bp -local f_value = formatters["%.6F"] - -directives.register("pdf.stripzeros",function() - local f_value = formatters["%.6N"] -end) +local f_value = formatters["%.6N"] local function boxvalue(n) -- we could share them return pdfverbose(f_value(factor * n)) |