我有一个包含两个数字的数字:
\begin{figure*}
\begin{center}
\subfigure[A]{
\begin{tikzpicture}
....
\end{tikzpicture}
}
\quad
\subfigure[B]{
\begin{tikzpicture}
....
\end{tikzpicture}
}
\end{center}
\end{figure*}
谁能告诉我如何在它们之间添加一条垂直线以在视觉上将它们分开?
答案1
遵循 percusse 和 egreg 的建议:
\documentclass{article}
\usepackage{tikz}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\centering
\begin{tabular}{c|c}
\begin{subfigure}[b]{0.45\textwidth}
\centering
\begin{tikzpicture}
\fill[red] (0,0) rectangle (3,3);
\end{tikzpicture}
\caption{A red square}
\label{fig:red_square}
\end{subfigure}
&
\begin{subfigure}[b]{0.45\textwidth}
\centering
\begin{tikzpicture}
\fill[blue] (0,0) rectangle (3,3);
\end{tikzpicture}
\caption{A blue square}
\label{fig:blue_square}
\end{subfigure}
\end{tabular}
\caption{Two squares}
\label{fig:two_squares}
\end{figure}
\end{document}