summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/textpos/examples
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-08-13 23:37:27 +0000
committerKarl Berry <karl@freefriends.org>2006-08-13 23:37:27 +0000
commit782deb6d565d097328fff63a6e7bca1527c0532c (patch)
tree7cb68feb4b7f0c817cf5d6434a6f7153272b43a2 /Master/texmf-dist/doc/latex/textpos/examples
parente9578e4835c3897751cd4babc31eef77a68dd02c (diff)
textpos update
git-svn-id: svn://tug.org/texlive/trunk@1942 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/textpos/examples')
-rw-r--r--Master/texmf-dist/doc/latex/textpos/examples/t1.tex46
-rw-r--r--Master/texmf-dist/doc/latex/textpos/examples/t2.tex43
-rw-r--r--Master/texmf-dist/doc/latex/textpos/examples/t3.tex44
-rw-r--r--Master/texmf-dist/doc/latex/textpos/examples/t4.tex73
-rw-r--r--Master/texmf-dist/doc/latex/textpos/examples/t5.tex66
-rw-r--r--Master/texmf-dist/doc/latex/textpos/examples/t6.tex86
-rw-r--r--Master/texmf-dist/doc/latex/textpos/examples/t7.tex25
-rw-r--r--Master/texmf-dist/doc/latex/textpos/examples/t8.tex33
8 files changed, 416 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/textpos/examples/t1.tex b/Master/texmf-dist/doc/latex/textpos/examples/t1.tex
new file mode 100644
index 00000000000..80bba4322a5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/examples/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/examples/t2.tex b/Master/texmf-dist/doc/latex/textpos/examples/t2.tex
new file mode 100644
index 00000000000..be52319c5a4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/examples/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/examples/t3.tex b/Master/texmf-dist/doc/latex/textpos/examples/t3.tex
new file mode 100644
index 00000000000..1768033b740
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/examples/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/examples/t4.tex b/Master/texmf-dist/doc/latex/textpos/examples/t4.tex
new file mode 100644
index 00000000000..fa712d1eb8b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/examples/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/examples/t5.tex b/Master/texmf-dist/doc/latex/textpos/examples/t5.tex
new file mode 100644
index 00000000000..37a181c87de
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/examples/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/examples/t6.tex b/Master/texmf-dist/doc/latex/textpos/examples/t6.tex
new file mode 100644
index 00000000000..91428161b0a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/examples/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/examples/t7.tex b/Master/texmf-dist/doc/latex/textpos/examples/t7.tex
new file mode 100644
index 00000000000..6deceeff770
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/examples/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/examples/t8.tex b/Master/texmf-dist/doc/latex/textpos/examples/t8.tex
new file mode 100644
index 00000000000..25d05d8da94
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/textpos/examples/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}