When I wrap my text around a figure I cannot get it to wrap around the correct text. Basically, I want to have the text in the section the figure is in wrap around it, but when I compile it my figure ends up being farther down the page next to text in another section. 1. How do I change this? 2. (kind of a minor point) How do I make the label for the caption, such as "Figure 1.", bold?
\usepackage{graphicx}
\usepackage{wrapfig}
...
\begin{wrapfigure}{r}{40mm}
\begin{center}
\includegraphics[scale=0.5]{image}
\end{center}
\caption{This is the image.}
\end{wrapfigure}
Question #1
It may depend on the fact that the width specified as the option of \includegraphics
may be greater than the width specified at the beginning of the wrapfigure
environment.
It is always better to specify widths in relation to the \textwidth
.
Furthermore, since the wrapfig box is slightly larger than the figure box, it should always be a little larger:
\begin{wrapfigure}{r}{.3\textwidth}
\centering
\includegraphics[width=.27\textwidth]{image}
\caption{This is the image.}
\end{wrapfigure}
Question #2
Using the caption
package, you can change the layout of the labels as you prefer. If you just want them to be bold, type in your preamble:
\usepackage[labelfont=bf]{caption}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With