1

When I set my geometry like displayed below, the ''test test test' tekst is displayed at the reverse marginpart, however the showframe doesnt adjust correctly.

I tried this simple code for a more complex document. When I use this same method with for instance images, overfull \hbox errors occur, which made me think the reversemp isnt working correctly.

Does somebody know how to correctly set the geometry in such a way that for my single side document the margin part is displayed on the left side for all pages and also shown by the showframe???

Thanks in advance

\documentclass{scrreprt}

\usepackage[
        includemp,
        showframe,
        reversemp,
        paperwidth=20.10cm,
        paperheight=25.80cm,
        top=2.30cm,
        bottom=3.4cm,
        inner=2.7cm,
        outer=2.7cm,
        marginparwidth=1.6cm, % Fixed for now
        marginparsep=0.4cm
        ]{geometry}

\begin{document}

\marginpar{test test test}

\end{document}

showframe

0

geometry doesn't support this. But it can draw the lines on both sides, if the option twoside is given. Looking into the code reveals, that the internal macros \Gm@vrules@mpi and \Gm@vrules@mpii are used to draw the vertical lines. The first for right marginpars the second for left ones. By adding

\makeatletter
\let\Gm@vrules@mpi\Gm@vrules@mpii
\makeatother

to the preamble, geometry can be persuaded to draw the marginpar on the left.

Note: this is a hack, which may cease to work with future versions of geometry. And with it the lines for marginpars are now only draw on the left, even with the option twoside.

Complete code:

\documentclass{scrreprt}

\usepackage[
        includemp,
        showframe,
        reversemp,
        paperwidth=20.10cm,
        paperheight=25.80cm,
        top=2.30cm,
        bottom=3.4cm,
        inner=2.7cm,
        outer=2.7cm,
        marginparwidth=1.6cm, % Fixed for now
        marginparsep=0.4cm
        ]{geometry}

% added
\makeatletter
\let\Gm@vrules@mpi\Gm@vrules@mpii
\makeatother

\begin{document}

\marginpar{test test test}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.