Hi
Here's a question for the latex pro's: Do you know if special characters like german umlauts are allowed in labels? e.g.:
\section{Mein grünes Apfelbäumchen} \label{mein_grünes_apfelbäumchen}
It works when typesetting the document. I just wanted to know if this is valid code. Because if _not_ then it would be nice, if these would be escaped automagically when using the section, subsection and subsubsection snippets. E.g.:
\section{Mein grünes Apfelbäumchen} \label{mein_gruenes_apfelbaeumchen}
If it's easier to accomplish, you could also just escape a for ä, u for ü, and o for ö, etc.
Another nice enhancement would be if the \section and \label commands would each be on a seperate line. I just asked about the oppinions on this in the irc channel and I got at least one more vote for this ;-)
Cheers. Oliver
On Mar 8, 2006, at 10:33 AM, Oliver Hagmann wrote:
Hi
Here's a question for the latex pro's: Do you know if special characters like german umlauts are allowed in labels? e.g.:
\section{Mein grünes Apfelbäumchen} \label{mein_grünes_apfelbäumchen}
It works when typesetting the document. I just wanted to know if this is valid code. Because if
My opinion in this is: If it works, then it is valid.
_not_ then it would be nice, if these would be escaped automagically when using the section, subsection and subsubsection snippets. E.g.: \section{Mein grünes Apfelbäumchen} \label{mein_gruenes_apfelbaeumchen}
So, if I understand correctly, you want to change the snippet so that what you type in the section part is automatically written in the label part as well with characters escaped. It is probably possible, but I wouldn't want it to be part of the general snippet. It is not too easy to make many transformations on the fly like that, and the question is which characters to escape. I would be more in favor of creating a command that escapes the current word or selection. That should be a lot easier to do, once provided with a dictionary of the substitutions desired, and again it could be easily customized.
If it's easier to accomplish, you could also just escape a for ä, u for ü, and o for ö, etc.
Another nice enhancement would be if the \section and \label commands would each be on a seperate line. I just asked about the oppinions on this in the irc channel and I got at least one more vote for this ;-)
You can certainly change the snippet in your personal copy, and add the new line. These snippets are supposed to be there just for guidance, and they can certainly be customized to suit your personal preferences. They were made based on my personal preferences, and I like the labels at the same line as what they are describing, but if the majority prefers them on a separate line, we can change the "official" snippets as well. In any case, these snippets are sort of deprecated in favor of the "insert command based on current word" command, which is pretty customizable in that respect.
Cheers. Oliver
Haris