0
\documentclass{article}
\usepackage{graphicx}
\usepackage{fancybox}
\graphicspath{ {d:/pics/} }
\begin{document}
\begin{figure}
\fbox{\centerline{\includegraphics[scale=0.25]{example-image-a}}}
\caption{Picture 1}
\vspace{1in}
\shadowbox{\centerline{\includegraphics[scale=0.25]{example-image-a}}}
\caption{Picture 2}
\end{figure}
\end{document}

I'm trying to wrap the picture with a box. I want to know how to change the size of the box itself.

1
  • \fboxsep is the distance from the contents to the frame. \fboxrule is the line thickness used. – John Kormylo Jan 19 at 17:26
0

Hello and welcome to Tex. For the first one I would just recommend framebox(){}. For the shadowbox just delete the \centerline and add \centering right after \begin{figure}. see code below. is that what you wanted?

\documentclass{article}

\usepackage{graphicx}
\usepackage{fancybox}
\graphicspath{ {d:/pics/} }
\begin{document}
\begin{figure}
    \centering
\framebox(90,70){{\includegraphics[scale=0.25]{example-image-a}}}
\caption{Picture 1}
\vspace{1in}
\shadowbox{{\includegraphics[scale=0.25]{example-image-a}}}
\caption{Picture 2}
\end{figure}

\end{document}

enter image description here

1
  • Exactly what i want thanks! – Kain Jan 19 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.