summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/textpos/textpos-example.tex
blob: 2e8cb70547f657bf309903684d1159ba04e9fe5d (plain)
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
68
%%
%% This is file `textpos-example.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% textpos.dtx  (with options: `example')
%% Textpos: absolute positioning of text on the page
%%%% File: textpos.dtx
%%%% Copyright 1999-2019, Norman Gray
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Norman Gray <http://nxg.me.uk>
%%
%% This work consists of the files textpos.dtx and textpos.ins,
%% and the derived file textpos.sty.
%%
%% Author: Norman Gray, norman@astro.gla.ac.uk.
%% Department of Physics and Astronomy, University of Glasgow, UK
%%
%% See the file LICENCE for a copy of the LPPL.
%%
%% Mercurial ident: 09ee0efc21ac (1.9.1+0), 2019-04-15 22:14 +0100
%%
\documentclass{article}

\usepackage[absolute]{textpos}

\setlength{\TPHorizModule}{30mm}
\setlength{\TPVertModule}{\TPHorizModule}
\textblockorigin{10mm}{10mm} % start everything near the top-left corner
\setlength{\parindent}{0pt}

\begin{document}

\begin{textblock}{3}(0,0)
This block is 3 modules wide, and is placed with its top left corner
at the `origin' on the page.  Note that the length of the block is not
specified in the arguments -- the box will be as long as necessary to
accomodate the text inside it.  You need to examine the output of the
text to adjust the positioning of the blocks on the page.
\end{textblock}

\begin{textblock}{2}(2,1)
\textblocklabel{block two}
Here is another, slightly narrower, block, at position (2,1) on the page.
\end{textblock}

\begin{textblock}{3}[0.5,0.5](2,3)
This block is at position (2,3), but because the optional argument
[0.5,0.5] has been given, it is the centre of the block which is
located at that point, rather than the top-left corner.
\end{textblock}

\end{document}
 
\endinput
%%
%% End of file `textpos-example.tex'.