diff options
author | Karl Berry <karl@freefriends.org> | 2016-06-09 22:53:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-06-09 22:53:55 +0000 |
commit | 29b2df230459512a0f73e5769a1cfc16e4125510 (patch) | |
tree | 7ace3eb84f9786277a63ea0d04585d170d44d897 /Master/texmf-dist/doc/latex/textpos/examples | |
parent | 96152b37515359e17b9cbe19a6186cec57a15eda (diff) |
textpos (8jun16)
git-svn-id: svn://tug.org/texlive/trunk@41331 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/textpos/examples')
-rw-r--r-- | Master/texmf-dist/doc/latex/textpos/examples/README.examples (renamed from Master/texmf-dist/doc/latex/textpos/examples/README-examples) | 0 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/textpos/examples/t10.tex | 46 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/textpos/examples/t6.tex | 10 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/textpos/examples/t9.tex | 67 |
4 files changed, 121 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/latex/textpos/examples/README-examples b/Master/texmf-dist/doc/latex/textpos/examples/README.examples index 16b23fb6977..16b23fb6977 100644 --- a/Master/texmf-dist/doc/latex/textpos/examples/README-examples +++ b/Master/texmf-dist/doc/latex/textpos/examples/README.examples diff --git a/Master/texmf-dist/doc/latex/textpos/examples/t10.tex b/Master/texmf-dist/doc/latex/textpos/examples/t10.tex new file mode 100644 index 00000000000..3c8677353d8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/textpos/examples/t10.tex @@ -0,0 +1,46 @@ +%%% Testing:interactions between (x,y)-positioning and \TPMargin +% See https://bitbucket.org/nxg/textpos/issues/3/ +% Thanks to Richard Schreiber for the report and initial test code. + +\documentclass{minimal} +\usepackage[top=0mm,bottom=0mm,left=0mm,right=0mm,a5paper]{geometry} +\usepackage{color} +\usepackage[absolute,showboxes]{textpos} + +\parindent0mm +\begin{document} + +\textblockrulecolour{magenta} +\TPGrid[0mm,0mm]{6}{9}% +\TPMargin{5mm}% + +\null\vskip 4cm +\noindent \hrule width 2\TPHorizModule +\smallskip +\hbox to 2\TPHorizModule{$\leftarrow$\hfil two units wide\hfil $\rightarrow$} + +\begin{textblock}{2}(0,0) + This box is top-left. + The top and left margin lines touch the edge of the page. +\end{textblock} + +\begin{textblock}{2}[0,1](0,9) + This box should sit at the bottom left. + The box should be two units wide, and the text correspondingly narrower. + The bottom and left margin lines should touch the edge of the page. +\end{textblock} + +\TPMargin*{5mm} +\begin{textblock}{2}[1,0](6,0) + This box should sit at the top right of the page, and the text + should be two units wide. The top and right margin lines should be + off the page. +\end{textblock} + +\TPMargin{0mm}% +\begin{textblock}{2}[1,1](6,9) + This box sits at the bottom right edge. + The text and box are two units wide. + The bottom and right margin lines touch the edge of the page. +\end{textblock} +\end{document} diff --git a/Master/texmf-dist/doc/latex/textpos/examples/t6.tex b/Master/texmf-dist/doc/latex/textpos/examples/t6.tex index 93e3cefaeb9..5c479987b65 100644 --- a/Master/texmf-dist/doc/latex/textpos/examples/t6.tex +++ b/Master/texmf-dist/doc/latex/textpos/examples/t6.tex @@ -20,15 +20,21 @@ Blue \end{textblock} -\begin{textblock}{8}(14,0) +\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} +\end{textblock} \begin{textblock}{12}(4,4) This text is inside a box with a blue background. The text is flush diff --git a/Master/texmf-dist/doc/latex/textpos/examples/t9.tex b/Master/texmf-dist/doc/latex/textpos/examples/t9.tex new file mode 100644 index 00000000000..b86cf388929 --- /dev/null +++ b/Master/texmf-dist/doc/latex/textpos/examples/t9.tex @@ -0,0 +1,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} |