\documentclass{article}
\usepackage{subcaption,graphics}
\usepackage{color}
\newcommand{\rulesep}{\color{blue} \unskip\ \vrule\ } \begin{document}
\begin{figure*}[ht!]
\begin{subfigure}[t]{0.32\textwidth}
\includegraphics[width=\textwidth]{universe}
\end{subfigure}
\rulesep
\begin{subfigure}[t]{0.32\textwidth}
\includegraphics[width=\textwidth]{universe}
\end{subfigure}
\caption{set vertical dashed rule between image ?}
\end{figure*}
\end{document}
这里添加的代码垂直规则。我改变了颜色,但还需要改变样式和厚度。
答案1
使用数组、arydshln 和 colortbl :
\documentclass{article}
\usepackage{array, colortbl}
\usepackage{subcaption,graphics}
\usepackage{arydshln}
\newcommand{\rulesep}{\color{blue} \unskip\ \vrule\ } \begin{document}
\begin{figure*}[ht!]
\begin{tabular}{>{\arrayrulecolor{blue}}c:c}
\begin{subfigure}[t]{0.32\textwidth}
\includegraphics[width=\textwidth]{universe}
\end{subfigure}&
\begin{subfigure}[t]{0.32\textwidth}
\includegraphics[width=\textwidth]{universe}
\end{subfigure}
\end{tabular}
\caption{set vertical dashed rule between image ?}
\end{figure*}
\end{document}
答案2
这是我目前所拥有的。
\documentclass{article}
\usepackage{subcaption,graphicx}
\usepackage{tikz}
\begin{document}
\begin{figure*}[ht!]
\begin{tabular}{ccc}
\begin{subfigure}[t]{0.32\textwidth}
\includegraphics[width=\textwidth]{universe.png}
\end{subfigure} & \tikz{\draw[-,blue, densely dashed, thick](0,-1.05) -- (0,1.05);} &
\begin{subfigure}[t]{0.32\textwidth}
\includegraphics[width=\textwidth]{universe.png}
\end{subfigure}
\end{tabular}
\caption{set vertical dashed rule between image ?}
\end{figure*}
\end{document}
不幸的是,在这个版本中,必须知道 png 图片的高度。我无法在 LaTeX 中计算这些图片的高度。'