Reputation:
My code gives me two images on top of eachother on one page.
\documentclass{article}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\begin{document}
\begin{figure}[H]
\includegraphics{cow1}
\caption{foo}
\label{fig:cow1}
\end{figure}
\begin{figure}[H]
\includegraphics{cow2}
\caption{bar}
\label{fig:cow2}
\end{figure}
\end{document}
I want this:
How do I get a frame around the figures?
Upvotes: 2
Views: 6295
Reputation: 38783
\documentclass{article}
\usepackage{graphicx}
\usepackage{caption}
\graphicspath{ {./images/} }
\begin{document}
\fbox{
\parbox[c]{\textwidth}{
\centering
\includegraphics{example-image-duck}
\captionof{figure}{foo}
\label{fig:cow1}
\includegraphics{example-image-duck}
\captionof{figure}{bar}
\label{fig:cow2}
}}
\end{document}
Upvotes: 3