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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I added ngerman shorthands to my english babel as described here. But they do not work for glossaries, and probably in other macors as discussed here. I load all the acronyms as a separate file in the preamble.




\newacronym{CP-OFDM}{CP"~OFDM}{Cyclic Prefix OFDM}


How can I solve the problem for acronyms? One solution is to move them inside the main text, after \begin{document}.

share|improve this question
Babel shorthands are enabled only after \begin{document}. Just say \AtBeginDocument{\input{file}} instead of \input{file} (where file.tex contains the acronym definitions). – egreg Feb 19 '13 at 10:11
Thanks @egreg, it solves the problem. – Aydin Feb 19 '13 at 10:48
If the only language is english, you can use "user shorthands" with \useshorthands{"} and \defineshorthand{"~}{...}, which is much simpler. – Javier Bezos Feb 19 '13 at 15:49
up vote 4 down vote accepted

There are other questions in the site that cover similar problems

but this one raises a different problem.

As explained in the second linked question, shorthands are enabled only after \begin{document} and babel has good reasons to do this.

However, a long list of acronyms after \begin{document} would pollute the document and you're right when thinking that they are best placed in the preamble.

A solution might be

<list of acronyms>

and the list can also be put in a file myacronyms.tex so that the above becomes


However, there's a better solution for this setup:


will load the file after the shorthands are enabled, while the instruction is still in the preamble.

If you use the \shorthandon way, enable all shorthand prefixes you need. Here you find a list of shorthands for the various languages.

share|improve this answer
If you use the \AtBeginDocument approach, you'll need to put it before you load glossaries to avoid the generation of the .glsdefs file. (Otherwise the glossary/acronym definitions will occur after \newglossaryentry changes its behaviour.) – Nicola Talbot Mar 14 '14 at 15:42

Your Answer


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.