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.

I'd like to configure AUCTeX to compile without stopping on errors. I can do it from a terminal with

pdflatex -interaction=nonstopmode filename.tex

but AUCTeX apparently does

pdflatex filename.tex

when asked to compile with C-c C-c. How can I force the "-interaction=nonstopmode" option?

share|improve this question
2  
Can you do it through M-x customize-group RET TeX-command? –  Seamus Jul 18 '12 at 11:41
    
Changing the 'TeX Command' and 'LaTeX Command' variables suppresses the display of errors, but compilation still halts on the first error, which is different from the command-line behavior. –  Ketil Tveiten Jul 18 '12 at 12:49
    
You may want to use latexmk to handle compiling. Then you can set the flags via .latexmkrc –  N.N. Jul 18 '12 at 17:35
add comment

1 Answer

up vote 6 down vote accepted

I use Emacs 23.4 on Mac OS 10.7. That's what I've done:

  • Create a LaTeX file so you have all the AUCTeX menus available
  • Go to LaTeX -> Customize AUCTeX -> Browse options
  • Click on TeX Command
  • Expand TeX Command List and press on one INS button
  • Fill the appeared fields as here:
    1. Name: LaTeXnonint
    2. Command: %`%l -interaction=nonstopmode %(mode)%' %t
    3. How: TeX-run-command

In this way, if I try to compile (hitting C-c C-c LaTeXnonint) a file like:

\documentclass[a4paper]{article}

\begin{document}
\latex
\end{document}

I get no interaction on the present error (\latex instead of \LaTeX)

P.S. the first three points of the list can be made using the shortcut showed by @Seamus

share|improve this answer
    
Thank you, this seems to work. –  Ketil Tveiten Jul 19 '12 at 13:17
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.