summaryrefslogtreecommitdiff
path: root/doc/context/third/letterspace/letterspace.tex
blob: 8d163663095fdf10dc19ca7e63c28e6a239175f1 (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
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
\usemodule [letterspace]

\defineletterspace [largecaps]
\setupletterspace  [largecaps] [
  factor=.2,
  spaceskip=.3em,
  suppresskern=yes,
]

\defineletterspace [mediumcaps]
\setupletterspace  [mediumcaps] [
  factor=.25,
  spaceskip=.5em,
  suppresskern=yes,
]

\defineletterspace [smallcaps]
\setupletterspace  [smallcaps] [
  factor=.05,
  spaceskip=.25em,
  suppresskern=yes,
]

\defineletterspace [textemph]
\setupletterspace  [textemph] [
  factor=.125,
  spaceskip=.33em,
  suppresskern=no,
]

\defineletterspace [slightly]
\setupletterspace  [slightly] [
  factor=.075,
  spaceskip=.33em,
  suppresskern=no,
]

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

\defineletterspace [ugly]
\setupletterspace  [ugly] [
  factor=.4,
  spaceskip=1em,
  suppresskern=no,
]


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

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

\definefontfeature [kerning] [kern=yes]%

\usetypescript [modern]
\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\tf/\egroup}
\def\uprightomiss{\bgroup\tf[\dots]\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]    [factor=.1,  spaceskip=.33em,suppresskern=yes]
\setupletterspace  [LSsection]    [factor=.15, spaceskip=.40em,suppresskern=yes]
\setupletterspace  [LSsubsection] [factor=.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   \tocfontsection#1{\slightly{#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}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Captions                                                      %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\setupcaptions[
  location=bottom,
  headstyle=\tfx\italic,
  way=bytext,
  prefixsegments=none,
  style={\setupinterlinespace[9pt]\tfx},
]

\setupcaption [figure] [way=bytext]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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=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=2,
  s={Elements},
]
  \author[]{Robert}[]{}{Bringhurst}
  \pubyear{2008}
  \title{The Elements of Typographic Style}
  \edition{3.2}
  \city{Point Roberts WA, Vancouver}
\stoppublication

\startpublication [
  k=lhs2,
  t=book,
  a={Hofmann/Szantyr},
  y=1965,
  n=3,
  s={LHS},
]
  \author[]{Johann Baptist}[]{}{Hofmann}
  \author[]{Anton}[]{}{Szantyr}
  \pubyear{1965}
  \title{Lateinische Syntax und Stilistik}
  \city{München}
\stoppublication

\startpublication[
  k=roemer,
  t=article,
  a={Roemer},
  y=2011,
  n=4,
  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

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

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

\clubpenalty  -7000
\widowpenalty -7000

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

\setupindenting [yes,next,medium]

\useURL [leibnizausgabe] [http://www.leibniz-edition.de/Baende/] [] [Leibniz-Edition]
\useURL [soulpackage] [http://ctan.larsko.net/macros/latex/contrib/soul/] [] [soul]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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},
p.~31.}
Likewise other judgements:
\quote{Letter spacing is a form of markup particularly hard
to handle, that only master typographers should get involved
with.}\footnote{\ctay{lt}, p.~126.}
And another:
\quote{Letter spacing is disapproved of in the same way as of
capitals \uprightomiss~.}\footnote{\ctay{roemer}, p.~10.}
This module is partly a reaction on the excellent article the
last quotation was taken from, and partly the endeavour of a
convinced \CONTEXT\ user and letter spacer to replace a number of
kludges already in use with something more consistent.
To be sure, those warnings are grounded in facts and they should
seriously be taken into account before one resorts to
letterspacing.

Before the advent of \LUATEX\ the implementation of proper letter
spacing in *\TEX\ proved to be extremely difficult.
For instance, the \from [soulpackage] package provides some means
but at the same time severely limits the content passed to
macros.
Nevertheless there are magnificent examples of letterspacing done
right, like the \from [leibnizausgabe] by the Leibniz-Archiv in
Hanover that has been typeset with \smallcaps{EDMAC} and \PDFTEX.
Nowadays the Lua node library removes the technical restrictions
and thus leaves the task of correct letterspacing to the user.
The \te{Letterspace} module for \CONTEXT\ was designed to collect
everything necessary to achieve this and to make it accessible
from one place.

\chapter{Commands}

Technically, the \te{Letterspace} module doesn’t do anything
fancy; it just maps some existing \CONTEXT\ macros into a single
setup and lets you define and configure your own derivatives of
it.
The module is supposed to be loaded the regular way: somewhere
before \type{\starttext} should be the line
\starttyping
\usemodule [letterspace]
\stoptyping
\noindentation-- That’s all.

\section{Default Letterspace Command}
Initially one letterspace command is already defined and
configured, as well as a letterspacing environment.
They are now ready for use in running text.

%\definecolor [prettyone]   [r=.6,g=.6,b=.6]  % red
%\definecolor [prettytwo]   [r=.0,g=.6,b=.6]  % green
%\definecolor [prettythree] [r=.6,g=.6,b=.6]  % blue
%\definecolor [prettyfour]  [r=.6,g=.6,b=.6]  % yellow

%\startTEX
\starttyping
\usemodule [letterspace]
\starttext

\startlines
  uides ut \letterspace{alta} stet \letterspace{niue} candidum
  Soracte
\stoplines

\startletterspace
  \startlines
    hac {\italic ait} in Thebas, hac me iubet ardua uirtus
    ire, Menoeceo qua lubrica sanguine turris.
    experiar quid sacra iuuent, an falsus Apollo.
  \stoplines
\stopletterspace

\stoptext
\stoptyping
%\stopTEX

\showsetup{letterspace}
\showsetup{startletterspace}

\section{Defining and Customizing Letterspace Commands}

The \te{Letterspace} module allows the letterspacing to be
adjusted via \te{three} parameters.
The \type{factor} determines the value by which the
\te{intra}word spacing (between letters) will be extended.
\type{spaceskip} specifies a dimension for the \te{inter}word
spacing and, if applicable, the surrounding spaces.
\type{suppresskern} allows for disabling the letter kerning which
can improve the spacing of capitals (see below,
\at{p.}[suppresskern]).

The following lines reconfigure the predefined
\type{\letterspace} macro to behave in an extreme fashion.
\starttyping
\setupletterspace [
  factor=2,       % default: 0.125
  spaceskip=2em,  % default: 0.5em
]

\letterspace{vapula!}
\stoptyping
\showsetup{setupletterspace}

The recommended alternative to constantly readjusting the base
command is to define separate macros for different purposes.

\starttyping
\defineletterspace [LSbighead]
\defineletterspace [LSemphasis]
\defineletterspace [LSsmcp]

\setupletterspace [LSbighead]  [factor=.2,   spaceskip=.7em, suppresskern=yes]
\setupletterspace [LSemphasis] [factor=.111, spaceskip=.4em, suppresskern=no,]
\setupletterspace [LSsmcp]     [factor=.06,  spaceskip=.4em, suppresskern=no,]

\LSbighead{\bf\WORD This is a candidate for sectioning, innit?}
\blank [line]

\startlines
  terrarum delicta nec exsaturabile \LSsmcp{\sc Diris}
  \LSemphasis{ingenium mortale} queror, quonam usque nocentum
  exigar in poenas! taedet saeuire corusco
  fulmine.
\stoplines
\stoptyping

These macros can subsequently accessed from whatever markup
element requires letterspacing: section titles, front matter
makeup, emphasis etc.

\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.

\placefigure [left] {Letterspaced greek small capitals after an
                     initial in \ctay{mt}, vol.~2.} {%
  \externalfigure [bodoni-mt-2-4.jpeg] [width=.45\hsize]%
}
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.\footnote{%
  \ctay{lt}, p.~122 distinguish \te{active} from \te{integrated}
  markup.
  Semi bold and underling belong to the former, italics and slant
  to the latter.
  As the effect of letter spacing heavily depends on the
  environment, it may count as active when used as the only means
  of emphasis.
  However, in a “colorful” product with many different layers of
  emphasis it might not stick out as much among the others and
  thus count as integrated (cf. p.~126).%
}

\placefigure [left] {Letterspaced italics along normal ones in \ctay{lhs2}} {%
  \externalfigure [lhs-2-128.jpeg] [width=.5\hsize]%
}
\indentation 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, spacing out
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 onto 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}
\startbuffer [display:capitals]
  \start%
  %\setupbodyfont [modern,11pt]%
  \setupbodyfont [11pt]%
  \framed[
    align=middle,
    background=color,
    backgroundcolor=gray:2,
    offset=1em,
    frame=off,
  ]{%
      \def\teststring{mispavayatsim}%
      %\definefontfeature [capitals] [cpsp=yes,kern=yes]% how’s this supposed to work?
      \bf%
      {\color[gray:7]\WORD\teststring}\par
      %{\setff{capitals}\WORD\teststring}\par % why doesn’t this have
                                              %an effect with *any* font?
      {\color[gray:8]\subff{kerning}\WORD\teststring}\par
      {\color[gray:9]\largecaps{\WORD\teststring}}\par
  }
  \stop%
\stopbuffer

\starthangaround{\getbuffer [display:capitals]}
Another natural use of letter spacing is to space out capitals and
small caps, whose legibility suffers with increasing markup
length.
The appearance of capitals can be influenced in various ways, as
demonstrated in the illustration to the left.
In the first row, no modification is applied and the capitals are
placed with full kerning.
Row number two has the kerning removed and thus the distance between
letters increases.
The final row, as the second, lacks kerning and adds
20\,\letterpercent\ letter spacing.
\stophangaround

As is apparent from the example, the difference in spacing
particularly influences the outcome.
The {\WORD unmodified text} in the first row is packed too
tightly, whereas disabling the kerning results in irregular
widening of the {\subff{kerning}\WORD previously kerned} letters
near the center.
In the third row the sequence looks much better because of
additional \mediumcaps{\WORD letterspacing.}
With some fonts \smallcaps{\sc small capitals} profit from additional
spacing as well, as employed in the section headings of this
document.\reference[suppresskern]{}
The \te{Letterspace} module provides a switch \type{suppresskern}
that, if set to {\it yes}, will disable kerning during
letterspacing.
This option is meant for the special treatment of capitalization
but depending on the font it might equally help when dealing with
emphasis as well.
\placefigure [middle] {Letterspaced capitals constitute a title
                       page in \ctay{mt}, vol.~1.} {%
  \externalfigure [bodoni-mt-1-front.jpeg] [width=.75\hsize]%
}

\chapter{License}

Copyright 2011 \te{Philipp Gesang}. All rights reserved.

Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:

\startitemize[n]
  \item Redistributions of source code must retain the above
    copyright notice, this list of conditions and the following
    disclaimer.
  \item Redistributions in binary form must reproduce the
    above copyright notice, this list of conditions and the
    following disclaimer in the documentation and/or other
    materials provided with the distribution.
\stopitemize

\begingroup
\setuptolerance [horizontal,stretch]
\startalignment [right]
\noindentation\startsmallcaps
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
  HOLDER “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\stopsmallcaps\endgraf
\stopalignment
\endgroup


\chapter{References}

\startbibindent
  \placepublications[criterium=all]
\stopbibindent

\stopbodymatter
\stoptext