9

I'm trying to write my L3 packages using good practice, which I understand involves using @@ in defining command and variable names which then get replaced by the module name (Section 3.2.2 in texdoc l3doc).

However, I sometimes need to interact between L3 and L2e and L2e code is simply littered with @s and sometimes @@s (to be clear, these come from other code that I'm interfacing with so I don't have a choice about those).

So, to my question: Is there a way to temporarily disable the @@ replacement?

If not, my current work around for, say, calling a macro defined in another package, is to use:

\use:c {commandWith@ @sInIt}

Note the extra space between the @s which is removed by L3 due to its habit of ignoring spaces. I'd similarly use :c variants with token lists and the like.

Is there something better?

1

1 Answer 1

11

You can go one of two ways

  • Use @@@@ to mean literal @@ selectively: this is needed by the kernel istelf to define e.g. \@@par

  • Use %<@@=> to turn off all substitution until you re-enable using %<@@=something>

1
  • Thank you! Both of these look very straightforward to use. Nov 29, 2020 at 21:03

You must log in to answer this question.

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