1
\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. Commented Jan 19, 2021 at 17:26

1 Answer 1

1

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
    Commented Jan 19, 2021 at 15:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .