15

In LaTeX2 a_1, a_{123} and a^1, a^{123} used to produce subscripts and superscripts respectively. In LaTeX3 superscripts still work the same way, but what happened to subscripts? I suspect the prominent role underscores play in LaTeX3 names has made a change necessary. I tried \_ without success.

  • I think that when you're writing the actual content, you should have l3 syntax turned off. – Seamus Mar 21 '12 at 13:07
  • Not sure what that means, can you elaborate further please. – Reinhard Neuwirth Mar 22 '12 at 5:38
  • It means that the expl3 syntax should only be used in internal code, e.g, in packages etc or between \ExplSyntaxOn ...\ExplSyntaxOff and that on document level the _ or : does not have this kind of meaning. – Frank Mittelbach May 31 '12 at 16:57
20

Within the document, no change should be necessary. If you need to access subscripts within the code section where _ is considered as a letter, you could use \sb which is defined in LaTeX as in plain TeX to have the same definition as the usual _ token. Or if you want a L3 name for it \c_math_subscript_token (which is actually a * rather than a _ but with the right catcode).

  • 1
    I am happy to report that \sb does the trick. Thank you David. Your reference to * and to catcodes is beyond my present capability to understand, but I am getting there. – Reinhard Neuwirth Mar 21 '12 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.