The `showframe` option does not correctly draw frames for the marginpar when using the `reversemarginpar` option
merijn opened this issue · 1 comments
merijn commented
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 commented
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