From 9c6a8a9737e6f5b09ca65ed82a186b58e731e350 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 5 Jun 2012 23:04:51 +0200 Subject: formatted manual --- .hgignore | 1 + README.rst | 4 +- mod/doc/context/third/rst/manual.tex | 88 ++++++++++++++++++++++------ mod/tex/context/third/rst/rst_context.lua | 4 +- mod/tex/context/third/rst/rst_directives.lua | 4 +- mod/tex/context/third/rst/rst_helpers.lua | 4 +- mod/tex/context/third/rst/rst_parser.lua | 7 ++- mod/tex/context/third/rst/rst_setups.lua | 4 +- 8 files changed, 85 insertions(+), 31 deletions(-) diff --git a/.hgignore b/.hgignore index e360e23..7874dae 100644 --- a/.hgignore +++ b/.hgignore @@ -38,6 +38,7 @@ syntax:glob *.bib ./testing/* ./tmp.tex +./doc/* *–rst_temporary* ./tmp/* ./test/* diff --git a/README.rst b/README.rst index 1b27f23..8c0e6fd 100644 --- a/README.rst +++ b/README.rst @@ -57,13 +57,13 @@ the maintainer_ (Contact_). Contact ======= -|rstcontext| was written by Philipp Gesang, ``megas.kapaneus`` at ``gmail`` dot +|rstcontext| was written by Philipp Gesang, ``phg42.2a`` at ``gmail`` dot ``com`` (find me on BitBucket_). .. |rstcontext| ctx:: {{\em rst}\kern.5pt\CONTEXT} .. |TeX| ctx:: {\TEX} .. |CONTEXT| ctx:: {\CONTEXT} -.. _Contact: megas.kapaneus@gmail.com +.. _Contact: phg42.2a@gmail.com .. _BitBucket: http://bitbucket.org/phg .. _maintainer: Contact_ diff --git a/mod/doc/context/third/rst/manual.tex b/mod/doc/context/third/rst/manual.tex index 460051b..cbb0382 100644 --- a/mod/doc/context/third/rst/manual.tex +++ b/mod/doc/context/third/rst/manual.tex @@ -1,8 +1,13 @@ -\usemodule[bib] - \setuppapersize[A5][A5] -\setupcombinedlist[content][interaction=all,focus=standard] +\setupcombinedlist[content][interaction=all,] + +\setupinteraction[ + state=start, + focus=standard, + color=darkcyan, + contrastcolor=\interactionparameter{color}, +] \setupindenting[yes,next,medium] % -> lead to the glue node error in mkiv @@ -13,7 +18,16 @@ \setupheads[indentnext=yes] \setupfloats[indentnext=yes] -\setupbodyfont[10pt] +\setupbodyfont[latin-modern,10pt] +\definefontfeature [textfigures] [onum=yes] +\definefontfeature [liningfigures] [onum=no] +\definefontfeature [texligatures] [tlig=yes] +\definefontfeature [notexligatures] [tlig=yes] +\addfs{textfigures,texligatures} + +\setuptyping[ + style={\addff{liningfigures,notexligatures}\ttx}, +] % title page \startbuffer[frontpage] @@ -38,10 +52,10 @@ \startstandardmakeup \vfill \framed [align=right,frame=off,topframe=on] {% -\tfxx\ss\setupinterlinespace[small] -Copyright 2010--2011 by Philipp Gesang, Dossenheim.\par -Mail any patches or suggestions to\par -\type{string.format("%s@%s.com", "megas.kapaneus", "gmail")}\par +\tfxx\ss\setupinterlinespace[small]\noindentation +Copyright 2010--2012 by Philipp Gesang, Heidelberg.\par +Mail any bug reports, patches or suggestions to\par +\type{string.format("%s@%s.com", "phg42.2a", "gmail")}\par or pay a visit to \goto{my BitBucket home}[url(http://bitbucket.org/phg/)].\par } \stopstandardmakeup @@ -49,17 +63,51 @@ or pay a visit to \goto{my BitBucket home}[url(http://bitbucket.org/phg/)].\par % table of contents -\startbuffer[toc] -\setuppagenumbering[state=start,alternative=doublesided,location=] -\setupheadertexts - [{\tfx\sc\getmarking[chapter]}] [{\tfx\bf \pagenumber}] - [{\tfx\bf \pagenumber}] [{\tfx{\em rst}{\kern.5pt\CONTEXT}}] -\completecontent +\startbuffer [toc] +\setuppagenumbering[ + state=start, + alternative=doublesided, + location=, +] +\setuplayout [grid=no] +\setuptolerance [verytolerant] +\setuptolerance [vertical,verytolerant] + +\newdimen \mypagenumdistance \mypagenumdistance .7em +\def\fillercmd{\nobreak\hskip\mypagenumdistance} + +\definelistplacement[my_list_placement][command]#1#2#3% + {#2\fillercmd#3\hskip1.5em} + +\setuplist [chapter] [alternative=a,style=\word\sc] +\setuplist [section] [alternative=my_list_placement,] + +\startsetups toc:subsection + \noindentation\placelist[subsection] +\stopsetups + +\startsetups toc:section + \blank + \setupnarrower [middle=9em,] + \startnarrower[middle]\tfx + \noindentation\placelist[section][after=\setups{toc:subsection}] + \stopnarrower + \blank +\stopsetups + +\title{Contents} + +\placelist [chapter] [criterium=text,after=\setups{toc:section}] + +% \setupheadertexts +% [{\tfx\sc\getmarking[chapter]}] [{\tfx\bf \pagenumber}] +% [{\tfx\bf \pagenumber}] [{\tfx{\em rst}{\kern.5pt\CONTEXT}}] +% \completecontent \stopbuffer % something radically changed in mkiv \startluacode -jobvariables = jobvariables or {} +jobvariables = job.variables or {} jobvariables.tobesaved = jobvariables.tobesaved or {} \stopluacode @@ -72,9 +120,13 @@ jobvariables.tobesaved = jobvariables.tobesaved or {} \completepublications \stopbuffer -\appendtoks \getbuffer[frontpage] \to \everystarttext -\appendtoks \getbuffer[author] \to \everystarttext -\appendtoks \getbuffer[toc] \to \everystarttext +\appendtoks + \startfrontmatter + \getbuffer[frontpage] + \getbuffer[author] + \getbuffer[toc] + \stopfrontmatter +\to \everystarttext %\prependtoks \getbuffer[pubs] \to \everystoptext diff --git a/mod/tex/context/third/rst/rst_context.lua b/mod/tex/context/third/rst/rst_context.lua index 3faa66a..e7637b3 100644 --- a/mod/tex/context/third/rst/rst_context.lua +++ b/mod/tex/context/third/rst/rst_context.lua @@ -3,8 +3,8 @@ -- FILE: rst_context.lua -- USAGE: called by rst_parser.lua -- DESCRIPTION: Complement to the reStructuredText parser --- AUTHOR: Philipp Gesang (Phg), --- CHANGED: 2011-08-28 13:46:46+0200 +-- AUTHOR: Philipp Gesang (Phg), +-- CHANGED: 2012-06-05 22:18:11+0200 -------------------------------------------------------------------------------- -- --- TODO diff --git a/mod/tex/context/third/rst/rst_directives.lua b/mod/tex/context/third/rst/rst_directives.lua index 4491ebb..78b184c 100644 --- a/mod/tex/context/third/rst/rst_directives.lua +++ b/mod/tex/context/third/rst/rst_directives.lua @@ -3,8 +3,8 @@ -- FILE: rst_directives.lua -- USAGE: called by rst_parser.lua -- DESCRIPTION: Complement to the reStructuredText parser --- AUTHOR: Philipp Gesang (Phg), --- CHANGED: 2012-06-05 21:18:54+0200 +-- AUTHOR: Philipp Gesang (Phg), +-- CHANGED: 2012-06-05 22:17:51+0200 -------------------------------------------------------------------------------- -- diff --git a/mod/tex/context/third/rst/rst_helpers.lua b/mod/tex/context/third/rst/rst_helpers.lua index d2d7221..e90a55a 100644 --- a/mod/tex/context/third/rst/rst_helpers.lua +++ b/mod/tex/context/third/rst/rst_helpers.lua @@ -3,8 +3,8 @@ -- FILE: rst_helpers.lua -- USAGE: called by rst_parser.lua -- DESCRIPTION: Complement to the reStructuredText parser --- AUTHOR: Philipp Gesang (Phg), --- CHANGED: 2011-08-28 13:47:07+0200 +-- AUTHOR: Philipp Gesang (Phg), +-- CHANGED: 2012-06-05 22:17:31+0200 -------------------------------------------------------------------------------- -- diff --git a/mod/tex/context/third/rst/rst_parser.lua b/mod/tex/context/third/rst/rst_parser.lua index 0a94f05..4e6db41 100644 --- a/mod/tex/context/third/rst/rst_parser.lua +++ b/mod/tex/context/third/rst/rst_parser.lua @@ -3,9 +3,9 @@ -- FILE: rst_parser.lua -- USAGE: refer to doc/documentation.rst -- DESCRIPTION: https://bitbucket.org/phg/context-rst/overview --- AUTHOR: Philipp Gesang (Phg), +-- AUTHOR: Philipp Gesang (Phg), -- VERSION: 0.5 --- CHANGED: 2011-08-28 22:29:33+0200 +-- CHANGED: 2012-06-05 22:17:18+0200 -------------------------------------------------------------------------------- -- @@ -1420,7 +1420,8 @@ local function get_setups (inline) setups = setups .. [[ \setupcolors[state=start] -\setupinteraction[state=start,focus=standard,color=darkgreen,contrastcolor=darkgreen] +%% Interaction is supposed to be handled manually. +%%\setupinteraction[state=start,focus=standard,color=darkgreen,contrastcolor=darkgreen] \setupbodyfontenvironment [default] [em=italic] \sethyphenatedurlnormal{:=?&} \sethyphenatedurlbefore{?&} diff --git a/mod/tex/context/third/rst/rst_setups.lua b/mod/tex/context/third/rst/rst_setups.lua index 08f21c5..ccf3967 100644 --- a/mod/tex/context/third/rst/rst_setups.lua +++ b/mod/tex/context/third/rst/rst_setups.lua @@ -3,8 +3,8 @@ -- FILE: rst_setups.lua -- USAGE: called by rst_parser.lua -- DESCRIPTION: Complement to the reStructuredText parser --- AUTHOR: Philipp Gesang (Phg), --- CHANGED: 2011-08-28 13:47:24+0200 +-- AUTHOR: Philipp Gesang (Phg), +-- CHANGED: 2012-06-05 22:17:10+0200 -------------------------------------------------------------------------------- -- -- cgit v1.2.3