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

AucTeX recognizes for example the statement


in a .tex file. Then typing " twice will result in "` before a word resp. "' after a word. However if \usepackage[german]{babel} is hidden behind an input statement like


i.e. the statement is contained in the preamble file,

AucTeX doesn't recognize the statement above anymore.

Is there any way to make AucTeX parse the \input files too?

share|improve this question
You might have better luck at the AucTeX mailing-list. Feel free to post the solution here if you get one there. – Martin Scharrer Jul 3 '11 at 16:46
This would be a comment instead of an answer, but I could not find the button to comment. This thread is related: mail-archive.com/auctex@gnu.org/msg01411.html and I have the same problem. It seems to be easily solved, but I could not get my install of AUCTeX to complete \includegraphics. – YIchun Jul 4 '11 at 3:48
@user4011 I'm struggling to see a difference in behaviour in AUCTeX between the case where a main file includes \usepackage[german]{babel} and where is doesn't, even before I worry about secondary files. Could you clarify what I should be seeing? – Joseph Wright Jul 17 '11 at 8:37
@'Joseph Wright' Maybe a better example is \usepackage{amsmath}. If you have this in your preamble the AucTeX command LaTeX-environment (C-c C-e) knows the align environment (tab completion). However if you hide this statement in an external preamble file (included by an include statement) it doesn't know it anymore (after restarting emacs or pressing C-c C-n) – student Oct 3 '11 at 18:13
@JosephWright : Simple test: as said above, use \usepackage{amsmath}, and toggle on latex-math-mode if not already. If ams is correctly detected, backtick-C F will give \mathcal{F} , else it will give {\cal F} – T. Verron Dec 1 '11 at 22:22

If you are using included files in your document, you should check that the emacs-related lines are present at the end of the included file you are testing it with:

%%% Local Variables:
%%% mode: latex
%%% TeX-Master: foo
%%% End:

if foo.tex is the name of your master file, and for the master file (I'm not sure it is as useful, though):

%%% Local Variables:
%%% mode: latex
%%% TeX-Master: t
%%% End:

I had this problem, but it was because I had written my text below the variable lines, instead of above. Moving it, saving and reloading the file fixed the problem for me.

Some other hints :

  • the \input command should probably be the only one on its line
  • the file path has to be specified starting with ./ (assuming you use unix)

Actually, \input{./fmt/preamble.tex} works, but \input{fmt/preamble.tex} doesn't.

share|improve this answer

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.