summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-01-17 07:37:48 +0000
committerNorbert Preining <preining@logic.at>2008-01-17 07:37:48 +0000
commitf68c780d6454f39b2b65fd74df409817b7c2fe8b (patch)
tree251ae19c12f7a2cc2da35b008f9559f499ca58d2 /Master
parent3ad540de17823d46730b0ded939b821a7ed0918a (diff)
update textpos from ctan
git-svn-id: svn://tug.org/texlive/trunk@6283 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/textpos/README2
-rw-r--r--Master/texmf-dist/doc/latex/textpos/VERSION-1.7b1
-rw-r--r--Master/texmf-dist/doc/latex/textpos/VERSION-1.7d1
-rw-r--r--Master/texmf-dist/doc/latex/textpos/examples/t8.tex29
-rw-r--r--Master/texmf-dist/doc/latex/textpos/niepraschk-eso-pic.pdfbin0 -> 15677 bytes
-rw-r--r--Master/texmf-dist/doc/latex/textpos/niepraschk-eso-pic.tex87
-rw-r--r--Master/texmf-dist/doc/latex/textpos/textpos-example.tex2
-rw-r--r--Master/texmf-dist/doc/latex/textpos/textpos.html26
-rw-r--r--Master/texmf-dist/doc/latex/textpos/textpos.pdfbin90173 -> 164554 bytes
-rw-r--r--Master/texmf-dist/source/latex/textpos/textpos.drv12
-rw-r--r--Master/texmf-dist/source/latex/textpos/textpos.dtx158
-rw-r--r--Master/texmf-dist/tex/latex/textpos/textpos.sty33
12 files changed, 265 insertions, 86 deletions
diff --git a/Master/texmf-dist/doc/latex/textpos/README b/Master/texmf-dist/doc/latex/textpos/README
index 9aa4812b538..35582c812f9 100644
--- a/Master/texmf-dist/doc/latex/textpos/README
+++ b/Master/texmf-dist/doc/latex/textpos/README
@@ -2,7 +2,7 @@
Textpos: absolute positioning of text on the LaTeX page
-------------------------------------------------------
-Version 1.7b
+Version 1.7d
This package facilitates placing boxes at absolute positions on the
LaTeX page. There are several reasons why this might be useful, but
diff --git a/Master/texmf-dist/doc/latex/textpos/VERSION-1.7b b/Master/texmf-dist/doc/latex/textpos/VERSION-1.7b
deleted file mode 100644
index f15d65c91f7..00000000000
--- a/Master/texmf-dist/doc/latex/textpos/VERSION-1.7b
+++ /dev/null
@@ -1 +0,0 @@
-textpos-1.7b, released 2007 March 21
diff --git a/Master/texmf-dist/doc/latex/textpos/VERSION-1.7d b/Master/texmf-dist/doc/latex/textpos/VERSION-1.7d
new file mode 100644
index 00000000000..46597ad4e9a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/VERSION-1.7d
@@ -0,0 +1 @@
+textpos-1.7d, released 2007 March 30
diff --git a/Master/texmf-dist/doc/latex/textpos/examples/t8.tex b/Master/texmf-dist/doc/latex/textpos/examples/t8.tex
index 25d05d8da94..c86083410a9 100644
--- a/Master/texmf-dist/doc/latex/textpos/examples/t8.tex
+++ b/Master/texmf-dist/doc/latex/textpos/examples/t8.tex
@@ -1,3 +1,5 @@
+%%% Testing: floats
+
\documentclass{article}
\usepackage[showboxes]{textpos}
@@ -5,29 +7,44 @@
\begin{document}
-\begin{textblock}{5}(0,0)
+\listoffigures
+
+Here is some text.
+\marginpar{\dots with a marginal note}
+
+\begin{textblock}{5}(0,5)
In this document we have figures~\ref{figa} and~\ref{figb}.
\end{textblock}
-\begin{textblock}{5}(1,1)
+\begin{textblock}{5}(1,6)
Here is a figure.
\begin{figure}
Text
- \caption{This is the first figure}
+ \caption[this is figure 1]{This is the first figure}
\label{figa}
\end{figure}
\end{textblock}
-\begin{textblock}{5}(2,2)
- Here is another figure.
+\begin{textblock}{5}(2,7)
+ Here is another figure.%error: \marginpar{\dots and a marginpar in block}
+ % perhaps the following ought to be OK
+ %\begin{minipage}{4cm} Hello minipage\marginpar{ping!}\end{minipage}
\begin{figure}
More text
\caption{\label{figb}This is the second figure}
\end{figure}
\end{textblock}
-\begin{textblock}{5}(3,3)
+\begin{textblock}{5}(3,8)
We can still refer to figures~\ref{figb} and~\ref{figa}.
\end{textblock}
+Here is text, just before the outer figure.
+\begin{figure}
+\hrule
+Figure Text
+\hrule
+\caption[final figure]{\label{figc}This is the final figure}
+\end{figure}
+
\end{document}
diff --git a/Master/texmf-dist/doc/latex/textpos/niepraschk-eso-pic.pdf b/Master/texmf-dist/doc/latex/textpos/niepraschk-eso-pic.pdf
new file mode 100644
index 00000000000..b1c6635b9c1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/niepraschk-eso-pic.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/textpos/niepraschk-eso-pic.tex b/Master/texmf-dist/doc/latex/textpos/niepraschk-eso-pic.tex
new file mode 100644
index 00000000000..10be9ec8af9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/niepraschk-eso-pic.tex
@@ -0,0 +1,87 @@
+
+% Rolf Niepraschk, nieprasck@ptb.de, 2002-11-24
+% A funny demo for `textpos' with a backgroundgrid from `eso-pic'.
+\documentclass[a4paper,draft]{article}
+
+%\usepackage[absolute,showboxes]{textpos}
+\usepackage[absolute]{textpos}
+\usepackage[colorgrid,texcoord]{eso-pic}[2002/11/16]
+\usepackage{calc}
+
+\newcommand\StartX{25mm} \newcommand\StartY{40mm}
+\newcommand\Wi{160mm} \newcommand\Wii{40mm} \newcommand\Wiii{60mm}
+\newcommand\Hi{20mm} \newcommand\Hii{100mm}
+
+\pagestyle{empty}
+
+\begin{document}
+
+\textblockorigin{0cm}{0cm}
+
+\begin{textblock*}{\Wi}(\StartX,\StartY)%
+ \noindent\colorbox[rgb]{0,0,1}{%
+ \begin{minipage}[c][\Hi - 2\fboxsep][c]{\linewidth - 2\fboxsep}%
+ \centering\Huge\textbf{FOO}%
+ \end{minipage}}%
+\end{textblock*}
+
+\begin{textblock*}{\Wii}(\StartX,\StartY + 20mm)%
+ \noindent\colorbox[rgb]{0,1,0}{%
+ \begin{minipage}[c][\Hii - 2\fboxsep][c]{\linewidth - 2\fboxsep}%
+ \centering\Huge\textbf{BAR}%
+ \end{minipage}}%
+\end{textblock*}
+
+\begin{textblock*}{\Wii}(\StartX + \Wi - \Wii,\StartY + 20mm)%
+ \noindent\colorbox[rgb]{1,1,0}{%
+ \begin{minipage}[c][\Hii - 2\fboxsep][c]{\linewidth - 2\fboxsep}%
+ \centering\Huge\textbf{BAR}%
+ \end{minipage}}%
+\end{textblock*}
+
+\begin{textblock*}{\Wi}(\StartX,\Wi)%
+ \noindent\colorbox[rgb]{1,0,1}{%
+ \begin{minipage}[c][\Hi - 2\fboxsep][c]{\linewidth - 2\fboxsep}%
+ \centering\Huge\textbf{FOO}%
+ \end{minipage}}%
+\end{textblock*}
+
+\begin{textblock*}{\Wiii}(75mm,70mm)%
+ \setlength\fboxrule{2pt}%
+ \noindent\fbox{%
+ \begin{minipage}{\linewidth - 2\fboxsep - 2\fboxrule}%
+ \Large\itshape
+ Text Text Text Text Text
+ Text Text Text Text Text
+ Text Text Text Text Text
+ Text Text Text Text Text
+ Text Text Text Text Text
+ Text Text Text Text Text
+ Text Text Text Text Text
+ \end{minipage}}%
+\end{textblock*}
+
+\begin{textblock*}{\Wiii}(75mm,130mm)%
+ \setlength\fboxrule{2pt}%
+ \noindent\fbox{%
+ \begin{minipage}[c][\Hi - 2\fboxsep - 2\fboxrule]%
+ {\linewidth - 2\fboxsep - 2\fboxrule}%
+ \centering\Huge\textbf{\LaTeX}
+ \end{minipage}}%
+\end{textblock*}
+
+\begin{textblock*}{\Wi}(\StartX,\StartY + 160mm)%
+ \noindent\colorbox[rgb]{0,1,1}{%
+ \begin{minipage}[c][\Hi - 2\fboxsep][c]{\linewidth - 2\fboxsep}%
+ \centering\Huge\textbf{FOOBAR}%
+ \end{minipage}}%
+\end{textblock*}
+
+\begin{textblock*}{\Wi}(\StartX,\StartY + 200mm)%
+ \noindent\colorbox[rgb]{1,0,0}{%
+ \begin{minipage}[c][\Hi - 2\fboxsep][c]{\linewidth - 2\fboxsep}%
+ \centering\Huge\textbf{BAZ}%
+ \end{minipage}}%
+\end{textblock*}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/textpos/textpos-example.tex b/Master/texmf-dist/doc/latex/textpos/textpos-example.tex
index 9ae78c096c8..0d280eee76a 100644
--- a/Master/texmf-dist/doc/latex/textpos/textpos-example.tex
+++ b/Master/texmf-dist/doc/latex/textpos/textpos-example.tex
@@ -28,7 +28,7 @@
%% 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.13 2007/03/21 20:37:33 norman Exp $
+%%% Source: $Id: textpos.dtx.in,v 1.18 2007/04/04 13:22:51 norman Exp $
%%
\documentclass{article}
diff --git a/Master/texmf-dist/doc/latex/textpos/textpos.html b/Master/texmf-dist/doc/latex/textpos/textpos.html
index 71c31d826a7..4ded91ab1f9 100644
--- a/Master/texmf-dist/doc/latex/textpos/textpos.html
+++ b/Master/texmf-dist/doc/latex/textpos/textpos.html
@@ -1,8 +1,13 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
+<head profile="http://dublincore.org/documents/dcq-html/">
<title>Textpos</title>
+<meta name='DC.subject' content='latex, textpos, absolute positioning'/>
+<meta name='DC.title' content='Textpos'/>
+<meta name='DC.date' content='2006-8-24'/> <!-- 1.7 release date -->
+<meta name='rcsdate' content='$Date: 2007/10/15 17:08:07 $'/>
+<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
<link href="http://nxg.me.uk" rev="author"/>
<link type="text/css" rel="stylesheet"
href="style.css"/>
@@ -15,7 +20,7 @@
page.</p>
<p>The textpos home page is at <a href='http://purl.org/nxg/dist/textpos'
><code>http://purl.org/nxg/dist/textpos</code></a></p>
-<p>Version 1.7b, 2007 March 21.</p>
+<p>Version 1.7d, 2007 March 30.</p>
</div>
<p>This package facilitates placing boxes at absolute positions on the
@@ -34,10 +39,25 @@ href="textpos.pdf" >manual (pdf)</a>.</p>
href="http://purl.org/nxg/note/posters" >creating
conference posters with LaTeX</a>.</p>
+<p>Rolf Niepraschk provided me with a wonderful demo
+(<a href="niepraschk-eso-pic.tex" >tex</a>,
+<a href="niepraschk-eso-pic.pdf" >pdf</a>)
+of using Textpos along with his <code>eso-pic</code> package,
+and the <code>calc</code> package, to produce a grid which can help lay out
+material on the page.</p>
<h3>History</h3>
<dl>
+<dt>1.7d, 2007 March 30</dt>
+<dd>Axel Sommerfeldt suggested a further alternative approach, even more
+lightweight, and I incorporated a version of that.</dd>
+
+<dt>1.7c, 2007 March 29</dt>
+<dd>Giovanni Radilla reported a problem with captions, which meant that the
+captions weren't appearing properly in the list of figures. Dan
+Luecking and Axel Sommerfeldt analysed the problem precisely, and the
+latter provided code which I've incorporated in this fix.</dd>
<dt>1.7b, 2007 March 21</dt>
<dd>Robert Whittaker reported a problem with <code>\TPmargin</code>,
@@ -149,7 +169,7 @@ up-to-date versions available there.</p>
<div class="signature">
<a href="http://nxg.me.uk" >Norman Gray</a><br />
-2007 March 21
+2007 March 30
</div>
</body>
diff --git a/Master/texmf-dist/doc/latex/textpos/textpos.pdf b/Master/texmf-dist/doc/latex/textpos/textpos.pdf
index 1784dbe3b2d..fc40602ab7d 100644
--- a/Master/texmf-dist/doc/latex/textpos/textpos.pdf
+++ b/Master/texmf-dist/doc/latex/textpos/textpos.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/textpos/textpos.drv b/Master/texmf-dist/source/latex/textpos/textpos.drv
index 40f151eb618..71a01a01bea 100644
--- a/Master/texmf-dist/source/latex/textpos/textpos.drv
+++ b/Master/texmf-dist/source/latex/textpos/textpos.drv
@@ -28,17 +28,17 @@
%% 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.13 2007/03/21 20:37:33 norman Exp $
+%%% Source: $Id: textpos.dtx.in,v 1.18 2007/04/04 13:22:51 norman Exp $
%%
%%\def\ParseRCSDate$#1: #2 #3 ${\def\TP@Date{#2}}
-%%\ParseRCSDate$Date: 2007/03/21 20:37:33 $
+%%\ParseRCSDate$Date: 2007/04/04 13:22:51 $
\def\filename{textpos}
-\def\fileversion{1.7b}
-\def\filedate{2007/03/21}
-\def\docdate{2007 March 21}
+\def\fileversion{1.7d}
+\def\filedate{2007/03/30}
+\def\docdate{2007 March 30}
\documentclass{ltxdoc}
\title{Textpos: absolute positioning of text on the page}
-\author{Norman Gray\\(\texttt{norman@astro.gla.ac.uk})}
+\author{Norman Gray\\(\texttt{http://nxg.me.uk})}
\date{Version \fileversion, \filedate}
\newcommand\Lopt[1]{\textsf {\small [#1]}}
\newcommand\file[1]{\texttt {#1}}
diff --git a/Master/texmf-dist/source/latex/textpos/textpos.dtx b/Master/texmf-dist/source/latex/textpos/textpos.dtx
index b13c43e782e..da206294dc1 100644
--- a/Master/texmf-dist/source/latex/textpos/textpos.dtx
+++ b/Master/texmf-dist/source/latex/textpos/textpos.dtx
@@ -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.13 2007/03/21 20:37:33 norman Exp $
+%<+package|driver|example>%%% Source: $Id: textpos.dtx.in,v 1.18 2007/04/04 13:22:51 norman Exp $
%%
%<*package|driver>
%%\def\ParseRCSDate$#1: #2 #3 ${\def\TP@Date{#2}}
-%%\ParseRCSDate$Date: 2007/03/21 20:37:33 $
+%%\ParseRCSDate$Date: 2007/04/04 13:22:51 $
\def\filename{textpos}
-\def\fileversion{1.7b}
-\def\filedate{2007/03/21}
-\def\docdate{2007 March 21}
+\def\fileversion{1.7d}
+\def\filedate{2007/03/30}
+\def\docdate{2007 March 30}
%</package|driver>
%<+package>\NeedsTeXFormat{LaTeX2e}
%<+package>\ProvidesPackage{textpos}[\filedate\space v\fileversion]
@@ -41,7 +41,7 @@
%<*driver>
\documentclass{ltxdoc}
\title{Textpos: absolute positioning of text on the page}
-\author{Norman Gray\\(\texttt{norman@astro.gla.ac.uk})}
+\author{Norman Gray\\(\texttt{http://nxg.me.uk})}
\date{Version \fileversion, \filedate}
\newcommand\Lopt[1]{\textsf {\small [#1]}}
\newcommand\file[1]{\texttt {#1}}
@@ -112,12 +112,12 @@
% let me know if you experience problems in this respect.
%
% This package requires the services of Martin Schr\"oder's package
-% \texttt{everyshi}. You will need to download this package from CTAN
-% first. See
+% \texttt{everyshi}. If this is not already part of your \TeX{}
+% installation, you will need to download this package from CTAN. See
% \url{http://www.tex.ac.uk/tex-archive/macros/latex/contrib/supported/ms/}
% or one of the other CTAN hosts.
%
-% This software is copyright, 1999, 2001--03, 2005-6, Norman Gray. It
+% This software is copyright, 1999, 2001--03, 2005--7, Norman Gray. It
% is released under
% the terms of the GNU General Public Licence. See the copyright
% declaration at the top of file \texttt{textpos.dtx}, and the file
@@ -322,28 +322,36 @@
% the width and location arguments to the (unstarred) \Lenv{textblock}
% environment.
%
-% \pstyle{Textpos} overrides any \Lenv{figure} and \Lenv{table}
-% \marginpar{Figure and table environments}
-% environments \emph{within} instances of the \Lenv{textblock} environment.
-% It does not, however, do so outside the environment, so you are
-% still able to use \pstyle{textblock} within figures, as described
-% above; also it avoids doing so unless the documentclass already
-% defined a \Lenv{figure} environment. This is because the normal
-% behaviour of these environments -- which is to float their contents
-% away from the point of definition -- obviously interacts very badly
-% with the \Lenv{textblock} environment, since
-% the floats float far from the \Lenv{textblock} where you put them.
-% Within a \Lenv{textblock}, therefore, these environments do nothing
+% \pstyle{Textpos} changes\marginpar{Figure and table environments}
+% the behaviour of any \Lenv{figure} and \Lenv{table} environments
+% \emph{within} instances of the \Lenv{textblock} environment, in such
+% a way that the figure or table contents do not float away from the
+% \Lenv{textblock} environment. For the same reason, |\marginpar| is
+% forbidden within a textblock. It makes no change, however, outside
+% the environment, where figures float as normal, and you are still
+% able to use \pstyle{textblock} within figures, as described above.
+% Within a \Lenv{textblock}, these environments do nothing
% beyond accepting the usual |\caption| command, which behaves
% correctly with respect to caption numbering and |\label| commands
% (it also respects |\@makecaption|, so you can tinker with that if
% you like that sort of thing). There's no real need to use either
-% the \Lenv{figure} or \Lenv{table} environments -- you don't require
-% them to allow |\includegraphics| or \Lenv{tabular} to work, for
-% example -- but many people automatically use them to surround
-% graphics or tables, and also expect to use these environments to
-% number figures and tables within \Lenv{textblock} environments; they
-% are therefore here on a principle of least surprise.
+% the \Lenv{figure} or \Lenv{table} environments within a textblock --
+% you don't require them to allow |\includegraphics| or \Lenv{tabular}
+% to work, for example -- but many people automatically use them to
+% surround graphics or tables, and also expect to use these
+% environments to number figures and tables within \Lenv{textblock}
+% environments; they are therefore here on a principle of least
+% surprise.
+%
+% The support here is admittedly simple, and it is known to fail in
+% the case where there are \Lenv{figure} (or \Lenv{table})
+% environments both inside and outside \Lenv{textblock}s on the same
+% page (the LoF is ordered incorrectly in this case, due to the
+% different times that the various environments write to the
+% \texttt{.lof} file). I don't have immediate plans to fix this: the
+% situation is surely sufficiently rare as not to justify the
+% (potentially fragile) complication of the fix -- if you disagree,
+% let me know.
%
% Since both \LaTeX's floats mechanism (that is, \Lenv{figure} and
% \Lenv{table}) and the \Lopt{absolute} mode are designed to move
@@ -492,6 +500,7 @@
% \end{description}
% \end{raggedright}
%
+% \section{Notes}
% \subsection{Suggestions: Producing large-format posters}
%
% If you are producing a large-format poster, such as A0 size, you
@@ -531,7 +540,8 @@
%
% \subsection{Interactions}
%
-% Textpos does not appear to get on terribly well with Prosper (a
+% Textpos does not appear to get on terribly well with
+% Prosper\marginpar{textpos \& prosper} (a
% problem reported by Erik Van Eynde). This is because
% Textpos in absolute mode places its text onto the page at the last
% moment before the page is shipped out, which will be \emph{after}
@@ -544,7 +554,28 @@
% relative mode as long as the \Lenv{textblock} environment is the
% first thing on the slide.
%
-% Gabriel Zachmann suggested having Textpos put a grid on the page, so
+% There's also an unfortunate interaction with the \texttt{color}
+% package\marginpar{textpos \& color}. Textpos in absolute mode, and
+% the \texttt{pdftex} graphics driver, both squabble over who gets to
+% redefine the |\shipout| command: using the |\pagecolor| command with
+% \texttt{pdflatex} causes textpos absolute mode to behave
+% strangely\footnote{See the \texttt{comp.text.tex} thread `Colour in
+% a0 poster' starting 2007 April 3}. A fix may appear here in time, but
+% for the present, there are three workarounds. The first is to place
+% the |\pagecolor{...}| command before |\begin{document}|, which
+% causes the redefinitions of |\shipout| to happen in a working
+% order. If this is impossible for some reason, then (as with the
+% Prosper workaround above) you can use textpos not in absolute
+% mode: if the textblocks are the first printable material on the
+% page, then they're anchored at a fixed position, and you should be
+% able to use textblocks and |\pagecolor| with \texttt{pdflatex}
+% much as normal. The final possibility is to use \texttt{latex},
+% \texttt{dvips} and \texttt{ps2pdf} to produce PDF, since the
+% dvips driver happens not to have this problem (thanks to Joris Vankerschaver
+% for the initial report, and to Heiko Oberdiek for one of the workarounds).
+%
+% Gabriel Zachmann suggested having Textpos put a grid on the
+% page\marginpar{page grid}, so
% that it is easier to work out \Lenv{textblock} coordinates. I may
% yet do this, but it may not be necessary, since Rolf Niepraschk's
% \texttt{eso-pic} package can help you create this grid yourself.
@@ -554,7 +585,8 @@
% \url{http://purl.org/nxg/dist/textpos}.
%
% Finally, Robert Wenner reported a problem when using Textpos along
-% with the \texttt{texdraw} package, with |\move(0,0)| apparently
+% with the \texttt{texdraw} package\marginpar{textpos \& texdraw}, with
+% |\move(0,0)| apparently
% making a difference when it should be a no-op. I haven't worked out
% what's going on here.
%
@@ -585,8 +617,11 @@
% 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, Wolfgang Fleischer
-% and Robert Whittaker.
+% Axel Sommerfeldt provided elegant code to fix incorrect
+% behaviour of |\caption| within the \Lenv{figure} environment.
+%
+% Thanks also for bugreports to Jozef Bednarcik, Wolfgang Fleischer,
+% Robert Whittaker and Giovanni Radilla.
%
% If you've reported a bug or made a suggestion and I haven't credited
% you here, please do accept my apologies, and please let me know.
@@ -703,19 +738,37 @@ located at that point, rather than the top-left corner.
%
% \subsection{Other initialisation}
%
-% Handle our local figure and table environments, in the case where
-% the current document class has defined a figure environment (we
-% assume that the figure and table environments always go together).
-% These do almost nothing, but they carefully do not float, which causes mucho
-% confusion within documents. Define private macros, to which
-% |\TP@textblock| defines |\figure| and |\table|.
+% Handle floats. The following definition of |\TP@xfloat| will be
+% used to redefine |\@xfloat| within textblocks. It has the same
+% `interface' as |\@xfloat| -- and in particular, it sets |\@captype|,
+% so that |\caption| will still work -- except that it ignores any
+% placement specifiers, and doesn't put anything into the |\@currbox|.
+% Thus nothing will actually float from here, and thus float out of the
+% textblock.
+%
+% We have to open a box, and set |\@floatpenalty|, because
+% |\end@float| expects to close a box; and we don't want to redefine
+% |\end@float| because that would required us to redefine
+% |\end@dblfloat| as well. Redefine |\@xympar| to throw an error:
+% this means that |\marginpar| is forbidden inside textblocks. Hmm,
+% it also means that it's forbidden even within a minipage -- is that
+% a bad thing?
% \changes{1.6a}{2005/10/13}{remove superfluous definitions of thefigure}
+% \changes{1.7c}{2007/03/29}{fix caption handling -- code from Axel Sommerfeldt}
+% \changes{1.7d}{2007/03/30}{further figure fixes, building on more Axel suggestions}
% \begin{macrocode}
-\@ifundefined{figure}{}{
- \newcommand\TP@caption[2]{\refstepcounter{#1}\@caption{#1}[]{#2}}
- \newcommand\TP@figure{\par \def\caption##1{\TP@caption{figure}{##1}}}
- \newcommand\TP@table {\par \def\caption##1{\TP@caption{table}{##1}}}
+\def\TP@xfloat#1[#2]{
+ \par\def\@captype{#1}%
+ \@floatpenalty\z@
+ \color@vbox
+ \normalcolor
+ \vbox\bgroup
}
+\def\TP@xympar{
+ \PackageError{textpos}
+ {You can't use \protect\marginpar\space within a textblock}
+ {You're using textpos because you _don't_ want things to float
+ around, yes?}}
% \end{macrocode}
%
% \subsection{The box handling starts here}
@@ -1024,19 +1077,18 @@ located at that point, rather than the top-left corner.
\def\TP@textblock[#1,#2](#3,#4){%
\TP@tbargs={{#1}{#2}{#3}{#4}}%
% \end{macrocode}
-% Now set the \Lenv{figure} and \Lenv{table} environments to be the
-% special textpos ones within the textblock. Do this only if the
-% \Lenv{figure} environment is already defined (there's no reason why
-% we \emph{mustn't} define it in the other case, but the user won't
-% expect it, so there's no reason to add it).
+%
+% Now (re)define |\@xfloat| and |\@xympar| to be the stub ones defined
+% above. Do this in all cases, even those where the |\figure|
+% environment is not defined: if there's no figure environment, this
+% will end up otiose rather than wrong, plus this will cope with the
+% rather peculiar case where there are some floats defined
+% \emph{other} than |\figure|.
% \begin{macrocode}
- \@ifundefined{figure}{}{
- \let\figure\TP@figure
- \let\table\TP@table
- \let\endfigure\relax
- \let\endtable\relax
- }
+ \let\@xfloat\TP@xfloat
+ \let\@xympar\TP@xympar
% \end{macrocode}
+%
% Start the |\TP@textbox|, which contains the contents of the textblock.
% \begin{macrocode}
\setbox\TP@textbox=\vbox\bgroup
diff --git a/Master/texmf-dist/tex/latex/textpos/textpos.sty b/Master/texmf-dist/tex/latex/textpos/textpos.sty
index 67de86e0372..e01a3c7a551 100644
--- a/Master/texmf-dist/tex/latex/textpos/textpos.sty
+++ b/Master/texmf-dist/tex/latex/textpos/textpos.sty
@@ -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.13 2007/03/21 20:37:33 norman Exp $
+%%% Source: $Id: textpos.dtx.in,v 1.18 2007/04/04 13:22:51 norman Exp $
%%
%%\def\ParseRCSDate$#1: #2 #3 ${\def\TP@Date{#2}}
-%%\ParseRCSDate$Date: 2007/03/21 20:37:33 $
+%%\ParseRCSDate$Date: 2007/04/04 13:22:51 $
\def\filename{textpos}
-\def\fileversion{1.7b}
-\def\filedate{2007/03/21}
-\def\docdate{2007 March 21}
+\def\fileversion{1.7d}
+\def\filedate{2007/03/30}
+\def\docdate{2007 March 30}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{textpos}[\filedate\space v\fileversion]
\typeout{Package: `textpos' \fileversion\space<\docdate>}
@@ -59,11 +59,18 @@
\ifTP@abspos
\RequirePackage{everyshi}
\fi
-\@ifundefined{figure}{}{
- \newcommand\TP@caption[2]{\refstepcounter{#1}\@caption{#1}[]{#2}}
- \newcommand\TP@figure{\par \def\caption##1{\TP@caption{figure}{##1}}}
- \newcommand\TP@table {\par \def\caption##1{\TP@caption{table}{##1}}}
+\def\TP@xfloat#1[#2]{
+ \par\def\@captype{#1}%
+ \@floatpenalty\z@
+ \color@vbox
+ \normalcolor
+ \vbox\bgroup
}
+\def\TP@xympar{
+ \PackageError{textpos}
+ {You can't use \protect\marginpar\space within a textblock}
+ {You're using textpos because you _don't_ want things to float
+ around, yes?}}
\newbox\TP@textbox
\ifTP@abspos
\newbox\TP@holdbox % starts off void
@@ -204,12 +211,8 @@
\newtoks\TP@tbargs
\def\TP@textblock[#1,#2](#3,#4){%
\TP@tbargs={{#1}{#2}{#3}{#4}}%
- \@ifundefined{figure}{}{
- \let\figure\TP@figure
- \let\table\TP@table
- \let\endfigure\relax
- \let\endtable\relax
- }
+ \let\@xfloat\TP@xfloat
+ \let\@xympar\TP@xympar
\setbox\TP@textbox=\vbox\bgroup
\ifTPshowboxes
{\color{\TP@rulecolour}\hrule height0pt depth \TPboxrulesize }%