I'm trying to place some pictures inside my text using the wrapfig package of Donald Arseneau with KOMAscript of Markus Kohm. The intention is to place the pictures partly in the margin area at the outer side of a twosided document.
According to the package documentation I have to set the placement
parameter value to the capital letter O
to gain the outside edge–far from the binding, and the overhang
parameter to a value of how much the figure should hang out into the margin.
That's what I have done in the attached minimum working example. As you can see in the attached picture, this works fine on odd pages, but the picture is misplaced on even pages.
Additional it seems that the overhang
parameter — different from the manual's description — specifies the value how much the figure should hang into the text (not the margin).
Is it my fault, or a bug in the package?
\documentclass[twoside]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{blindtext}
\begin{document}
\section{Hello, World!}
\Blindtext
\begin{wrapfigure}{O}{1cm}
\includegraphics[width=3cm]{qr}
\end{wrapfigure}
\Blindtext
\blindtext
\begin{wrapfigure}{O}{1cm}
\includegraphics[width=3cm]{qr}
\end{wrapfigure}
\Blindtext
\end{document}
Best Answer
I can make out that you have seen the manual, but still have a look at this:
Now in this:
you haven't specified the
overhang
but the width as1cm
and putting a picture ofwidth=3cm
.Let us correct it:
Here
overhang
is1cm
and total width is3cm
.The code: