diff options
author | Karl Berry <karl@freefriends.org> | 2020-10-14 21:43:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-10-14 21:43:27 +0000 |
commit | 96017976c095713d2013168eeb9d3c2ad8c1c7dc (patch) | |
tree | 823a3fbc49cdefedda1d05006f3767e904c28973 /Master/texmf-dist/source/latex/eso-pic | |
parent | e459b11c06a0dee213069a0129a18e77755ca167 (diff) |
eso-pic (14oct20)
git-svn-id: svn://tug.org/texlive/trunk@56658 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/eso-pic')
-rw-r--r-- | Master/texmf-dist/source/latex/eso-pic/eso-pic.dtx | 120 |
1 files changed, 54 insertions, 66 deletions
diff --git a/Master/texmf-dist/source/latex/eso-pic/eso-pic.dtx b/Master/texmf-dist/source/latex/eso-pic/eso-pic.dtx index 74060e560e6..5cdf9141cd7 100644 --- a/Master/texmf-dist/source/latex/eso-pic/eso-pic.dtx +++ b/Master/texmf-dist/source/latex/eso-pic/eso-pic.dtx @@ -23,9 +23,9 @@ % \fi % % \iffalse -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%<package>\NeedsTeXFormat{LaTeX2e}[2020-10-01] %<package>\ProvidesPackage{eso-pic} -%<package> [2020/09/27 v2.0i eso-pic (RN)] +%<package> [2020/10/14 v3.0a eso-pic (RN)] % %<*driver> \documentclass[a4paper]{ltxdoc} @@ -37,7 +37,7 @@ %</driver> % \fi % -% \CheckSum{782} +% \CheckSum{750} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -151,9 +151,10 @@ % \cs{ClearShipoutPictureFG} % clears the contents of \cs{ESO@HookIFG}. % -% \DescribeMacro{\LenToUnit} Allows a length as parameter to a picture -% command. Note that this macro is no more necessary when using -% |\usepackage{picture}|. +% \DescribeMacro{\LenToUnit} [Allows a length as parameter to a picture +% command.] Note that this macro exist only for compatibility to older +% versions of this package. A recent \LaTeX\ version allows dimensions +% in picture commands. % % \DescribeMacro{\gridSetup} % \cmd{\gridSetup}\oarg{gridunitname}\marg{gridunit}\marg{labelfactor}^^A @@ -208,28 +209,21 @@ % % \subsection{The main functionality} % -% \begin{macrocode} -\RequirePackage{atbegshi} -% \end{macrocode} % \begin{macro}{\LenToUnit} % \changes{v1.0d}{2006/07/14}{Using \cmd{\providecommand} instead of % \cmd{\newcommand} for \cmd{\LenToUnit}} % \changes{v2.0f}{2015/07/14}{Changed definition for better compatibility % with package \pkgname{curve2e} suggested by Claudio Beccari.} +% Only for compatibility +% \changes{v3.0a}{2020/10/14}{No more used. (RN).} % \begin{macrocode} -\providecommand*\LenToUnit[1]{\strip@pt\dimexpr#1*\p@/\unitlength} +\providecommand*\LenToUnit[1]{#1} % \end{macrocode} % \end{macro} -% \changes{v2.0i}{2020/09/27}{no more system dimension registers} -% \begin{macro}{\ESO@tempdima} -% \begin{macro}{\ESO@tempdimb} -% Some auxiliary dimension registers % \begin{macrocode} \newdimen\ESO@tempdima \newdimen\ESO@tempdimb % \end{macrocode} -% \end{macro} -% \end{macro} % \begin{macro}{\ESO@isMEMOIR} % Support for the \clsname{memoir} class. % \begin{macrocode} @@ -240,20 +234,20 @@ % \begin{macro}{\AtPageUpperLeft} % \begin{macrocode} \newcommand\AtPageUpperLeft[1]{% - \put(0,\LenToUnit{-\ESO@yoffsetI}){#1}% + \put(0,-\ESO@yoffsetI){#1}% } % \end{macrocode} % \end{macro} % \begin{macro}{\AtPageLowerLeft} % \begin{macrocode} \newcommand\AtPageLowerLeft[1]{\AtPageUpperLeft{% - \put(0,\LenToUnit{-\paperheight}){#1}}} + \put(0,-\paperheight){#1}}} % \end{macrocode} % \end{macro} % \begin{macro}{\AtPageCenter} % \begin{macrocode} \newcommand\AtPageCenter[1]{\AtPageUpperLeft{% - \put(\LenToUnit{.5\paperwidth},\LenToUnit{-.5\paperheight}){#1}}% + \put(.5\paperwidth,-.5\paperheight){#1}}% } % \end{macrocode} % \end{macro} @@ -274,7 +268,7 @@ \advance\ESO@tempdimb\paperheight \advance\ESO@tempdimb\trimtop \AtPageLowerLeft{% - \put(\LenToUnit{\ESO@tempdima},\LenToUnit{\ESO@tempdimb}){#1}% + \put(\ESO@tempdima,\ESO@tempdimb){#1}% }% \endgroup } @@ -290,7 +284,7 @@ \ESO@isMEMOIR{% \renewcommand\AtStockUpperLeft[1]{% \AtStockLowerLeft{% - \put(0,\LenToUnit{\stockheight}){#1}% + \put(0,\stockheight){#1}% }% }% }{% @@ -305,7 +299,7 @@ \ESO@isMEMOIR{% \renewcommand\AtStockCenter[1]{% \AtStockLowerLeft{% - \put(\LenToUnit{.5\stockwidth},\LenToUnit{.5\stockheight}){#1}% + \put(.5\stockwidth,.5\stockheight){#1}% }% }% }{% @@ -329,7 +323,7 @@ \fi \ESO@tempdimb=-\uppermargin \AtPageUpperLeft{% - \put(\LenToUnit{\ESO@tempdima},\LenToUnit{\ESO@tempdimb}){#1}% + \put(\ESO@tempdima,\ESO@tempdimb){#1}% }% \endgroup } @@ -351,7 +345,7 @@ \advance\ESO@tempdimb-\headheight \advance\ESO@tempdimb-\headsep \AtPageUpperLeft{% - \put(\LenToUnit{\ESO@tempdima},\LenToUnit{\ESO@tempdimb}){#1}% + \put(\ESO@tempdima,\ESO@tempdimb){#1}% }% \endgroup } @@ -361,13 +355,13 @@ % \begin{macro}{\AtTextLowerLeft} % \begin{macrocode} \newcommand\AtTextLowerLeft[1]{\AtTextUpperLeft{% - \put(0,\LenToUnit{-\textheight}){#1}}} + \put(0,-\textheight){#1}}} % \end{macrocode} % \end{macro} % \begin{macro}{\AtTextCenter} % \begin{macrocode} \newcommand\AtTextCenter[1]{\AtTextUpperLeft{% - \put(\LenToUnit{.5\textwidth},\LenToUnit{-.5\textheight}){#1}}} + \put(.5\textwidth,-.5\textheight){#1}}} % \end{macrocode} % \end{macro} % \DescribeMacro{\ESO@HookIBG}\DescribeMacro{\ESO@HookIIBG} @@ -405,6 +399,7 @@ \@ifstar{\g@addto@macro\ESO@HookIIFG}{\g@addto@macro\ESO@HookIFG}} % \end{macrocode} % \end{macro} +% \changes{v3.0a}{2020/10/14}{LaTeX's shipout hooks instead of `atbegshi' (RN).} % \begin{macro}{\ClearShipoutPictureBG} % \begin{macro}{\ClearShipoutPicture} % \begin{macro}{\ClearShipoutPictureFG} @@ -419,15 +414,11 @@ % \end{macro} % \end{macro} % \end{macro} -% \begin{macro}{\AtBeginShipout} -% \begin{macro}{\AtBeginShipoutUpperLeft} -% \begin{macro}{\AtBeginShipoutUpperLeftForeground} -% (see package \pkgname{atbegshi}) % \changes{v2.0c}{2010/10/06}{bugfix for memoir class % (reported by YI Hoze)} % \begin{macrocode} \ESO@isMEMOIR{% - \AtBeginShipout{% + \newcommand*\ESO@MEMOIR@corr{% \ESO@tempdima=-\trimedge \advance\ESO@tempdima-\paperwidth \advance\ESO@tempdima\stockwidth @@ -438,41 +429,38 @@ \fi\fi \ESO@tempdimb=\ESO@yoffsetI \advance\ESO@tempdimb-\trimtop - \nointerlineskip - \AtBeginShipoutUpperLeft{% - \put(\LenToUnit{\ESO@tempdima},\LenToUnit{\ESO@tempdimb}){% - \ESO@HookIIIBG\ESO@HookIBG\ESO@HookIIBG - \global\let\ESO@HookIIBG\@empty - }% + } + \nointerlineskip + \AddToHook{shipout/background}{% + \ESO@MEMOIR@corr + \put(\ESO@tempdima,\ESO@tempdimb){% + \ESO@HookIIIBG\ESO@HookIBG\ESO@HookIIBG + \global\let\ESO@HookIIBG\@empty }% - \AtBeginShipoutUpperLeftForeground{% - \put(\LenToUnit{\ESO@tempdima},\LenToUnit{\ESO@tempdimb}){% - \ESO@HookIFG\ESO@HookIIFG\ESO@HookIIIFG - \global\let\ESO@HookIIFG\@empty - }% + }% + \AddToHook{shipout/foreground}{% + \ESO@MEMOIR@corr + \put(\ESO@tempdima,\ESO@tempdimb){% + \ESO@HookIFG\ESO@HookIIFG\ESO@HookIIIFG + \global\let\ESO@HookIIFG\@empty }% - } + }% }{% - \AtBeginShipout{% - \nointerlineskip - \AtBeginShipoutUpperLeft{% - \put(0,\LenToUnit{\ESO@yoffsetI}){% - \ESO@HookIIIBG\ESO@HookIBG\ESO@HookIIBG - \global\let\ESO@HookIIBG\@empty - }% + \nointerlineskip + \AddToHook{shipout/background}{% + \put(0,\ESO@yoffsetI){% + \ESO@HookIIIBG\ESO@HookIBG\ESO@HookIIBG + \global\let\ESO@HookIIBG\@empty }% - \AtBeginShipoutUpperLeftForeground{% - \put(0,\LenToUnit{\ESO@yoffsetI}){% - \ESO@HookIFG\ESO@HookIIFG\ESO@HookIIIFG - \global\let\ESO@HookIIFG\@empty - }% + }% + \AddToHook{shipout/foreground}{% + \put(0,\ESO@yoffsetI){% + \ESO@HookIFG\ESO@HookIIFG\ESO@HookIIIFG + \global\let\ESO@HookIIFG\@empty }% - } + }% } % \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} % \subsection{The background grid} % \begin{macrocode} \RequirePackage{keyval} @@ -613,7 +601,7 @@ \fi }% \ifESO@dvips\def\@tempb{eepic}\else\def\@tempb{epic}\fi - \def\@tempa{dotted}%\def\ESO@gap{\LenToUnit{6\@wholewidth}}% + \def\@tempa{dotted}%\def\ESO@gap{6\@wholewidth}% \ifx\@tempa\ESO@subgridstyle \IfFileExists{\@tempb.sty}% {% @@ -648,26 +636,26 @@ % \begin{macrocode} \ESO@div{\paperheight}{\ESO@griddelta}% \multiput(0,0)(0,\ESO@griddeltaY){\@tempcnta}% - {\ESO@hline{\LenToUnit{\paperwidth}}}% + {\ESO@hline{\paperwidth}}% % \end{macrocode} % --- vertical subgrid lines --- % \begin{macrocode} \ESO@div{\paperwidth}{\ESO@griddelta}% - \multiput(0,\LenToUnit{\ESO@yoffsetII})(\ESO@griddelta,0){\@tempcnta}% - {\ESO@vline{\LenToUnit{\paperheight}}}% + \multiput(0,\ESO@yoffsetII)(\ESO@griddelta,0){\@tempcnta}% + {\ESO@vline{\paperheight}}% \ESO@color{\ESO@gridcolor}% % \end{macrocode} % --- horizontal grid lines --- % \begin{macrocode} \ESO@div{\paperheight}{\ESO@gridDelta}% \multiput(0,0)(0,\ESO@gridDeltaY){\@tempcnta}% - {\ESO@Hline{\LenToUnit{\paperwidth}}}% + {\ESO@Hline{\paperwidth}}% % \end{macrocode} % --- vertical grid lines --- % \begin{macrocode} \ESO@div{\paperwidth}{\ESO@gridDelta}% - \multiput(0,\LenToUnit{\ESO@yoffsetII})(\ESO@gridDelta,0){\@tempcnta}% - {\ESO@Vline{\LenToUnit{\paperheight}}}% + \multiput(0,\ESO@yoffsetII)(\ESO@gridDelta,0){\@tempcnta}% + {\ESO@Vline{\paperheight}}% % \end{macrocode} % --- horizontal numbers --- % \changes{v1.1a}{2002/11/09}{Font setting added.} |