• Tidak ada hasil yang ditemukan

Index of /CTAN/macros/latex/contrib/leading

N/A
N/A
Protected

Academic year: 2023

Membagikan "Index of /CTAN/macros/latex/contrib/leading"

Copied!
3
0
0

Teks penuh

(1)

Giving leading a number

Will Robertson 2008 / 12 / 11 v 0 . 3

1 Introduction

LATEX defines two methods of specifyingleading1, 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 pracjournclass, a font size and leading of12pt/15.5pt was chosen, which required the preamble declaration\linespread{1.069}, be- cause the default leading for a12pt document is14.5pt and 14.5×1.069≈15.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 a12pt document”. Instead, it’s common to see “give me a leading of15.5pt”. And indeed, that’s how LATEX’s\fontsizecommand 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\leadingcommand will ignore spaces after it.

As\leadinguses\linespreadinternally, the results of\leading{15.5pt}

in a12pt 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\leadinguses 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

Referensi

Dokumen terkait

The macro now checks wether the requested abbreviation has been defined, and sets the conditional accordingly: 220\def\fk@checkfirst #1 #2{% 221

Dynamic references: Some packages, such as varioref, generate text references which dynamically change depending on the location of each float, and these changing messages may then

The latexcolors package ∗ Tobias Plüss 2019/01/06 Abstract Built on top of the xcolor package, the latexcolors package defines the set of colors shown on latexcolor.com, for use in

In general, documents that were written for version 0.3 will exhibit different line and page breaks when typeset using the new version of this document class.. A Document Preparation

leftindex – left indices with better spacing v0.1β Sebastian Ørsted [email protected] August 25, 2020 The packageleftindexprovides commands for typesetting left indices.. Unlike any

For instance, put this line into this file, if you want to have A4 as paper format: \PassOptionsToClass{a4paper}{article} An example follows how to generate the documentation with

237\newlength\cv@projectSep 238\setlength\cv@projectSep{0cm} internal spacing between details of a single project 239\newlength\cvProjectDetailsSep

102 2.19 Without line numbers in equations 103 Cras dapibus, augue quis scelerisque ultricies, felis dolor placerat sem, id porta 104 velit odio eu elit.. Aenean interdum nibh sed