On 4/7/2017 11:15 AM, MF wrote:
Hello list, I need the lua equivalent of \fontstyle, a function that returns a string like "rm", "ss", etc.
A lua equivalent for
\doifelse{\fontstyle}{ss}{...}{...}
to write lua code like this:
local fs = get_current_font_style() if fs == "ss" then ... else ... end
\startluacode if tokens.getters.macro("fontstyle") == "ss" then context("Foo") else context("Bar") end if tokens.getters.macro("fontstyle") == "rm" then context("Foo") else context("Bar") end \stopluacode ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------