| 1 |
%%% Testing:interactions between (x,y)-positioning and \TPMargin |
| 2 |
% See https://bitbucket.org/nxg/textpos/issues/3/ |
| 3 |
% Thanks to Richard Schreiber for the report and initial test code. |
| 4 |
|
| 5 |
\documentclass{minimal} |
| 6 |
\usepackage[top=0mm,bottom=0mm,left=0mm,right=0mm,a5paper]{geometry} |
| 7 |
\usepackage{color} |
| 8 |
\usepackage[absolute,showboxes]{textpos} |
| 9 |
|
| 10 |
\parindent0mm |
| 11 |
\begin{document} |
| 12 |
|
| 13 |
\textblockrulecolour{magenta} |
| 14 |
\TPGrid[0mm,0mm]{6}{9}% |
| 15 |
\TPMargin{5mm}% |
| 16 |
|
| 17 |
\null\vskip 4cm |
| 18 |
\noindent \hrule width 2\TPHorizModule |
| 19 |
\smallskip |
| 20 |
\hbox to 2\TPHorizModule{$\leftarrow$\hfil two units wide\hfil $\rightarrow$} |
| 21 |
|
| 22 |
\begin{textblock}{2}(0,0) |
| 23 |
This box is top-left. |
| 24 |
The top and left margin lines touch the edge of the page. |
| 25 |
\end{textblock} |
| 26 |
|
| 27 |
\begin{textblock}{2}[0,1](0,9) |
| 28 |
This box should sit at the bottom left. |
| 29 |
The box should be two units wide, and the text correspondingly narrower. |
| 30 |
The bottom and left margin lines should touch the edge of the page. |
| 31 |
\end{textblock} |
| 32 |
|
| 33 |
\TPMargin*{5mm} |
| 34 |
\begin{textblock}{2}[1,0](6,0) |
| 35 |
This box should sit at the top right of the page, and the text |
| 36 |
should be two units wide. The top and right margin lines should be |
| 37 |
off the page. |
| 38 |
\end{textblock} |
| 39 |
|
| 40 |
\TPMargin{0mm}% |
| 41 |
\begin{textblock}{2}[1,1](6,9) |
| 42 |
This box sits at the bottom right edge. |
| 43 |
The text and box are two units wide. |
| 44 |
The bottom and right margin lines touch the edge of the page. |
| 45 |
\end{textblock} |
| 46 |
\end{document} |