dagstuhl-publishing / styles

LaTeX Styles provided by Dagstuhl Publishing
LaTeX Project Public License v1.3c
33 stars 11 forks source link

LIPICs: enforcing \marginpar to the right side does not work. Ideas? #7

Open 5nizza opened 4 years ago

5nizza commented 4 years ago

hey,

The following trick to control where to put a margin text (on the left or on the right) does not work with the current LIPICs class style. Yet it does work with the style article (and even with [twosided]{article}). Do you have an idea what causes this?

Here is a side-by-side comparison: on the left -- the expected behaviour (article), on the right side -- lipics (notice the blue box goes left on the second page):

image

Here is a code snippet to re-produce this:

\documentclass[a4paper,english,svgnames,table]{lipics-v2019}
%\documentclass{article}

\usepackage{xcolor}
\usepackage{stackengine}
\usepackage{lipsum}
\usepackage{MnSymbol}
\usepackage{graphicx}

\newcommand*\mnote[3][0pt]{%
  \if l#2\reversemarginpar\def\pointer{\filledmedtriangleright}%
    \def\stackalignment{r}\fi%
  \if r#2\normalmarginpar\def\pointer{\filledmedtriangleleft}%
    \def\stackalignment{l}\fi%
  \marginpar{%
    \topinset{%
      \scalebox{1.5}{\textcolor{blue}{$\pointer$}}}{%
      \belowbaseline[-1.5\baselineskip-#1]{%
        \stackengine%
          {-5pt}%
          {\fcolorbox{blue}{white}{\parbox{1.8cm}%
            {\vspace{3pt}\raggedright#3}}}%
          {~\colorbox{white}{\sffamily Note}}%
          {O}%
          {l}%
          {F}%
          {F}%
          {S}%
        }%
      }{%
      3ex+#1}{%
      -2ex}%
  }%
}

\begin{document}
This is another test\mnote{r}{another mnote box test testing the right side}
\lipsum[50]

\clearpage
This is another test\mnote{r}{another mnote box test testing the right side}
\lipsum[50]

\clearpage
This is another test\mnote{r}{another mnote box test testing the right side}
\lipsum[50]

\clearpage
This is another test\mnote{r}{another mnote box test testing the right side}
\lipsum[50]

\end{document}
java7mike commented 4 years ago

(Sorry for the delayed response. For some reason, I didn't receive any notification.)

Unfortunately we have no experience with this problem either. \marginpar do not play a role in our everyday text typesetting and are not used. Therefore we cannot offer a solution at the moment. Maybe another user has an idea.