When I am trying to redefine \L to be \Lambda, it seems that been undo by hyperref, getting a warning Command \L invalid in math mode and the results is the polish Ł.




You could redefine it after loading hyperref:


Both pd1enc.def (PDFDocEncoding definition file) and puenc.def (PDF Unicode definition file) define \L:

  • pd1enc.def: \DeclareTextCommand{\L}{PD1}{\225}% U+0141
  • puenc.def: \DeclareTextCommand{\L}{PU}{\81\101}% U+0141

If you make your redefinition later, i.e. after loading hyperref, yours will override the previous ones.

The problem here shows, that it's better to try using unique names, even if they are longer. Short and common names are often already used. Furthermore, you don't need to lose the \L brought by hyperref. Although it's just an \L, I explain this because similar things can happen with other macros you might need.

  • even if it works for the op to redefine \L after loading hyperref, it's not a good idea. if this definition is in a file submitted for publication in some journals, where articles are published in both print and electronically, the production procedures require hyperref to be removed or replaced by an automatic process, which will undoubtedly change the order. this only causes problems, resulting in frustration for the production staff and added expense when all the instances of \L must be manually changed to something else. use a 2-letter shorthand, like \gL if you must. – barbara beeton Dec 19 '11 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.