diff --git a/arbeitsanweisung/vl-arbeitsanweisung.cls b/arbeitsanweisung/vl-arbeitsanweisung.cls index 71918e2a21568b01439abbb6f1002a5e1934e910..a6f47cead865e89fbc64cc5dde027c028c743beb 100644 --- a/arbeitsanweisung/vl-arbeitsanweisung.cls +++ b/arbeitsanweisung/vl-arbeitsanweisung.cls @@ -19,7 +19,8 @@ \RequirePackage[% paper=a4paper, headheight=16mm, -marginparwidth=5mm, +marginparsep=2mm, +marginparwidth=12mm, left=22mm, right=16mm, textheight=228mm, @@ -254,10 +255,51 @@ footskip=25mm, ,tocnumwidth=3.5em ]{section} +\RequirePackage{marginnote} +\DeclareRobustCommand\note{% + % Normalform = Horizontale Notiz; + % #1 = vertikale Verschiebung (ohne Einheit: Anzahl Zeilen) + % Sternform = Um 90 Grad gedrehte Notiz; + % #1 = Breite (ohne Einheit: Anzahl mm, ohne Angabe: 3\marginparwidth) + \@ifstar{\@tempswatrue\note@i}{\@tempswafalse\note@i}% +} + +\newcommand*\note@i[1][\z@]{% + \note@ii[#1]% +} + +\newcommand*\note@ii{} +\def\note@ii[#1]#2{% + \begingroup{} + \if@tempswa + \unitlength=1mm\relax + \else + \unitlength=\baselineskip + \fi + \@ovro#1\unitlength + \if@tempswa + \@ovri=\ifdim\@ovro=\z@ 3\marginparwidth\else\@ovro\fi + \@ovro=\z@ + \def\x{\rotatebox[origin=c]{90}{\makebox[0pt][c]{% + \parbox{\@ovri}{\baselineskip=0pt\RaggedRight\hspace{0pt}#2}}}}% + \else + \def\x{\baselineskip=0pt\RaggedRight\hspace{0pt}#2}% + \fi + \overfullrule=\z@ + \marginnote{\x}[\@ovro]% + \endgroup + \ignorespaces% problematisch! +} +% Für Parameter #1 Angabe mit und ohne Einheit ermöglichen. +\picture@redefine\note@ii{[&1]} + +\renewcommand*\marginfont{\normalfont\normalsize\itshape\color{red}} + \emergencystretch=3em % \raggedbottom +\RequirePackage{nameref} \RequirePackage[final]{hyperref} \endinput