Clearest way to call a {\command } in Lua?
Hello, what is the clearest way to call a {\command ...} (i.e. a command which is to be wrapped in curly braces, like \em, \bf etc.) in Lua? Let's have: ---- bla {\em haha} bla ---- Should be the Lua transcription be: ---- bla \ctxlua{context(false, context.delayed.em("haha"))} % <--- The clearest ("nicest") way? bla ---- Best regards, Lukas -- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
Lukáš Procházka mailto:LPr@pontex.cz 23. Juli 2016 um 15:25 Hello,
what is the clearest way to call a {\command ...} (i.e. a command which is to be wrapped in curly braces, like \em, \bf etc.) in Lua?
Let's have:
---- bla {\em haha} bla ----
Should be the Lua transcription be:
---- bla \ctxlua{context(false, context.delayed.em("haha"))} % <--- The clearest ("nicest") way? bla ---- Try not to use them because there is \bold{…} etc. or even better \style[style=bold]{…}.
\starttext \startluacode context.bold("Bold text!") context.space() context.style( { style = "em" }, "Emphasized text!") \stopluacode \stoptext Wolfgang
participants (2)
-
Lukáš Procházka
-
Wolfgang Schuster