Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Common practice for naming packages and classes seems to be, using regex-like notation:

[a-z][a-z0-9]*

In other words, the name usually starts by a lowercase letter, followed by any sequence of lowercase letters and digits.

However, some packages (e.g. tikz-3dplot) and classes (e.g. revtex4-1) contain a - in their name. I am myself tempted to use a dash in the name of one of my packages. Is that wise? Aside from perhaps inconveniencing some users by deviating from naming conventions...

... Are there potential side-effects associated with using a dash in a package/class name?

share|improve this question
3  
should be OK: any normal ascii value, main thing to watch out for is punctuation characters that babel uses for shorthands, although mostly babel does that after begin{document} these days so should not affect package names. –  David Carlisle Jan 15 at 12:58
add comment

1 Answer

up vote 11 down vote accepted

It should be OK: any normal ASCII value. The main thing to watch out for is punctuation characters that babel uses for shorthands, although mostly babel does that after \begin{document} these days so even those should not affect package names.

Also avoid characters that are special in the underlying kpathsea library for example " is used to delimit files with spaces in their names and optionally file names starting | are treated as a shell command to execute. It's probably best to avoid those.

Finally, avoid spaces or commas as they would seriously mess up the \usepackage parsing. You can input a file called array,longtable.sty into TeX but \usepackage{array,longtable} isn't going to work.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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