diff options
-rw-r--r-- | letterspace.tex | 175 |
1 files changed, 162 insertions, 13 deletions
diff --git a/letterspace.tex b/letterspace.tex index 5cca7a0..501400b 100644 --- a/letterspace.tex +++ b/letterspace.tex @@ -1,5 +1,17 @@ \usemodule [letterspace] +\defineletterspace [largecaps] +\setupletterspace [largecaps] [ + spacefactor=.2, + spaceskip=.3em, +] + +\defineletterspace [mediumcaps] +\setupletterspace [mediumcaps] [ + spacefactor=.25, + spaceskip=.5em, +] + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Font Setups % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -122,6 +134,98 @@ 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} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Misc % @@ -130,36 +234,80 @@ \clubpenalty -7000 \widowpenalty -7000 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Makeup for Front Matter % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\definemakeup [FM] [standard] +\setupmakeup [FM] [ + width=125mm, + height=172.506mm, + location=middle, +] -\starttext -\setuppagenumbering[state=stop,location=] - -The - -Letterspace Module +\setupheadertexts [] [] [] [] +\setuppagenumbering [state=stop,location=] -for Context mkiv +\starttext -a Contribution to horizontal movement +\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 -© 2011-03-16 {\italic Philipp Gesang}, Heidelberg +\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]}] -\page[odd] -\setuppagenumbering[state=start,alternative=doublesided,location={right,header}] \title{Content} \placelist[chapter,section][criterium=all] \chapter{Commands} -\showsetup{setupletterspace} -\showsetup{defineletterspace} +\section{Default Letterspace Command} + \showsetup{letterspace} \showsetup{startletterspace} +\section{Defining and Customizing Letterspace Commands} + +\showsetup{setupletterspace} +\showsetup{defineletterspace} + \chapter{Applications} \section{Emphasis} @@ -167,4 +315,5 @@ a Contribution to horizontal movement \section{Capital Spacing} +\stopbodymatter \stoptext |