I am also posting my solution. Please save your time and energy on this Question!
I have experienced a strange behavior after upgrading TikZ 2 to TikZ 3 when loading and using the TikZ and PSTricks packages (via auto-pst-pdf
) at the same time. Please consider this situation of generating barcodes.
%! latex or pdflatex or xelatex or lualatex
%! with ----shell-escape or --enable-write18
%! bug0001-problem.tex
\documentclass[a4paper]{article}
\pagestyle{empty}
\usepackage{pst-barcode}
\usepackage{auto-pst-pdf}
\usepackage{tikz}
\begin{document}
My first barcode is:\par
\begin{pspicture}(3,1in)
\psbarcode{978-80-87106-00-6}{includetext guardwhitespace}{isbn}
\end{pspicture}\par
My first QR code is:\par
\begin{pspicture}(1,1in)
\psbarcode{http://www.cstug.cz/}{}{qrcode}
\end{pspicture}\par
\begin{tikzpicture}
\node{Hello World!};
\end{tikzpicture}
\end{document}
I had no problem when using TikZ 2, but I got this error message with TikZ 3.
Error: /typecheck in --div--
Operand stack:
1 2 0.0 TeXcolorgray 65781.8
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1932 1 3 %oparray_pop 1931 1 3 %oparray_pop 1915 1 3 %oparray_pop 1803 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- --nostringval-- 5 --nostringval-- %repeat_continue --nostringval--
Dictionary stack:
--dict:1180/1684(ro)(G)-- --dict:0/20(G)-- --dict:126/200(L)-- --dict:179/300(L)--
Current allocation mode is local
Current file position is 601489
GPL Ghostscript 9.10: Unrecoverable error, exit code 1
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
==> 2 pages written on `bug0001-problem-pics.pdf'.
I am still tracking down the problem I experienced in a real project: I haven't got the barcodes at all. The realproject.pdf
file was empty and therefore pdfcrop
generated an error and there was no cropped version of the PDF file. My project is huge, so I wasn't able to emulate my real situation on a small scale yet. If I do, I'll extend this Question. Still, I couldn't hand over the TeX code generating this sort of error to a TeXist/publisher, because I wasn't able to hide it by \batchmode
or \nonstopmode
.
My question is: How to fix it when TikZ 3 is loaded to get no error message of this kind as in TikZ 2?