[Tex/LaTex] Tikz with positioning does not work with DVI

dvipositioningtikz-pgf

I have the following Tikz picture:

\begin{tikzpicture}
  \node (a) {A};
  \node [below=2cm of a] (b) {B};
\end{tikzpicture}

When I compile this code with PDF-LaTeX, I get the expected result: "B" appears 2 cm below "A".

When I compile the exact same code with plain LaTeX, in the DVI file, "A" and "B" are in the same position, mashed together. In the PS file, after another re-compilation, they appear correctly again.

Is there some way or workaround to work with PGF/Tikz with positioning straight with the DVI preview?

Best Answer

I take it you mean that after dvips the PostScript file looks okay. In that case, you are seeing the expected behaviour. When working in DVI mode, PostScript specials are used for effects that TeX does not support directly. This includes absolute positioning, rotation, scaling and so on. However, DVI viewers do not interpret these specials (unless they do some PostScript breaking out), and so show only the unmodified results. So you will not see these effects until you convert to PostScript.

Related Question