summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-03 21:11:49 +0000
committerKarl Berry <karl@freefriends.org>2021-05-03 21:11:49 +0000
commit138cd963c48f6a40f4efc66336b25645167d4ae3 (patch)
tree8600f2f460a42f172bb2ea496a4c476fa7c9db24 /Master
parentca4b95e67cb163120117189e0990da6dae2de193 (diff)
mparhack (3may21)
git-svn-id: svn://tug.org/texlive/trunk@59066 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/mparhack/README4
-rw-r--r--Master/texmf-dist/doc/latex/mparhack/README.md15
-rw-r--r--Master/texmf-dist/doc/latex/mparhack/mparhack.pdfbin86384 -> 309552 bytes
-rw-r--r--Master/texmf-dist/source/latex/mparhack/mparhack.dtx138
-rw-r--r--Master/texmf-dist/source/latex/mparhack/mparhack.ins16
-rw-r--r--Master/texmf-dist/tex/latex/mparhack/mparhack.sty7
6 files changed, 76 insertions, 104 deletions
diff --git a/Master/texmf-dist/doc/latex/mparhack/README b/Master/texmf-dist/doc/latex/mparhack/README
deleted file mode 100644
index c551d65f4d8..00000000000
--- a/Master/texmf-dist/doc/latex/mparhack/README
+++ /dev/null
@@ -1,4 +0,0 @@
-This package implements a workaround for the LATEX bug that marginpars
-sometimes appear on the wrong margin.
-
-Maintainer: Stefan Ulrich (stefanulrich AT users.sourceforge.net)
diff --git a/Master/texmf-dist/doc/latex/mparhack/README.md b/Master/texmf-dist/doc/latex/mparhack/README.md
new file mode 100644
index 00000000000..9037e460410
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mparhack/README.md
@@ -0,0 +1,15 @@
+# mparhack package for LaTeX
+
+Version: 2021-05-02 v1.5
+
+This package implements a workaround for the LATEX bug that marginpars
+sometimes appear on the wrong margin.
+
+
+
+## Copyright (C)
+* 1999- 2005 Tom Sgouros, Stefan Ulrich
+* 2021 Tom Sgouros, Stefan Ulrich, Ulrike Fischer
+
+## License
+GNU General Public License 2 or later
diff --git a/Master/texmf-dist/doc/latex/mparhack/mparhack.pdf b/Master/texmf-dist/doc/latex/mparhack/mparhack.pdf
index dba66c79642..6b2532c4999 100644
--- a/Master/texmf-dist/doc/latex/mparhack/mparhack.pdf
+++ b/Master/texmf-dist/doc/latex/mparhack/mparhack.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/mparhack/mparhack.dtx b/Master/texmf-dist/source/latex/mparhack/mparhack.dtx
index 11ea9965b9d..f0f51ec476a 100644
--- a/Master/texmf-dist/source/latex/mparhack/mparhack.dtx
+++ b/Master/texmf-dist/source/latex/mparhack/mparhack.dtx
@@ -4,12 +4,12 @@
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version 2
% of the License, or (at your option) any later version.
-%
+%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
-%
+%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -36,7 +36,7 @@
% \DoNotIndex{\newcount,\newif,\newlinechar,\newread,\newtoks,\newwrite}
% \DoNotIndex{\dp,\wd,\ht,\vss,\unskip}
%
-% \CheckSum{418}
+% \CheckSum{417}
%
% \MakeShortVerb\|
%
@@ -44,12 +44,7 @@
% \begin{macrocode}
%<*driver>
\documentclass{ltxdoc}
-\RequirePackage{url}%
-\IfFileExists{hyperref.sty}{\RequirePackage{hyperref}}{%
-%%% alternative definitions if hyperref is not available
- \newcommand\href[2]{#2}%
- \newcommand\url{\texttt}%
-}
+\RequirePackage{hyperref}
\EnableCrossrefs
%\DisableCrossrefs % Say \DisableCrossrefs if index is ready
\CodelineIndex
@@ -73,8 +68,8 @@
%
% ===================================================================
% @LaTeX-package-file{
-% version = "1.4",
-% date = "2005/04/17",
+% version = "1.5",
+% date = "2021-05-02",
% filename = "mparhack.sty",
% author-1 = "Tom Sgouros",
% email-1 = "tomfool@top.gso.uri.edu",
@@ -107,9 +102,14 @@
% \title{\PackageName}
% \author{Tom Sgouros\\ {\small\texttt{tomfool@top.gso.uri.edu}} \and
% Stefan Ulrich\\ {\small\href{mailto:stefanulrich@users.sourceforge.net}{\texttt{stefanulrich@users.sourceforge.net}}}}
-% \date{v1.4 2005/04/17\\[1ex] {\footnotesize CTAN:
-% \href{http://www.ucc.ie/cgi-bin/ctan?server=ftp.dante.de%2Ftex-archive&term=mparhack}
-% {\texttt{macros/latex/contrib/supported/mparhack/}}}}
+% \date{v1.5 2021-05-02\\[1ex] {\footnotesize CTAN:
+% \href{https://ctan.org/pkg/mparhack}
+% {\texttt{https://ctan.org/pkg/mparhack}}}
+% \\[1ex]
+% {\footnotesize Github:
+% \href{https://github.com/u-fischer/mparhack}
+% {\texttt{https://github.com/u-fischer/mparhack}}}
+% }
% \maketitle
%
% \begin{abstract}
@@ -117,15 +117,15 @@
% that marginpars sometimes show up on the wrong margin.
% \end{abstract}
%
-% \changes{1.0}{1999/03/02}{Created}
-% \changes{1.1}{1999/09/23}{Rewrite to use only one label per page, and to implement
+% \changes{v1.0}{1999/03/02}{Created}
+% \changes{v1.1}{1999/09/23}{Rewrite to use only one label per page, and to implement
% `twocolumn' document option.}
% \changes{v1.2}{2000/02/29}{Small documentation changes}
-% \changes{1.2a}{2000/03/14}{Fixed the \Com{NeedsTeXFormat} to use 1997/04/14}
-% \changes{1.2c}{2001/02/07}{Small documentation changes}
-% \changes{1.3}{2001/02/07}{Use \Com{mph@tempa} instead of \Com{@tempa} to avoid
+% \changes{v1.2a}{2000/03/14}{Fixed the \Com{NeedsTeXFormat} to use 1997/04/14}
+% \changes{v1.2c}{2001/02/07}{Small documentation changes}
+% \changes{v1.3}{2001/02/07}{Use \Com{mph@tempa} instead of \Com{@tempa} to avoid
% possible clashes with other classes (e.g. scrpage2)}
-% \changes{1.4}{2005/04/17}{Fix a bug with eso-pic.sty (latex/3775)}
+% \changes{v1.4}{2005/04/17}{Fix a bug with eso-pic.sty (latex/3775)}
%
%
% {\parskip 0pt \tableofcontents }
@@ -137,10 +137,10 @@
% A persistent problem with the |\marginpar| command is that the
% marginalia produced often show up on the wrong margin. This has
% been noted in the \LaTeX\ bugs database.^^A
-% \footnote{See \url{http://www.latex-project.org/cgi-bin/ltxbugs2html}:
-% \href{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2361}{latex/2361},
-% \href{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2484}{latex/2484},
-% \href{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2617}{latex/2617}.}
+% \footnote{See \url{https://www.latex-project.org/cgi-bin/ltxbugs2html}:
+% \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2361}{latex/2361},
+% \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2484}{latex/2484},
+% \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2617}{latex/2617}.}
%
%
% The problem occurs most likely when a marginpar appears near
@@ -198,7 +198,7 @@
% \texttt{debug} option; this will output a lot of tracing
% information and will add numbers to the marginpars in the |.dvi|
% file for reference.
-%
+%
%
% ^^A --------------------------------------------------
% \section{Bugs\slash Restrictions}
@@ -243,7 +243,7 @@
% package option enabled). Suggestions/improvements are also welcome,
% of course.
% \end{itemize}
-%
+%
% ^^A --------------------------------------------------
% \section{Acknowledgements}
% ^^A --------------------------------------------------
@@ -254,19 +254,7 @@
% label per page (instead of one label each marginpar, as in a
% previous version).
%
-% ^^A --------------------------------------------------
-% ^^A Place to stop if implementation shouldn't be printed
-% ^^A --------------------------------------------------
-%
-% \typein[\answer]%
-% {^^JPrint an annotated listing of the macro definitions (y/n)? [n]}
-% \def\next{y}^^A
-% \ifx\answer\next
-% \AfterElseFi\AlsoImplementation
-% \else
-% \typeout{(not printing macro definitions.)}^^A
-% \expandafter\endinput
-% \fi
+% \AlsoImplementation
% \StopEventually{\relax}
% ^^A --------------------------------------------------
% \section{Implementation}
@@ -326,7 +314,7 @@
% check for even-\slash oddness.
%
% ^^A --------------------------------------------------
-% \subsection{Code}
+% \subsection{Code}
% ^^A --------------------------------------------------
%
% We need at least \LaTeX\ version 1997/04/14 which introduced
@@ -335,10 +323,10 @@
%<*sty>
\NeedsTeXFormat{LaTeX2e}[1997/04/14]
\ProvidesPackage{mparhack}
- [2005/04/17 v1.4 (T. Sgouros and S. Ulrich)]
+ [2021-05-02 v1.5 (T. Sgouros and S. Ulrich)]
% \end{macrocode}
% ^^A --------------------------------------------------
-% \subsubsection{Booleans, Options, etc.}
+% \subsubsection{Booleans, Options, etc.}
% ^^A --------------------------------------------------
% Some boolean switches which we will be using:
% |\if@mph@firstcol@| indicates that the current column is the
@@ -391,8 +379,8 @@
\ProcessOptions*
% \end{macrocode}
% ^^A --------------------------------------------------
-% \subsubsection{Commands}
-% ^^A --------------------------------------------------
+% \subsubsection{Commands}
+% ^^A --------------------------------------------------
% \begin{macro}{\mph@nr}
% A command sequence containing the current marginpar number (which
% will be written to the |.aux| file).
@@ -407,7 +395,7 @@
\newcommand*\mph@lastpage{0}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\mph@cnt}
% Emulate a counter with a command name to save one count
% register. Oh well~\dots \texttt{;-)}
@@ -480,7 +468,7 @@
}%
% \end{macrocode}
% Fix for latex/3775\footnote{^^A
-% \url{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/3775}^^A
+% \url{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/3775}^^A
% }: eso-pic uses \Com{@picture} inside the output routine,
% which causes problems with our redefinition of \Com{hb@xt@} in \Com{@outputdblcol}.
% So, as suggested by M. H\o gholm in his reply to the above bug report, we patch
@@ -510,7 +498,7 @@
}%
}
% \end{macrocode}
-%
+%
% \begin{macro}{\mph@ifundef@or@smaller}
% A helper macro that checks if the command sequence in |#1| is
% undefined or if its value is smaller than |\mph@cnt| (it assumes
@@ -537,7 +525,7 @@
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\mph@pg@orig}
% \changes{v1.2}{2000/02/29}{%
% Added the \Com{mph@pg@orig} macro
@@ -551,7 +539,7 @@
\newcommand*\mph@pg@orig{}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\mph@get@margin}
% This macro does most of the work described in
% section~\ref{implementation}.
@@ -604,7 +592,7 @@
}%
}%
}{%
- \@tempswafalse
+ \@tempswafalse
\global\@mph@firstcol@true
\mph@debug{exiting loop}%
}%
@@ -672,10 +660,10 @@
% \end{macrocode}
% \end{macro}
-%
+%
+% ^^A --------------------------------------------------
+% \subsubsection{Patching the output routine}
% ^^A --------------------------------------------------
-% \subsubsection{Patching the output routine}
-% ^^A --------------------------------------------------
% We have to hook into 3 commands that are part of \LaTeX's output routine:
% |\@addmarginpar|, |\@outputdblcol| and |\@outputpage|. For the latter, we can use the default
% \LaTeX\ mechanism |\g@addto@macro|. For the others, this is more difficult,
@@ -700,7 +688,7 @@
% }%
% \changes{v1.2}{2000/02/29}{%
% Added \Com{CheckCommand*} for \Com{@addmarginpar}, \Com{@outputpage}
-% and \Com{@outputdblcol}
+% and \Com{@outputdblcol}
% }%
% \changes{v1.2b}{2000/09/01}{%
% Replaced \Com{CheckCommand*} and the full redefinitions of
@@ -773,7 +761,7 @@
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\@outputdblcol}
% In case an entire twocolumn page is finished, this command calls
% \Com{hb@xt@} with the boxes for the two columns inside, and each
@@ -786,7 +774,12 @@
% the end we check if this number equals 0 (in which case the
% page hadn't been fininshed yet, and we didn't need to do anything)
% or 2 (the `interesting' case); else we signal an error.
-%
+% \changes{v1.5}{2021-04-02}{%
+% Changed definition of \Com{@outputdblcol} to allow
+% \Com{hb@xt@} to correctly expands in shipout hooks. See
+% \url{https://tex.stackexchange.com/q/595272/2388}
+% }%
+
% \begin{macrocode}
\newcommand\mph@orig@hb@xt@{}
\newcommand\mph@orig@outputdblcol{}
@@ -808,10 +801,10 @@
}%
}%
}%
+ \mph@orig@hb@xt@##1{##2\mph@tempa}%
\else
- \def\mph@tempa{}%
+ \mph@orig@hb@xt@##1{##2}%
\fi
- \mph@orig@hb@xt@##1{##2\mph@tempa}%
}%
\mph@orig@outputdblcol
\def\hb@xt@{\mph@orig@hb@xt@}%
@@ -822,11 +815,11 @@
\mph@error{\string\@outputdblcol}%
\fi
\fi
-}
+}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\mph@orig@picture}
% \begin{macrocode}
\newcommand\mph@orig@picture{}
@@ -837,24 +830,7 @@
%</sty>
% \end{macrocode}
% ^^A\typeout{End of package documentation.}
-% \typein[\answer]%
-% {^^JPrint an index of command names (y/n)? [n]^^J^^A
-% -- Note: this requires a previous run of:^^J^^A
-% \space\space\space makeindex -s gind.ist \PackageNameNoExt^^J}
-% \def\next{y}^^A
-% \ifx\answer\next
-% \AfterElseFi\PrintIndex
-% \else
-% \typeout{(not printing index.)}^^A
-% \fi
-% \typein[\answer]%
-% {^^JPrint a history of changes (y/n)? [n]^^J^^A
-% -- Note: this requires a previous run of:^^J^^A
-% \space\space\space makeindex -s gglo.ist -o \PackageNameNoExt.gls \PackageNameNoExt.glo^^J}
-% \def\next{y}^^A
-% \ifx\answer\next
-% \AfterElseFi\PrintChanges
-% \else
-% \typeout{(not printing history of changes.)}^^A
-% \fi
-% \Finale
+% ^^A makeindex -s gind.ist \PackageNameNoExt^^J}
+% \PrintIndex
+% \PrintChanges
+% \Finale
diff --git a/Master/texmf-dist/source/latex/mparhack/mparhack.ins b/Master/texmf-dist/source/latex/mparhack/mparhack.ins
index 754baa3b9de..4b2119379ad 100644
--- a/Master/texmf-dist/source/latex/mparhack/mparhack.ins
+++ b/Master/texmf-dist/source/latex/mparhack/mparhack.ins
@@ -5,22 +5,6 @@
\def\batchfile{mparhack.ins}
\input docstrip.tex
\def\makeCommand#1{\catcode`#1=0\relax}
-\@ifundefined{endbatchfile}
- {\PackageError{mparhack.ins}
- {%
- ^^J\space\space\space
- The installation requires docstrip version 2.4d (1996/10/17)
- ^^J\space\space\space
- or later (Type `H' for more help)%
- }{%
- An older version of docstrip has been input.\MessageBreak
- Since this version won't install the current package\MessageBreak
- properly, please get a current version (files docstrip.ins\MessageBreak
- and docstrip.dtx) from CTAN.\MessageBreak
- }%
- \let\endbatchfile\endinput
- }
- {\relax}
\preamble
Workaround for the marginpar bug.
diff --git a/Master/texmf-dist/tex/latex/mparhack/mparhack.sty b/Master/texmf-dist/tex/latex/mparhack/mparhack.sty
index 9f2a74aea79..6cbaead9ff4 100644
--- a/Master/texmf-dist/tex/latex/mparhack/mparhack.sty
+++ b/Master/texmf-dist/tex/latex/mparhack/mparhack.sty
@@ -24,7 +24,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1997/04/14]
\ProvidesPackage{mparhack}
- [2005/04/17 v1.4 (T. Sgouros and S. Ulrich)]
+ [2021-05-02 v1.5 (T. Sgouros and S. Ulrich)]
\newif\if@mph@firstcol@
\newif\if@mph@warning@
\newif\if@debug@
@@ -245,6 +245,7 @@
}
\g@addto@macro{\@outputpage}{\mph@outputpage@hook}
+
\newcommand\mph@orig@hb@xt@{}
\newcommand\mph@orig@outputdblcol{}
\newcommand\mph@chk@dcl{0}%
@@ -265,10 +266,10 @@
}%
}%
}%
+ \mph@orig@hb@xt@##1{##2\mph@tempa}%
\else
- \def\mph@tempa{}%
+ \mph@orig@hb@xt@##1{##2}%
\fi
- \mph@orig@hb@xt@##1{##2\mph@tempa}%
}%
\mph@orig@outputdblcol
\def\hb@xt@{\mph@orig@hb@xt@}%