Hello, I am trying to sort out a minor but awkward LaTeX issue. The command \L is defined in LaTeX to be an L with a line through it. But I frequently need a caligraphic L, so my papers normally begin with "\def\L{{\cal L}". Unfortunately, I occasionally need to refer to a Polish author whose name begins with \L. So, I would like to still define \L to be {\cal L} since I am so used to that, but be able to somehow access the original \L definition on occasion. I suppose I could enclose all the rest of my paper in { } and thus limit the scope of my redefined \L, but I would rather not have to do that. What I want is something like:
\def\linedL{{\L}}
\def\L{{\cal L}}
and then access the two macros separately. But of course this doesn't work correctly, since the second definition automatically modifies the first definition too. Any suggestions of how to make this work the way I want? Thanks! (And, sorry if this is already covered somewhere -- I coudln't think of what keywords to search for.)
General ⇒ Accessing a previous LaTeX \def
NEW: TikZ book now 40% off at Amazon.com for a short time.
Accessing a previous LaTeX \def
You can use \let or \edef to save the old definition in \linedL
Best regards
Elke
Code: Select all
\documentclass{scrartcl}
\usepackage{xspace}
\edef\linedL{\L\noexpand\xspace}
\def\L{\mathcal{L}}
\begin{document}
\linedL and $\L$
\end{document}
Elke
Re: Accessing a previous LaTeX \def
Thanks, that's great -- thanks very much Elke!