summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/textpos
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-08-25 18:03:57 +0000
committerKarl Berry <karl@freefriends.org>2006-08-25 18:03:57 +0000
commit50990a3a4c2f167320e149cdef49dbba792e298d (patch)
tree0c012003c3903de8df7cd380c0accf80a05166c2 /Master/texmf-dist/source/latex/textpos
parent66a43e051194001b16db6930ed7e0e30e8dcf2c2 (diff)
textpos 1.7 (24aug06)
git-svn-id: svn://tug.org/texlive/trunk@2014 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/textpos')
-rw-r--r--Master/texmf-dist/source/latex/textpos/textpos.drv12
-rw-r--r--Master/texmf-dist/source/latex/textpos/textpos.dtx97
2 files changed, 76 insertions, 33 deletions
diff --git a/Master/texmf-dist/source/latex/textpos/textpos.drv b/Master/texmf-dist/source/latex/textpos/textpos.drv
index 7085820cfbc..afc9b558934 100644
--- a/Master/texmf-dist/source/latex/textpos/textpos.drv
+++ b/Master/texmf-dist/source/latex/textpos/textpos.drv
@@ -6,7 +6,7 @@
%%
%% textpos.dtx (with options: `driver')
%% Textpos: absolute positioning of text on the page
-%% This software is copyright, 1999, 2001--2003, 2005 Norman Gray.
+%% This software is copyright, 1999, 2001--2003, 2005, 2006 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,14 +28,14 @@
%% 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 .
%%
-%%% Source: $Id: textpos.dtx.in,v 1.8 2006/08/10 21:40:56 norman Exp $
+%%% Source: $Id: textpos.dtx.in,v 1.9 2006/08/24 13:59:21 norman Exp $
%%
%%\def\ParseRCSDate$#1: #2 #3 ${\def\TP@Date{#2}}
-%%\ParseRCSDate$Date: 2006/08/10 21:40:56 $
+%%\ParseRCSDate$Date: 2006/08/24 13:59:21 $
\def\filename{textpos}
-\def\fileversion{1.6b}
-\def\filedate{2006/08/10}
-\def\docdate{2006 August 10}
+\def\fileversion{1.7}
+\def\filedate{2006/08/24}
+\def\docdate{2006 August 24}
\documentclass{ltxdoc}
\title{Textpos: absolute positioning of text on the page}
\author{Norman Gray\\(\texttt{norman@astro.gla.ac.uk})}
diff --git a/Master/texmf-dist/source/latex/textpos/textpos.dtx b/Master/texmf-dist/source/latex/textpos/textpos.dtx
index 44a2141c1f4..9e29d4df826 100644
--- a/Master/texmf-dist/source/latex/textpos/textpos.dtx
+++ b/Master/texmf-dist/source/latex/textpos/textpos.dtx
@@ -2,7 +2,7 @@
% This is textpos.dtx, which allows you to place text (and graphics)
% anywhere on the LaTeX page. It's useful for posters.
%
-%% This software is copyright, 1999, 2001--2003, 2005 Norman Gray.
+%% This software is copyright, 1999, 2001--2003, 2005, 2006 Norman Gray.
%%
%% This program is free software; you can redistribute it and/or
%% modify it under the terms of the GNU General Public License
@@ -24,15 +24,15 @@
%% 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 .
%%
-%<+package|driver|example>%%% Source: $Id: textpos.dtx.in,v 1.8 2006/08/10 21:40:56 norman Exp $
+%<+package|driver|example>%%% Source: $Id: textpos.dtx.in,v 1.9 2006/08/24 13:59:21 norman Exp $
%%
%<*package|driver>
%%\def\ParseRCSDate$#1: #2 #3 ${\def\TP@Date{#2}}
-%%\ParseRCSDate$Date: 2006/08/10 21:40:56 $
+%%\ParseRCSDate$Date: 2006/08/24 13:59:21 $
\def\filename{textpos}
-\def\fileversion{1.6b}
-\def\filedate{2006/08/10}
-\def\docdate{2006 August 10}
+\def\fileversion{1.7}
+\def\filedate{2006/08/24}
+\def\docdate{2006 August 24}
%</package|driver>
%<+package>\NeedsTeXFormat{LaTeX2e}
%<+package>\ProvidesPackage{textpos}[\filedate\space v\fileversion]
@@ -351,7 +351,8 @@
% |\textblockcolour{|\meta{colour}|}|
% \end{quote}
% all text blocks following will have their background filled with the
-% specified colour, which has to be declared, as usual, in a
+% specified colour, which must be one of the standard colours or have
+% been declared in a
% |\definecolor| declaration in the document preamble. This colour
% may be overridden for individual text blocks by giving this command
% within the \Lenv{textblock} environment. If you wish a block not to
@@ -359,12 +360,26 @@
% at a time, with the command |\textblockcolour{}| inside the
% \Lenv{textblock} environment.
%
+% \DescribeMacro{\textblockrulecolour}
+% You can similarly change the colour of the borders around the text
+% block. If you give the command
+% \begin{quote}
+% |\textblockrulecolour{|\meta{colour}|}|
+% \end{quote}
+% then following text blocks will have their border in the given
+% colour, which must again be either one of the standard ones of
+% declared in the document preamble.
+%
% \DescribeMacro{\textblockcolor}
% For the benefit of those who observe Webster's spelling
% reforms, |\textblockcolor| is defined as a synonym for
% |\textblockcolour|, but those who would condemn such anaemic half measures
% \DescribeMacro{\tekstblokkulur}
% can use |\tekstblokkulur| instead.
+% \DescribeMacro{\textblockrulecolor}
+% \DescribeMacro{\tekstblokroolkulur}
+% There are also the corresponding spelling-reform variants of
+% |\textblockrulecolour|.
%
% \subsection{Package options}
% \label{packopts}
@@ -373,7 +388,9 @@
% \begin{description}
% \item[\Lopt{showboxes}]When you are laying things out, it can be
% useful to have the boxes drawn in for you. This option draws a box
-% fitting closely round the set text.
+% fitting closely round the set text. You can turn this on and off
+% within the file using the |\TPshowboxestrue| and |\TPshowboxesfalse|
+% commands.
% \item[\Lopt{noshowtext}]This suppresses the display of the text in
% each block (so it's not really usable without the \Lopt{showboxes}
% option). The resulting box will be the correct size, but empty,
@@ -416,6 +433,10 @@
% size parameters of the \Lenv{textblock} environment. Set it using
% the command \cmd|\setlength{\TPVertModule}{<dimen>}| (or |\addtolength|).
% The default is one sixteenth of the paper height.
+% \item[\texttt{\bslash TPshowboxestrue} and \texttt{\bslash TPshowboxesfalse}]
+% You can control whether text blocks have the rule around them by
+% using the |\TPshowboxestrue| and |\TPshowboxesfalse| commands. The
+% \Lopt{showboxes} option simply sets the initial value of this switch.
% \item[\texttt{\bslash TPboxrulesize}]
% \DescribeMacro{\TPboxrulesize}
% When you use the \Lopt{showboxes} option,
@@ -423,7 +444,7 @@
% when you are previewing your document, or if you simply like bold
% frames and wish to make them a feature of your poster's design, you
% may adjust the size using |\setlength| or |\addtolength|. The
-% default is 0.4pt.
+% default is 0.4pt. See also the |\textblockrulecolour| command.
% \item[\texttt{\bslash textblocklabel}]
% \DescribeMacro{\textblocklabel}
% This may be used within any \Lenv{textblock}
@@ -529,10 +550,13 @@
% box~255 was (erroneously) not a vbox, and passed on a fix from Hans
% Hagen.
%
-% Jenny Maresh and Matthias Jerg independenty suggested that it would
+% Jenny Maresh and Matthias Jerg independently suggested that it would
% be useful to specify a margin around the block of text in a
% \Lenv{textblock} environment. That resulted in the |\TPMargin|
-% command (after an unconscionably long gestation period).
+% command (after an unconscionably long gestation period). Rusen Lu
+% suggested that one should be able to specify the colours of the box
+% borders, and that it would be useful to turn the bordering feature
+% on and off within the file.
%
% Thanks also for bugreports to Jozef Bednarcik and Wolfgang Fleischer.
%
@@ -585,9 +609,9 @@ located at that point, rather than the top-left corner.
% Allow the user to switch on display of boxes round the text.
% \begin{macrocode}
%<*package>
-\newif\ifTP@showboxes
-\TP@showboxesfalse
-\DeclareOption{showboxes}{\TP@showboxestrue}
+\newif\ifTPshowboxes
+\TPshowboxesfalse
+\DeclareOption{showboxes}{\TPshowboxestrue}
% \end{macrocode}
% \dots and switch off printing of text.
% \begin{macrocode}
@@ -782,7 +806,8 @@ located at that point, rather than the top-left corner.
% \end{macrocode}
%
% The rules round the boxes are of width |\TPboxrulesize|, and the
-% label text within them is |\normalsize|.
+% label text within them is |\normalsize|. For the colour, see
+% |\textblockrulecolour|.
% \begin{macrocode}
\newdimen\TPboxrulesize
\setlength{\TPboxrulesize}{0.4pt}
@@ -866,6 +891,24 @@ located at that point, rather than the top-left corner.
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\textblockrulecolour}
+% \changes{v1.7}{2006/08/24}{Add textblockrulecolour}
+% \begin{macrocode}
+\def\textblockrulecolour#1{%
+ \@ifundefined{color}%
+ {\gdef\TP@rulecolour{}}% ignore argument, switch off colour blocking below
+ {%
+ \def\@tempa{#1}
+ \gdef\TP@rulecolour{#1}%
+ }}
+\def\TP@rulecolour{black}
+% \end{macrocode}
+% Plus spelling-reform variants:
+% \begin{macrocode}
+\let\textblockrulecolor\textblockrulecolour
+\let\tekstblokroolkulur\textblockrulecolour
+% \end{macrocode}
+%
% \begin{macro}{\textblock}
% Now define the start of the textblock environment. Read the first
% argument, and save it for the moment as |\@tempdima|. If we are
@@ -947,8 +990,8 @@ located at that point, rather than the top-left corner.
% \end{macrocode}
% If we're showing boxes, then draw a rule here
% \begin{macrocode}
- \ifTP@showboxes
- \hrule height0pt depth \TPboxrulesize
+ \ifTPshowboxes
+ {\color{\TP@rulecolour} \hrule height0pt depth \TPboxrulesize }%
\vskip-\TPboxrulesize
\fi
% \end{macrocode}
@@ -1007,9 +1050,9 @@ located at that point, rather than the top-left corner.
% \begin{macrocode}
\def\TP@commonendtextblock{%
\vskip \TP@absmargin
- \ifTP@showboxes
+ \ifTPshowboxes
\vskip-\TPboxrulesize
- \hrule depth 0pt height \TPboxrulesize
+ {\color{\TP@rulecolour}\hrule depth 0pt height \TPboxrulesize}%
\fi
\egroup % end of \TP@textbox
% \end{macrocode}
@@ -1112,16 +1155,16 @@ located at that point, rather than the top-left corner.
\ifx\TP@defaultblockcolour\@undefined \else
\global\let\TP@blockcolour\TP@defaultblockcolour
\fi
- \ifTP@showboxes
- \vrule width \TPboxrulesize
+ \ifTPshowboxes
+ {\color{\TP@rulecolour}\vrule width \TPboxrulesize}%
\hskip -\TPboxrulesize
\fi
\ifTP@showtext
\box\TP@textbox
\else
\vbox to\ht\TP@textbox{%
- \ifTP@showboxes
- \hrule depth 0pt height \TPboxrulesize \vskip-\TPboxrulesize
+ \ifTPshowboxes
+ {\color{\TP@rulecolour}\hrule depth 0pt height \TPboxrulesize \vskip-\TPboxrulesize}%
\fi
\vskip\smallskipamount
\hbox to\wd\TP@textbox{%
@@ -1135,15 +1178,15 @@ located at that point, rather than the top-left corner.
\hss
}%
\vss
- \ifTP@showboxes
+ \ifTPshowboxes
\vskip -\TPboxrulesize
- \hrule depth 0pt height \TPboxrulesize
+ {\color{\TP@rulecolour}\hrule depth 0pt height \TPboxrulesize}%
\fi
}%
\fi
- \ifTP@showboxes
+ \ifTPshowboxes
\hskip -\TPboxrulesize
- \vrule width \TPboxrulesize
+ {\color{\TP@rulecolour}\vrule width \TPboxrulesize}%
\fi
\hss}%
\vss