summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-baselinepar.html
blob: 8b17ba3c0f67cc06cc201ec5a3b4e2e784e0e1d3 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<head>
<title>UK TeX FAQ -- question label baselinepar</title>
</head><body>
<h3>Only one <code>\</code><code>baselineskip</code> per paragraph</h3>
<p/>The <code>\</code><code>baselineskip</code>, which determines the space between lines, is
not (as one might hope) a property of a line, but of a paragraph.  As
a result, in a <code>10pt</code> (nominal) document (with a default
<code>\</code><code>baselineskip</code> of <code>12pt</code>), a single character with a larger
size, as:
<blockquote>
<pre>
{\Huge A}
</pre>
</blockquote><p>
will be squashed into the paragraph: TeX will make sure it doesn&#8217;t
scrape up against the line above, but won&#8217;t give it &#8220;room to
breathe&#8221;, as it does the text at standard size; that is, its size
(<code>24.88pt</code>) is taken account of, but its <code>\</code><code>baselineskip</code>
(<code>30pt</code>) isn&#8217;t.  This problem may be solved by a <em>strut</em>:
the name comes from movable metal typography, and refers to a spacer
that held the boxes (that contained the metal character shapes) apart.
Every time you change font size, LaTeX redefines the command
<code>\</code><code>strut</code> to provide the equivalent of a metal-type strut for the
size chosen.  So for the example above, we would type
<blockquote>
<pre>
Paragraph text ...
   {\Huge A\strut}
   ... paragraph continues ...
</pre>
</blockquote><p>
This technique <em>only</em> works for such very short intrusions; if
you need several lines, you should convert your intrusion into an
<code>quote</code> environment, since it&#8217;s not possible to provide a
<code>\</code><code>strut</code> command for every line of the intrusion, in a sensible
way, so proceed by:
<blockquote>
<pre>
\begin{quote}
  \Huge A LENGTHY TEXT ...
  SHOUTING AT THE READER!
\end{quote}
</pre>
</blockquote><p>
<p/>The contrary case:
<blockquote>
<pre>
Paragraph text ...
{\footnotesize Extended interjection ...
   ... into the paragraph.}
      ... paragraph continues ...
</pre>
</blockquote><p>
will look wrong, since the <code>8pt</code> interjection will
end up set on the <code>12pt</code> <code>\</code><code>baselineskip</code> of the paragraph,
rather than its preferred <code>8.5pt</code>.  A <code>\</code><code>strut</code> here is no
help: there is no such thing as a &#8220;negative strut&#8221;, that draws lines
together, so once more, one falls back on the <code>quote</code> to
separate the interjection:
<blockquote>
<pre>
Paragraph text ...
\begin{quote}
  \footnotesize Extended interjection ...
  ... into the paragraph.
\end{quote}
... paragraph continues ...
</pre>
</blockquote><p>
<p/>The same effect is at work when we have something like:
<blockquote>
<pre>
Paragraph text ...
  ... paragraph body ends.
{\footnotesize Comment on the paragraph.}

Next paragraph starts...
</pre>
</blockquote><p>
which will set the body of the first paragraph on the constricted
<code>\</code><code>baselineskip</code> of the <code>\</code><code>footnotesize</code> comment.  Solve this
problem by ending the initial paragraph before starting the comment:
<blockquote>
<pre>
Paragraph text ...
  ... paragraph body ends.
\par\noindent
{\footnotesize Comment on the paragraph.}

Next paragraph starts...
</pre>
</blockquote><p>
(We suggest <code>\</code><code>noindent</code> to make the comment look as if it is part
of the paragraph it discusses; omit <code>\</code><code>noindent</code> if that is inappropriate.)
<p/>A variation of the previous issue arises from a paragraph whose size
is different from those around it:
<blockquote>
<pre>
{\Large (Extended) IMPORTANT DETAILS ...}

Main body of text...
</pre>
</blockquote><p>
Again, the problem is solved by inserting a paragraph marker in
the text with a different size:
<blockquote>
<pre>
{\Large (Extended) IMPORTANT DETAILS ...\par}

Main body of text...
</pre>
</blockquote><p>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=baselinepar">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=baselinepar</a>
</body>