LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Frank Mittelbach <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Sun, 23 Apr 2017 11:37:19 +0200
text/plain (60 lines)
Am 23.04.17 um 10:50 schrieb Benedikt Vitecek:
> This is only a rough idea and I would need to figure out how to implement it, but it could solve (at least
> for me) the category code problem.

as I expected, babel does have an option to enable the shorthands 
already in the preamble:


however, as I also expected that doesn't  work in all cases as  packages 
loaded afterwards may have a problem with that.




solves your problem but if babel is loaded before xparse, that will break.

On the other hand, what might be enough in your case is simply changing 
the catcode of < and > before making your definition since we know that 
it will be active by the time of begin document (ie when your definition 
is used):




\catcode`\< = 13
\catcode`\> = 13

   \NewDocumentCommand \Something { d<> m }
       Optional: #1 \\
       Mandatory: #2
  \catcode`\< = 12
  \catcode`\> = 12


Of course that only works because we know that spanish will activate 
them, so this is not robust in a general way.

Guess the correct answer is drawingboard and make xparse babel aware and 
long term a better shorthand interface / integration