[lltx] convert language name to number in Lua

Stephan Hennig mailing_list at arcor.de
Tue Feb 11 23:54:53 CET 2014


consider the following macro \langnum, which stores the language number
corresponding to an arbitrary language name in a Lua variable

      local number = \the\csname l@#1\endcsname
  \langnum{USenglish} \langnum{UKenglish}

How would I do the same conversion of a name to a number in pure Lua,
given a string containing an arbitrary language name?

Best regards,
Stephan Hennig

More information about the lualatex-dev mailing list