summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/textpos/examples/t1.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/textpos/examples/t1.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/textpos/examples/t1.tex')
-rw-r--r--macros/latex/contrib/textpos/examples/t1.tex66
1 files changed, 66 insertions, 0 deletions
diff --git a/macros/latex/contrib/textpos/examples/t1.tex b/macros/latex/contrib/textpos/examples/t1.tex
new file mode 100644
index 0000000000..8cb8bfc45f
--- /dev/null
+++ b/macros/latex/contrib/textpos/examples/t1.tex
@@ -0,0 +1,66 @@
+%%% 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}{4}(0,0)
+ % make a grid on the page
+ \lineskip=0pt % abut boxes directly
+ \setbox1=\hbox to \TPHorizModule{\hfill \vrule height \TPVertModule}
+ \setbox0=\vbox to \TPVertModule{\noindent\copy1\copy1 \copy1 \vss\hrule}
+ \copy0
+ \copy0
+ \copy0
+ \copy0
+\end{textblock}
+
+\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*}
+
+\TPReferencePosition{0.5,0.5}
+\begin{textblock}{1}(2,4)
+\{1\}(2,4)\hfil\break (refpos [0.5,0.5])
+\end{textblock}
+
+% The following is for testing the _experimental_ (in v1.9) discardcontent=true mode
+% \TPoptions{discardcontent=true}
+% Here is content
+
+\end{document}