I have two Tikz diagrams - let's denote their code by $D$ and $D'$. Now I want to display them in a row, so I put them in align. That is I write
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{align}
D & & D'
\end{align*}
\end{document}
In addition I would like to put a caption under each diagram. I tried to use the caption software, but doesn't seem to work in the align environment. How can I fix this?
align
environment? Are your TikZ diagrams actually equations? If not just write them without a blank line (→ new paragraph) between them. Horizontal alignment can be adjusted with thecenter
environment or the\centering
command inside afigure
environment, theminipage
environment (or even with TikZ itself). Thesubcaption
package or related ones can help with adding captions to each diagram. There are many Qs about this on this site.\includegraphics
by yourTiKZ
figures and you will get it.