1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
%%% Testing: switching between absolute and relative mode
\documentclass{article}
\usepackage[absolute,showboxes]{textpos}
\setlength{\parindent}{0pt}
\TPHorizModule=1cm
\TPVertModule=1cm
\begin{document}
Here is some text, which appears in the body of the page.
\begin{textblock}{5}(0,0)
This text is at (0,0), and should appear at the very top-left corner.
\end{textblock}
Here is more text, which also appears in the body.
\begin{textblock}{5}(1,1)
This text is at (1,1), and should appear near the top-left corner, 1cm
in and down.
\end{textblock}
\newpage
\TPoptions{ absolute=false,
showboxes = false}
Here is some text, which appears in the body of page two.
\begin{textblock}{5}(0,0)
This text is at (0,0), and appears at the top-left of the text block,
just under `Here is some text'.
It should not have a box around it.
\end{textblock}
\vskip4cm
Here is more text, which also appears in the body of p.2.
\begin{textblock}{5}(1,1)
This text is at (1,1), and also appears in the text block 1cm along
and down from the `Here is more text', and without a surrounding box.
\end{textblock}
\TPoptions{absolute=true, showboxes=true, showtext=false}
\vskip4cm
Text. The corresponding text block should appear only as a box, with
no text inside it. It appears in the top-left corner of the page.
\begin{textblock}{5}(0,0)
This text should not appear (just the box, positioned 2cm along and
down from `Text.'
\end{textblock}
\TPoptions{absolute=false, showboxes=true, showtext=true}
\vskip4cm
Text 2.
\begin{textblock}{5}(6,0)
This text should appear surrounded by a box, level with, but along from, `Text 2'.
\end{textblock}
\newpage
\TPoptions{absolute=true}
Page 3.
\begin{textblock}{5}(0,0)
This text appears at the extreme top-left of page three.
\end{textblock}
\end{document}
|