1
\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}

here the code of adding vertical rule. I changed the color, but I need to change also the style and thickness.

enter image description here

LearnToGrow
  • 2,579

2 Answers2

3

This is what I have so far.

\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}

enter image description here

Unfortunately, in this version one has to know the height of the png pictures. I was unable to compute the height of these in LaTeX. '

1

With array, arydshln and 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}