summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild/cdbuild/ctan2tds.pl13
-rw-r--r--Master/texmf-dist/doc/latex/marginnote/README39
-rw-r--r--Master/texmf-dist/doc/latex/marginnote/marginnote.pdfbin131622 -> 151129 bytes
-rw-r--r--Master/texmf-dist/source/latex/marginnote/README18
-rw-r--r--Master/texmf-dist/source/latex/marginnote/marginnote.dtx398
-rw-r--r--Master/texmf-dist/tex/latex/marginnote/marginnote.sty252
-rw-r--r--Master/texmf-dist/tpm/marginnote.tpm9
-rw-r--r--Master/texmf/lists/marginnote1
8 files changed, 532 insertions, 198 deletions
diff --git a/Build/cdbuild/ctan2tds.pl b/Build/cdbuild/ctan2tds.pl
index 03fb46f7573..50a43d28f51 100755
--- a/Build/cdbuild/ctan2tds.pl
+++ b/Build/cdbuild/ctan2tds.pl
@@ -195,7 +195,7 @@ chdir $startdir || die "chdir($startdir) failed: $!";
'makor', "&MAKEbase",
'manjutex', "&MAKEflatten",
'mathdesign', "&MAKEmathdesign",
- 'marginnote', "&MAKEcopy",
+ 'marginnote', "&MAKEunzip",
'mathmode', "&setup",
'mathpazo', "&MAKEmathpazo",
'metaobj', "&MAKEflatten",
@@ -1088,7 +1088,7 @@ sub MAKEcopy {
print "\t COPY from $packagedir to $dest\n";
- chdir ($packagedir) || die "chdir($packagedir) failed: $!";
+ &xchdir ($packagedir);
&SYSTEM ("mkdir -p $dest");
# do the copy.
@@ -1499,10 +1499,17 @@ sub MAKEflatten {
&donormal;
}
+# a ctan-ready zip file.
+sub MAKEunzip {
+ &SYSTEM("mkdir -p $DEST");
+ &xchdir ($DEST);
+ &SYSTEM ("unzip -q -o -a $startdir/$packagedir/$package*.zip");
+}
+
sub MAKEunzipandflatten {
&setup;
chdir("$DEST/doc/$whichdocformat/$package");
- &SYSTEM("unzip -o -a $package.zip; rm $package.zip");
+ &SYSTEM("unzip -q -o -a $package.zip; rm $package.zip");
&SYSTEM("$MV */*/*/*/* .; rmdir */*/*/*");
&SYSTEM("$MV */*/*/* .; rmdir */*/*");
&SYSTEM("$MV */*/*/* .; rmdir */*/*");
diff --git a/Master/texmf-dist/doc/latex/marginnote/README b/Master/texmf-dist/doc/latex/marginnote/README
deleted file mode 100644
index 4908a5c2239..00000000000
--- a/Master/texmf-dist/doc/latex/marginnote/README
+++ /dev/null
@@ -1,39 +0,0 @@
-----------------------------------------------------------------------------
-Package marginnote
-Copyright (c) Markus Kohm 2005-2006
-Licence: LPPL
-----------------------------------------------------------------------------
-This package provides the command \marginnote that may be used instead of
-\marginpar at almost every place, where \marginpar cannot be used, e.g.
-inside floats, footnotes, frames made with framed package ...
-----------------------------------------------------------------------------
-If you have a distribution of marginnote with an archive containing the
-files
-
- README
- doc/
- doc/latex/
- doc/latex/marginnote/
- doc/latex/marginnote/marginnote.pdf
- source/
- source/latex/
- source/latex/marginnote/
- source/latex/marginnote/marginnote.dtx
- source/latex/marginnote/marginnote.ins
- source/latex/marginnote/README
- tex/
- tex/latex/
- tex/latex/marginnote/
- tex/latex/marginnote/marginnote.sty
-
-you may simply extract this archive at your local texmf tree (local TDS
-tree) that may be e.g. C:\localtexmf or /usr/local/share/texmf or
-/usr/TeX/texmf-local. You may not extract the low level README file or
-remove it after extraction. After this update your FileName DataBase e.g.
-using the MiKTeX Options dialog or texhash.
-
-If you instead of this have one the files marginnote.dtx, marginnote.ins
-marginnote.pdf (optional) and README, you have to call:
- tex marginnote.ist
-and follow the instructions.
-----------------------------------------------------------------------------
diff --git a/Master/texmf-dist/doc/latex/marginnote/marginnote.pdf b/Master/texmf-dist/doc/latex/marginnote/marginnote.pdf
index 2e7a9aef593..9ad5a79496d 100644
--- a/Master/texmf-dist/doc/latex/marginnote/marginnote.pdf
+++ b/Master/texmf-dist/doc/latex/marginnote/marginnote.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/marginnote/README b/Master/texmf-dist/source/latex/marginnote/README
index 4908a5c2239..ec57f89502b 100644
--- a/Master/texmf-dist/source/latex/marginnote/README
+++ b/Master/texmf-dist/source/latex/marginnote/README
@@ -10,7 +10,6 @@ inside floats, footnotes, frames made with framed package ...
If you have a distribution of marginnote with an archive containing the
files
- README
doc/
doc/latex/
doc/latex/marginnote/
@@ -26,14 +25,19 @@ files
tex/latex/marginnote/
tex/latex/marginnote/marginnote.sty
-you may simply extract this archive at your local texmf tree (local TDS
-tree) that may be e.g. C:\localtexmf or /usr/local/share/texmf or
-/usr/TeX/texmf-local. You may not extract the low level README file or
-remove it after extraction. After this update your FileName DataBase e.g.
+you may simply extract this archive at your local texmf tree (local TDS tree)
+that may be e.g. C:\localtexmf or /usr/local/share/texmf or
+/usr/TeX/texmf-local. You may not extract the low level README file or should
+remove it after extraction. After this update your File Name DataBase e.g.
using the MiKTeX Options dialog or texhash.
-If you instead of this have one the files marginnote.dtx, marginnote.ins
+If the files are at a root directory marginnote the distributor has changed my
+original distribution archive and you have to copy the files yourself into
+the appropriate directories at one of your texmf trees and update your File
+Name DataBase.
+
+If you instead of this have only the files marginnote.dtx, marginnote.ins
marginnote.pdf (optional) and README, you have to call:
- tex marginnote.ist
+ tex marginnote.ins
and follow the instructions.
----------------------------------------------------------------------------
diff --git a/Master/texmf-dist/source/latex/marginnote/marginnote.dtx b/Master/texmf-dist/source/latex/marginnote/marginnote.dtx
index 88816bf93fb..0e8a0813382 100644
--- a/Master/texmf-dist/source/latex/marginnote/marginnote.dtx
+++ b/Master/texmf-dist/source/latex/marginnote/marginnote.dtx
@@ -1,4 +1,4 @@
-% \CheckSum{260}
+% \CheckSum{506}
% \iffalse meta-comment
%
% marginnote.dtx
@@ -27,7 +27,7 @@
%</driver>
%<package>\ProvidesPackage{marginnote}[%
%<*driver|package>
- 2006/02/06 v1.0a non floating margin notes for LaTeX]
+ 2006/10/26 v1.1 non floating margin notes for LaTeX]
%</driver|package>
%<*driver>
\documentclass{ltxdoc}
@@ -57,6 +57,7 @@
% \cs{marginpar}. But there might be other problems \dots
% \end{abstract}
%
+% \changes{v1.0b}{2006/14/03}{spelling fixes}
%
% \section{How to Use \textsf{marginnote} Package}
%
@@ -73,7 +74,7 @@
% kernel. Even \cs{reversemarginpar} will be considered. The note \meta{left}
% or \meta{right} will be put at the current vertical position. Second
% optional argument \meta{voffset} may be used to adjust the vertical position
-% of the margin note. Use a negativ dimension to move it up or a positiv
+% of the margin note. Use a negative dimension to move it up or a positive
% dimension to move it down.
%
% \DescribeMacro{\marginnoteleftadjust}
@@ -95,6 +96,33 @@
% at your preamble after loading package \textsf{framed} to fix the problem
% using \texttt{framed} environment.
%
+% NOTE: \cs{marginnoteleftadjust} and \cs{marginnoterightadjust} will be used
+% only, if the correct horizontal possition cannot determined using PDF\TeX{}
+% features (\cs{pdfsavepos} and \cs{pdflastxpos}). So if you are using
+% PDF\LaTeX{} with PDF output you will not need to use the example code above,
+% but you will need at least two PDF\LaTeX{} runs to get the correct
+% horizontal possitions of the margin notes.
+%
+% \DescribeMacro{\marginnotetextwidth}
+% Package \textsl{marginnote} needs to know the real width of the type area to
+% find the right margin. While some environments (e.g. thos of package
+% \textsl{framed}) change \cs{textwidth}, \textsl{marginnote} defines it's own
+% text width macro. If you change type area after \cs{begin\{document\}} you
+% should add
+% \begin{verbatim}
+% \edef\marginnotetextwidth{\the\textwidth}
+% \end{verbatim}\vskip-\baselineskip
+% after changing the type area. Maybe you should do this globally using
+% \verb|\xdef| instead of \verb|\edef|. Most users will never need to change
+% \cs{marginnotetextwidth}.
+%
+% \DescribeMacro{\marginnotevadjust}
+% At some environments the vertical adjustment of the margin note will be
+% wrong, e.g. one base line to low. In this case you may use the additional
+% optional argument of \cs{marginnote} at every usage of \cs{marginnote} or
+% redefine \cs{marginnotevadjust} at the begin of the environment. The default
+% definition is \texttt{0pt}.
+%
% \DescribeMacro{\raggedleftmarginnote}
% \DescribeMacro{\raggedrightmarginnote}
% These macros define how the margin note will be aligned. The defaults are:
@@ -138,7 +166,7 @@
%
% The command \cs{marginnote} uses \cs{strut} and \cs{vadjust} to put the
% margin note at the correct position. But under some circumstances this may
-% fail. You may adjust te vertical position of the margin note using the
+% fail. You may adjust the vertical position of the margin note using the
% second optional argument of \cs{marginnote}. Sometimes even the text outside
% \cs{marginnote} will be moved because of using \cs{marginnote}. There's
% currently no other solution for this problem then moving the \cs{marginnote}
@@ -156,6 +184,15 @@
% With math \cs{marginnote} may work or may not depending on the math
% environment.
%
+% If you are using PDF\LaTeX{} with PDF output and the horizontal possition of
+% a margin note is wrong, do one more PDF\LaTeX{} run.
+%
+% Sometimes lines are stretched vertically using \cs{marginnote}, e.g.\ if
+% you're using \cs{marginnote} at a list \emph{and} upper case umlauts like
+% ``\"U''. In this case \verb|\lineskiplimit=-\maxdimen| should help.
+%
+% You should not use \cs{marginnote} at the optional argument of \cs{item}.
+%
%
% \StopEventually{\PrintIndex\PrintChanges}
%
@@ -165,8 +202,20 @@
%<*package>
% \fi
%
-% First process the options (no options are defined).
+% First declare and process the options.
+%
+% \begin{macro}{\if@mn@verbose}
+% Use verbose output mode by default. But you may change this using option
+% \texttt{quiet}.
% \begin{macrocode}
+\newif\if@mn@verbose\@mn@verbosetrue
+\DeclareOption{verbose}{\@mn@verbosetrue}
+\DeclareOption{quiet}{\@mn@verbosefalse}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\ExecuteOptions{verbose}
\ProcessOptions\relax
% \end{macrocode}
%
@@ -181,11 +230,67 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\if@mn@pdfmode}
+% \changes{v1.1}{2006/10/23}{new switch}
+% We need to know, wether or not PDF\TeX{} is used. With PDF\TeX{} the
+% horizontal output possition may be detected using \cs{pdfsavepos} and
+% \cs{pdflastxpos}. So the relative position of the margin may be
+% calculated. Without PDF\TeX{} only manual adjustment is available. While PDF
+% mode or not may change before start of the document, setting up the switch
+% is delayed.
+% \begin{macrocode}
+\newif\if@mn@pdfmode\@mn@pdfmodefalse
+\AtBeginDocument{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname pdflastxpos\endcsname\relax\else
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname pdfoutput\endcsname\relax\else
+ \ifcase\pdfoutput\else\@mn@pdfmodetrue\fi
+ \fi
+ \fi
+ \if@mn@verbose
+ \if@mn@pdfmode
+ \PackageInfo{marginnote}{%
+ \string\pdfoutput\space not 0 and \string\pdflastxpos\space
+ available.\MessageBreak
+ Extended possition detection mode activated\@gobble
+ }%
+ \else
+ \PackageInfo{marginnote}{%
+ either \string\pdflastxpos\space or \string\pdfoutput\space not
+ available\MessageBreak
+ or \string\pdfoutput\space set to 0.\MessageBreak
+ Extended possition detection mode deactivated\@gobble
+ }%
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\marginnotetextwidth}
+% \changes{v1.1}{2006/10/23}{new macro}
+% Some environments change \cs{textwidth}. But at PDF mode we need to know the
+% real text width to find the right margin. So we use our own text width
+% macro. Sometimes it may be usefull if the user can set it up. Because of
+% this it is a user command.
+% \begin{macrocode}
+\newcommand*{\marginnotetextwidth}{}
+\let\marginnotetextwidth\textwidth
+\AtBeginDocument{\if@mn@pdfmode\edef\marginnotetextwidth{\the\textwidth}\fi}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@mn@margintest}
+% \changes{v1.1}{2006/10/23}{new PDF mode feature}
% \begin{macro}{\@mn@thispage}
% \begin{macro}{\@mn@atthispage}
+% \begin{macro}{\@mn@currpage}
+% \changes{v1.1}{2006/10/23}{new (internal)}
+% \begin{macro}{\@mn@currxpos}
+% \changes{v1.1}{2006/10/23}{new (internal)}
% \begin{macro}{mn@abspage}
-% Macro \cs{@margintest} does the complete test, which margin to use. The
+% Macro \cs{@mn@margintest} does the complete test, which margin to use. The
% result may be found at \cs{if@tempswa}. To avoid changes on the last page
% if there is a new note on the first page, try to count the notes by
% page. We know that this can not be successfull, but never the less it may
@@ -193,10 +298,15 @@
% of \cs{@mn@margintest}. \cs{@mn@atthispage} saves the number of margin
% note at this page. But we need to know the absolut page number to do
% this. So we increase the absolut page number \texttt{mn@abspage} at every
-% \cs{@outputpage}.
+% \cs{@outputpage}. \cs{@mn@currpage} is the page from the page label if
+% found. \cs{@mn@currxpos} is somehow special. Using PDF\TeX{} the real $x$
+% possition may be written with the page label and used to calculate the
+% correct horizontal offset. In this case \cs{marginnoteleftadjust} and
+% \cs{marginnoterightadjust} will not be used!
% \begin{macrocode}
\newcommand*{\@mn@thispage}{}
-\let\@mn@thispage\@empty
+\newcommand*{\@mn@currpage}{}
+\newcommand*{\@mn@currxpos}{}
\newcounter{mn@abspage}
\AtBeginDocument{\setcounter{mn@abspage}{1}%
\g@addto@macro\@outputpage{\stepcounter{mn@abspage}}}
@@ -218,38 +328,67 @@
\xdef\@mn@thispage{\themn@abspage}%
% \end{macrocode}
% Use the number of the page and the number of the margin note at this page
-% to save the real number of this page at the \texttt{aux} file.
-% \begin{macrocode}
- \protected@write\@auxout{\let\themn@abspage\relax}{%
- \string\newmarginnote{note.\@mn@thispage.\@mn@atthispage}{\themn@abspage}%
- }%
-% \end{macrocode}
-% If we are not in two side mode, we are on a odd page.
+% to save the real number of this page at the \texttt{aux} file. At PDF mode
+% save the current $x$ possition too.
% \begin{macrocode}
- \if@twoside
+ \let\@mn@currpage\relax
+ \let\@mn@currxpos\relax
+ \if@mn@pdfmode
+ \pdfsavepos
+ \protected@write\@auxout{\let\themn@abspage\relax}{%
+ \string\newmarginnote{note.\@mn@thispage.\@mn@atthispage}{%
+ {\themn@abspage}{\noexpand\number\pdflastxpos sp}}%
+ }%
+ \else
+ \protected@write\@auxout{\let\themn@abspage\relax}{%
+ \string\newmarginnote{note.\@mn@thispage.\@mn@atthispage}{%
+ {\themn@abspage}{}}%
+ }%
+ \fi
% \end{macrocode}
% If the margin note label was not defined, it seams to be new. In this case
% the absolut page number will be used for the test instead of the saved
% real page number.
% \begin{macrocode}
- \@ifundefined{mn@note.\@mn@thispage.\@mn@atthispage}{%
- \PackageInfo{marginnote}{Suggest that margin
- note \@mn@thispage.\@mn@atthispage\space will be on\MessageBreak
- absolute page \themn@abspage.\MessageBreak
- This may be wrong}%
+ \expandafter\ifx\csname mn@note.\@mn@thispage.\@mn@atthispage\endcsname\relax
+% \end{macrocode}
+% If we are not in two side mode, we are on a odd page.
+% \begin{macrocode}
+ \if@twoside
+ \if@mn@verbose
+ \PackageInfo{marginnote}{Suggest that margin
+ note \@mn@thispage.\@mn@atthispage\space will be on\MessageBreak
+ absolute page \themn@abspage.\MessageBreak
+ This may be wrong}%
+ \fi
\ifodd\value{mn@abspage}\@tempswatrue\else\@tempswafalse\fi
- }{%
+ \else
+ \if@mn@verbose
+ \PackageInfo{marginnote}{right page because not two side mode}%
+ \fi
+ \@tempswatrue
+ \fi
+ \else
+ \edef\@mn@currpage{\csname
+ mn@note.\@mn@thispage.\@mn@atthispage\endcsname}%
+ \edef\@mn@currxpos{\expandafter\@secondoftwo\@mn@currpage}%
+ \edef\@mn@currpage{\expandafter\@firstoftwo\@mn@currpage}%
+ \if@mn@verbose
\PackageInfo{marginnote}{Margin note \@mn@thispage.\@mn@atthispage\space
- is on absolute page \@nameuse{mn@note.\@mn@thispage.\@mn@atthispage}}%
- \ifodd\@nameuse{mn@note.\@mn@thispage.\@mn@atthispage}
+ is on absolute page \@mn@currpage\MessageBreak}%
+ \fi
+ \if@twoside
+ \ifodd\@mn@currpage\relax
\@tempswatrue
\else
\@tempswafalse
\fi
- }%
- \else
- \PackageInfo{marginnote}{right page because not two side mode}%
- \@tempswatrue
+ \else
+ \if@mn@verbose
+ \PackageInfo{marginnote}{right page because not two side mode}%
+ \fi
+ \@tempswatrue
+ \fi
\fi
}
% \end{macrocode}
@@ -257,13 +396,16 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\marginnote}
% \begin{macro}{\@mn@marginnote}
% \begin{macro}{\@mn@@marginnote}
% \begin{macro}{\@mn@@@marginnote}
-% Command \cs{marginnote} is the main macro of the package. The others are
-% helpers to manage the optional arguments.
+% \changes{v1.1}{2006/10/23}{new PDF mode feature}
+% Command \cs{marginnote} is the main macro of the package. The others are
+% helpers to manage the optional arguments.
% \begin{macrocode}
\newcommand*{\marginnote}{%
\@dblarg\@mn@marginnote
@@ -284,8 +426,8 @@
\def\@mn@@marginnote[#1]#2[#3]{%
\endgroup
% \end{macrocode}
-% In horizontal mode the space hack of the \LaTeX{} kernel will be used. In
-% vertical mode this should not be used.
+% In horizontal mode the space hack of the \LaTeX{} kernel will be used. In
+% vertical mode this should not be used.
% \begin{macrocode}
\ifhmode
\@mn@@@marginnote[{#1}]{#2}[{#3}]%
@@ -297,65 +439,142 @@
\newcommand{\@mn@@@marginnote}{}
\def\@mn@@@marginnote[#1]#2[#3]{%
% \end{macrocode}
-% All changes (but change of counters that are global because of using the
-% \LaTeX{} commands to change them an \cs{gdef} and \cs{xdef}) should be
-% local. In h-mode a \cs{strut} will be used to fix base line. The margin
-% note will be put to vertical list using \cs{vadjust}. This also means that
-% wie are one line to deep. This will be corrected later using negativ kern.
-% In v-mode wie use a special kind of vbox to simply set everything. Math
-% mode should behave like v-mode. And if we are just after an item we have
-% to leave v-mode first.
+% All changes (but change of counters that are global because of using the
+% \LaTeX{} commands to change them an \cs{gdef} and \cs{xdef}) should be
+% local. In h-mode a \cs{strut} will be used to fix base line. The margin
+% note will be put to vertical list using \cs{vadjust}. This also means that
+% wie are one line to deep. This will be corrected later using negative kern.
+% In v-mode wie use a special kind of vbox to simply set everything. Math
+% mode should behave like v-mode. And if we are just after an item we have
+% to leave v-mode first.
+% \begin{macrocode}
+ \begingroup
+ \ifmmode\strut\let\@tempa\vadjust\else
+ \if@inlabel\leavevmode\fi
+ \ifhmode\strut\let\@tempa\vadjust\else\let\@tempa\mn@vlap\fi
+ \fi
+ \@tempa{%
+% \end{macrocode}
+% Everything will be put upwards using a vbox with zero height and depth and
+% \cs{vss}. At this box the margin test will be done. If cs{reversemargin}
+% was used, the logic switchs. Then the note will be places to the margin.
% \begin{macrocode}
- \begingroup
- \ifmmode\strut\let\@tempa\vadjust\else
- \if@inlabel\leavevmode\fi
- \ifhmode\strut\let\@tempa\vadjust\else\let\@tempa\mn@vlap\fi
- \fi
- \@tempa{%
+ \vbox to\z@{%
+ \vss
+ \@mn@margintest
+ \if@reversemargin\if@tempswa
+ \@tempswafalse
+ \else
+ \@tempswatrue
+ \fi\fi
+ \if@tempswa
+ \rlap{%
% \end{macrocode}
-% Everything will be put upwards using a vbox with zero height and depth and
-% \cs{vss}. At this box the margin test will be done. If cs{reversemargin}
-% was used, the logic switchs. Then the note will be places to the margin.
+% If \cs{@mn@currpos} is neither \cs{relax} nor empty it is the real current
+% $x$ possition of the last PDF\LaTeX{} run and may be used to calculate the
+% real horizontal offset.
% \begin{macrocode}
- \vbox to\z@{%
- \vss
- \@mn@margintest
- \if@reversemargin\if@tempswa
- \@tempswafalse
- \else
- \@tempswatrue
- \fi\fi
- \if@tempswa
- \rlap{\kern\textwidth\kern\marginparsep\kern\marginnoterightadjust
- \vbox to\z@{\kern #3
- \vbox to\z@{%
- \hsize\marginparwidth
+ \ifx\@mn@currxpos\relax
+ \kern\marginnoterightadjust
+ \if@mn@verbose
+ \PackageInfo{marginnote}{%
+ xpos not known,\MessageBreak
+ using \string\marginnoterightadjust}%
+ \fi
+ \else\ifx\@mn@currxpos\@empty
+ \kern\marginnoterightadjust
+ \if@mn@verbose
+ \PackageInfo{marginnote}{%
+ xpos not known,\MessageBreak
+ using \string\marginnoterightadjust}%
+ \fi
+ \else
+ \if@mn@verbose
+ \PackageInfo{marginnote}{%
+ xpos seams to be \@mn@currxpos,\MessageBreak
+ \string\marginnoterightadjust
+ \space ignored}%
+ \fi
+ \begingroup
+ \setlength{\@tempdima}{\@mn@currxpos}%
+ \kern-\@tempdima
+ \if@twoside\ifodd\@mn@currpage\relax
+ \kern\oddsidemargin
+ \else
+ \kern\evensidemargin
+ \fi
+ \else
+ \kern\oddsidemargin
+ \fi
+ \kern 1in
+ \endgroup
+ \fi
+ \fi
+ \kern\marginnotetextwidth\kern\marginparsep
+ \vbox to\z@{\kern\marginnotevadjust\kern #3
+ \vbox to\z@{%
+ \hsize\marginparwidth
% \end{macrocode}
% Here's the correction of the vertical position. The rest is simple.
% \begin{macrocode}
- \kern-\baselineskip\kern-\parskip
- \marginfont\raggedrightmarginnote\hspace{\z@}\strut#2\endgraf
- \vss}%
- \vss}%
- }%
- \else
- \llap{%
- \vbox to\z@{\kern #3
- \vbox to\z@{%
- \hsize\marginparwidth
+ \kern-\baselineskip\kern-\parskip
+ \marginfont\raggedrightmarginnote\hspace{\z@}\strut#2\endgraf
+ \vss}%
+ \vss}%
+ }%
+ \else
+ \llap{%
+ \vbox to\z@{\kern #3
+ \vbox to\z@{%
+ \hsize\marginparwidth
% \end{macrocode}
% Same like above for left margins.
% \begin{macrocode}
- \kern-\baselineskip\kern-\parskip
- \marginfont\raggedleftmarginnote\hspace{\z@}\strut#1\endgraf
- \vss}%
- \vss}%
- \kern\marginparsep\kern\marginnoteleftadjust
- }%
- \fi
- }%
- }%
- \endgroup
+ \kern-\baselineskip\kern-\parskip
+ \marginfont\raggedleftmarginnote\hspace{\z@}\strut#1\endgraf
+ \vss}%
+ \vss}%
+ \ifx\@mn@currxpos\relax
+ \kern\marginnoteleftadjust
+ \if@mn@verbose
+ \PackageInfo{marginnote}{%
+ xpos not known,\MessageBreak
+ using \string\marginnoteleftadjust}%
+ \fi
+ \else\ifx\@mn@currxpos\@empty
+ \kern\marginnoteleftadjust
+ \if@mn@verbose
+ \PackageInfo{marginnote}{%
+ xpos not known,\MessageBreak
+ using \string\marginnoteleftadjust}%
+ \fi
+ \else
+ \if@mn@verbose
+ \PackageInfo{marginnote}{%
+ xpos seams to be \@mn@currxpos,\MessageBreak
+ \string\marginnoteleftadjust
+ \space ignored}%
+ \fi
+ \begingroup
+ \kern\@mn@currxpos
+ \if@twoside\ifodd\@mn@currpage\relax
+ \kern-\oddsidemargin
+ \else
+ \kern-\evensidemargin
+ \fi
+ \else
+ \kern-\oddsidemargin
+ \fi
+ \kern-1in
+ \endgroup
+ \fi
+ \fi
+ \kern\marginparsep
+ }%
+ \fi
+ }%
+ }%
+ \endgroup
}
% \end{macrocode}
% \end{macro}
@@ -366,7 +585,7 @@
% \begin{macro}{\marginnoterightadjust}
% \begin{macro}{\marginnoteleftadjust}
% These may be used to define an automatic horizontal adjust. The default is
-% zero.
+% zero. It will be used only if the PDF mode features are not available.
% \begin{macrocode}
\newcommand*{\marginnoterightadjust}{}
\newcommand*{\marginnoteleftadjust}{}
@@ -376,12 +595,22 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\marginnotevadjust}
+% This may be used to define an automatic vertical adjust. The defaul tis
+% zero. Values greater than zero will move the margin note down, values less
+% than zero will move the margin note up.
+% \begin{macrocode}
+\newcommand*{\marginnotevadjust}{}
+\let\marginnotevadjust\z@
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\mn@vlap}
% This macro is used to set a vertical box without size at vertical mode.
% \begin{macrocode}
\newcommand{\mn@vlap}[1]{%
\setbox\@tempboxa\vbox to \ht\strutbox{#1\vss}%
- \box\@tempboxa\vskip-\baselineskip\ifhmode\typeout{FALSCH!}\fi
+ \box\@tempboxa\vskip-\baselineskip
}
% \end{macrocode}
% \end{macro}
@@ -411,7 +640,6 @@
% \iffalse
%%% Local Variables:
%%% mode: doc-tex
-%%% mode: font-lock
%%% Text-master: t
%%% End:
% \fi \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/marginnote/marginnote.sty b/Master/texmf-dist/tex/latex/marginnote/marginnote.sty
index a3df8036f91..517a03985ba 100644
--- a/Master/texmf-dist/tex/latex/marginnote/marginnote.sty
+++ b/Master/texmf-dist/tex/latex/marginnote/marginnote.sty
@@ -31,11 +31,45 @@
%% and REAMDE.
%%
\ProvidesPackage{marginnote}[%
- 2006/02/06 v1.0a non floating margin notes for LaTeX]
+ 2006/10/26 v1.1 non floating margin notes for LaTeX]
+\newif\if@mn@verbose\@mn@verbosetrue
+\DeclareOption{verbose}{\@mn@verbosetrue}
+\DeclareOption{quiet}{\@mn@verbosefalse}
+\ExecuteOptions{verbose}
\ProcessOptions\relax
\newcommand*{\newmarginnote}{\@newl@bel{mn}}
+\newif\if@mn@pdfmode\@mn@pdfmodefalse
+\AtBeginDocument{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname pdflastxpos\endcsname\relax\else
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname pdfoutput\endcsname\relax\else
+ \ifcase\pdfoutput\else\@mn@pdfmodetrue\fi
+ \fi
+ \fi
+ \if@mn@verbose
+ \if@mn@pdfmode
+ \PackageInfo{marginnote}{%
+ \string\pdfoutput\space not 0 and \string\pdflastxpos\space
+ available.\MessageBreak
+ Extended possition detection mode activated\@gobble
+ }%
+ \else
+ \PackageInfo{marginnote}{%
+ either \string\pdflastxpos\space or \string\pdfoutput\space not
+ available\MessageBreak
+ or \string\pdfoutput\space set to 0.\MessageBreak
+ Extended possition detection mode deactivated\@gobble
+ }%
+ \fi
+ \fi
+}
+\newcommand*{\marginnotetextwidth}{}
+\let\marginnotetextwidth\textwidth
+\AtBeginDocument{\if@mn@pdfmode\edef\marginnotetextwidth{\the\textwidth}\fi}
\newcommand*{\@mn@thispage}{}
-\let\@mn@thispage\@empty
+\newcommand*{\@mn@currpage}{}
+\newcommand*{\@mn@currxpos}{}
\newcounter{mn@abspage}
\AtBeginDocument{\setcounter{mn@abspage}{1}%
\g@addto@macro\@outputpage{\stepcounter{mn@abspage}}}
@@ -52,28 +86,56 @@
\fi
\fi
\xdef\@mn@thispage{\themn@abspage}%
- \protected@write\@auxout{\let\themn@abspage\relax}{%
- \string\newmarginnote{note.\@mn@thispage.\@mn@atthispage}{\themn@abspage}%
- }%
- \if@twoside
- \@ifundefined{mn@note.\@mn@thispage.\@mn@atthispage}{%
- \PackageInfo{marginnote}{Suggest that margin
- note \@mn@thispage.\@mn@atthispage\space will be on\MessageBreak
- absolute page \themn@abspage.\MessageBreak
- This may be wrong}%
+ \let\@mn@currpage\relax
+ \let\@mn@currxpos\relax
+ \if@mn@pdfmode
+ \pdfsavepos
+ \protected@write\@auxout{\let\themn@abspage\relax}{%
+ \string\newmarginnote{note.\@mn@thispage.\@mn@atthispage}{%
+ {\themn@abspage}{\noexpand\number\pdflastxpos sp}}%
+ }%
+ \else
+ \protected@write\@auxout{\let\themn@abspage\relax}{%
+ \string\newmarginnote{note.\@mn@thispage.\@mn@atthispage}{%
+ {\themn@abspage}{}}%
+ }%
+ \fi
+ \expandafter\ifx\csname mn@note.\@mn@thispage.\@mn@atthispage\endcsname\relax
+ \if@twoside
+ \if@mn@verbose
+ \PackageInfo{marginnote}{Suggest that margin
+ note \@mn@thispage.\@mn@atthispage\space will be on\MessageBreak
+ absolute page \themn@abspage.\MessageBreak
+ This may be wrong}%
+ \fi
\ifodd\value{mn@abspage}\@tempswatrue\else\@tempswafalse\fi
- }{%
+ \else
+ \if@mn@verbose
+ \PackageInfo{marginnote}{right page because not two side mode}%
+ \fi
+ \@tempswatrue
+ \fi
+ \else
+ \edef\@mn@currpage{\csname
+ mn@note.\@mn@thispage.\@mn@atthispage\endcsname}%
+ \edef\@mn@currxpos{\expandafter\@secondoftwo\@mn@currpage}%
+ \edef\@mn@currpage{\expandafter\@firstoftwo\@mn@currpage}%
+ \if@mn@verbose
\PackageInfo{marginnote}{Margin note \@mn@thispage.\@mn@atthispage\space
- is on absolute page \@nameuse{mn@note.\@mn@thispage.\@mn@atthispage}}%
- \ifodd\@nameuse{mn@note.\@mn@thispage.\@mn@atthispage}
+ is on absolute page \@mn@currpage\MessageBreak}%
+ \fi
+ \if@twoside
+ \ifodd\@mn@currpage\relax
\@tempswatrue
\else
\@tempswafalse
\fi
- }%
- \else
- \PackageInfo{marginnote}{right page because not two side mode}%
- \@tempswatrue
+ \else
+ \if@mn@verbose
+ \PackageInfo{marginnote}{right page because not two side mode}%
+ \fi
+ \@tempswatrue
+ \fi
\fi
}
\newcommand*{\marginnote}{%
@@ -103,53 +165,127 @@
}
\newcommand{\@mn@@@marginnote}{}
\def\@mn@@@marginnote[#1]#2[#3]{%
- \begingroup
- \ifmmode\strut\let\@tempa\vadjust\else
- \if@inlabel\leavevmode\fi
- \ifhmode\strut\let\@tempa\vadjust\else\let\@tempa\mn@vlap\fi
- \fi
- \@tempa{%
- \vbox to\z@{%
- \vss
- \@mn@margintest
- \if@reversemargin\if@tempswa
- \@tempswafalse
- \else
- \@tempswatrue
- \fi\fi
- \if@tempswa
- \rlap{\kern\textwidth\kern\marginparsep\kern\marginnoterightadjust
- \vbox to\z@{\kern #3
- \vbox to\z@{%
- \hsize\marginparwidth
- \kern-\baselineskip\kern-\parskip
- \marginfont\raggedrightmarginnote\hspace{\z@}\strut#2\endgraf
- \vss}%
- \vss}%
- }%
- \else
- \llap{%
- \vbox to\z@{\kern #3
- \vbox to\z@{%
- \hsize\marginparwidth
- \kern-\baselineskip\kern-\parskip
- \marginfont\raggedleftmarginnote\hspace{\z@}\strut#1\endgraf
- \vss}%
- \vss}%
- \kern\marginparsep\kern\marginnoteleftadjust
- }%
- \fi
- }%
- }%
- \endgroup
+ \begingroup
+ \ifmmode\strut\let\@tempa\vadjust\else
+ \if@inlabel\leavevmode\fi
+ \ifhmode\strut\let\@tempa\vadjust\else\let\@tempa\mn@vlap\fi
+ \fi
+ \@tempa{%
+ \vbox to\z@{%
+ \vss
+ \@mn@margintest
+ \if@reversemargin\if@tempswa
+ \@tempswafalse
+ \else
+ \@tempswatrue
+ \fi\fi
+ \if@tempswa
+ \rlap{%
+ \ifx\@mn@currxpos\relax
+ \kern\marginnoterightadjust
+ \if@mn@verbose
+ \PackageInfo{marginnote}{%
+ xpos not known,\MessageBreak
+ using \string\marginnoterightadjust}%
+ \fi
+ \else\ifx\@mn@currxpos\@empty
+ \kern\marginnoterightadjust
+ \if@mn@verbose
+ \PackageInfo{marginnote}{%
+ xpos not known,\MessageBreak
+ using \string\marginnoterightadjust}%
+ \fi
+ \else
+ \if@mn@verbose
+ \PackageInfo{marginnote}{%
+ xpos seams to be \@mn@currxpos,\MessageBreak
+ \string\marginnoterightadjust
+ \space ignored}%
+ \fi
+ \begingroup
+ \setlength{\@tempdima}{\@mn@currxpos}%
+ \kern-\@tempdima
+ \if@twoside\ifodd\@mn@currpage\relax
+ \kern\oddsidemargin
+ \else
+ \kern\evensidemargin
+ \fi
+ \else
+ \kern\oddsidemargin
+ \fi
+ \kern 1in
+ \endgroup
+ \fi
+ \fi
+ \kern\marginnotetextwidth\kern\marginparsep
+ \vbox to\z@{\kern\marginnotevadjust\kern #3
+ \vbox to\z@{%
+ \hsize\marginparwidth
+ \kern-\baselineskip\kern-\parskip
+ \marginfont\raggedrightmarginnote\hspace{\z@}\strut#2\endgraf
+ \vss}%
+ \vss}%
+ }%
+ \else
+ \llap{%
+ \vbox to\z@{\kern #3
+ \vbox to\z@{%
+ \hsize\marginparwidth
+ \kern-\baselineskip\kern-\parskip
+ \marginfont\raggedleftmarginnote\hspace{\z@}\strut#1\endgraf
+ \vss}%
+ \vss}%
+ \ifx\@mn@currxpos\relax
+ \kern\marginnoteleftadjust
+ \if@mn@verbose
+ \PackageInfo{marginnote}{%
+ xpos not known,\MessageBreak
+ using \string\marginnoteleftadjust}%
+ \fi
+ \else\ifx\@mn@currxpos\@empty
+ \kern\marginnoteleftadjust
+ \if@mn@verbose
+ \PackageInfo{marginnote}{%
+ xpos not known,\MessageBreak
+ using \string\marginnoteleftadjust}%
+ \fi
+ \else
+ \if@mn@verbose
+ \PackageInfo{marginnote}{%
+ xpos seams to be \@mn@currxpos,\MessageBreak
+ \string\marginnoteleftadjust
+ \space ignored}%
+ \fi
+ \begingroup
+ \kern\@mn@currxpos
+ \if@twoside\ifodd\@mn@currpage\relax
+ \kern-\oddsidemargin
+ \else
+ \kern-\evensidemargin
+ \fi
+ \else
+ \kern-\oddsidemargin
+ \fi
+ \kern-1in
+ \endgroup
+ \fi
+ \fi
+ \kern\marginparsep
+ }%
+ \fi
+ }%
+ }%
+ \endgroup
}
\newcommand*{\marginnoterightadjust}{}
\newcommand*{\marginnoteleftadjust}{}
\let\marginnoterightadjust\z@
\let\marginnoteleftadjust\z@
+\newcommand*{\marginnotevadjust}{}
+\let\marginnotevadjust\z@
\newcommand{\mn@vlap}[1]{%
\setbox\@tempboxa\vbox to \ht\strutbox{#1\vss}%
- \box\@tempboxa\vskip-\baselineskip\ifhmode\typeout{FALSCH!}\fi
+ \box\@tempboxa\vskip-\baselineskip
}
\providecommand*{\marginfont}{}
\newcommand*{\raggedleftmarginnote}{\raggedleft}
diff --git a/Master/texmf-dist/tpm/marginnote.tpm b/Master/texmf-dist/tpm/marginnote.tpm
index 1ea2b616af4..464fb1ee5ad 100644
--- a/Master/texmf-dist/tpm/marginnote.tpm
+++ b/Master/texmf-dist/tpm/marginnote.tpm
@@ -3,7 +3,7 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/marginnote.zip">
<TPM:Name>marginnote</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/09/14 00:20:24</TPM:Date>
+ <TPM:Date>2006/11/15 07:42:44</TPM:Date>
<TPM:Version></TPM:Version>
<TPM:Creator>karl</TPM:Creator>
<TPM:Title>The marginnote package.</TPM:Title>
@@ -12,15 +12,14 @@
<TPM:Size>157600</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="6095">
+ <TPM:RunFiles size="10621">
texmf-dist/tex/latex/marginnote/marginnote.sty
texmf-dist/tpm/marginnote.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="133156">
-texmf-dist/doc/latex/marginnote/README
+ <TPM:DocFiles size="151129">
texmf-dist/doc/latex/marginnote/marginnote.pdf
</TPM:DocFiles>
- <TPM:SourceFiles size="18349">
+ <TPM:SourceFiles size="27328">
texmf-dist/source/latex/marginnote/README
texmf-dist/source/latex/marginnote/marginnote.dtx
texmf-dist/source/latex/marginnote/marginnote.ins
diff --git a/Master/texmf/lists/marginnote b/Master/texmf/lists/marginnote
index edc9d6d56b2..25dc615f903 100644
--- a/Master/texmf/lists/marginnote
+++ b/Master/texmf/lists/marginnote
@@ -1,4 +1,3 @@
-texmf-dist/doc/latex/marginnote/README
texmf-dist/doc/latex/marginnote/marginnote.pdf
texmf-dist/source/latex/marginnote/README
texmf-dist/source/latex/marginnote/marginnote.dtx