summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/textpos/examples/t6.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/textpos/examples/t6.tex')
-rw-r--r--macros/latex/contrib/textpos/examples/t6.tex103
1 files changed, 103 insertions, 0 deletions
diff --git a/macros/latex/contrib/textpos/examples/t6.tex b/macros/latex/contrib/textpos/examples/t6.tex
new file mode 100644
index 0000000000..5c479987b6
--- /dev/null
+++ b/macros/latex/contrib/textpos/examples/t6.tex
@@ -0,0 +1,103 @@
+%%% 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}
+\definecolor{Borders}{rgb}{0.8,1.0,0.8}
+
+\begin{textblock}{4}(0,0)
+ \textblockcolour{Blue}
+ Blue
+\end{textblock}
+
+\begin{textblock}{12}(4,-1)
+ \hrule width 12\TPHorizModule
+ \vbox to 0pt{\hbox{12 units}\vss}
+ \vskip1\TPVertModule
+ \hrule width 8\TPHorizModule
+ \vbox to 0pt{\hbox{8 units}\vss}
+ \vskip1\TPVertModule
+ \hrule width 4\TPHorizModule
+ \vbox to 0pt{\hbox{4 units}\vss}
+ \vskip1\TPVertModule
+ \hrule width 2\TPHorizModule
+ \vbox to 0pt{\hbox{2 units}\vss}
+ \vskip1\TPVertModule
+ \hrule width 1\TPHorizModule
+\end{textblock}
+
+\begin{textblock}{12}(4,4)
+ This text is inside a box with a blue background. The text is flush
+ with the edge of the box, and the whole thing is twelve units wide.
+
+ There's a second paragraph in here.
+ \begin{itemize}
+ \item Here is a list item. It should be appropriately narrower than
+ the text around it, and specifically not abut the border.
+ \item Here is a second item.
+ \end{itemize}
+\end{textblock}
+
+\TPshowboxestrue
+\textblockrulecolour{red}
+\setlength\TPboxrulesize{0.25\TPHorizModule}
+
+\TPMargin{1\TPHorizModule}
+
+\begin{textblock}{4}(0,7)
+ \textblockcolour{Blue}
+ Blue
+\end{textblock}
+
+\begin{textblock}{12}(4,11)
+ This text is also inside a box with a blue background. However,
+ this time, there's a red border and a margin. The box as a whole is
+ twelve units wide, and the text is correspondingly narrower.
+ \begin{itemize}
+ \item Here is a list item. It should be appropriately narrower than
+ the text around it, and specifically not abut the border.
+ \item Here is a second item.
+ \end{itemize}
+\end{textblock}
+
+\TPMargin*{1\TPHorizModule}
+
+\begin{textblock}{4}(0,19)
+ \textblockcolour{Blue}
+ Blue
+\end{textblock}
+\tekstblokroolkulur{Borders}
+
+\begin{textblock}{12}(4,21)
+ Finally, here is some text on a blue background with an
+ unattractive green border. This time, the text is twelve units wide,
+ and the box, and its border, is consequently wider than that.
+ \begin{itemize}
+ \item Here is a list item. It should be appropriately narrower than
+ the text around it, and specifically not abut the border.
+ \item Here is a second item.
+ \end{itemize}
+ Here's some final text, and a quotation:
+ \begin{quotation}
+ \noindent
+ You shall see them on a beautiful quarto page, where a neat rivulet
+ of text shall meander through a meadow of
+ margin.
+ \hfil\penalty50\hskip2em\hbox{}\nobreak\hfil
+ \emph{--- Sheridan, The School for Scandal}\parfillskip=0pt
+ \end{quotation}
+\end{textblock}
+
+
+\end{document}
+