diff options
author | Karl Berry <karl@freefriends.org> | 2010-01-06 23:41:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-01-06 23:41:34 +0000 |
commit | 0d4d31d35388bef68b087a7f7f16089aedcc0ac6 (patch) | |
tree | 91f8d0426812e89ca5f21019fa67be37cf1bf6fb /Master/texmf-dist/tex/latex/marginnote | |
parent | 951d70130d982d0e20580fc0f85046e20ebca56b (diff) |
marginnote update (6jan10)
git-svn-id: svn://tug.org/texlive/trunk@16624 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/marginnote')
-rw-r--r-- | Master/texmf-dist/tex/latex/marginnote/marginnote.sty | 75 |
1 files changed, 58 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/marginnote/marginnote.sty b/Master/texmf-dist/tex/latex/marginnote/marginnote.sty index c03e5406bd6..0908db41ad9 100644 --- a/Master/texmf-dist/tex/latex/marginnote/marginnote.sty +++ b/Master/texmf-dist/tex/latex/marginnote/marginnote.sty @@ -12,7 +12,7 @@ %% without the source ot the work. See below about more informations %% about the files the work consists of. %% -%% Copyright (c) Markus Kohm 2005-2009 +%% Copyright (c) Markus Kohm 2005-2010 %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -35,7 +35,7 @@ %% the Work (see ``Important Recommendations'' at lppl.txt). %% \ProvidesPackage{marginnote}[% - 2009/05/06 v1.1d non floating margin notes for LaTeX] + 2010/01/05 v1.1f non floating margin notes for LaTeX] \begingroup \def\@tempb{}% \def\@tempa{% @@ -63,7 +63,57 @@ \newif\if@mn@verbose\@mn@verbosetrue \DeclareOption{verbose}{\@mn@verbosetrue} \DeclareOption{quiet}{\@mn@verbosefalse} -\ExecuteOptions{verbose} +\newcommand*{\mn@strut}{} +\newcommand{\mn@zbox}[1]{} +\DeclareOption{fulladjust}{% + \renewcommand*{\mn@strut}{\strut}% + \renewcommand{\mn@zbox}[1]{% + \bgroup + \setbox\@tempboxa\vbox{#1}% + \ht\@tempboxa\ht\strutbox + \dp\@tempboxa\dp\strutbox + \wd\@tempboxa\z@ + \box\@tempboxa + \egroup + }% +} +\DeclareOption{heightadjust}{% + \renewcommand*{\mn@strut}{\begingroup\dp\strutbox\z@\strut\endgroup}% + \renewcommand{\mn@zbox}[1]{% + \bgroup + \setbox\@tempboxa\vbox{#1}% + \ht\@tempboxa\ht\strutbox + \dp\@tempboxa\dp\z@ + \wd\@tempboxa\z@ + \box\@tempboxa + \egroup + }% +} +\DeclareOption{depthadjust}{% + \renewcommand*{\mn@strut}{\begingroup\ht\strutbox\z@\strut\endgroup}% + \renewcommand{\mn@zbox}[1]{% + \bgroup + \setbox\@tempboxa\vbox{#1}% + \ht\@tempboxa\ht\z@ + \dp\@tempboxa\dp\strutbox + \wd\@tempboxa\z@ + \box\@tempboxa + \egroup + }% +} +\DeclareOption{noadjust}{% + \renewcommand*{\mn@strut}{\relax}% + \renewcommand{\mn@zbox}[1]{% + \bgroup + \setbox\@tempboxa\vbox{\kern-\ht\strutbox #1}% + \ht\@tempboxa\ht\z@ + \dp\@tempboxa\dp\z@ + \wd\@tempboxa\z@ + \box\@tempboxa + \egroup + }% +} +\ExecuteOptions{verbose,fulladjust} \ProcessOptions\relax \newcommand*{\newmarginnote}{\@newl@bel{mn}} \newif\if@mn@pdfmode\@mn@pdfmodefalse @@ -223,9 +273,9 @@ \newcommand{\@mn@@@marginnote}{} \def\@mn@@@marginnote[#1]#2[#3]{% \begingroup - \ifmmode\strut\let\@tempa\mn@vadjust\else + \ifmmode\mn@strut\let\@tempa\mn@vadjust\else \if@inlabel\leavevmode\fi - \ifhmode\strut\let\@tempa\mn@vadjust\else\let\@tempa\mn@vlap\fi + \ifhmode\mn@strut\let\@tempa\mn@vadjust\else\let\@tempa\mn@vlap\fi \fi \@tempa{% \vbox to\z@{% @@ -255,7 +305,7 @@ \else \if@mn@verbose \PackageInfo{marginnote}{% - xpos seams to be \@mn@currxpos,\MessageBreak + xpos seems to be \@mn@currxpos,\MessageBreak \string\marginnoterightadjust \space ignored}% \fi @@ -285,7 +335,7 @@ }% \else \llap{% - \vbox to\z@{\kern #3 + \vbox to\z@{\kern\marginnotevadjust\kern #3 \vbox to\z@{% \hsize\marginparwidth \kern-\parskip @@ -309,7 +359,7 @@ \else \if@mn@verbose \PackageInfo{marginnote}{% - xpos seams to be \@mn@currxpos,\MessageBreak + xpos seems to be \@mn@currxpos,\MessageBreak \string\marginnoteleftadjust \space ignored}% \fi @@ -344,15 +394,6 @@ \setbox\@tempboxa\vbox to \ht\strutbox{#1\vss}% \box\@tempboxa\vskip-\baselineskip } -\newcommand{\mn@zbox}[1]{% - \bgroup - \setbox\@tempboxa\vbox{#1}% - \ht\@tempboxa\ht\strutbox - \dp\@tempboxa\dp\strutbox - \wd\@tempboxa\z@ - \box\@tempboxa - \egroup -} \newcommand{\mn@vadjust}[1]{% \mn@zbox{\kern-\parskip \leavevmode\vadjust{#1}% |