texlive[59066] Master/texmf-dist: mparhack (3may21)

commits+karl at tug.org commits+karl at tug.org
Mon May 3 23:11:49 CEST 2021


Revision: 59066
          http://tug.org/svn/texlive?view=revision&revision=59066
Author:   karl
Date:     2021-05-03 23:11:49 +0200 (Mon, 03 May 2021)
Log Message:
-----------
mparhack (3may21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/mparhack/mparhack.pdf
    trunk/Master/texmf-dist/source/latex/mparhack/mparhack.dtx
    trunk/Master/texmf-dist/source/latex/mparhack/mparhack.ins
    trunk/Master/texmf-dist/tex/latex/mparhack/mparhack.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/mparhack/README.md

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/mparhack/README

Deleted: trunk/Master/texmf-dist/doc/latex/mparhack/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mparhack/README	2021-05-03 17:49:57 UTC (rev 59065)
+++ trunk/Master/texmf-dist/doc/latex/mparhack/README	2021-05-03 21:11:49 UTC (rev 59066)
@@ -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)

Added: trunk/Master/texmf-dist/doc/latex/mparhack/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mparhack/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/mparhack/README.md	2021-05-03 21:11:49 UTC (rev 59066)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/mparhack/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/mparhack/mparhack.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/mparhack/mparhack.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mparhack/mparhack.dtx	2021-05-03 17:49:57 UTC (rev 59065)
+++ trunk/Master/texmf-dist/source/latex/mparhack/mparhack.dtx	2021-05-03 21:11:49 UTC (rev 59066)
@@ -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 at top.gso.uri.edu",
@@ -107,9 +102,14 @@
 % \title{\PackageName}
 % \author{Tom Sgouros\\ {\small\texttt{tomfool at top.gso.uri.edu}} \and
 %       Stefan Ulrich\\ {\small\href{mailto:stefanulrich at users.sourceforge.net}{\texttt{stefanulrich at 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 at 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 at 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,8 +198,8 @@
 %    \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}
 % ^^A --------------------------------------------------
@@ -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 at 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 at nr}
 %    A command sequence containing the current marginpar number (which
 %    will be written to the |.aux| file).
@@ -407,7 +395,7 @@
 \newcommand*\mph at lastpage{0}
 %    \end{macrocode}
 %    \end{macro}
-%    
+%
 %    \begin{macro}{\mph at 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 at 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 at ifundef@or at smaller}
 %    A helper macro that checks if the command sequence in |#1| is
 %    undefined or if its value is smaller than |\mph at cnt| (it assumes
@@ -537,7 +525,7 @@
 
 %    \end{macrocode}
 %    \end{macro}
-%    
+%
 %    \begin{macro}{\mph at pg@orig}
 %    \changes{v1.2}{2000/02/29}{%
 %         Added the \Com{mph at pg@orig} macro
@@ -551,7 +539,7 @@
 \newcommand*\mph at pg@orig{}
 %    \end{macrocode}
 %    \end{macro}
-%    
+%
 %    \begin{macro}{\mph at get@margin}
 %    This macro does most of the work described in
 %    section~\ref{implementation}.
@@ -604,7 +592,7 @@
                 }%
             }%
         }{%
-            \@tempswafalse               
+            \@tempswafalse
             \global\@mph at firstcol@true
             \mph at 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 at 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 at 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 at xt@} to correctly expands in shipout hooks. See
+%         \url{https://tex.stackexchange.com/q/595272/2388}
+%    }%
+
 %    \begin{macrocode}
 \newcommand\mph at orig@hb at xt@{}
 \newcommand\mph at orig@outputdblcol{}
@@ -808,10 +801,10 @@
                     }%
                 }%
             }%
+            \mph at orig@hb at xt@##1{##2\mph at tempa}%
         \else
-            \def\mph at tempa{}%
+            \mph at orig@hb at xt@##1{##2}%
         \fi
-        \mph at orig@hb at xt@##1{##2\mph at tempa}%
     }%
     \mph at orig@outputdblcol
     \def\hb at xt@{\mph at orig@hb at xt@}%
@@ -822,11 +815,11 @@
             \mph at error{\string\@outputdblcol}%
         \fi
     \fi
-}   
+}
 
 %    \end{macrocode}
 %    \end{macro}
-%    
+%
 %    \begin{macro}{\mph at orig@picture}
 %    \begin{macrocode}
 \newcommand\mph at 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

Modified: trunk/Master/texmf-dist/source/latex/mparhack/mparhack.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/mparhack/mparhack.ins	2021-05-03 17:49:57 UTC (rev 59065)
+++ trunk/Master/texmf-dist/source/latex/mparhack/mparhack.ins	2021-05-03 21:11:49 UTC (rev 59066)
@@ -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.

Modified: trunk/Master/texmf-dist/tex/latex/mparhack/mparhack.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mparhack/mparhack.sty	2021-05-03 17:49:57 UTC (rev 59065)
+++ trunk/Master/texmf-dist/tex/latex/mparhack/mparhack.sty	2021-05-03 21:11:49 UTC (rev 59066)
@@ -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 at mph@firstcol@
 \newif\if at mph@warning@
 \newif\if at debug@
@@ -245,6 +245,7 @@
 }
 \g at addto@macro{\@outputpage}{\mph at outputpage@hook}
 
+
 \newcommand\mph at orig@hb at xt@{}
 \newcommand\mph at orig@outputdblcol{}
 \newcommand\mph at chk@dcl{0}%
@@ -265,10 +266,10 @@
                     }%
                 }%
             }%
+            \mph at orig@hb at xt@##1{##2\mph at tempa}%
         \else
-            \def\mph at tempa{}%
+            \mph at orig@hb at xt@##1{##2}%
         \fi
-        \mph at orig@hb at xt@##1{##2\mph at tempa}%
     }%
     \mph at orig@outputdblcol
     \def\hb at xt@{\mph at orig@hb at xt@}%



More information about the tex-live-commits mailing list.