5

AucTeX 11.90 (Emacs 25.2) gives the following error instead of a warning when using Tikz Externalize:

! Package tikz Warning: The key 'up to date check=md5' is impossible, there is no macro to compute MD5. Falling back to 'up to date check=diff'.

Though my PDF compiles fine, I find the false error quite annoying. Any help in resolving this will be appreciated.

I have the following custom set variables in my init file:

'(TeX-debug-bad-boxes t)
'(TeX-debug-warnings t)
'(TeX-display-help nil)
'(TeX-engine (quote xetex))
'(TeX-error-overview-open-after-TeX-run t)
'(TeX-source-correlate-mode t)
'(TeX-source-correlate-start-server t)

MWE:

\documentclass[12pt]{article}
\usepackage{fontspec,realscripts}
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} 
\setmainfont[Scale=1]{Libertinus Serif}

\usepackage{tikz}
\usetikzlibrary{external} \tikzexternalize[prefix=tikz/]

\begin{document}
\begin{figure}
  \centering
  \begin{tikzpicture}
    \draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- (0,0);
  \end{tikzpicture}
\end{figure}
\end{document}
%%% Local Variables:
%%% TeX-command-extra-options: "-shell-escape"
%%% End:
  • Is this reproducible in the command line? Or the error appears only in AUCTeX? – giordano May 29 '17 at 10:37
  • The file compiles perfectly from the command line. That is, the warning is reported but not shown as an error. The error is reported only in AucTeX. – user10050 May 29 '17 at 10:41
  • I see. AUCTeX catches the warning as an error. – giordano May 29 '17 at 10:50
  • Uhm, indeed AUCTeX considers all messages starting with ! as errors rather than warnings. I think there was a good reason for this... For the record, also TeXstudio takes that warning as an error. – giordano May 29 '17 at 10:56
  • 1
    So is this a problem with Tikz then? – user10050 May 29 '17 at 13:05
5

Exclamation marks are usually employed to denote errors, rather than warnings. Consider for example this document:

\documentclass{article}
\usepackage{does-not-exist}
\begin{document}
Hello world!
\end{document}

This results in this error in the log:

! LaTeX Error: File `does-not-exist.sty' not found.

Also fatal errors starts with a ! (try compiling with plain TeX a document containing only \doesnotexist: two different errors starting with ! are thrown). See also https://en.wikibooks.org/wiki/LaTeX/Errors_and_Warnings#Error_messages Also the TeXbook indicates that error messages start with the exclamation mark.

Thus, I believe it's an unfortunate decision by TikZ to emit a warnings that starts with an exclamation mark. Also other TeX editors (I tried AUCTeX, TeXstudio and Texworks) have the same issue here. This could be fixed in AUCTeX (but it's very tricky, because there are several different error messages starting with an exclamation mark and there are several places in AUCTeX's code where ! is assumed to start an error message), but emitting warnings compliant with long-standing habits would alleviate the pain of front-end developers.


For this particular case, the warning can be avoided by using the option suggested in the message:

\tikzexternalize[prefix=tikz/,up to date check=diff]
  • Thank you for the detailed response. I guess I will just ignore this particular "error" going ahead. – user10050 May 29 '17 at 15:23
  • 1
    I looked into fixing the issue, but the problem is that the only thing that error messages have in common is the initial exclamation mark, so it isn't possible to narrow the regexp more than ^!. I'm sorry for the issue. – giordano May 29 '17 at 15:32
  • Not at all your fault. In fact you have been a great help. I will try to report this bug to the Tikz developers instead. – user10050 May 30 '17 at 2:03
  • 1
    For anyone else facing this issue, I am using the workaround up to date check = diff to avoid the above warning and corresponding error. – user10050 May 30 '17 at 6:18
  • 1
    Reported. See sourceforge.net/p/pgf/bugs/427 – user10050 Jun 1 '17 at 5:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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