1

To see my issue, you will need an image at this path: ../images/a_random_image, presumably in a jpg or png format.

My issue is visible on page two of the resulting file generated by running pdflatex mwe.tex and can be described as:

(1) the wrapfig package is failing to play well with the multicol package, leading to my copy overwriting the image; and of more concern,

(2) the first several words of the copy intended to follow the image are wrapping to the right of the image, but are over-writing other copy placed in that space by the multicol package.

I'd really like to see the image at least this large, but am willing to sacrifice that and shrink it to the width of a single column IF I can resolve that second issue. But I'd love to sort out both issues, actually.

This is my mwe.tex file:

\documentclass[12pt]{report}

\usepackage[width=4.375in, height=7.0in, top=1.0in, papersize={5.5in,8.5in}]{geometry}
\usepackage[toc]{}
\usepackage{titlesec}
\usepackage{multicol}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{lipsum}

\begin{document}

\begin{multicols}{2}
\lipsum[5-8]
\end{multicols}

\begin{wrapfigure}{L}{0.70\textwidth}
    \includegraphics[width=.65\textwidth]{example-image}
    \caption{This is a roughly seven word caption.}
\end{wrapfigure}

\begin{multicols}{2}
\columnbreak
\lipsum[1-4]
\end{multicols}

\end{document}

enter image description here

Any guidance on how to resolve at least the second issue, but hopefully both of them would be appreciated!

Thanks, -- Hugh Esco

8
  • you could make a usable test file by using \includegraphics[width=.65\textwidth, height=whatever height you need to show the issue]{example-image} Dec 7, 2021 at 22:17
  • It is hard to guess your intent having multicols after a wrapfigure, the wrapfigure would need to be inside the multicols to do anything useful Dec 7, 2021 at 22:18
  • I edited your example as suggested above. if that is not the effect that you wanted to show then please adjust further and change the screenshot. Dec 7, 2021 at 22:24
  • 1
    Your image is 70% of the page width is your intention that it takes up all of the left column, and cuts in to half the right column with the text taking up the remaining half of the right column? That's possible but tricky and why not simply make the image full width and not use wrapfig at all? Dec 7, 2021 at 22:25
  • 1
    Originally I had intended to have the image span both columns, and to then resume the two-column layout. But that intention is getting balanced against a desire to not have this content run over to the next page. I have tried moving the wrapfig inside the multicol scope, it did not change the outcome.
    – Hugh Esco
    Dec 7, 2021 at 22:33

1 Answer 1

3

I would not use wrapfig at all here

enter image description here

\documentclass[12pt]{report}

\usepackage[width=4.375in, height=7.0in, top=1.0in, papersize={5.5in,8.5in}]{geometry}
\usepackage[toc]{}
\usepackage{titlesec}
\usepackage{multicol}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{lipsum}

\begin{document}

\begin{multicols}{2}
\lipsum[5-8]
\end{multicols}

\begin{figure}[htp]
\centering
    \includegraphics[width=.65\textwidth]{example-image}
    \caption{This is a roughly seven word caption.}
\end{figure}

\begin{multicols}{2}
\columnbreak
\lipsum[1-4]
\end{multicols}

\end{document}

If you really want wrapfig, you can force the layout:

enter image description here

\documentclass[12pt]{report}

\usepackage[width=4.375in, height=7.0in, top=1.0in, papersize={5.5in,8.5in}]{geometry}
\usepackage[toc]{}
\usepackage{titlesec}
\usepackage{multicol}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{lipsum}

\begin{document}

\begin{multicols}{2}
\lipsum[5-8]
\end{multicols}


\begin{multicols}{2}
\vspace*{14\baselineskip}
enough text enough text enough text
enough text enough text enough text
enough text enough text enough text
enough text enough text enough text
enough text enough text enough text
enough text enough text enough text

\columnbreak
\begin{wrapfigure}{l}[.5\textwidth]{.7\textwidth}
\centering
    \includegraphics[width=.65\textwidth]{example-image}
    \caption{This is a roughly seven word caption.}
\end{wrapfigure}

\lipsum[2-4]
\end{multicols}

\end{document}
4
  • David Carisle: I copied your wrapfig code as a local .tex file and ran pdflatex against it, but these are the results I got: drive.google.com/file/d/1FUADb2DqtSYZLEL053aw41rWEvHobZLV/… Not nearly so nice as yours. Any thoughts on what may be different from my own environment and yours?
    – Hugh Esco
    Dec 7, 2021 at 23:18
  • your g drive link is not public @HughEsco Dec 7, 2021 at 23:27
  • Sorry about that. Please try again with this link: drive.google.com/file/d/1FUADb2DqtSYZLEL053aw41rWEvHobZLV/…
    – Hugh Esco
    Dec 8, 2021 at 1:18
  • @HughEsco that is not the document that I posted here, you have used an image of a different size so naturally you need to adjust the space and text before the column break. As I commented originally under your question any answer would be highly dependent on the image size, you could have provided an example-image test document forcing the right size for your case with height and width keys however presumably your real text isn't lipsum either and so the exact adjustment requred to make the gap in the left column fall in the right place will always need adjustment Dec 8, 2021 at 8:03

You must log in to answer this question.

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