summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/textpos/examples/t2.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/textpos/examples/t2.tex')
-rw-r--r--macros/latex/contrib/textpos/examples/t2.tex43
1 files changed, 43 insertions, 0 deletions
diff --git a/macros/latex/contrib/textpos/examples/t2.tex b/macros/latex/contrib/textpos/examples/t2.tex
new file mode 100644
index 0000000000..be52319c5a
--- /dev/null
+++ b/macros/latex/contrib/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}