diff options
author | Karl Berry <karl@freefriends.org> | 2019-05-04 22:47:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-05-04 22:47:13 +0000 |
commit | b29d97e34cfe9a6d8ecf55de223c21ae703bda8a (patch) | |
tree | 498144d9a2082c1e12cbf4c3fb28d00a58754221 /Master/texmf-dist/tex/latex/textpos | |
parent | c454261d3133ff69d91828cf2411f1d830c7b249 (diff) |
textpos (16apr19)
git-svn-id: svn://tug.org/texlive/trunk@50988 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/textpos')
-rw-r--r-- | Master/texmf-dist/tex/latex/textpos/textpos.sty | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/textpos/textpos.sty b/Master/texmf-dist/tex/latex/textpos/textpos.sty index e43feb50a6c..ad216f0a4ab 100644 --- a/Master/texmf-dist/tex/latex/textpos/textpos.sty +++ b/Master/texmf-dist/tex/latex/textpos/textpos.sty @@ -7,7 +7,7 @@ %% textpos.dtx (with options: `package') %% Textpos: absolute positioning of text on the page %%%% File: textpos.dtx -%%%% Copyright 1999, 2001-03, 2005-7, 2009-12, 2014-16., Norman Gray +%%%% Copyright 1999-2019, Norman Gray %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -22,18 +22,18 @@ %% The Current Maintainer of this work is Norman Gray <http://nxg.me.uk> %% %% This work consists of the files textpos.dtx and textpos.ins, -%% and the derived file textpos.cls. +%% and the derived file textpos.sty. %% %% Author: Norman Gray, norman@astro.gla.ac.uk. %% Department of Physics and Astronomy, University of Glasgow, UK %% %% See the file LICENCE for a copy of the LPPL. %% -%% Mercurial ident: 8aa202e2b283, 2016-06-07 23:52 +0100 +%% Mercurial ident: 09ee0efc21ac (1.9.1+0), 2019-04-15 22:14 +0100 %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{textpos}[2016/06/07 v1.8] -\typeout{Package: textpos 2016/06/07 1.8, absolute positioning of text on the page} +\ProvidesPackage{textpos}[2019/04/15 v1.9.1] +\typeout{Package: textpos 2019/04/15 1.9.1, absolute positioning of text on the page} \newif\ifTPshowboxes \TPshowboxesfalse @@ -52,6 +52,9 @@ \TP@chattertrue \DeclareOption{quiet}{\TP@chatterfalse} \DeclareOption{verbose}{\TP@chattertrue} +\newif\ifTP@displayholdbox + \TP@displayholdboxtrue +\DeclareOption{discardcontent}{\TP@displayholdboxfalse} \ProcessOptions \ifTP@abspos \RequirePackage{everyshi} @@ -62,6 +65,8 @@ \define@key{tp}{verbose}{\csname TP@chatter#1\endcsname} \define@key{tp}{showboxes}{\csname TPshowboxes#1\endcsname} \define@key{tp}{showtext}{\csname TP@showtext#1\endcsname} +\define@key{tp}{discardcontent}{\csname @tempswa#1\endcsname + \if@tempswa\TP@displayholdboxfalse\else\TP@displayholdboxtrue\fi} \def\TPoptions{\setkeys{tp}} \def\TP@xfloat#1[#2]{ \par\def\@captype{#1}% @@ -77,7 +82,7 @@ \newbox\TP@textbox \ifTP@abspos \newbox\TP@holdbox % starts off void - \AtEndDocument{\ifvoid\TP@holdbox \else \hbox{}\fi} + \AtEndDocument{\ifTP@displayholdbox\ifvoid\TP@holdbox \else \hbox{}\fi\fi} \fi \newdimen\TPHorizModule \newdimen\TPVertModule @@ -180,6 +185,8 @@ \globaldefs=0 }{}% \global\let\TP@checkdummycolorpackage\relax % don't come here again } +\def\TP@referenceposition{0,0} +\def\TPReferencePosition#1{\def\TP@referenceposition{#1}} \def\textblock#1{% \@tempdima=#1\TPHorizModule \ifvmode\else @@ -193,7 +200,7 @@ \par % force us back into vertical mode \fi \fi - \@ifnextchar[{\TP@textblock}{\TP@textblock[0,0]}%] bracematch + \@ifnextchar[{\TP@textblock}{\expandafter\TP@textblock\expandafter[\TP@referenceposition]}%] bracematch } \def\TP@textblockstar#1{% \setlength{\@tempdima}{#1} @@ -205,7 +212,7 @@ Alignment may work out wrongly.}% \par % force us back into vertical mode \fi - \@ifnextchar[{\TP@textblock}{\TP@textblock[0,0]}%] bracematch + \@ifnextchar[{\TP@textblock}{\expandafter\TP@textblock\expandafter[\TP@referenceposition]}%] bracematch } \expandafter\let\csname textblock*\endcsname\TP@textblockstar \newtoks\TP@tbargs @@ -345,19 +352,19 @@ }% \ifTP@abspos \ifTP@overlay - \EveryShipout{% + \EveryShipout{\ifTP@displayholdbox \global\setbox\@cclv\vbox{% \vbox to 0pt{\ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi \vss}% \unvbox\TP@holdbox % TP@holdbox is now void - } - }% + }% + \fi}% \else - \EveryShipout{% + \EveryShipout{\ifTP@displayholdbox \global\setbox\@cclv\vbox{% \unvbox\TP@holdbox \ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi }% - }% + \fi}% \fi \textblockorigin{0pt}{0pt}% \fi |