Debian Codegraph @

texmf-dist/doc/latex/textpos/examples/t5.tex

raw
1 %%% Testing:spacing
2 \documentclass{article}
3
4 \usepackage{textpos}
5 %\usepackage[showboxes]{textpos}
6
7 \hoffset=0pt
8 \voffset=0pt
9 \oddsidemargin=0pt
10 \topmargin=0pt
11 \headheight=0pt
12 \headsep=0pt
13
14 \setlength{\TPHorizModule}{50pt}
15 \setlength{\TPVertModule}{\TPHorizModule}
16
17 \pagestyle{empty}
18
19 \begin{document}
20
21 \setlength{\parindent}{0pt}
22 \setlength{\parskip}{30pt}
23 \setlength{\baselineskip}{20pt}
24
25 % Make sure that all text appears precisely where it ought to. The
26 % above dimensions mean that text appears in round-number locations.
27 %
28 % The \showbox puts detailed calculations in the log file
29 %
30 % Output of 'dvireport -F -up t5.dvi':
31 % c 97[a] 0,20pt
32 % c 121[y] 4.72223,20pt
33 % c 98[b] 0,28.8889pt
34 % c 121[y] 5.27777,28.8889pt
35 % c 99[c] 50,76.25pt
36 % c 100[d] 0,70pt
37 % c 121[y] 5.55556,70pt
38 %
39 % The most important thing is that `a' and `d' are 50pt
40 % apart, \parskip+\baselineskip
41 %
42 % This test may not currently be working (2005 August 30). There's an
43 % extra 30pt (\parskip) appearing before the by and cy in their boxes,
44 % which clearly isn't present in the t5.correct.dvi. Ought it to be
45 % there? Have I done something (when?) which has caused this to
46 % spuriously appear?
47
48
49 \showboxdepth=8
50 \showboxbreadth=8
51
52 \noindent ay
53 \vrule height 20pt depth 0pt width 0pt % strut -- makes base of this
54 % line 20pt from top
55 \begin{textblock}{3}(0,0)
56 \noindent by
57 \end{textblock}
58 \begin{textblock}{2}(1,1)
59 \noindent cy
60 \end{textblock}
61 \noindent
62 dy
63
64 %\showlists % put detailed diagnostics into log file
65
66 \end{document}