1

I have a wrapfigure, and as shown on the image below, the image and the caption go outside of the page and overlap the space where the page number is. Is there a way to fix it?

image overflowing the page and going near the page number

Minimal reproducible example (with lipsum text and blank image)

\documentclass[a4paper,12pt]{article}

\usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english,russian,ukrainian]{babel} \usepackage[a4paper,top=1.3cm,bottom=2cm,left=1.5cm,right=1.5cm,marginparwidth=0.75cm]{geometry} \usepackage[utf8]{inputenc} \usepackage[OT1]{fontenc} \usepackage{graphicx, wrapfig, float} \usepackage{subfigure} \usepackage{lipsum}

\graphicspath{ {./images/} }

\begin{document}

\lipsum[150]\lipsum[150]\lipsum[150]\lipsum[150]\lipsum[150]\lipsum[150]\lipsum[150]\lipsum[150]

\subsection{subsection}

\begin{wrapfigure}{l}{0pt} \centering \rule{8cm}{8cm} \caption{image} \end{wrapfigure}

\lipsum[150]

\end{document}

1 Answers1

3

It is usually best to move wrapfig by hand in the source so it ends up in a "good" position, however it does support moving at a page break to avoid this problem if you use uppercase position. So {L} here not {l}. The image goes to the next page in this example.

enter image description here

Alternatively you can adjust the size and position here just by eye, stealing as much space above and below as possible.

enter image description here

\documentclass[a4paper,12pt]{article}

\usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english,russian,ukrainian]{babel} \usepackage[a4paper,top=1.3cm,bottom=2cm,left=1.5cm,right=1.5cm,marginparwidth=0.75cm]{geometry} \usepackage[utf8]{inputenc} \usepackage[OT1]{fontenc} \usepackage{graphicx, wrapfig, float} \usepackage{subfigure} \usepackage{lipsum}

\graphicspath{ {./images/} }

\begin{document}

\lipsum[150]\lipsum[150]\lipsum[150]\lipsum[150]\lipsum[150]\lipsum[150]\lipsum[150]\lipsum[150]

\subsection{subsection}

\begin{wrapfigure}{l}{0pt} \centering \raisebox{-1.2cm}[3cm]{\rule{8cm}{5cm}} \caption{image} \end{wrapfigure}

\lipsum[150]

\end{document}

David Carlisle
  • 757,742