diff options
author | Karl Berry <karl@freefriends.org> | 2012-11-15 00:18:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-11-15 00:18:33 +0000 |
commit | fb9b612c3d1d6ac4d7201bf7a95ebe3fe8a844d1 (patch) | |
tree | 4fa003a8bb171436e719ae5b9968969aea52b3bc /Master/texmf-dist/tex/latex | |
parent | eafc90360cb16a334a31f04e761f7ba4de4d5529 (diff) |
textpos 1.7i (14nov12)
git-svn-id: svn://tug.org/texlive/trunk@28261 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/textpos/textpos.sty | 64 |
1 files changed, 29 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/latex/textpos/textpos.sty b/Master/texmf-dist/tex/latex/textpos/textpos.sty index cf59f923cdb..c931d423642 100644 --- a/Master/texmf-dist/tex/latex/textpos/textpos.sty +++ b/Master/texmf-dist/tex/latex/textpos/textpos.sty @@ -6,7 +6,7 @@ %% %% textpos.dtx (with options: `package') %% Textpos: absolute positioning of text on the page -%% This software is copyright, 1999, 2001--2003, 2005--7, 2009--10 Norman Gray. +%% This software is copyright, 1999, 2001--2003, 2005-7, 2009-12 Norman Gray. %% %% This program is free software; you can redistribute it and/or %% modify it under the terms of the GNU General Public License @@ -28,11 +28,12 @@ %% See the file LICENCE for a copy of the GPL. %% You can also find an online copy at http://www.gnu.org/copyleft/gpl.html . %% -%% Mercurial ident: 9c8abea513c2, 2012-06-01 16:23 +0100 +%% Mercurial ident: 67a1f060e5fa, 2012-11-13 15:31 +0000 %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{textpos}[2012/06/01 v1.7h] -\typeout{Package: textpos 2012/06/01 1.7h, absolute positioning of text on the page} +\ProvidesPackage{textpos}[2012/11/13 v1.7i] +\typeout{Package: textpos 2012/11/13 1.7i, absolute positioning of text on the page} + \newif\ifTPshowboxes \TPshowboxesfalse \DeclareOption{showboxes}{\TPshowboxestrue} @@ -141,42 +142,35 @@ \def\textblocklabel#1{\gdef\TP@textblocklabel{#1}} \def\textblockcolour#1{% \@ifundefined{color}% - {% - \gdef\TP@blockcolour{}% ignore argument, switch off colour blocking below - \TP@dummycolorpackage - } - {% - \def\@tempa{#1} - \gdef\TP@blockcolour{#1} - \ifx\TP@defaultblockcolour\@undefined - \gdef\TP@defaultblockcolour{#1} - \fi + {\PackageWarning{textpos}{command textblockcolour used,\MessageBreak + but {color} package not loaded.\MessageBreak + Colour changes ignored.}} + {\gdef\TP@blockcolour{#1} + \ifx\TP@defaultblockcolour\@undefined + \gdef\TP@defaultblockcolour{#1} + \fi }} \def\TP@blockcolour{} % safe initial default \let\textblockcolor\textblockcolour \let\tekstblokkulur\textblockcolour \def\textblockrulecolour#1{% \@ifundefined{color}% - {% - \gdef\TP@rulecolour{}% ignore argument, switch off colour blocking below - \TP@dummycolorpackage - } - {% - \def\@tempa{#1} - \gdef\TP@rulecolour{#1}% - }} + {\PackageWarning{textpos}{command textblockrulecolour used,\MessageBreak + but {color} package not loaded.\MessageBreak + Colour changes ignored.}} + {\gdef\TP@rulecolour{#1}}} \def\TP@rulecolour{black} \let\textblockrulecolor\textblockrulecolour \let\tekstblokroolkulur\textblockrulecolour -\def\TP@dummycolorpackage{% - \PackageWarning{textpos}{command textblockrulecolour used,\MessageBreak - but {color} package not loaded.\MessageBreak - Colour changes ignored.}% - \DeclareRobustCommand\color[2][]{}% Replace \color{foo} and \color[x]{foo} - % The following line may be redundant, given the TP@blockcolour code - % below, but it does no harm. - \gdef\color@block##1##2##3{}% - } +\gdef\TP@color[#1]#2{} +\def\TP@checkdummycolorpackage{% + \@ifundefined{color}% + {\globaldefs=1 + \DeclareRobustCommand\color[2][]{}% + \def\color@block##1##2##3{}% + \globaldefs=0 }{}% + \global\let\TP@checkdummycolorpackage\relax % don't come here again +} \def\textblock#1{% \@tempdima=#1\TPHorizModule \ifvmode\else @@ -212,6 +206,7 @@ \let\@xympar\TP@xympar \setbox\TP@textbox=\vbox\bgroup \ifTPshowboxes + \TP@checkdummycolorpackage {\color{\TP@rulecolour}\hrule height0pt depth \TPboxrulesize }% \vskip-\TPboxrulesize \fi @@ -288,10 +283,9 @@ \setbox0=\vbox to 0pt{\vskip\@tempdimb \hbox to 0pt{\hskip\@tempdima \ifx\TP@blockcolour\@empty \else - {% defaults for TP@blockcolour mean we should never get here if - % the {color} package is not loaded - \color{\TP@blockcolour}% - \color@block{\wd\TP@textbox}{\ht\TP@textbox}{\dp\TP@textbox}% + {\TP@checkdummycolorpackage + \color{\TP@blockcolour}% + \color@block{\wd\TP@textbox}{\ht\TP@textbox}{\dp\TP@textbox}% }% \fi \ifx\TP@defaultblockcolour\@undefined \else |