• No results found

Instructions don’t come from the designer: “increase the leading 1.069 times the standard size in a 12 pt document”

N/A
N/A
Protected

Academic year: 2021

Share "Instructions don’t come from the designer: “increase the leading 1.069 times the standard size in a 12 pt document”"

Copied!
3
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Giving leading a number

Will Robertson 2008/12/11 v0.3

1 Introduction

LATEX defines two methods of specifying leading1, or the distance between suc- cessive lines of text:

\linespread{hratio to originali}, and

\linespread

\renewcommand\baselinestretch{hratio to originali}.

\baselinestretch

(I’ve got no idea what the difference between the two methods actually is.) For example, in the pracjourn class, a font size and leading of 12 pt/15.5 pt was chosen, which required the preamble declaration \linespread{1.069}, be- cause the default leading for a 12 pt document is 14.5 pt and 14.5×1.06915.5.

But this is not how most people define the typesetting of their paragraphs.

Instructions don’t come from the designer: “increase the leading 1.069 times the standard size in a 12 pt document”. Instead, it’s common to see “give me a leading of 15.5 pt”. And indeed, that’s how LATEX’s \fontsize command works.

This package defines the \leading{hlengthi}command, which sets the lead-

\leading

ing immediately to thehlengthispecified. Here’s an example:

\leading{11pt}

Upon observing him more closely, I per- ceived that he wore a black silk apron over his small-clothes; and this was a thing which I thought very odd. Before I had time to make any remark, however, upon so singular a circumstance, he interrupted me with a second “ahem!”

\leading{5mm}

Upon observing him more closely, I per- ceived that he wore a black silk apron over his small-clothes; and this was a thing which I thought very odd. Before I had time to make any remark, however, upon so singular a circumstance, he interrupted me with a second “ahem!”

1Pronounced to rhyme with ‘sledding’; the word arises from the spacers of lead used to separate lines of text in traditional metal press typesetting

1

(2)

2 Notes

The \leading command will ignore spaces after it.

As \leading uses \linespread internally, the results of \leading{15.5pt}

in a 12 pt document and \linespread{1.069} are identical. This means that the leading at other font sizes (e.g., \small, \large) will also be adjusted by the same ratio.

Since \leading uses a fixed length, if the font size of the document changes then its value will need to be adjusted. This isn’t a problem in general, however, because it is common for different ratios of linespread to be used for different absolute font sizes anyway.

File I

The leading package

1 \ProvidesPackage{leading}

2 [2008/12/11 v0.3 Define leading length]

3 \RequirePackage{calc}

\leading {#1}: Leading (or ‘baselineskip’) length

This is the whole package. Not much to it, really.

4 \newcommand\leading[1]{%

5 \begingroup

6 \@tempdima=\f@baselineskip\relax

7 \@tempdimb=#1\relax

8 \setlength\@tempdimc{1pt*\ratio{\@tempdimb}{\@tempdima}}%

9 \global\@tempdimc=\@tempdimc

10 \endgroup

11 \linespread{\strip@pt\@tempdimc}\selectfont\ignorespaces}

Index

Numbers written in italic refer to the page where the corresponding entry is described; numbers underlined refer to the code line of the definition; numbers in roman refer to the code lines where the entry is used.

Symbols

\@tempdima . . . . 6, 8

\@tempdimb . . . . 7, 8

\@tempdimc . . . 8, 9, 11

B

\baselinestretch . . . 1 F

\f@baselineskip . . . 6

2

(3)

I

\ignorespaces . . . 11

L

\leading . . . . 1, 4

\linespread . . . 1, 11

R

\ratio . . . 8

\RequirePackage . . . 3 S

\selectfont . . . 11

\strip@pt . . . 11

3

Referenties

GERELATEERDE DOCUMENTEN

\hyperlinkemail The \hyperlinkemail command defines \typesetemail to use the hyperref pack- age’s facilities to create a hyperlink email address in the output document.

[r]

The macro typesets text in Bera serif fonts from Walter Schmidt’s bera package (based on Bitstream Vera serif font de- signed by Jim Lyles of Bitstream Inc.) and math is typeset

De Raad heeft aan alle regionale netbeheerders van gastransportnetten in Nederland via een informatieverzoek gevraagd om de maandelijkse reconciliatieresultaten zoals deze zijn

Distribution of kinetic energy in

The comparison with the cal- culations is nearly quantitative and the large number of ex- perimentally observed parameters 共the number of vibration modes, their stretching

We have computed the sticking probabilities of molecular hydrogen and deuterium on Pt(211) and compared our theoretical results with the experimental data. Our theoretical

More significant roughening is visible for NaOH (Fig. A.17), which induces the formation of triangular etch pits at less negative potentials than in 1 M LiOH. At more