summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/textpos/t
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/textpos/t')
-rw-r--r--Master/texmf-dist/doc/latex/textpos/t/Makefile16
-rwxr-xr-xMaster/texmf-dist/doc/latex/textpos/t/runtests99
-rw-r--r--Master/texmf-dist/doc/latex/textpos/t/t1.tex46
-rw-r--r--Master/texmf-dist/doc/latex/textpos/t/t2.tex43
-rw-r--r--Master/texmf-dist/doc/latex/textpos/t/t3.tex44
-rw-r--r--Master/texmf-dist/doc/latex/textpos/t/t4.tex73
-rw-r--r--Master/texmf-dist/doc/latex/textpos/t/t5.tex66
-rw-r--r--Master/texmf-dist/doc/latex/textpos/t/t6.tex86
-rw-r--r--Master/texmf-dist/doc/latex/textpos/t/t7.tex25
-rw-r--r--Master/texmf-dist/doc/latex/textpos/t/t8.tex33
10 files changed, 531 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/textpos/t/Makefile b/Master/texmf-dist/doc/latex/textpos/t/Makefile
new file mode 100644
index 00000000000..e369f0f919b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/t/Makefile
@@ -0,0 +1,16 @@
+test: ../textpos.sty
+ TEXINPUTS=..: ./runtests
+
+clean:
+ rm -f *~ *.log *.aux *.stderr *.stdout *.tmp *.diff *.dtl
+
+%.dvi: %.tex
+ TEXINPUTS=..: latex $<
+%.pdf: %.tex
+ TEXINPUTS=..: pdflatex $<
+%.dtl: %.dvi
+ dv2dt $< >$@
+%.dvireport: %.dvi
+ dvireport -F -up $< >$@
+%.dtl.diff: %.dtl %.correct.dtl
+ diff ${<:.dtl=.correct.dtl} $< >$@; true
diff --git a/Master/texmf-dist/doc/latex/textpos/t/runtests b/Master/texmf-dist/doc/latex/textpos/t/runtests
new file mode 100755
index 00000000000..d7264da52f8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/t/runtests
@@ -0,0 +1,99 @@
+#! /bin/sh -
+#
+# $Id: runtests,v 1.4 2005/08/30 18:19:12 norman Exp $
+#
+# Run a series of tests on LaTeX files. The directory contains a collection
+# of documents named `t<number>.tex', and these are processed in turn and their
+# output diffed against `t<number>.correct.dvi'. Exit status is the
+# number of failures.
+#
+# Run without an argument, and if there is no file runtests.filelist,
+# this runs all the tests in the directory; run with an argument, it
+# runs only the specified tests.
+#
+# If there is no argument, but a file runtests.filelist exists, use
+# that file's contents as the list of tests to run. This means that
+# we can make it easy to do a subset of the tests repeatedly while
+# testing.
+#
+# The only we we really have of testing whether the binary DVI files
+# differ is by comparing them using cmp, which simply reports the
+# byte-offset where they differ. This isn't terribly helpful, and
+# even examining the files using dv2dt doesn't help much. It's also
+# probably rather sensitive to things like the version of hyperref
+# which is being used. Also, since TeX puts a timestamp in DVI files,
+# we have to ignore the first 50 bytes or so (see a thread with the
+# subject `diff for dvi files', in comp.text.tex, in May 2001.
+#
+# If the option --keep is present, then it doesn't delete temporary files.
+
+UsageString="$0 [--keep] [filename...]"
+deletetemp=true
+LS=/bin/ls
+
+
+filelist=""
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ --keep) deletetemp=false ;;
+ --*) echo "Usage: $UsageString"
+ exit 1
+ ;;
+ *) filelist="$filelist $1"
+ ;;
+ esac
+ shift
+done
+
+# If filelist is null, and a file runtests.filelist exists, use that
+# file's contents as the value of filelist.
+if [ -z "$filelist" -a -f runtests.filelist ]; then
+ echo "Reading filelist from runtests.filelist"
+ filelist=`cat runtests.filelist`
+fi
+
+# Check filelist is non-null, and make it t* if it is.
+if [ -z "$filelist" ]; then
+ filelist=`$LS | grep '^t[0-9]*\.tex$' | sed 's/\.tex//'`
+fi
+
+
+
+nfailures=0
+
+for name in $filelist
+do
+ echo -n "$name... "
+ # Make sure we run twice, if there's no preexisting aux file.
+ test -f $name.aux || latex $name.tex >$name.stdout 2>$name.stderr
+ latex $name.tex >$name.stdout 2>$name.stderr
+ testval=$?
+ #test -f $name.dvi && mv $name.dvi $name.dvi.tmp
+
+ if [ $testval != 0 ]; then
+ echo "failed (exited with error status $testval)"
+ nfailures=`expr $nfailures + 1`
+ $deletetemp && rm -f $name.stdout $name.stderr $name.dvi $name*.tmp
+ elif [ -r "$name.correct.dvi" ]; then
+ cmp -i50 $name.dvi $name.correct.dvi >$name.diff
+ rval=$?
+ if [ $rval != 0 ]; then
+ make $name.dtl.diff >/dev/null
+ echo "failed (results in $name.dtl.diff)"
+ nfailures=`expr $nfailures + 1`
+ else
+ echo "ok"
+ $deletetemp && rm -f $name.diff $name.stdout $name.stderr $name.dvi $name*.tmp
+ fi
+ else
+ echo "apparently OK, but no correct results to compare"
+ mv $name.dvi $name.correct.dvi
+ echo " (now in $name.correct.dvi)"
+ $deletetemp && rm -f $name*.tmp
+ fi
+done
+
+echo "$nfailures failed tests"
+
+exit $nfailures
diff --git a/Master/texmf-dist/doc/latex/textpos/t/t1.tex b/Master/texmf-dist/doc/latex/textpos/t/t1.tex
new file mode 100644
index 00000000000..80bba4322a5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/t/t1.tex
@@ -0,0 +1,46 @@
+%%% Testing:basic functionality
+\documentclass{article}
+
+\usepackage[absolute,showboxes]{textpos}
+
+\setlength{\TPHorizModule}{30mm}
+\setlength{\TPVertModule}{\TPHorizModule}
+\textblockorigin{10mm}{10mm} % start everything near the top-left corner
+
+\setlength{\parindent}{0pt}
+\pagestyle{empty}
+
+\textblockcolour{red} % should have no effect, since {color} not loaded
+
+\begin{document}
+
+\begin{textblock}{3}(0,0)
+\{3\}(0,0)
+\end{textblock}
+
+\begin{textblock}{2}(2,1)
+\textblocklabel{block two}
+\{2\}(2,1)
+\end{textblock}
+
+\begin{textblock}{3}[0.5,0.5](3,3)
+\{3\}[0.5,0.5](3,3)
+\end{textblock}
+
+\begin{textblock}{2.5}(3,3)
+\{2.5\}(3,3)
+\end{textblock}
+
+\begin{textblock}{3.5}(1.5,1.5)
+\{3.5\}(1.5,1.5)
+\end{textblock}
+
+\begin{textblock*}{5cm}(25mm,50mm)
+\{5cm\}(25mm,50mm)
+\end{textblock*}
+
+\begin{textblock*}{284.52756pt}[0.5,0.5](50.0mm,2.5cm)
+\{284.52756pt\}[0.5,0.5](50.0mm,2.5cm)
+\end{textblock*}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/textpos/t/t2.tex b/Master/texmf-dist/doc/latex/textpos/t/t2.tex
new file mode 100644
index 00000000000..be52319c5a4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/t/t2.tex
@@ -0,0 +1,43 @@
+%%% Testing:interaction with calc
+\documentclass{article}
+
+\usepackage[absolute,showboxes]{textpos}
+\usepackage{calc,ifthen}
+
+\setlength\TPHorizModule{1mm}
+\setlength\TPVertModule{\TPHorizModule}
+\newcounter{MYCOUNT}
+
+\setlength\parindent{0pt}\pagestyle{empty}
+
+\begin{document}
+
+% Set origin to 10mm,10mm
+\textblockorigin{56.9055pt-10mm}{0pt+1cm}
+% Box at (10mm,10mm)
+\begin{textblock*}{25mm*2}(10mm,10mm)
+\{25mm*2\}(10mm,10mm)
+\end{textblock*}
+% Box at (15mm,15mm)
+\begin{textblock*}{10mm+14cm}(3\TPHorizModule*5,10\TPVertModule+5mm)
+\verb^{10mm+14cm}(3\TPHorizModule*5,10\TPVertModule+5mm)^
+\end{textblock*}
+
+
+\whiledo{\value{MYCOUNT} < 5}%
+{
+ \textblockorigin{0mm + 20mm * \value{MYCOUNT}}{55mm * \value{MYCOUNT}}
+ \begin{textblock}{100}(10,10)%
+ \begin{minipage}[b][50mm][t]{\linewidth}
+ Text \hfill Text \par \vfill Text \hfill Text\par
+ \end{minipage}
+ \end{textblock}%
+ \stepcounter{MYCOUNT}
+}
+
+\def\tick#1{\vrule height 0pt depth #1pt}
+\def\\{\hbox to 1cm{\hfil\tick4\hfil\tick8}}
+\vbox{\hrule\hbox{\tick8\\\\\\\\\\\\\\\\\\\\}}
+
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/textpos/t/t3.tex b/Master/texmf-dist/doc/latex/textpos/t/t3.tex
new file mode 100644
index 00000000000..1768033b740
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/t/t3.tex
@@ -0,0 +1,44 @@
+%From Wybo@Servalys.Nl Fri Jun 28 14:28:41 2002
+%From: Wybo Dekker <Wybo@Servalys.Nl>
+%To: Norman@Astro.Gla.Ac.Uk
+%Date: Mon, 24 Jun 2002 23:38:46 +0200 (Cest)
+%Subject: Textpos
+
+%Dear Norman,
+
+%Whn I Tried This:
+
+\documentclass{article}
+\RequirePackage[absolute]{textpos} % revision 1.4
+\usepackage{graphicx,fancybox}
+\begin{document}
+
+%\begin{Landscape*}{\pdfpagewidth}{\pdfpageheight}{\rotatebox{-90}}
+\begin{Landscape*}{\hsize}{\vsize}{\rotatebox{-90}}
+test
+\end{Landscape*}
+\end{document}
+
+%I got:
+%
+%! Incompatible list can't be unboxed.
+%\@EveryShipout@Hook ...\TP@holdbox \unvbox \@cclv
+% }\global \setbox
+% \TP@holdb...
+%<*> \end{Landscape*}
+%
+%Hans Hagen suggested to replace the \unvbox with
+%
+%\ifvbox\@cclv\unvbox\else\box\fi
+%
+%and that worked. Should that perhaps be a fix?
+%
+%--
+%Best regards, Wybo Dekker
+%
+%---Servalys Analytical Chemistry Services---
+%Wybo Dekker wybo@servalys.nl
+%Deilsedijk 60 www.servalys.nl
+%4158 CH Deil tel +31-345-652164
+%The Netherlands fax +31-345-652383
+
diff --git a/Master/texmf-dist/doc/latex/textpos/t/t4.tex b/Master/texmf-dist/doc/latex/textpos/t/t4.tex
new file mode 100644
index 00000000000..fa712d1eb8b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/t/t4.tex
@@ -0,0 +1,73 @@
+%%% Testing:colours
+\documentclass{article}
+
+\newif\ifdebug
+\debugfalse
+
+%\usepackage[absolute,showboxes]{textpos}
+\ifdebug
+\usepackage[showboxes]{textpos}
+\else
+\usepackage{textpos}
+\fi
+
+\def\t#1#2{\ifdebug #2\else #1\fi}
+
+\usepackage{color}
+
+\setlength{\TPHorizModule}{30mm}
+\setlength{\TPVertModule}{\TPHorizModule}
+%\textblockorigin{10mm}{10mm} % start everything near the top-left corner
+
+\setlength{\parindent}{0pt}
+\pagestyle{empty}
+
+\def\bigstrut{\hrule height 2ex depth 2ex width 0pt }
+
+\begin{document}
+
+\definecolor{Pink}{rgb}{1.0,0.8,0.8}
+\definecolor{Blue}{rgb}{0.8,0.8,1.0}
+\definecolor{Yellow}{rgb}{0.8,0.8,0.0}
+
+\textcolor{Blue}{\t{a1}{Hello}}
+{\color{Yellow} \t{a2}{There}}
+
+\textblockcolour{Pink}
+
+\begin{textblock}{3}(0,0)
+\t{b}{\{3\}(0,0) Pink}
+\end{textblock}
+
+\begin{textblock}{2}(2,1)
+\textblocklabel{block two}
+\textblockcolour{Blue}
+\t{c}{\{2\}(2,1) Blue}
+\end{textblock}
+
+\begin{textblock}{3}[0.5,0.5](3,3)
+\bigstrut
+\t{d}{\{3\}[0.5,0.5](3,3)
+ \textcolor{Yellow}{\t{e}{Yellow}}
+ \t{d2}{on Pink}}
+\end{textblock}
+
+\begin{textblock}{2.5}(3,3)
+\tekstblokkulur{}
+\t{f}{\{2.5\}(3,3)}
+\textcolor{Yellow}{\t{g}{No colour}}
+\end{textblock}
+
+\begin{textblock}{3.5}(1.5,1.5)
+\t{h}{\{3.5\}(1.5,1.5) Pink}
+\end{textblock}
+
+%\begin{textblock*}{5cm}(25mm,50mm)
+%\{5cm\}(25mm,50mm)
+%\end{textblock*}
+
+%\begin{textblock*}{284.52756pt}[0.5,0.5](50.0mm,2.5cm)
+%\{284.52756pt\}[0.5,0.5](50.0mm,2.5cm)
+%\end{textblock*}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/textpos/t/t5.tex b/Master/texmf-dist/doc/latex/textpos/t/t5.tex
new file mode 100644
index 00000000000..37a181c87de
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/t/t5.tex
@@ -0,0 +1,66 @@
+%%% Testing:spacing
+\documentclass{article}
+
+\usepackage{textpos}
+%\usepackage[showboxes]{textpos}
+
+\hoffset=0pt
+\voffset=0pt
+\oddsidemargin=0pt
+\topmargin=0pt
+\headheight=0pt
+\headsep=0pt
+
+\setlength{\TPHorizModule}{50pt}
+\setlength{\TPVertModule}{\TPHorizModule}
+
+\pagestyle{empty}
+
+\begin{document}
+
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{30pt}
+\setlength{\baselineskip}{20pt}
+
+% Make sure that all text appears precisely where it ought to. The
+% above dimensions mean that text appears in round-number locations.
+%
+% The \showbox puts detailed calculations in the log file
+%
+% Output of 'dvireport -F -up t5.dvi':
+% c 97[a] 0,20pt
+% c 121[y] 4.72223,20pt
+% c 98[b] 0,28.8889pt
+% c 121[y] 5.27777,28.8889pt
+% c 99[c] 50,76.25pt
+% c 100[d] 0,70pt
+% c 121[y] 5.55556,70pt
+%
+% The most important thing is that `a' and `d' are 50pt
+% apart, \parskip+\baselineskip
+%
+% This test may not currently be working (2005 August 30). There's an
+% extra 30pt (\parskip) appearing before the by and cy in their boxes,
+% which clearly isn't present in the t5.correct.dvi. Ought it to be
+% there? Have I done something (when?) which has caused this to
+% spuriously appear?
+
+
+\showboxdepth=8
+\showboxbreadth=8
+
+\noindent ay
+\vrule height 20pt depth 0pt width 0pt % strut -- makes base of this
+ % line 20pt from top
+\begin{textblock}{3}(0,0)
+\noindent by
+\end{textblock}
+\begin{textblock}{2}(1,1)
+\noindent cy
+\end{textblock}
+\noindent
+dy
+
+%\showlists % put detailed diagnostics into log file
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/textpos/t/t6.tex b/Master/texmf-dist/doc/latex/textpos/t/t6.tex
new file mode 100644
index 00000000000..91428161b0a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/t/t6.tex
@@ -0,0 +1,86 @@
+%%% Testing:colours, borders and margins
+\documentclass{article}
+
+\usepackage{textpos}
+\usepackage{color}
+
+\setlength{\TPHorizModule}{20pt}
+\setlength{\TPVertModule}\TPHorizModule
+
+\setlength\parindent{0pt}
+\pagestyle{empty}
+
+\begin{document}
+
+\definecolor{Blue}{rgb}{0.8,0.8,1.0}
+
+\begin{textblock}{4}(0,0)
+ \textblockcolour{Blue}
+ Blue
+\end{textblock}
+
+\begin{textblock}{8}(14,6)
+ \hrule width 8\TPHorizModule
+ \vskip1\TPVertModule
+ \hrule width 4\TPHorizModule
+ \vskip1\TPVertModule
+ \hrule width 2\TPHorizModule
+ \vskip1\TPVertModule
+ \hrule width 1\TPHorizModule
+\end{textblock}
+
+\begin{textblock}{8}(4,2)
+ This package facilitates placing boxes at absolute positions on the
+ \LaTeX\ page. There are several reasons why this might be useful, but
+ the main one (or at least my motivating one) is to help produce a
+ large-format conference poster.
+
+ This package provides a single environment, which contains the text
+ (or graphics, or table, or whatever) which is to be placed on the
+ page, and which specifies where it is to be placed.
+\end{textblock}
+
+\makeatletter
+ \TP@showboxestrue
+\makeatother
+\setlength\TPboxrulesize{0.25\TPHorizModule}
+
+\TPMargin{0.5\TPHorizModule}
+
+\begin{textblock}{4}(0,8)
+ \textblockcolour{Blue}
+ Blue
+\end{textblock}
+
+\begin{textblock}{8}(4,10)
+ This package facilitates placing boxes at absolute positions on the
+ \LaTeX\ page. There are several reasons why this might be useful, but
+ the main one (or at least my motivating one) is to help produce a
+ large-format conference poster.
+
+ This package provides a single environment, which contains the text
+ which is to be placed on the
+ page, and which specifies where it is to be placed.
+\end{textblock}
+
+\TPMargin*{0.5\TPHorizModule}
+
+\begin{textblock}{4}(0,20)
+ \textblockcolour{Blue}
+ Blue
+\end{textblock}
+
+\begin{textblock}{8}(4,22)
+ This package facilitates placing boxes at absolute positions on the
+ \LaTeX\ page. There are several reasons why this might be useful, but
+ the main one (or at least my motivating one) is to help produce a
+ large-format conference poster.
+
+ This package provides a single environment, which contains the text
+ (or graphics, or table, or whatever) which is to be placed on the
+ page, and which specifies where it is to be placed.
+\end{textblock}
+
+
+\end{document}
+
diff --git a/Master/texmf-dist/doc/latex/textpos/t/t7.tex b/Master/texmf-dist/doc/latex/textpos/t/t7.tex
new file mode 100644
index 00000000000..6deceeff770
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/t/t7.tex
@@ -0,0 +1,25 @@
+\documentclass{article}
+
+%\usepackage[showboxes]{textpos}
+\usepackage[absolute,showboxes]{textpos}
+
+\setlength{\TPHorizModule}{100pt}
+\TPVertModule=\TPHorizModule
+
+\begin{document}
+
+ \begin{textblock}{2}(1,1)
+ Here is some text
+ \end{textblock}
+
+ \begin{textblock}{2}(2,2)
+ More text
+ \end{textblock}
+
+\null\newpage
+
+\begin{textblock}{2}(1.5,1.5)
+ Text on a new page
+\end{textblock}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/textpos/t/t8.tex b/Master/texmf-dist/doc/latex/textpos/t/t8.tex
new file mode 100644
index 00000000000..25d05d8da94
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/t/t8.tex
@@ -0,0 +1,33 @@
+\documentclass{article}
+
+\usepackage[showboxes]{textpos}
+\setlength{\parindent}{0pt}
+
+\begin{document}
+
+\begin{textblock}{5}(0,0)
+In this document we have figures~\ref{figa} and~\ref{figb}.
+\end{textblock}
+
+\begin{textblock}{5}(1,1)
+ Here is a figure.
+ \begin{figure}
+ Text
+ \caption{This is the first figure}
+ \label{figa}
+ \end{figure}
+\end{textblock}
+
+\begin{textblock}{5}(2,2)
+ Here is another figure.
+ \begin{figure}
+ More text
+ \caption{\label{figb}This is the second figure}
+ \end{figure}
+\end{textblock}
+
+\begin{textblock}{5}(3,3)
+ We can still refer to figures~\ref{figb} and~\ref{figa}.
+\end{textblock}
+
+\end{document}