summaryrefslogtreecommitdiff
path: root/letterspace.tex
blob: fea85dffc4b0154effd81ba15dcc8fc4e7134e11 (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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
\usemodule [letterspace]

\defineletterspace [largecaps]
\setupletterspace  [largecaps] [
  spacefactor=.2,
  spaceskip=.3em,
]

\defineletterspace [mediumcaps]
\setupletterspace  [mediumcaps] [
  spacefactor=.25,
  spaceskip=.5em,
]

\defineletterspace [smallcaps]
\setupletterspace  [smallcaps] [
  spacefactor=.05,
  spaceskip=.25em,
]

\defineletterspace [textemph]
\setupletterspace  [textemph] [
  spacefactor=.125,
  spaceskip=.33em,
]

\let\te\textemph
\unexpanded\def\name#1{\smallcaps{\sc#1}}

\defineletterspace [ugly]
\setupletterspace  [ugly] [
  spacefactor=.4,
  spaceskip=1em,
]


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Font Setups                                                   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definefontfeature [default] [default] [
  protrusion=quality,
  expansion=quality,
  mode=node,
  script=latn,
  onum=yes,
  dlig=yes,
  liga=yes,
]

\usetypescript [antykwa-poltawskiego]
\setupbodyfont [antykwa-poltawskiego,10pt]

\usetypescript [serif] [hz] [highquality]
\setupalign    [hanging,hz]

\setupbodyfontenvironment [default] [12pt] [interlinespace=15pt]
\setupbodyfontenvironment [default] [11pt] [interlinespace=13pt]
\setupbodyfontenvironment [default] [10pt] [interlinespace=12pt]
\setupbodyfontenvironment [default] [9pt]  [interlinespace=11pt]
\setupbodyfontenvironment [default] [8pt]  [interlinespace=10pt]

\setupbodyfontenvironment [default] [em=italic]

\def\quote#1{\bgroup\italic#1\egroup}
\def\uprightslash{\bgroup\rm/\egroup}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Presenting the Interface                                      %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usemodule  [int-load]
\loadsetups [t-letterspace.xml]

\define\beautifyshowsetups{%
  \unexpanded\def\setupnumfont  {\rm}%
  \unexpanded\def\setuptxtfont  {\rm}%
  \unexpanded\def\setupintfont  {\rm\sc\Word}%
  \unexpanded\def\setupvarfont  {\rm\it}%
  \unexpanded\def\setupoptfont  {\rm\it}%
  \unexpanded\def\setupalwcolor {gutenred}%
  \unexpanded\def\setupoptcolor {gutenred}%
  \defineframedtext [setuptext] [
    frame=off,
    background=color,
    backgroundcolor=gray:2,
    width=\hsize,
    height=fit,
    align=right,
    offset=0.75em,
  ]%
}

\let\Oldshowsetup\showsetup

\define[1]\showsetup{% hurray for diversity
  \bgroup\beautifyshowsetups%
    \Oldshowsetup{#1}%
  \egroup%
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Paper                                                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definepapersize[LHS][
  width=160mm,
  height=239mm,
]

\setuppapersize[LHS][LHS]

\showframe
\setuplayout [
    width=122mm,
    %textheight=199mm, % ca. 47 rows * 12pt
    height=224mm, % text height should end up at ca. 47 rows * 12pt
    %height=fit,
    %  
    topspace=14mm,
    header=12pt,
    headerdistance=4mm,
    top=00mm,
    %  
    bottomspace=0mm,
    footer=23mm,
    bottom=0mm,
    footerdistance=0mm,
    %  
    backspace=16mm,
    leftedge=0mm,
    leftedgedistance=0mm,
    leftmargin=16mm,
    leftmargindistance=1em,
    %  
    rightmargin=20mm,
    rightmargindistance=2mm,
    rightedge=0mm,
    rightedgedistance=0mm,
]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Interaction                                                   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definecolor [gutenred] [x=bf221f] % rubrication from digitized_Göttingen Gutenberg bible

\setupinteraction[%
  state=start,
  color=gutenred,
  contrastcolor=gutenred,
  %color=,
  %contrastcolor=,
  style=,
  focus=standard,
  title={Letterspace Module},
  subtitle={Bringing Flow into Horizontal Spacing},
  author={Philipp Gesang},
  keyword={ConTeXt, LuaTeX, letterspacing, horizontal glue},
]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Headings                                                      %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\defineletterspace [LSchapter]
\defineletterspace [LSsection]
\defineletterspace [LSsubsection]
\setupletterspace  [LSchapter]    [spacefactor=.1,  spaceskip=.33em]
\setupletterspace  [LSsection]    [spacefactor=.15, spaceskip=.40em]
\setupletterspace  [LSsubsection] [spacefactor=.125,spaceskip=.33em]

\def   \fontchapter#1{\setupbodyfont[11pt]\WORD\LSchapter{#1}}
\def   \fontsection#1{\setupbodyfont[11pt]\word\sc\LSsection{#1}}
\def\fontsubsection#1{\setupbodyfont[11pt]\LSsubsection{#1}}

\def   \Chapterheadfontcmd{\fontchapter}
\def   \Sectionheadfontcmd{\fontsection}
\def\Subsectionheadfontcmd{\fontsubsection}

\setuphead [chapter] [
  align=middle,
  footer=text,
  grid=yes,
  header=empty,
  number=no,
  page=yes,
  style=,
  textcommand=\Chapterheadfontcmd,
  before={\startlinecorrection\blank[3*line,force]},
  after={\stoplinecorrection\blank[line,force]},
]

\definetext [text] [footer] [pagenumber]

\setuphead [section] [
  align=middle,
  number=no,
  page=no,
  style=,
  textcommand=\Sectionheadfontcmd,
  before={\blank[line]},
  after={\blank[line]},
]

\setuphead [subsection] [
  align=middle,
  number=no,
  page=no,
  style=,
  textcommand=\Subsectionheadfontcmd,
  before={\blank[line]},
  after={\blank[line]},
]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ToC                                                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def   \tocfontchapter#1{\WORD\LSchapter{#1}}
\def   \tocfontsection#1{\word\sc\LSsection{#1}}
\def\tocfontsubsection#1{\LSsubsection{#1}}

\setuplist [chapter] [
  alternative=b,
  textcommand=\tocfontchapter,
]

\setuplist [section] [
  alternative=c,
  interaction=text,
  margin=2em,
  numberstyle=,
  textcommand=\tocfontsection,
  textstyle=,
]

\setuplist [subsection] [
  %after=2.5em,    % from the hack
  alternative=d,
  interaction=text,
  margin=3em,     % hanging
  textcommand=\tocfontsubsection,
]

\setuplistalternative[c] [
  %distance=0em,
  %width=0pt,
  stretch=.5em,
  command=\hskip.5em\phglistdots\hskip.5em\relax,
]

\def\phglistdots{\gleaders\hbox to 1em{\hss.\hss}\hfill}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography                                                  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bib: Setups                                                   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setuppublications [
  alternative=ssa,
  refcommand=authoryear,
  %sorttype=bbl,
  sort=author,
  numbering=yes,
  autohang=yes,
]

\setuppublicationlist [
  artauthor=\invertedauthor,
]

\setupcite [authoryear] [compress=no]

%%% Used in bibliography formatting.
\definestartstop [bibindent] [
  before={\startnarrower[left]%
          \setupindenting[-\leftskip,yes,first]%
          \clubpenalty-9000%
          \widowpenalty-9000%
          },  
  after=\stopnarrower,
]

\unexpanded\def\ctay#1{\cite[authoryear][#1]}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bib: Entries                                                  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\startpublication [
  k=lt,
  t=book,
  a={{Willberg/Forssman}},
  y=1997,
  %n=1,
  s={Lesetypographie},
]
  \author[]{Hans Peter}[]{}{Willberg}
  \author[]{Friedrich}[]{}{Forssmann}
  \pubyear{1997}
  \title{Lesetypographie}
  \city{Mainz}
\stoppublication

\startpublication [
  k=mt,
  t=book,
  a={Bodoni},
  y=1818,
  %n=1,
  s={Manuale},
]
  \author[]{Giambattista}[]{}{Bodoni}
  \pubyear{1818}
  \title{Manuale Tipografico, 2~vols}
  \city{Parma}
\stoppublication

\startpublication [
  k=bh,
  t=book,
  a={Bringhurst},
  y=2008,
  %n=1,
  s={Elements},
]
  \author[]{Robert}[]{}{Bringhurst}
  \pubyear{2008}
  \title{The Elements of Typographic Style}
  \edition{3.2}
  \city{Point Roberts WA, Vancouver}
\stoppublication

\startpublication[
  k=roemer,
  t=article,
  a={Roemer},
  y=2011,
  %n=3,
  s={Gewichten},
]
  \artauthor[]{Christine}[]{}{Roemer}
  \pubyear{2011}
  \arttitle{Gewichten -- Wichtiges und Unwichtiges mit \LATEX\ markieren}
  \journal{Die \TEX nische Komödie}
  \volume{2011:1}
  \pages{6--16}
\stoppublication

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Misc                                                          %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\clubpenalty  -7000
\widowpenalty -7000

\def\etc{{\italic\letterampersand}c}

\setupindenting [yes,next,medium]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Makeup for Front Matter                                       %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definemakeup [FM] [standard]
\setupmakeup [FM] [
  width=125mm,
  height=172.506mm,
  location=middle,
]

\setupheadertexts [] [] [] []
\setuppagenumbering [state=stop,location=]

\starttext

\startfrontmatter
\setuplayout [width=middle]
\startFMmakeup
  \raggedcenter
  \vfill
  {\tfc\italic The}\par
  \vfill
  {\tfd\WORD \largecaps{Letterspace Module}}\par
  \vfill
  {\tfc\italic for {\CONTEXT} MkIV}\par
  \vfill
  {\tfa\sc \mediumcaps{A Contribution to Horizontal Movement}}\par
  \vfill
\stopFMmakeup
\stopfrontmatter

\page

\useURL [phg-mail] [megas.kapaneus@gmail.com]   [] []
\useURL [phg-bibu] [https://bitbucket.org/phg/] [] []
\startstandardmakeup
  \vfill\raggedright\tfx
  © 2011-03-16 {\italic Philipp Gesang}, Heidelberg\par
  The latest Version can be found at \from [phg-bibu].\par
  Mail bugs and fixes or complaints and suggestions to \from
  [phg-mail].\par
\stopstandardmakeup

\page [odd]
\startbodymatter

\setuppagenumber [number=1]
\setuppagenumbering [
  state=start,
  alternative=doublesided,
  location={right,header},
]

\setupheadertexts
  [{\tfx\getmarking[title]}]    [{\pagenumber}]
  [{\pagenumber}]        [{\tfx\getmarking[title]}]

\title{Content}

\placelist[chapter,section][criterium=all]

\chapter{Introduction}

Robert \name{Bringhurst} quotes Frederick \name{Goudy}’s famous
dictum on the topic of letterspacing: \quote{A man who would
letterspace lowercase would steal sheep.}\footnote{\ctay{bh},
S.~31.}

\chapter{Commands}

\section{Default Letterspace Command}

\showsetup{letterspace}
\showsetup{startletterspace}

\section{Defining and Customizing Letterspace Commands}

\showsetup{setupletterspace}
\showsetup{defineletterspace}

\chapter{Applications}

\section{Precautions}

\te{Letterspacing} is a dynamic property of a string of text, as
opposed to static font properties that are e.g. italics or slant.
In principle, when applying a letterspacing to text, the current
font is not merely pushed back in favor of another font.
Instead, the way of typesetting the same font is modified by
certain parameters; in the case of the \te{Letterspace} module
these are the \te{kerning} and the \te{interword space}.
Therefore it exclusively depends on the correct adjustment of said
parameters whether the letterspacing will achieve its purpose or
not.
On the other hand, external factors like harmonizing different
typefaces, the font’s design size \etc. are ruled out as possible
influences, which can be a great advantage if for example a font
happens to lack a matching italic face for emphasizing.

Due to its flexibility and because it poses relatively small
demands on the typesetting environment, thoughtless letterspacing
may easily ruin a product.
Moderate values don’t express how important a particular emphasis
is to the author? Just \ugly{widen the spacing} and no reader
will ever skip over your message \dots.
Sure, everybody will get the cue, though the appearance of the
highlighted text, the paragraph, and possibly the whole page will
certainly be spoilt.
Granted, from this perspective letterspacing might appear to be
too dangerous a tool, only begging for misuse.
But this judgement is premature as letterspacing has in fact a
long tradition and was employed in many outstanding examples of
typography.
Apart from its seductive versatility there are no objections
against letterspacing on a general level, as long as it is
carefully utilized.

Letterspacing has two prevailing uses: ({\it1}) for emphases and
({\it2}) for spacing capital letters, which is especially
valuable in display situations like for instance the front matter
of books or section headings.
Both come with a set of peculiarities that the typesetter must
consider in order to figure out the appropriate values for the
interword and letter spacings.

\section{Emphasis}
Documents that require many levels of different emphases are
among the primary targets of letterspacing.
For example, in linguistics an author might wish to distinguish
({\it1}) names of cited authors, ({\it2}) ordinary text emphasis,
({\it3}) inline quoted passages, and ({\it4}) word forms or
etymological roots.
To be sure, this can be accomplished with a mapping like
  {\it1}: small capitals,
  {\it2}: italics,
  {\it3}: quotation marks, and
  {\it4}: a slanted face.
But \te{quotation marks} are hard to keep track of, if the enveloped
text exceeds a certain length; also, they disencourage skimming
because the reader always has to check whether the point that
caught his eye might belong to a quotation instead of the main
text.
In various fonts -- mainly sans serif -- \te{slant} cannot easily
be told apart from italics, thus defeating the very purpose of
emphasis, in other fonts it might not be available at all.
\te{Bold face} might seem to be an obvious alternative but even
semi bold weights cause text to stand out from the surrounding
paragraph, diverting the readers attention away from its normal
trail along successive lines.
Besides, the more a text is intermingled with different weights,
the closer it resembles the look of a dictionary.

After these deliberations the validity of \te{letterspacing,}
including lower case, as a means of emphasis is already half
established.
It beats slant with respect to availability and differentiating
effect.
It is preferable over quotation marks because the emphasized
passage clearly differs from the main font style.
Finally, it triumphs over weight switching as the result is very
close to the mean overall distribution of ink within the text
body.
In the previous graduation of emphasis levels an alternative
involving letter spacing could be as follows:
  {\it1}: small caps,
  {\it2}: letterspaced text font,
  {\it3}: italics, and
  {\it4}: letterspaced italics or slants.
Here another convenient feature of letterspacing becomes
apparent: as it is basically a different method of typesetting
the same font it can theoretically be applied on any typeface and
weight.
It follows, that in the foregoing mapping, parts of longer
(italic) quotations may be emphasized as well:
  \quote{%
    regum timendorum in proprios greges {\uprightslash}
    reges in ipsos imperium est \te{Iouis} {\uprightslash}
    \te{clari} Giganteo triumpho {\uprightslash}
    cuncta supercilio \te{mouentis.}%
  }
However, substituting rule {\it2} for {\it3}, the resulting
mapping will be less satisfactory.
As quotations are prone to extending over multiple lines, whereas
normal emphasis rarely spans more than two words, letter spacing
the former might lead to the unbalanced appearance of paragraphs.
So best avoid letterspacing in cases where the object possibly
encompasses entire sentences.

Caution is necessary concerning \te{punctuation} adjacient to the
letterspaced passage.
In contrast to italicized or bold emphasis where an immediately
succeeding punctuation sign is best typeset in the surrounding
main face (e.g. „et {\it tu}, Brute?“), letter spacing may
require the sign to be typeset as part of the emphasis.
The reason for this consists partly in the larger interword
spacing that extends to the surrounding spaces, and partly also
on the letterspacing itself which would be disrupted by a
tighter-spaced character.
(Bad: \te{O Tite}, tute, \te{Tati}, tibi tanta, \te{tyranne}, tulisti;
good: \te{O Tite,} tute, \te{Tati,} tibi tanta, \te{tyranne,} tulisti.)

\section{Capital Spacing}

\section{Don’t’s}
-- different letterspace widths for the same meaning


\title{References}

\startbibindent
  \placepublications[criterium=all]
\stopbibindent

\stopbodymatter
\stoptext