I have a large document with a lot of equation, the author overwritten the original \l
(used to get polish letter ł) with \renewcommand\l{{\lambda}}
. It would be to much work to find all the \l
in all the equations and change it to \lambda
. I only need couple of ł it the entire doc so I need to reset locally the \l
command. How do I do that? \renewcommand\l{???}
[Tex/LaTex] How to reset \renewcommand\l{\lambda} locally
groupingmacros
Best Answer
You cannot reset a
\renewcommand
. But there are several options.The cleanest would be to write
ł
instead of\l
directly. This merely requires saving the document as UTF-8 and either using a modern LaTeX processor (LuaTeX or XeLaTeX) or to include theinputenc
package with theutf8
option (\usepackage[utf8]{inputenc}
).Alternatively, you can define a new command to include
\l
immediately before it’s redefined:… and then just use
\lw
in place of\l
to typeset ł.Or you could change the redefinition of
\l
so that it only includes the λ in math mode, and includes ł in text mode. But I wouldn’t do that – it’s very unintuitive and hard to understand as a reader of the source code. Still, here it is:… which will render as: