Menu

#442 `latex` and `pdflatex` produce different colors given the same TikZ picture

v1.0 (example)
open
nobody
None
5
2017-08-06
2017-08-06
Evan Aad
No

Consider the following LaTeX manuscript featuring a TikZ picture* containing an empty, red-bordered node placed at the picture's origin.

\documentclass{article}
\usepackage{tikz}
\begin{document}
    \tikz \path[draw=red] (0,0) node[draw] {};
\end{document}

When this manuscript is compiled with pdflatex the result is a pdf file with a picture of a red square, as expected. However, when the same manuscript is compiled with latex the result is a dvi file with a picture of a black square.

When the node is replaced by a line segment:

\tikz path[draw=red] (0,0) -- (1,0);

both pdf and dvi look the same, showing a red line segment, as expected.


This bug was first posed as a question on tex.stackexchange (tex.stackexchange.com), and the concensus was that this was a bug.

Discussion

Monday.com Logo