This minimal example produces an error (undefined control sequences):

% !TEX TS-program = pdflatexmk






Once the tikz package is removed, it compiles fine. Removing either usepackage commands allows the program to compile. Moreover, including both, but adding the [active] option to preview allows the script to compile.

I've pasted the log file here.

  • I looked at the documentation. if I call preview.sty with \usepackage[active]{preview}, it does run. – sgmoye Sep 22 '14 at 13:25
  • @sgmoye: as I noted in the post, calling with active runs, but preview should work without. – TSGM Sep 22 '14 at 13:49
  • @UlrikeFischer: forgive for the question, but I can't seem to locate the pfgutil-latex.def file I'm supposed to edit. – TSGM Sep 22 '14 at 13:50
  • Run kpsewhich pgfutil-latex.def on the command line. – Ulrike Fischer Sep 22 '14 at 13:57

Ulrike Fischer has noted that this is a current bug report listed here and here. I include a short guide so as to preserve the suggested solution.

Run kpsewhich pgfutil-latex.def on the command line to detect the location of the def file. Search for an \AtBeginDocument command that addresses the preview package. Change the previous codeblock to the following:

% Ok, package loaded. Swap definitions of everyshi.sty's shipout
% and preview.sty's shipout:
\let\shipout\@EveryShipout@Org@Shipout%This is the null version of \shipout, created by preview and saved by everyshi
\let\@EveryShipout@Org@Shipout\pr@shipout% This is the original shipout
| improve this answer | |

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.