summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2012-02-01 21:50:15 +0100
committerPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2012-02-01 21:50:15 +0100
commit1f56aa625af0fa39aeb70ec8284d0ee51cb4547b (patch)
treef8397400a803e7c310361f5eab212b1c6ba868fa
parent9b910ffb4fb27b1f51883c7cc1fe18575497bd8e (diff)
downloadt-letterspace-1f56aa625af0fa39aeb70ec8284d0ee51cb4547b.tar.gz
fixed macro name bug; added structure to documentation
-rw-r--r--doc/context/third/letterspace/letterspace.tex78
-rw-r--r--tex/context/third/letterspace/t-letterspace.mkiv5
2 files changed, 52 insertions, 31 deletions
diff --git a/doc/context/third/letterspace/letterspace.tex b/doc/context/third/letterspace/letterspace.tex
index 26de8f7..9c04b11 100644
--- a/doc/context/third/letterspace/letterspace.tex
+++ b/doc/context/third/letterspace/letterspace.tex
@@ -70,15 +70,16 @@
\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] [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\quote#1{\bgroup\italic#1\egroup}
+\definehighlight[quote][style=italic]
\def\uprightslash{\bgroup\tf/\egroup}
\def\uprightomiss{\bgroup\tf[\dots]\egroup}
@@ -133,23 +134,23 @@
%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,
@@ -312,11 +313,12 @@
\setupindenting[-\leftskip,yes,first]%
\clubpenalty-9000%
\widowpenalty-9000%
- },
+ },
after=\stopnarrower,
]
\unexpanded\def\ctay#1{\cite[authoryear][#1]}
+% \unexpanded\def#1{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bib: Entries %
@@ -475,16 +477,19 @@
[{\tfx\getmarking[chapter]}] [{\pagenumber}]
[{\pagenumber}] [{\tfx\getmarking[chapter]}]
-\chapter{Introduction}
+\startchapter[title=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.}
+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.}
+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.}
@@ -511,7 +516,9 @@ 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}
+\stopchapter
+
+\startchapter[title=Commands]
Technically, the \te{Letterspace} module doesn’t do anything
fancy; it just maps some existing \CONTEXT\ macros into a single
@@ -524,7 +531,7 @@ before \type{\starttext} should be the line
\stoptyping
\noindentation-- That’s all.
-\section{Default Letterspace Command}
+\startsection[title=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.
@@ -558,8 +565,9 @@ They are now ready for use in running text.
\showsetup{letterspace}
\showsetup{startletterspace}
+\stopsection
-\section{Defining and Customizing Letterspace Commands}
+\startsection[title=Defining and Customizing Letterspace Commands]
The \te{Letterspace} module allows the letterspacing to be
adjusted via \te{three} parameters.
@@ -615,9 +623,12 @@ makeup, emphasis etc.
\showsetup{defineletterspace}
-\chapter{Applications}
+\stopsection
+\stopchapter
-\section{Precautions}
+\startchapter[title=Applications]
+
+\startsection[title=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.
@@ -664,7 +675,9 @@ 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}
+\stopsection
+
+\startsection[title=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
@@ -754,10 +767,11 @@ 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}
+\stopsection
+
+\startsection[Capital Spacing]
\startbuffer [display:capitals]
\start%
- %\setupbodyfont [modern,11pt]%
\setupbodyfont [11pt]%
\framed[
align=middle,
@@ -769,11 +783,11 @@ good: \te{O Tite,} tute, \te{Tati,} tibi tanta, \te{tyranne,} tulisti.)
\def\teststring{mispavayatsim}%
%\definefontfeature [capitals] [cpsp=yes,kern=yes]% how’s this supposed to work?
\bf%
- {\color[gray:7]\WORD\teststring}\par
+ {\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
+ {\color[gray:8]{\subff{kerning}\WORD\teststring}}\par
+ {\color[gray:9]{\largecaps{\WORD\teststring}}}\par
}
\stop%
\stopbuffer
@@ -814,7 +828,11 @@ emphasis as well.
\externalfigure [bodoni-mt-1-front.jpeg] [width=.75\hsize]%
}
-\chapter{License}
+\stopsection
+\stopchapter
+\stopbodymatter
+
+\startchapter[title=License]
Copyright 2011 \te{Philipp Gesang}. All rights reserved.
@@ -853,12 +871,14 @@ conditions are met:
\stopalignment
\endgroup
+\stopchapter
-\chapter{References}
+\startchapter[title=References]
\startbibindent
\placepublications[criterium=all]
\stopbibindent
-\stopbodymatter
+\stopchapter
+
\stoptext
diff --git a/tex/context/third/letterspace/t-letterspace.mkiv b/tex/context/third/letterspace/t-letterspace.mkiv
index 95fadeb..0a2744a 100644
--- a/tex/context/third/letterspace/t-letterspace.mkiv
+++ b/tex/context/third/letterspace/t-letterspace.mkiv
@@ -62,7 +62,7 @@
\iffirstargument
\doifassignmentelse{#1}{%
\setupletterspace[\currentletterspace][#1]%
- }\relax%
+ }\relax
\fi
\dododoletterspace%
}
@@ -82,7 +82,8 @@
\subtractfontfeaturefromfont{letterspace:kerning}%
}%
}%
- \ifhmode\ifnum\lastnodetype=\@@gluenode
+ % \ifhmode\ifnum\lastnodetype=\@@gluenode
+ \ifhmode\ifnum\lastnodetype=\gluenodecode
\unskip{\letterspace_setstuff\ }%
\fi
\fi%