Time for action – embedding a picture within text
We shall modify our picture embedding an example. We would like the picture to appear on the left side, accompanied by the body text on the right side:
In our example, additionally load the
wrapfig
package:\documentclass[a5paper]{article} \usepackage[english]{babel} \usepackage{blindtext} \usepackage[demo]{graphicx} \usepackage{wrapfig} \pagestyle{empty} \begin{document}
Begin an unnumbered section, place a
wrapfig
environment within some filler text:\section*{Text flowing around a picture} \blindtext \begin{wrapfigure}{l}{4.4cm} \includegraphics[width=4.4cm]{test} \caption{Test figure} \end{wrapfigure} \blindtext \end{document}
Typeset and look:
What just happened?
The wrapfigure
environment understands parameters other than the figure
environment. We used just two of them. If you need more, here's the complete definition:
\begin{wrapfigure}[number of lines]{placement}[overhang] {width}
The first optional argument states the number of wrapped text...