summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/marginnote/marginnote.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/marginnote/marginnote.dtx')
-rw-r--r--Master/texmf-dist/source/latex/marginnote/marginnote.dtx72
1 files changed, 46 insertions, 26 deletions
diff --git a/Master/texmf-dist/source/latex/marginnote/marginnote.dtx b/Master/texmf-dist/source/latex/marginnote/marginnote.dtx
index 0e8a0813382..7bc87d50a6e 100644
--- a/Master/texmf-dist/source/latex/marginnote/marginnote.dtx
+++ b/Master/texmf-dist/source/latex/marginnote/marginnote.dtx
@@ -1,9 +1,9 @@
-% \CheckSum{506}
+% \CheckSum{534}
% \iffalse meta-comment
%
% marginnote.dtx
%
-%% Copyright (c) Markus Kohm 2005-2006
+%% Copyright (c) Markus Kohm 2005-2008
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,13 +21,17 @@
%% This work consists of the files marginnote.dtx, marginnote.ins,
%% and REAMDE.
%%
+%% Important Recommendation:
+%% The LPPL requires that distributions of the Work contain all the files of
+%% the Work (see ``Important Recommendations'' at lppl.txt).
+%%
%
%<*driver>
\ProvidesFile{marginnote.dtx}[%
%</driver>
%<package>\ProvidesPackage{marginnote}[%
%<*driver|package>
- 2006/10/26 v1.1 non floating margin notes for LaTeX]
+ 2008/11/10 v1.1a non floating margin notes for LaTeX]
%</driver|package>
%<*driver>
\documentclass{ltxdoc}
@@ -97,11 +101,12 @@
% 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.
+% only, if the correct horizontal position cannot be determined using
+% PDF\TeX{} features (\cs{pdfsavepos} and \cs{pdflastxpos}). So if you are
+% using PDF\LaTeX{} with PDF output or PDF\LaTeX{} with PDF\TeX-version since
+% 1.40 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 positions of the
+% margin notes.
%
% \DescribeMacro{\marginnotetextwidth}
% Package \textsl{marginnote} needs to know the real width of the type area to
@@ -184,7 +189,8 @@
% 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
+% If you are using PDF\LaTeX{} since version~1.40 or PDF\LaTeX{} before
+% version~1.40 with PDF output and the horizontal position of
% a margin note is wrong, do one more PDF\LaTeX{} run.
%
% Sometimes lines are stretched vertically using \cs{marginnote}, e.g.\ if
@@ -231,21 +237,33 @@
% \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.
+% \changes{v1.1}{2006/10/23}{new switch}%
+% \changes{v1.1a}{2008/11/10}{PDF\TeX\ since 1.40 allows \cs{pdfsavepos} in
+% DVI mode too}%
+% We need to know, wether or not PDF\TeX{} and which version of PDF\TeX{} is
+% used. With PDF\TeX{} the horizontal output position 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
+ \expandafter\ifx\csname pdftexversion\endcsname\relax
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname pdfoutput\endcsname\relax\else
+ \ifcase\pdfoutput\else\@mn@pdfmodetrue\fi
+ \fi
+ \else
+ \ifnum \pdftexversion<140
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname pdfoutput\endcsname\relax\else
+ \ifcase\pdfoutput\else\@mn@pdfmodetrue\fi
+ \fi
+ \else
+ \@mn@pdfmodetrue
\fi
\fi
\if@mn@verbose
@@ -253,14 +271,14 @@
\PackageInfo{marginnote}{%
\string\pdfoutput\space not 0 and \string\pdflastxpos\space
available.\MessageBreak
- Extended possition detection mode activated\@gobble
+ Extended position 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
+ Extended position detection mode deactivated\@gobble
}%
\fi
\fi
@@ -300,7 +318,7 @@
% this. So we increase the absolut page number \texttt{mn@abspage} at every
% \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
+% position 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}
@@ -329,7 +347,7 @@
% \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. At PDF mode
-% save the current $x$ possition too.
+% save the current $x$ position too.
% \begin{macrocode}
\let\@mn@currpage\relax
\let\@mn@currxpos\relax
@@ -471,7 +489,7 @@
\rlap{%
% \end{macrocode}
% 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
+% $x$ position of the last PDF\LaTeX{} run and may be used to calculate the
% real horizontal offset.
% \begin{macrocode}
\ifx\@mn@currxpos\relax
@@ -585,7 +603,9 @@
% \begin{macro}{\marginnoterightadjust}
% \begin{macro}{\marginnoteleftadjust}
% These may be used to define an automatic horizontal adjust. The default is
-% zero. It will be used only if the PDF mode features are not available.
+% zero. They will be used only if not PDF\TeX{} or PDF\TeX{} before version~1.40
+% in DVI mode is used, because in this case the save position features are not
+% available.
% \begin{macrocode}
\newcommand*{\marginnoterightadjust}{}
\newcommand*{\marginnoteleftadjust}{}
@@ -640,6 +660,6 @@
% \iffalse
%%% Local Variables:
%%% mode: doc-tex
-%%% Text-master: t
+%%% TeX-master: t
%%% End:
% \fi \ No newline at end of file