Have got a style file using underscore with function and variable names. I use \ExplSyntaxOn and \ExplSyntaxOff as expected.

But I am encountering some difficulties in my knowledge.

Suppose I include some key definitions and then define some new commands.


\keys_define:nn { mystyle_teorema_keys }
   name .tl_set:N = \mystyle_teorema_name_tl,
   label .tl_set:N = \mystyle_teorema_label_tl,
   shared .tl_set:N = \mystyle_teorema_shared_tl,
   parent .tl_set:N = \mystyle_teorema_parent_tl,
   pigment .tl_set:N = \mystyle_teorema_pigment_tl,


Then in my document I call \usepackage{mystyle} followed by the command from my style file.


Would calling \mystyleCommand have a problem accessing the underscore variables in my style file because the use of underscore has not been enabled in document.ltx ?


1 Answer 1


As covered in my ansewr to a related question, TeX fixes the catcode (interpretation) of tokens when they are first read. Thus if you have a file containing say


then when you use \foo in a 'normal' document context, TeX will still see \some_code_function: in the replacement text.

This idea of 'hiding' control sequences from the document namespace goes back to Knuth, who uses @ as a 'letter' in internal code in plain TeX, but who sets @ as an 'other' char when typesetting.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .