# AUCTeX says “LaTeX: problems after {1} page”

After upgrading from Windows 8 to Windows 10, I installed the latest version of MiKTeX (2.9.6300, 64 bit). When I use AUCTeX to typeset a document, the PDF file appears to be produced correctly, but I get the message

LaTeX: problems after {1} page

(or "LaTeX: problems after {2} pages" for a two-page document, etc.).

If press Ctrl-C Ctrl-L after that, I get

Running LaTeX' on temp2' with pdflatex  -file-line-error   -interaction=nonstopmode "\input" "temp2.tex"''
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6300 64-bit)
entering extended mode
LaTeX2e <2017-04-15>
Babel <3.9t> and hyphenation patterns for 76 language(s) loaded.
(temp2.tex ("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo")) (temp2.aux) [1{C:/Users/sm/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}] (temp2.aux) )<C:
/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on temp2.pdf (1 page, 10889 bytes).
Transcript written on temp2.log.

TeX Output finished at Sat May  6 16:18:23

As far as I can see, the log file contains no indication of a problem.

This happens even with a minimal tex file such as

\documentclass{article}
\begin{document}
Hello
\end{document}

I'm using AUCTeX 11.90 in GNU Emacs 25.1.1 (Vincent Goulet's bundled version).

If I instead use TeXworks, then as far as I can see, there is no indication of a problem. However, I noticed that TeXworks does not produce a .log file or an .aux file, instead producing a .synctex.gz file. I don't know whether that's normal.

This question is similar but it appears that my situation is not as bad as the situation described there. I tried the suggestion given by Sean Allred there, but it didn't solve the problem.

What is causing this problem and how can it be fixed?

I don't know much about running LaTeX from the terminal, but following the suggestion from ShreevatsaR, I get the following:

C:\tempwork\0701>latex temp2.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6300 64-bit)
entering extended mode
(temp2.tex
LaTeX2e <2017-04-15>
Babel <3.9t> and hyphenation patterns for 76 language(s) loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo")) (temp2.aux) [1]
(temp2.aux) )
Output written on temp2.dvi (1 page, 220 bytes).
Transcript written on temp2.log.

C:\tempwork\0701>pdftex temp2.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6300 64-bit)
entering extended mode
(temp2.tex
! Undefined control sequence.
l.1 \documentclass
{article}
?
• We really need to see the content of the output buffer (the one you get with C-c C-l). – giordano May 6 '17 at 0:01
• @giordano Thanks for your comment. I've added it. – markseeto May 6 '17 at 0:23
• I am having almost the identical problem here. As far as I can see, the pdf file is compiled correctly, but the same error message is reported by AUCTeX. I am using MiKTeX 2.9.6300 64bit. – Jiangwei Xue May 6 '17 at 4:09
• Can you directly run the command (your log says pdflatex -file-line-error -interaction=nonstopmode "\input" "temp2.tex") in a terminal and see what the return code is? (You can get the return code with \$? on Unix systems but I don't know if it's the same on Windows.) – ShreevatsaR May 6 '17 at 6:28
• @ShreevatsaR Thanks for the suggestion. I don't know much about running from the terminal, but I've added what I got to the question. I don't know what a return code is or where to find it. – markseeto May 6 '17 at 6:42

AUCTeX parses the output buffer in order to report errors and warnings, and if there is none of them, it looks for a line like

LaTeX2e <date>

However, since April 2017, the date format of LaTeX has been changed from yyyy/mm/dd to yyyy-mm-dd and your version of AUCTeX can't find the line

LaTeX2e <2017-04-15>

This has been already fixed upstream, you only need to update your AUCTeX package. The fix is present in the latest ELPA version (11.90.2), which is by far the best and simplest way to install (and then update) the package.

• Thank you very much for your help giordano, that fixed it. Thanks also for your work on AUCTeX. – markseeto May 6 '17 at 8:44
• Thank you for suggesting ELPA. It is so much easier to run "M-x package-install RET auctex RET" than downloading and unpacking AUCTeX by hand. – Jiangwei Xue May 8 '17 at 1:46
• @giordano Sorry to disagree here - distributors need releases, they are building from released tar balls in most of the cases. We on Debian use it, so we have 11.90. It would be nice if releases are somehow syncronized. Thanks – norbert Jul 20 '17 at 7:33
• @norbert I see your point, but like it or not that's a general trend in the Emacs package ecosystem. Also org-mode provides more frequents updates via ELPA than via release tarballs. I think that most packages in the MELPA repository don't have at all release tarballs. In AUCTeX, ELPA releases serve also as tests between releases, we've occasionally introduced bugs that were promptly reported by ELPA users, so that the the final release will be as polished as possible. Anyway, this bugfix is fairly important and may be a good idea to release a new version soon. Thanks! – giordano Jul 20 '17 at 10:11
• @giordano thanks! I understand the use of elpa as test bed, and if it is what it is used for, than that is ok. But as you said, for important changes a new release might be worth considering! Thanks for your work on auctex! – norbert Jul 20 '17 at 14:32