31 May
2017
31 May
'17
4:53 p.m.
On 05/31/2017 04:51 PM, Pablo Rodriguez wrote:
[...] This is the way to detect system modes, but I don’t know how to do it for \mainlanguage (**en).
It was simple (not even using tex.systemmodes): \mainlanguage[es] \starttext \en\startlua if tex.modes['*en'] then context('Language is English.') else context('Language is not English.') end context('\\par') if tex.modes['**es'] then context('Main language is Spanish.') else context('Main language is not Spanish.') end \stoplua \stoptext Just in case it helps, Pablo -- http://www.ousia.tk