[Tex/LaTex] Is usage of \ell instead of l in math mode best practice
best practicesfonts
Is usage of \ell instead of l in math mode best practice?
Best Answer
This depends on the context and font used. If there is no possibility to confuse l and I or 1, than you can safely use l. If there is, you might want to change to \ell, but you should be aware, that
it might differ from the other gylphs in style too much.
it might conflict with international standards, for example in the case of the litre symbol.
If you use it for high-school students or persons not accustumed to the symbols, \ell is preferable as the obvious distinction to 1 and I is more important. For example, I always use \ell as the symbol for litre in tests and training sheets for my high school students, because they still have problems reading $V \text{in} \si{\litre}$ correctly.
It depends a little if this files are only used by you are if you are planning to share them with other people, e.g. if you work with them on one document or the files are part of a LaTeX package.
But in general I would strongly recommend you to limit yourself to lowercase alphanumeric ASCII characters, i.e. a-z, 0-9 and -.
The reasons for that are:
Unicode or other non-ASCII characters can cause trouble when copied on a different file system with a different code page. I had the case that I couldn't even see files with German umlauts on a Windows share mounted by Linux. This is now much better, but still a risk. The normal TeX doesn't like non-ASCII character that much either.
Some file systems (FS) are case sensitive (e.g. under *nix FSs) others aren't (e.g. FAT, NTFS). If you keep you file names all lowercase you avoid collisions between files which can lead to loss of data when copied from a case sensitive to a case insensitive FS. Also you will run intro trouble on case sensitive systems when the actual filename has a different capitalization as on the hard drive. You might not realize that on e.g. Windows, but it will hit you then hard on a different FS.
Characters which are special in TeX will work as long they are valid at this position which excludes % and #. Others as & can cause trouble as well and there is no real reason to use them, so avoid them. Even _ which is commonly used and will work inside \input can cause trouble when the filename should be printed, so avoid it as well.
Spaces are "evil" in filename as well because some external tools will take them as file name separator. TeX should be fine with them, except when they used multiple times in a row. TeX will then combine them to one prior to the interpretation as a filename!
Dots will confuse the simple extension extraction algorithms used by LaTeX. See this question for an example.
I'm going through some effort in the svn-multi package to allow for arbitrary file names. This is done using verbatim mode which doesn't help for other input macros like \input, \include or \includegraphics.
Don Knuth touched on this topic in his article for TUGboat -- "Typesetting Concrete Mathematics". His examples don't include units (for that, the siunitx package is a good choice, as already mentioned), but the method for determining what is math and what isn't is well illustrated otherwise.
(The article is set in Knuth's Concrete fonts, and shows some of the special techniques used in setting that book. Irrelevant for this question, but interesting nonetheless.)
Best Answer
This depends on the context and font used. If there is no possibility to confuse
l
andI
or1
, than you can safely usel
. If there is, you might want to change to\ell
, but you should be aware, thatIf you use it for high-school students or persons not accustumed to the symbols,
\ell
is preferable as the obvious distinction to1
andI
is more important. For example, I always use\ell
as the symbol for litre in tests and training sheets for my high school students, because they still have problems reading$V \text{in} \si{\litre}$
correctly.