Half of a commutative diagram (tikz-cd
) is missing in the output. The rendering tool is pdflatex
. The problem occurs when:
- The documentclass is standalone.
- The
tikz-cd
diagram is embedded in a tikzpicture.
Example:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{cd}
\begin{document}
\begin{tikzpicture}
\begin{tikzcd}
A \arrow{r}{a} \arrow{d}{b} & B \arrow{d}{c} \\
C \arrow{r}{d} & D
\end{tikzcd}
\end{tikzpicture}
\end{document}
Apparently embedding a tikzcd diagram inside a tikzpicture environment introduces an unexpected indent that the standalone documentclass does not account for.
This is a problem for us, since we're using a setup to support tikzpictures in a vBulletin math forum. It recognizes \begin{tikzpicture}...\end{tikzpicture}
as the markers that define the picture, and replaces it with a .svgz picture. As a math forum we also want to support commutative diagrams from the cd
tikzlibrary. Since that apparently requires a toplevel tikzcd environment that doesn't fit into the structure.
What is causing the unexpected indent? And more importantly, how can we ensure that the diagram is rendered properly? That is, how can we get rid of the unexpected indent while still embedding the commutative diagram in a tikzpicture environment?