Skip to content

The showframe option does not correctly draw frames for the marginpar when using the reversemarginpar option #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
merijn opened this issue Mar 13, 2023 · 1 comment

Comments

@merijn
Copy link

merijn commented Mar 13, 2023

When using the reversemarginpar option, the frames for the marginpar are shown in the original position, rather than the reversed position. This seems to be a simple oversight caused by the frame code (https://github.com/LaTeX-Package-Repositories/geometry/blob/main/geometry.dtx#L3418-L3460) not checking the reversemarginpar option.

@merijn
Copy link
Author

merijn commented Mar 13, 2023

Quick workaround that patches the margin frames with a conditional on reversemarginpar until this can be fixed inside geometry:

\makeatletter
\newcommand*{\leftmarginframe}{}
\newcommand*{\rightmarginframe}{}
\let\rightmarginframe\Gm@vrules@mpi{}
\let\leftmarginframe\Gm@vrules@mpii{}
\renewcommand*{\Gm@vrules@mpi}{%
\if@reversemargin{}
    \leftmarginframe{}
\else
    \rightmarginframe{}
\fi}
\renewcommand*{\Gm@vrules@mpii}{%
\if@reversemargin{}
    \rightmarginframe{}
\else
    \leftmarginframe{}
\fi}
\makeatother

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant