I have a standalone
document of the form:
\documentclass[tikz]{standalone}
%\documentclass{article}
%\usepackage{tikz}
\usetikzlibrary{positioning}
\newcommand{\tikzmark}[2]{\tikz[remember picture, baseline] \node[inner sep=0pt, outer sep=0pt, anchor=base] (#1) {#2};}
\begin{document}
\begin{tikzpicture}[remember picture]
\node (A) {
\begin{tabular}{ll}
1 & \tikzmark{two}{2} \\
3 & 4 \\
\end{tabular}};
\node[right=of A] (B) {
\begin{tabular}{ll}
5 & 6 \\
\tikzmark{seven}{7} & 8 \\
\end{tabular}};
\end{tikzpicture}
\begin{tikzpicture}[remember picture, overlay]
\draw[->] (two) -- (seven);
\end{tikzpicture}
\end{document}
The contents are displayed correctly when using the article
documentclass
instead of standalone
.
Can anyone suggest how to make it so that the contents of all tikzpicture
s are displayed?
pdflatex
to put everytikzpicture
on a separate page of the document. Do you want all yourtikzpictures
on one page?tikzpicture
s fit on a single page. Some of the contents of the second and third ones are overlaid on the first. I have tried\documentclass[tikz=true]{standalone}
, but this isn't displaying the contents correctly, either.tikzpicture
s. Put all drawing inside a singletikzpicture
environment.standalone
produces one page pertikzpicture
environment you are using (by design).\documentclass{standalone} \usepackage{tikz}
and not\documentclass[tikz]{standalone}
as this separates thetikzpictures
on single pages. As @HarishKumar says, don't use differenttikzpicture
s, try to usescopes
in onetikzpicture
instead.tikzicture
s is that inside the firsttikzpicture
, there are tabular environments, some of the elements of which are inline\tikz
s. These elements cannot be referred to in the containingtikzpicture
. They are referred to in the followingtikzpicture
s. On the preamble: The last thing I tried was\documentclass[multi=tikzpicture, ignorerest=true]{standalone} \usepackage{tikz}
, again to no avail.