\newcommand{\1999}{saysomething}
\1999
how to define such command ?
I've tried the \newcommand{\csname 1999 \csname}{saysomething}.
but it brings an error.
\newcommand{\1999}{saysomething}
\1999
how to define such command ?
I've tried the \newcommand{\csname 1999 \csname}{saysomething}.
but it brings an error.
TeX has it's idea that only letters can be part of longer (not one-character) command names. You can fool around redefining digits to be letters, or some such, but that will produce more problems than what it is worth.
Just write out your numbers in e.g. Roman (XIX for 19 and so) or use some English abbreviation.
\expandafter\newcommand\expandafter{\csname 1999\endcsname}{Foo}. Bit you will not be able to use it as\1999, you have to use it as\csname 1999\endcsnameor similar (\makeatletter\@nameuse{1999}\makeatother). In general I would say digits in command names are not worth it. – moewe Aug 09 '19 at 05:42