I want to define variable with letters and with numerical numbers. But the variable have same name with and without numeric value. Here is an example:
Basically I want to define
\def\lam{\lambda}
\newcommand{lam}{\lambda}
\def\lam#1{\lambda^{#1}}
In the expression I have
F = \lam + \lam2 + \lam3
The output should be
F = \lambda + \lambda^2 + \lambda^3
\lamband\lamctechnically you can re-classify digits as letters so\lam2works, but then you break most of the rest of latex. – David Carlisle Jun 12 '20 at 17:08\lam{}+\lam2+\lam3– David Carlisle Jun 12 '20 at 17:10