0

I'd like to write macros like \choose, that takes its arguments from the stuff preceding and following its invocation.

For instance, a command \modulo that replaces {A \modulo \sim} with \faktor{A}{\sim}.

How could that work?

seldon
  • 249
  • 5
    you can not. tex just has a few fixed constructs that can do this. basically fractions with or without a dividing line , there is no general mechanism to colloect the preceding tokens – David Carlisle Jan 02 '24 at 16:10
  • 3
    David Carlisle would know better, but I'm pretty sure that such macros are one of the worse parts of TeX: because the macro comes after the argument, you can never be sure of the style of the math you're looking at. – Teepeemm Jan 02 '24 at 16:21
  • 2
    @Teepeemm not "one of the worst", it is absolutely the worst part of the tex syntax design – David Carlisle Jan 02 '24 at 16:42

0 Answers0