[NTG-context] Checking for singlesided/doublesided at run-time

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Wed Jun 24 15:05:32 CEST 2020


Lukas/ConTeXt schrieb am 24.06.2020 um 08:19:
> Hello,
> 
> is there a way to detect whether the document is intended as single- or double- sided, IOW, whether
>    \setuppagenumbering[alternative=singlesided]
> or
>    \setuppagenumbering[alternative=doublesided]
> has been specified?
> 
> If so, is it possible by Lua, too?

%\setuppagenumbering[alternative=singlesided]
%\setuppagenumbering[alternative=doublesided]
%\setuppagenumbering[alternative={singlesided,doublesided}]

\starttext

\doifmode{*singlesided}{a}
\doifmode{*doublesided}{b}

\startluacode

if tex.modes["*singlesided"] then
     context("x")
end

if tex.modes["*doublesided"] then
     context("y")
end

\stopluacode

\stoptext

Wolfgang



More information about the ntg-context mailing list