Commits

Philipp Gesang committed ae823ca

fixed macro name bug; added structure to documentation

  • Participants
  • Parent commits 4184db2

Comments (0)

Files changed (2)

doc/context/third/letterspace/letterspace.tex

 \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}
 
     %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,
           \setupindenting[-\leftskip,yes,first]%
           \clubpenalty-9000%
           \widowpenalty-9000%
-          },  
+          },
   after=\stopnarrower,
 ]
 
 \unexpanded\def\ctay#1{\cite[authoryear][#1]}
+% \unexpanded\def#1{}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Bib: Entries                                                  %
   [{\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.}
 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
 \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.
 
 \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.
 
 \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.
 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
 (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,
       \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
   \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.
 
 \stopalignment
 \endgroup
 
+\stopchapter
 
-\chapter{References}
+\startchapter[title=References]
 
 \startbibindent
   \placepublications[criterium=all]
 \stopbibindent
 
-\stopbodymatter
+\stopchapter
+
 \stoptext

tex/context/third/letterspace/t-letterspace.mkiv

   \iffirstargument
     \doifassignmentelse{#1}{%
       \setupletterspace[\currentletterspace][#1]%
-    }\relax%
+    }\relax
   \fi
   \dododoletterspace%
 }
       \subtractfontfeaturefromfont{letterspace:kerning}%
     }%
   }%
-  \ifhmode\ifnum\lastnodetype=\@@gluenode
+  % \ifhmode\ifnum\lastnodetype=\@@gluenode
+  \ifhmode\ifnum\lastnodetype=\gluenodecode
       \unskip{\letterspace_setstuff\ }%
     \fi
   \fi%