| 1 |
%% |
| 2 |
%% This is file `textpos-example.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% textpos.dtx (with options: `example') |
| 8 |
%% Textpos: absolute positioning of text on the page |
| 9 |
%%%% File: textpos.dtx |
| 10 |
%%%% Copyright 1999-2020, Norman Gray |
| 11 |
%% |
| 12 |
%% This work may be distributed and/or modified under the |
| 13 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 14 |
%% of this license or (at your option) any later version. |
| 15 |
%% The latest version of this license is in |
| 16 |
%% https://www.latex-project.org/lppl.txt |
| 17 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 18 |
%% version 2005/12/01 or later. |
| 19 |
%% |
| 20 |
%% This work has the LPPL maintenance status `maintained'. |
| 21 |
%% |
| 22 |
%% The Current Maintainer of this work is Norman Gray <https://nxg.me.uk> |
| 23 |
%% |
| 24 |
%% This work consists of the files textpos.dtx and textpos.ins, |
| 25 |
%% and the derived file textpos.sty. |
| 26 |
%% |
| 27 |
%% Author: Norman Gray, [email protected] |
| 28 |
%% Department of Physics and Astronomy, University of Glasgow, UK |
| 29 |
%% |
| 30 |
%% See the file LICENCE for a copy of the LPPL. |
| 31 |
%% |
| 32 |
%% Mercurial ident: 1.10.1 (@VCSINFO) |
| 33 |
%% |
| 34 |
\documentclass{article} |
| 35 |
|
| 36 |
\usepackage[absolute]{textpos} |
| 37 |
|
| 38 |
\setlength{\TPHorizModule}{30mm} |
| 39 |
\setlength{\TPVertModule}{\TPHorizModule} |
| 40 |
\textblockorigin{10mm}{10mm} % start everything near the top-left corner |
| 41 |
\setlength{\parindent}{0pt} |
| 42 |
|
| 43 |
\begin{document} |
| 44 |
|
| 45 |
\begin{textblock}{3}(0,0) |
| 46 |
This block is 3 modules wide, and is placed with its top left corner |
| 47 |
at the `origin' on the page. Note that the length of the block is not |
| 48 |
specified in the arguments -- the box will be as long as necessary to |
| 49 |
accomodate the text inside it. You need to examine the output of the |
| 50 |
text to adjust the positioning of the blocks on the page. |
| 51 |
\end{textblock} |
| 52 |
|
| 53 |
\begin{textblock}{2}(2,1) |
| 54 |
\textblocklabel{block two} |
| 55 |
Here is another, slightly narrower, block, at position (2,1) on the page. |
| 56 |
\end{textblock} |
| 57 |
|
| 58 |
\begin{textblock}{3}[0.5,0.5](2,3) |
| 59 |
This block is at position (2,3), but because the optional argument |
| 60 |
[0.5,0.5] has been given, it is the centre of the block which is |
| 61 |
located at that point, rather than the top-left corner. |
| 62 |
\end{textblock} |
| 63 |
|
| 64 |
\end{document} |
| 65 |
|
| 66 |
\endinput |
| 67 |
%% |
| 68 |
%% End of file `textpos-example.tex'. |