summaryrefslogtreecommitdiff
path: root/tex/context/modules/common
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-01-12 17:15:07 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-01-12 17:15:07 +0100
commit8d8d528d2ad52599f11250cfc567fea4f37f2a8b (patch)
tree94286bc131ef7d994f9432febaf03fe23d10eef8 /tex/context/modules/common
parentf5aed2e51223c36c84c5f25a6cad238b2af59087 (diff)
downloadcontext-8d8d528d2ad52599f11250cfc567fea4f37f2a8b.tar.gz
2016-01-12 16:26:00
Diffstat (limited to 'tex/context/modules/common')
-rw-r--r--tex/context/modules/common/s-abr-01.tex370
-rw-r--r--tex/context/modules/common/s-abr-02.tex22
-rw-r--r--tex/context/modules/common/s-abr-03.tex22
-rw-r--r--tex/context/modules/common/s-abr-04.tex24
-rw-r--r--tex/context/modules/common/s-cdr-01.tex145
-rw-r--r--tex/context/modules/common/s-faq-00.tex93
-rw-r--r--tex/context/modules/common/s-faq-01.tex215
-rw-r--r--tex/context/modules/common/s-faq-02.tex63
-rw-r--r--tex/context/modules/common/s-faq-03.tex70
-rw-r--r--tex/context/modules/common/s-mag-01.tex438
-rw-r--r--tex/context/modules/common/s-mod.ctx24
-rw-r--r--tex/context/modules/common/s-pre-00.tex202
-rw-r--r--tex/context/modules/common/s-pre-01.tex404
-rw-r--r--tex/context/modules/common/s-pre-02.tex381
-rw-r--r--tex/context/modules/common/s-pre-03.tex257
-rw-r--r--tex/context/modules/common/s-pre-04.tex377
-rw-r--r--tex/context/modules/common/s-pre-05.tex240
-rw-r--r--tex/context/modules/common/s-pre-06.tex324
-rw-r--r--tex/context/modules/common/s-pre-07.tex212
-rw-r--r--tex/context/modules/common/s-pre-08.tex271
-rw-r--r--tex/context/modules/common/s-pre-09.tex380
-rw-r--r--tex/context/modules/common/s-pre-10.tex308
-rw-r--r--tex/context/modules/common/s-pre-11.tex220
-rw-r--r--tex/context/modules/common/s-pre-12.tex226
-rw-r--r--tex/context/modules/common/s-pre-13.tex302
-rw-r--r--tex/context/modules/common/s-pre-14.tex263
-rw-r--r--tex/context/modules/common/s-pre-15.tex186
-rw-r--r--tex/context/modules/common/s-pre-16.tex203
-rw-r--r--tex/context/modules/common/s-pre-18.tex173
-rw-r--r--tex/context/modules/common/s-pre-19.tex347
-rw-r--r--tex/context/modules/common/s-pre-22.tex319
-rw-r--r--tex/context/modules/common/s-pre-23.tex109
-rw-r--r--tex/context/modules/common/s-pre-26.tex255
-rw-r--r--tex/context/modules/common/s-pre-27.tex181
-rw-r--r--tex/context/modules/common/s-pre-50.tex101
-rw-r--r--tex/context/modules/common/s-pre-61.tex275
-rw-r--r--tex/context/modules/common/s-pre-62.tex224
-rw-r--r--tex/context/modules/common/s-pre-63.tex77
-rw-r--r--tex/context/modules/common/s-pre-64.tex208
-rw-r--r--tex/context/modules/common/s-pre-66.tex161
-rw-r--r--tex/context/modules/common/s-pre-67.tex155
-rw-r--r--tex/context/modules/common/s-pre-68.tex150
-rw-r--r--tex/context/modules/common/s-pre-93.tex208
-rw-r--r--tex/context/modules/common/s-pre-96.tex188
44 files changed, 9373 insertions, 0 deletions
diff --git a/tex/context/modules/common/s-abr-01.tex b/tex/context/modules/common/s-abr-01.tex
new file mode 100644
index 000000000..00a1a5c1e
--- /dev/null
+++ b/tex/context/modules/common/s-abr-01.tex
@@ -0,0 +1,370 @@
+%D \module
+%D [ file=s-abr-01,
+%D version=1996.01.01,
+%D title=\CONTEXT\ Style File,
+%D subtitle=General Abbreviations 1,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+\setupsorting[logo][\c!style=\v!capital]
+
+\setupcapitals[\c!title=\v!no]
+
+\protect
+
+\logo [MKI] {MkI} % joke
+\logo [MKII] {MkII}
+\logo [MKIII] {MkIII} % joke
+\logo [MKIV] {MkIV}
+\logo [MKVI] {MkVI}
+\logo [MKIX] {MkIX}
+\logo [MKXI] {MkXI}
+\logo [MKIC] {MkIC}
+\logo [MKCI] {MkCI}
+\logo [MPII] {MpII}
+\logo [MPIV] {MpIV}
+
+%logo [FGA] {fga}
+%logo [FGBBS] {fgbbs}
+\logo [ACROBAT] {Acro\-bat}
+\logo [APA] {apa}
+\logo [AFM] {afm}
+\logo [API] {api}
+\logo [ALEPH] {Aleph} % {\mathematics{\aleph}}
+\logo [ALGOL] {ALGOL}
+\logo [AMS] {ams}
+\logo [AMSLATEX] {\AmSLaTeX}
+\logo [AMSTEX] {\AmSTeX}
+\logo [ANSI] {ansi}
+\logo [ARABTEX] {Arab\TeX}
+\logo [ASCII] {ascii}
+\logo [ASCIITEX] {ascii\TeX}
+\logo [ASCIIMATH] {AsciiMath}
+\logo [BACHOTEX] {Bacho\TeX}
+\logo [BIBTEX] {bib\TeX}
+\logo [MLBIBTEX] {MLbib\TeX}
+\logo [BLUESKY] {BlueSky}
+\logo [BMP] {bmp}
+\logo [BSD] {bsd}
+\logo [CCODE] {C}
+\logo [CPLUSPLUS] {C\high{++}}
+\logo [CALCMATH] {CalcMath}
+\logo [CLD] {cld}
+\logo [CD] {cd}
+\logo [CPU] {cpu}
+\logo [CDROM] {cdrom}
+\logo [CID] {cid}
+\logo [CJK] {cjk}
+\logo [CMR] {cmr}
+\logo [CLD] {cld}
+\logo [CMYK] {cmyk}
+\logo [CODHOST] {CodHost}
+\logo [CONTEXT] {\ConTeXt}
+\logo [CONTEXTWIKI] {\ConTeXt\ Wiki}
+\logo [CONTEXTGROUP] {\ConTeXt\ Group}
+\logo [CSS] {css}
+\logo [CTAN] {ctan}
+\logo [CTXTOOLS] {ctxtools}
+\logo [CWEB] {cweb}
+\logo [CSTUG] {cstug}
+\logo [DANTE] {Dante}
+\logo [DISTILLER] {distiller}
+\logo [DRATEX] {Dra\TeX}
+\logo [DSC] {dsc}
+\logo [DTD] {dtd}
+\logo [DTK] {dtk}
+\logo [DTP] {dtp}
+\logo [DVD] {dvd}
+\logo [DVI] {dvi}
+\logo [DVIPDFM] {dvipdfm}
+\logo [DVIPDFMX] {dvipdfmx}
+\logo [DVIPOS] {dvipos}
+\logo [DVIPS] {dvips}
+\logo [DVIPSONE] {dvipsone}
+\logo [DVISCR] {dviscr}
+\logo [DVIWINDO] {dviwindo}
+\logo [EBCDIC] {ebcdic}
+\logo [EC] {ec}
+\logo [EIFFEL] {Eiffel}
+\logo [EMACS] {emacs}
+\logo [EMTEX] {em\TeX}
+\logo [ENCODING] {enc}
+\logo [ENCTEX] {enc\TeX}
+\logo [EPUB] {ePub}
+\logo [EPS] {eps}
+\logo [ETEX] {\eTeX}
+\logo [EUROBACHOTEX] {EuroBacho\TeX}
+\logo [EUROMATH] {EuroMath}
+\logo [EUROTEX] {Euro\TeX}
+\logo [EXAMPLE] {eXaMpLe}
+\logo [EXAMPLED] {exampled}
+\logo [EXAMPLEQ] {exampleq}
+\logo [EXAMPLER] {exampler}
+\logo [EXAMPLET] {examplet}
+\logo [EXAMPLEX] {examplex}
+\logo [EXIMPLE] {eXiMpLe}
+\logo [FLAC] {flac}
+\logo [FAQ] {faq}
+\logo [FDF] {fdf}
+\logo [FONTFORGE] {FontForge}
+\logo [FOXET] {foXet}
+\logo [FPTEX] {fp\TeX}
+\logo [FREEBSD] {FreeBSD}
+\logo [FTP] {ftp}
+\logo [GHOSTSCRIPT] {Ghost\-script}
+\logo [GHOSTVIEW] {Ghost\-view}
+\logo [GIF] {gif}
+\logo [GNU] {gnu}
+\logo [GNUPLOT] {gnuplot}
+\logo [GS] {Ghost\-Script}
+\logo [GUST] {Gust}
+\logo [GCC] {gcc}
+\logo [GWTEX] {gw\TeX}
+\logo [HSB] {hsb}
+\logo [HTML] {html}
+\logo [HTTP] {http}
+\logo [HZ] {hz}
+\logo [IBM] {ibm}
+\logo [IMAGEMAGICK] {ImageMagick}
+\logo [INITEX] {ini\TeX}
+\logo [INRSTEX] {inrs\TeX}
+\logo [IO] {io}
+\logo [IRCNET] {IRCnet}
+\logo [ISO] {iso}
+\logo [JAVA] {Java}
+\logo [JAVASCRIPT] {Java\-Script}
+\logo [JPEG] {jpeg}
+\logo [JPG] {jpg}
+\logo [JBIG] {jbig}
+\logo [KPATHSEA] {kpathsea}
+\logo [KPSE] {kpse}
+\logo [KVM] {kvm}
+\logo [KPSEWHICH] {kpsewhich}
+\logo [MKTEXLSR] {mktexlsr}
+\logo [MYSQL] {MySQL}
+\logo [LAMSTEX] {\LamSTeX}
+\logo [LATEX] {\LaTeX}
+\logo [LATEXTE] {\LaTeX2e}
+\logo [LATEXTN] {\LaTeX2.09}
+\logo [LCD] {lcd}
+\logo [LINUX] {linux}
+\logo [LISP] {Lisp}
+\logo [LPEG] {lpeg}
+\logo [LUA] {Lua}
+\logo [LUAJIT] {LuaJIT}
+\logo [LUAJITTEX] {Luajit\TeX}
+\logo [LUATEX] {Lua\TeX}
+\logo [LUATOOLS] {luatools}
+\logo [LMX] {lmx}
+\logo [MACOSX] {MacOSX}
+\logo [MACROTEX] {Macro\TeX}
+\logo [MAKEMPY] {MakeMPY}
+\logo [MAPPING] {map}
+\logo [MAPS] {Maps}
+\logo [MATHML] {MathML}
+\logo [METAFONT] {\MetaFont}
+\logo [METAPOST] {\MetaPost}
+\logo [METATEX] {Meta\TeX}
+\logo [MIKTEX] {Mik\TeX}
+\logo [MINGW] {MingW}
+\logo [MLTEX] {ml\TeX}
+\logo [METATYPE] {MetaType1}
+\logo [MODULA] {Modula}
+\logo [MOV] {mov}
+\logo [MPS] {mps}
+\logo [MPTOPDF] {mptopdf}
+\logo [MPLIB] {mplib}
+\logo [MSDOS] {msdos}
+\logo [MICROSOFT] {Microsoft}
+\logo [MSWINDOWS] {MS~Windows}
+\logo [MSWORD] {MS~Word}
+\logo [MTXRUN] {mtxrun}
+\logo [MTXTOOLS] {mtxtools}
+\logo [NETPBM] {NetPBM}
+\logo [NTG] {ntg}
+\logo [NTS] {nts}
+\logo [OFM] {ofm}
+\logo [OMEGA] {Omega}
+\logo [OPENMATH] {OpenMath}
+\logo [OPENTYPE] {OpenType}
+\logo [OPI] {opi}
+\logo [OTEX] {Oriental \TeX}
+\logo [OTF] {otf}
+\logo [OTP] {otp}
+\logo [OVF] {ovf}
+\logo [PASCAL] {Pascal}
+\logo [PCTEX] {pc\TeX}
+\logo [PFA] {pfa}
+\logo [PFB] {pfb}
+\logo [PDF] {pdf}
+\logo [PDFETEX] {pdfe\TeX}
+\logo [PDFTEX] {pdf\TeX}
+\logo [PDFTOOLS] {pdftools}
+\logo [PDFTOPS] {pdftops}
+\logo [PERL] {Perl}
+\logo [PERLTK] {Perl/Tk}
+\logo [PICTEX] {\PiCTeX}
+\logo [PK] {pk}
+\logo [PLAIN] {Plain}
+\logo [PNG] {png}
+\logo [POSIX] {posix}
+\logo [POSTSCRIPT] {Post\-Script}
+\logo [PPCHTEX] {\PPCHTeX}
+\logo [PRAGMA] {Pragma ADE}
+\logo [PRESS] {press}
+\logo [PRIFIL] {prifil}
+\logo [PS] {Post\-Script}
+\logo [PSCHECK] {pscheck}
+\logo [PSTOEDIT] {pstoedit}
+\logo [PSTOPAGE] {pstopage}
+\logo [PSTOPDF] {pstopdf}
+\logo [PSTRICKS] {pstricks}
+\logo [RAM] {ram}
+\logo [READER] {Acro\-bat Reader}
+\logo [RELAXNG] {Relax\kern.125emNG}
+\logo [RGB] {rgb}
+\logo [RLXTOOLS] {rlxtools}
+\logo [RUBY] {Ruby}
+\logo [SCITE] {SciTE}
+\logo [SGML] {sgml}
+\logo [SI] {si}
+\logo [SQL] {sql}
+\logo [SSD] {ssd}
+\logo [SVG] {svg}
+\logo [STIX] {Stix}
+\logo [SUMATRAPDF] {SumatraPDF}
+\logo [SWIG] {swig}
+\logo [SWIGLIB] {SwigLib}
+\logo [TABLE] {\TaBlE}
+\logo [TCPIP] {tcp/ip}
+\logo [TDS] {tds} % no sc te
+\logo [TEI] {tei} % no sc te
+\logo [TETEX] {te\TeX} % no sc te
+\logo [TEX] {\TeX}
+\logo [TEXADRES] {\TeX adress}
+\logo [TEXBASE] {\TeX base}
+\logo [TEXEDIT] {\TeX edit}
+\logo [TEXEXEC] {\TeX exec}
+\logo [TEXFONT] {\TeX font}
+\logo [TEXFORM] {\TeX form}
+\logo [TEXLIVE] {\TeX Live}
+\logo [TEXLUA] {\TeX Lua}
+\logo [TEXMF] {texmf}
+\logo [TEXMFSTART] {texmfstart}
+\logo [TEXNL] {tex-nl}
+\logo [TEXSHOW] {\TeX show}
+\logo [TEXSPELL] {\TeX spell}
+\logo [TEXGYRE] {\TeX\ Gyre}
+\logo [TEXSYNC] {texsync}
+\logo [TEXTMATE] {TextMate}
+\logo [TEXTOOLS] {\TeX tools}
+\logo [TEXUTIL] {\TeX util}
+\logo [TEXWORK] {\TeX work}
+\logo [TEXWORKS] {\TeX works}
+\logo [TEXXET] {\TeX\XeT} \def\XeT{XeT}
+\logo [TFM] {tfm}
+\logo [TIF] {tif}
+\logo [TIFF] {tiff}
+\logo [TIFFINFO] {tiffinfo}
+\logo [TIFFTAGS] {tifftags}
+\logo [TMFTOOLS] {tmftools}
+\logo [TPIC] {tpic}
+\logo [TPM] {tpm}
+\logo [TRUETYPE] {TrueType}
+\logo [TTC] {ttc}
+\logo [TTF] {ttf}
+\logo [TUG] {tug}
+\logo [TUGBOAT] {Tug\-Boat}
+\logo [TUGNEWS] {Tug\-News}
+\logo [TYPEONE] {Type1}
+\logo [UCS] {ucs}
+\logo [UNICODE] {Uni\-code}
+\logo [UNIX] {Unix}
+\logo [URI] {uri}
+\logo [URL] {url}
+\logo [USA] {usa}
+\logo [USENET] {usenet}
+\logo [UTF] {utf}
+\logo [USB] {usb}
+\logo [VF] {vf}
+\logo [WDT] {wdt}
+\logo [WEB] {web}
+\logo [WEBC] {web2c}
+\logo [WIKI] {Wiki}
+\logo [WINDOWS] {Windows}
+\logo [WINNT] {WinNT}
+\logo [WINNX] {Win9x}
+\logo [WWW] {www}
+\logo [WTHREEC] {W3C}
+\logo [WYSIWYG] {wysiwyg}
+\logo [XDVI] {Xdvi}
+\logo [XETEX] {\XeTeX}
+\logo [XFDF] {xfdf}
+\logo [XHTML] {xhtml}
+\logo [XINDY] {Xindy}
+\logo [XITS] {Xits}
+\logo [XML] {xml}
+\logo [XPATH] {xpath}
+\logo [XMLTOOLS] {xmltools}
+\logo [XPDFETEX] {xpdfe\TeX}
+\logo [XSL] {xsl}
+\logo [XSLFO] {xsl-fo}
+\logo [XSLT] {xslt}
+\logo [XSLTPROC] {xsltproc}
+\logo [XYPIC] {XYPIC} % wrong logo
+\logo [VMWARE] {VMWare}
+\logo [YandY] {y\&y}
+\logo [ZIP] {zip}
+
+\def\METAFUN {\MetaFun}
+
+\logo [METAFUN] {\MetaFun}
+
+\def\SystemSpecialA#1{$\langle\it#1\rangle$}
+\def\SystemSpecialB#1{{\tttf<#1>}}
+
+\unexpanded\def\CATCODE {\SystemSpecialA{catcode}}
+\unexpanded\def\CATCODES {\SystemSpecialA{catcodes}}
+\unexpanded\def\DIMENSION {\SystemSpecialA{dimension}}
+\unexpanded\def\DIMENSIONS {\SystemSpecialA{dimensions}}
+\unexpanded\def\COUNTER {\SystemSpecialA{counter}}
+\unexpanded\def\COUNTERS {\SystemSpecialA{counters}}
+\unexpanded\def\HBOX {\SystemSpecialA{hbox}}
+\unexpanded\def\HBOXES {\SystemSpecialA{hboxes}}
+\unexpanded\def\VBOX {\SystemSpecialA{vbox}}
+\unexpanded\def\VBOXES {\SystemSpecialA{vboxes}}
+\unexpanded\def\BOX {\SystemSpecialA{box}}
+\unexpanded\def\BOXES {\SystemSpecialA{boxes}}
+\unexpanded\def\TOKENLIST {\SystemSpecialA{token list}}
+\unexpanded\def\TOKENLISTS {\SystemSpecialA{token lists}}
+\unexpanded\def\NEWLINE {\SystemSpecialA{newline}}
+\unexpanded\def\SKIP {\SystemSpecialA{skip}}
+\unexpanded\def\SKIPS {\SystemSpecialA{skips}}
+\unexpanded\def\MUSKIP {\SystemSpecialA{muskip}}
+\unexpanded\def\MUSKIPS {\SystemSpecialA{muskips}}
+\unexpanded\def\MARK {\SystemSpecialA{mark}}
+\unexpanded\def\MARKS {\SystemSpecialA{marks}}
+
+\unexpanded\def\SPACE {\SystemSpecialB{space}}
+\unexpanded\def\EOF {\SystemSpecialB{eof}}
+\unexpanded\def\TAB {\SystemSpecialB{tab}}
+\unexpanded\def\NEWPAGE {\SystemSpecialB{newpage}}
+\unexpanded\def\NEWLINE {\SystemSpecialB{newline}}
+
+\unexpanded\def\LUWATEEKH {لُواتيخ} % kh ī t ā w [u] l
+\unexpanded\def\luwateekh {luwātīkh}
+
+\doifmodeelse {mkiv} {
+ \unexpanded\def\THANH{H\agrave n Th\ecircumflexacute\ Th\agrave nh}
+} {
+ \unexpanded\def\THANH{H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh}
+}
+
+\endinput
diff --git a/tex/context/modules/common/s-abr-02.tex b/tex/context/modules/common/s-abr-02.tex
new file mode 100644
index 000000000..8bb6a2898
--- /dev/null
+++ b/tex/context/modules/common/s-abr-02.tex
@@ -0,0 +1,22 @@
+%D \module
+%D [ file=s-abr-02,
+%D version=1996.01.01,
+%D title=\CONTEXT\ Style File,
+%D subtitle=General Abbreviations 2,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\usemodule[abr-01]
+
+\unprotect
+
+\setupsorting[logo][\c!style=\v!smallcaps]
+
+\setupcapitals[\c!title=\v!no]
+
+\protect \endinput
diff --git a/tex/context/modules/common/s-abr-03.tex b/tex/context/modules/common/s-abr-03.tex
new file mode 100644
index 000000000..8247b68a9
--- /dev/null
+++ b/tex/context/modules/common/s-abr-03.tex
@@ -0,0 +1,22 @@
+%D \module
+%D [ file=s-abr-03,
+%D version=1998.08.10,
+%D title=\CONTEXT\ Style File,
+%D subtitle=General Abbreviations 3,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\usemodule[abr-01]
+
+\unprotect
+
+\setupsorting[logo][\c!style=\v!WORD]
+
+\protect
+
+\endinput
diff --git a/tex/context/modules/common/s-abr-04.tex b/tex/context/modules/common/s-abr-04.tex
new file mode 100644
index 000000000..23940b526
--- /dev/null
+++ b/tex/context/modules/common/s-abr-04.tex
@@ -0,0 +1,24 @@
+%D \module
+%D [ file=s-abr-04,
+%D version=1996.01.01,
+%D title=\CONTEXT\ Style File,
+%D subtitle=General Abbreviations 2,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\usemodule[abr-01]
+
+\unprotect
+
+% \definealternativestyle [\v!mixed] [\font_style_pseudoMixedCapped] [\font_style_pseudoMixedCapped]
+
+\setupsorting[logo][\c!style=\font_style_pseudoMixedCapped]
+
+% \setupcapitals[\c!title=\v!no]
+
+\protect \endinput
diff --git a/tex/context/modules/common/s-cdr-01.tex b/tex/context/modules/common/s-cdr-01.tex
new file mode 100644
index 000000000..b0bced9da
--- /dev/null
+++ b/tex/context/modules/common/s-cdr-01.tex
@@ -0,0 +1,145 @@
+%D \module
+%D [ file=s-cdr-01,
+%D version=2001.2.07, % maybe earlier
+%D title=\CONTEXT\ Style File,
+%D subtitle=CDROM Cover,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\startmodule[cdr-01]
+
+\setupmodule[cdr-01][option=]
+
+\def\PDFMPformoffset{20cm}
+
+\definepapersize
+ [CDcover]
+ [width=12.5cm,
+ height=12.4cm]
+
+\definelayout
+ [CDcover]
+ [topspace=5mm,
+ backspace=5mm,
+ header=0pt,
+ footer=0pt,
+ width=middle,
+ height=middle]
+
+\setuparranging
+ [2SIDE]
+
+\setuppapersize
+ [CDcover]
+ [A4,landscape]
+
+\setuplayout
+ [CDcover]
+
+\setuplayout
+ [location=middle]
+
+\setupcolors
+ [state=start]
+
+\setupbackgrounds
+ [leftpage]
+ [background=leftcover]
+
+\setupbackgrounds
+ [rightpage]
+ [background=rightcover]
+
+\setuppagenumbering
+ [alternative=doublesided]
+
+\defineoverlay[leftcover] [\useMPgraphic{leftcover}]
+\defineoverlay[rightcover][\useMPgraphic{rightcover}]
+
+\definecolor [cd-color] [s=0]
+\definemeasure[cd-linewidth][.4pt]
+
+\doif {\moduleparameter{cdr-01}{option}} {light} {
+ \definecolor [cd-color] [s=.85]
+ \definemeasure[cd-linewidth][.2pt]
+}
+
+\startuseMPgraphic{leftcover}
+ StartPage ;
+ pickup pencircle scaled \measure{cd-linewidth} ;
+ draw
+ bottomboundary Page &
+ rightboundary Page &
+ topboundary Page withcolor \MPcolor{cd-color} ;
+ draw
+ bottomboundary (Page enlarged 3mm) &
+ rightboundary (Page enlarged 3mm) &
+ topboundary (Page enlarged 3mm) dashed evenly withcolor \MPcolor{cd-color} ;
+ StopPage ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{rightcover}
+ StartPage ;
+ pickup pencircle scaled \measure{cd-linewidth} ;
+ draw
+ topboundary Page &
+ leftboundary Page &
+ bottomboundary Page withcolor \MPcolor{cd-color} ;
+ draw
+ topboundary (Page enlarged 3mm) &
+ leftboundary (Page enlarged 3mm) &
+ bottomboundary (Page enlarged 3mm) dashed evenly withcolor \MPcolor{cd-color} ;
+ draw
+ bottomboundary Page --
+ lrcorner Page shifted (-5mm,-1cm) --
+ llcorner Page shifted ( 5mm,-1cm) -- cycle withcolor \MPcolor{cd-color} ;
+ draw
+ topboundary Page --
+ ulcorner Page shifted ( 5mm, 1cm) --
+ urcorner Page shifted (-5mm, 1cm) -- cycle withcolor \MPcolor{cd-color} ;
+ StopPage ;
+ setbounds currentpicture to Page ;
+\stopuseMPgraphic
+
+\setupmakeup
+ [standard]
+ [doublesided=no,page=]
+
+\setuplayout
+ [topspace=5mm,
+ backspace=5mm,
+ header=0pt,
+ footer=0pt,
+ width=middle,
+ height=middle]
+
+\defineframedtext
+ [maintext]
+ [background={foreground,color},
+ backgroundcolor=a-bit-white,
+ frame=off,
+ before=,
+ after=,
+ align=right,
+ strut=no,
+ height=fit,
+ width=\textheight]
+
+\stopmodule
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+ \startstandardmakeup
+ page 1
+ \stopstandardmakeup
+
+ \startstandardmakeup
+ page 2
+ \stopstandardmakeup
+\stoptext
diff --git a/tex/context/modules/common/s-faq-00.tex b/tex/context/modules/common/s-faq-00.tex
new file mode 100644
index 000000000..84055491f
--- /dev/null
+++ b/tex/context/modules/common/s-faq-00.tex
@@ -0,0 +1,93 @@
+%D \module
+%D [ file=s-faq-00,
+%D version=1997.21.08,
+%D title=\CONTEXT\ Style File,
+%D subtitle=FAQ Common Macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\usemodule[abr-01]
+
+\defineblock[question]
+\defineblock[answer]
+
+\def\ScreenFAQ {fs-\TagOfFAQ-\LanguageOfFAQ}
+\def\PaperFAQ {fp-\TagOfFAQ-\LanguageOfFAQ}
+\def\FileNameOfFAQ {fa-\TagOfFAQ-\LanguageOfFAQ}
+
+\language
+ [\HyphenationOfFAQ]
+
+\setupwhitespace
+ [big]
+
+\setupbodyfont
+ [ams]
+
+\setuptolerance
+ [tolerant]
+
+\setupregister
+ [index]
+ [indicator=no]
+
+\setupframedtexts
+ [width=\hsize]
+
+\setupblock
+ [question]
+ [before=\startframedtext,
+ after=\stopframedtext]
+
+\setupblock
+ [answer]
+ [after=\EndAnswer]
+
+\def\EndAnswer {}
+
+\def\AuthorOfFAQ {}
+\def\IndexOfFAQ {}
+
+\def\FrequentlyAskedQuestion#1#2%
+ {\page
+ \doglobal\increment\CurrentNOfFAQ
+ \pagereference[faq:\CurrentNOfFAQ]
+ \gdef\IndexOfFAQ{#1}
+ \gdef\AuthorOfFAQ{#2}}
+
+\newcounter\CurrentNOfFAQ
+
+\setuplabeltext [nl] [FAQ=Vaak gestelde vragen]
+\setuplabeltext [du] [FAQ=Oft gestellte Fragen]
+\setuplabeltext [en] [FAQ=Frequently Asked Questions]
+
+\setuplabeltext [nl] [about=over]
+\setuplabeltext [du] [about=zu]
+\setuplabeltext [en] [about=about]
+
+\setuplabeltext [nl] [version=Versie]
+\setuplabeltext [du] [version=Version]
+\setuplabeltext [en] [version=Version]
+
+\setuplabeltext [nl] [goback=terug]
+\setuplabeltext [du] [goback=zur\"uck]
+\setuplabeltext [en] [goback=go back]
+
+\setuplabeltext [nl] [paper=papier]
+\setuplabeltext [du] [paper=Papier]
+\setuplabeltext [en] [paper=paper]
+
+\setuplabeltext [nl] [faqs=FAQ's]
+\setuplabeltext [du] [faqs=FAQs]
+\setuplabeltext [en] [faqs=FAQ's]
+
+\setuplabeltext [nl] [index=index]
+\setuplabeltext [du] [index=Index]
+\setuplabeltext [en] [index=index]
+
+\endinput
diff --git a/tex/context/modules/common/s-faq-01.tex b/tex/context/modules/common/s-faq-01.tex
new file mode 100644
index 000000000..f6ee3ce06
--- /dev/null
+++ b/tex/context/modules/common/s-faq-01.tex
@@ -0,0 +1,215 @@
+%D \module
+%D [ file=s-faq-01,
+%D version=1997.21.08,
+%D title=\CONTEXT\ Style File,
+%D subtitle=FAQ Interactive Version,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\usemodule[faq-00]
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [topspace=.5cm,
+ backspace=.5cm,
+ margin=0pt,
+ height=fit,
+ header=0pt,
+ width=fit,
+ footer=0pt,
+ bottomdistance=12pt,
+ bottom=18pt]
+
+\setupinteractionscreen
+ [width=fit,
+ height=fit,
+ option=max]
+
+\setupinteraction
+ [state=start,
+ page=yes,
+ color=darkred,
+ contrastcolor=black,
+ menu=on]
+
+\setupcolors
+ [state=start]
+
+\setupbackgrounds
+ [state=repeat]
+
+\setupbackgrounds
+ [page]
+ [offset=3pt]
+
+\setupbackgrounds
+ [text]
+ [text]
+ [background={screen,go-on}]
+
+\setupbackgrounds
+ [bottom]
+ [text]
+ [background=screen]
+
+\setupframedtexts
+ [background=MyFrame,
+ backgroundcolor=white,
+ framecolor=darkred,
+ frame=overlay]
+
+\defineoverlay[go-on][\overlaybutton{forward}]
+
+\useexternaldocument
+ [paperfaq]
+ [\PaperFAQ]
+ []
+
+\setupregister
+ [index]
+ [coupling=yes,
+ unknownreference=none,
+ interaction=text]
+
+\coupleregister
+ [index]
+
+\defineinteractionmenu [bottom 1] [bottom] [state=stop]
+\defineinteractionmenu [bottom 2] [bottom] [state=stop]
+
+\setupinteractionmenu
+ [bottom, bottom 1, bottom 2]
+ [background=MyFrame,
+ backgroundcolor=white,
+ color=black,
+ contrastcolor=black,
+ frame=overlay,
+ framecolor=darkred,
+ dummy=yes,
+ middle=\hskip1em,
+ height=\bottomheight,
+ distance=overlay]
+
+\setupinteractionmenu
+ [bottom 1]
+ [{\hfill},
+ {\labeltext{paper}[paperfaq::]},
+ {\labeltext{goback}[PreviousJump]},
+ {\labeltext{faqs}[faqs]},
+ {\labeltext{index}[index]},
+ {\gobackwardcharacter[previouspage]},
+ {\goforwardcharacter[nextpage]}]
+
+\setupinteractionmenu
+ [bottom 2]
+ [{\CurrentIndexOfFAQ},
+ {\hfill},
+ {\labeltext{paper}[paperfaq::faq:\CurrentNOfFAQ]},
+ {\labeltext{goback}[PreviousJump]},
+ {\labeltext{faqs}[faqs]},
+ {\labeltext{index}[index]},
+ {\gobackwardcharacter[previouspage]},
+ {\goforwardcharacter[nextpage]}]
+
+\def\CurrentIndexOfFAQ%
+ {\bgroup
+ \setupinteraction[color=]%
+ \menubox[bottom]%
+ {\hskip-.5em\def\index{\hskip.5em\coupledindex}\IndexOfFAQ}%
+ \egroup}
+
+\setupinteractionmenu
+ [bottom 1]
+ [state=start]
+
+\def\EndAnswer
+ {\vfill
+ \bgroup
+ \tfx\setstrut
+ \framed
+ [frame=overlay,
+ framecolor=darkred,
+ background=MyFrame,
+ backgroundcolor=white]
+ {\AuthorOfFAQ}
+ \egroup}
+
+\def\TitlePage
+ {\startstandardmakeup
+ \blank[3*big]
+ \midaligned{\bfd \labeltext{FAQ}}
+ \blank[3*big]
+ \midaligned{\bfd \labeltext{about} \NameOfFAQ}
+ \blank[3*big]
+ \midaligned{\bfb \labeltext{version}: \currentdate}
+ \blank[3*big]
+ \midaligned{\tta \ListOfFAQ}
+ \vfill
+ \midaligned{\tta pragma@wxs.nl}
+ \blank[3*big]
+ \stopstandardmakeup}
+
+\def\StartReadingFAQ
+ {\setupinteractionmenu[bottom 1][state=stop]
+ \setupinteractionmenu[bottom 2][state=start]
+ \page}
+
+\def\StopReadingFAQ
+ {\page
+ \setupinteractionmenu[bottom 2][state=stop]
+ \setupinteractionmenu[bottom 1][state=start]}
+
+\def\FileWithFAQs
+ {\StartReadingFAQ
+ \input \FileNameOfFAQ \relax
+ \StopReadingFAQ}
+
+\def\IndexPage
+ {\page
+ \def\CurrentIndexOfFAQ{}
+ \def\NameOfFAQ{}
+ \pagereference[index]
+ \placeregister[index]
+ \page}
+
+\def\BeginFAQ
+ {\doglobal\increment\CurrentNOfFAQ
+ \setbox0=\vbox\bgroup
+ \setupframedtexts[before=,after=,linecorrection=off]
+ \startframedtext}
+
+\def\EndFAQ
+ {\stopframedtext
+ \egroup
+ \button
+ [color=,contrastcolor=,frame=overlay,offset=overlay]
+ {\copy0}
+ [faq:\CurrentNOfFAQ]
+ \vskip6pt}
+
+\def\AllFAQs
+ {\page
+ \def\CurrentIndexOfFAQ{}
+ \def\NameOfFAQ{}
+ \newcounter\CurrentNOfFAQ
+ \setupblock[question][before=\BeginFAQ,after=\EndFAQ]
+ \pagereference[faqs]
+ \useblocks[question]}
+
+\startuniqueMPgraphic{Frame}
+ path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
+ pickup pencircle scaled 2pt ;
+ fill p withcolor \MPcolor{\overlaycolor} ;
+ draw p withcolor \MPcolor{\overlaylinecolor} ;
+\stopuniqueMPgraphic
+
+\defineoverlay[MyFrame][\uniqueMPgraphic{Frame}]
+
+\endinput
diff --git a/tex/context/modules/common/s-faq-02.tex b/tex/context/modules/common/s-faq-02.tex
new file mode 100644
index 000000000..92aa1eca2
--- /dev/null
+++ b/tex/context/modules/common/s-faq-02.tex
@@ -0,0 +1,63 @@
+%D \module
+%D [ file=s-faq-02,
+%D version=1997.21.08,
+%D title=\CONTEXT\ Style File,
+%D subtitle=FAQ Paper Version,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\usemodule[faq-00]
+
+\setuplayout
+ [header=0pt]
+
+\setuppagenumbering
+ [location=]
+
+\setupfootertexts
+ [\labeltext{FAQ}: \NameOfFAQ\IndexOfFAQ][pagenumber]
+
+\def\EndAnswer%
+ {\blank[2*big]
+ \page[no]
+ (\AuthorOfFAQ)}
+
+\def\TitlePage%
+ {\startstandardmakeup
+ \midaligned{\bfd \labeltext{FAQ}}
+ \blank[3*big]
+ \midaligned{\bfd \labeltext{about} \NameOfFAQ}
+ \blank[3*big]
+ \midaligned{\bfb \labeltext{version}: \currentdate}
+ \blank[3*big]
+ \midaligned{\tta \ListOfFAQ}
+ \vfill
+ \midaligned{\tta pragma@wxs.nl}
+ \blank[3*big]
+ \stopstandardmakeup}
+
+\def\StartReadingFAQ
+ {\page}
+
+\def\StopReadingFAQ
+ {\page}
+
+\def\FileWithFAQs
+ {\StartReadingFAQ
+ \input \FileNameOfFAQ \relax
+ \StopReadingFAQ}
+
+\def\IndexPage
+ {\page
+ \setupfootertexts[\labeltext{index}][]
+ \placeregister[index]}
+
+\def\AllFAQs
+ {}
+
+\endinput
diff --git a/tex/context/modules/common/s-faq-03.tex b/tex/context/modules/common/s-faq-03.tex
new file mode 100644
index 000000000..b1e1ef2c2
--- /dev/null
+++ b/tex/context/modules/common/s-faq-03.tex
@@ -0,0 +1,70 @@
+%D \module
+%D [ file=s-faq-03,
+%D version=1997.21.08,
+%D title=\CONTEXT\ Style File,
+%D subtitle=FAQ General Framework,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\def\StartFAQ[#1]%
+ {\getrawparameters[FAQ][name=,label=,language=,hyphenation=,url=,#1]
+ \let\NameOfFAQ \FAQname
+ \let\TagOfFAQ \FAQlabel
+ \let\LanguageOfFAQ \FAQlanguage
+ \let\HyphenationOfFAQ \FAQhyphenation
+ \let\ListOfFAQ \FAQurl
+ \doifmodeelse{screen}
+ {\usemodule[faq-01]}
+ {\usemodule[faq-02]}
+ \starttext
+ \TitlePage
+ \StartReadingFAQ}
+
+\def\StopFAQ
+ {\StopReadingFAQ
+ \IndexPage
+ \AllFAQs
+ \stoptext}
+
+\def\ProcessFAQ[#1]%
+ {\StartFAQ[#1]
+ \input \FileNameOfFAQ \relax
+ \StopFAQ}
+
+% for old times sake:
+
+\def\PDFscreenFAQ \name #1 \tag #2 \language #3 \hyphenation #4 \list #5
+ {\def\NameOfFAQ {#1}
+ \def\TagOfFAQ {#2}
+ \def\LanguageOfFAQ {#3}
+ \def\HyphenationOfFAQ {#4}
+ \def\ListOfFAQ {#5}
+ \usemodule[faq-01]
+ \starttext
+ \TitlePage
+ \FileWithFAQs
+ \IndexPage
+ \AllFAQs
+ \stoptext}
+
+\def\PDFpaperFAQ \name #1 \tag #2 \language #3 \hyphenation #4 \list #5
+ {\def\NameOfFAQ {#1}
+ \def\TagOfFAQ {#2}
+ \def\LanguageOfFAQ {#3}
+ \def\HyphenationOfFAQ {#4}
+ \def\ListOfFAQ {#5}
+ \usemodule[faq-02]
+ \starttext
+ \TitlePage
+ \FileWithFAQs
+ \IndexPage
+ \stoptext}
+
+\let\DVIpaperFAQ\PDFscreenFAQ
+
+\endinput
diff --git a/tex/context/modules/common/s-mag-01.tex b/tex/context/modules/common/s-mag-01.tex
new file mode 100644
index 000000000..e2d30f4e5
--- /dev/null
+++ b/tex/context/modules/common/s-mag-01.tex
@@ -0,0 +1,438 @@
+%D \module
+%D [ file=s-mag-01,
+%D version=2002.12.14,
+%D title=\CONTEXT\ Style File,
+%D subtitle=\CONTEXT\ Magazine Base Style,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% This style is used for producing explanationary documents.
+% Don't misuse it for other purposes, since it may confuse
+% users. Don't change the title either, since it provides a
+% way to categorize documents. Numbers are disabled in
+% instances produced outside PRAGMA ADE.
+%
+% The layout setup is such that one has several text areas
+% available: headers and footers, margins and edges as well
+% as the main text area. The surrounding (gray) makes the
+% main page stand out and is suitable for viewing in spread
+% mode.
+%
+% Since this style is under constant construction, messing
+% around with settings will produce unwanted side effects.
+% So, if some feature or settings is needed, let me know.
+
+% todo: mp frames
+
+\setvariables[magazine][number=0]
+\setvariables[magazine][author=]
+\setvariables[magazine][title={Zero Issue}]
+\setvariables[magazine][date=\currentdate]
+
+% These are reserved for PRAGMA-ADE, don't use them yourself!
+
+% \setvariables[magazine][main=Tricky]
+% \setvariables[magazine][main=Update]
+% \setvariables[magazine][main=HOWTO]
+
+% \setvariables[magazine][main=This Way] % preludes to a/the manual
+% \setvariables[magazine][main=A Better Way] % dirty versus clean
+% \setvariables[magazine][main=No Way] % how users should not do it
+% \setvariables[magazine][main=Your Way] % how users do it
+% \setvariables[magazine][main=My Way] % how users do it
+% \setvariables[magazine][main=Our Way] % how we do things at pragma
+% \setvariables[magazine][main=Their Way] % how to do latex things in context
+
+\setvariables[magazine][main=My Way]
+
+\startmode[atpragma]
+ \setvariables[magazine][main=This Way]
+\stopmode
+
+\definepapersize
+ [magazine]
+ [width=\dimexpr\paperwidth-.1\paperwidth\relax,
+ height=\dimexpr\paperheight-.1\paperheight\relax]
+
+\setuppapersize
+ [magazine]
+ [A4]
+
+\setupinteractionscreen
+ [option=doublesided]
+
+\definecolor[OuterColor][s=.3]
+\definecolor[InnerColor][s=.8]
+\definecolor[MainColor] [s=.2]
+\definecolor[TitleColor][s=.7]
+
+\definecolor[MyRed] [r=.6]
+\definecolor[MyGreen][g=.6]
+\definecolor[MyBlue] [b=.6]
+
+\startuseMPgraphic{paper}
+ sh := define_circular_shade(a,a,0,bbheight(OverlayBox),
+ \MPcolor{InnerColor},\MPcolor{OuterColor}) ;
+ fill OverlayBox withshade sh ;
+\stopuseMPgraphic
+
+\startreusableMPgraphic{middlepaper}
+ pair a ; a := center OverlayBox ;
+ \includeMPgraphic{paper}
+\stopreusableMPgraphic
+
+\startreusableMPgraphic{rightpaper}
+ pair a ; a := .5[urcorner OverlayBox,lrcorner OverlayBox] ;
+ \includeMPgraphic{paper}
+\stopreusableMPgraphic
+
+\startreusableMPgraphic{leftpaper}
+ pair a ; a := .5[ulcorner OverlayBox,llcorner OverlayBox] ;
+ \includeMPgraphic{paper}
+\stopreusableMPgraphic
+
+\startreusableMPgraphic{page}
+ fill OverlayBox withcolor white ;
+\stopreusableMPgraphic
+
+\startusableMPgraphic{text}
+ StartPage ;
+ for i = Header,Text,Footer :
+ for j = LeftEdge, LeftMargin, Text, RightMargin, RightEdge :
+ draw Field[i][j] withpen pencircle scaled .5pt ;
+ endfor ;
+ endfor ;
+ StopPage ;
+ setbounds currentpicture to Field[Text][Text] ;
+\stopusableMPgraphic
+
+\startsetups[paper]
+
+ \doifmodeelse{*makeup}
+ {\reuseMPgraphic{middlepaper}}
+ {\doifoddpageelse
+ {\reuseMPgraphic{rightpaper}}
+ {\reuseMPgraphic{leftpaper}}}
+
+\stopsetups
+
+\defineoverlay[paper] [\setups{paper}]
+\defineoverlay[page] [\reuseMPgraphic{page}]
+\defineoverlay[text] [\doifmode{frame}{\useMPgraphic{text}}]
+
+\setupbackgrounds [paper] [background=paper]
+\setupbackgrounds [page] [background={page,title}]
+\setupbackgrounds [text] [background=text]
+
+\definelayer
+ [title]
+ [state=repeat,
+ hoffset=-1cm,
+ voffset=1cm,
+ width=\paperwidth,
+ height=\paperheight]
+
+\setupoutput
+ [pdftex]
+
+\setuplayout
+ [width=middle,
+ topspace=1.5cm,
+ height=middle,
+ header=1.5cm,
+ footer=1cm,
+ %grid=yes,
+ headerdistance=.25cm,
+ footerdistance=.5cm,
+ backspace=3cm,
+ margin=1.5cm,
+ margindistance=.25cm,
+ edge=.75cm,
+ edgedistance=.25cm,
+ bottomdistance=1.5cm,
+ bottom=.1\printpaperheight]
+
+\definelayout
+ [makeup]
+ [topspace=1cm,
+ backspace=1cm,
+ header=0pt,
+ footer=0pt,
+ bottom=0pt]
+
+\setuppagenumbering
+ [alternative=doublesided]
+
+\setupcolors
+ [state=start]
+
+\usetypescript
+ [palatino][\defaultencoding]
+
+\setupbodyfont
+ [palatino,10pt]
+
+\setuptolerance
+ [verytolerant,stretch]
+
+\appendtoks\setups[papershift]\to\beforeeverypage
+
+\startsetups[papershift]
+
+ \setuppapersize[top=\vskip.5cm,bottom=\vss]
+
+ \doifmodeelse{*makeup}
+ {\setuppapersize[left=\hfill,right=\hfill]}
+ {\doifoddpageelse
+ {\setuppapersize[right=\hfill]}
+ {\setuppapersize[left=\hfill]}}
+
+\stopsetups
+
+\setupbottomtexts
+ [\setups{rightbanner}] []
+ [] [\setups{leftbanner}]
+
+\startsetups [leftbanner]
+
+ \definedfont[Regular at \the\bottomheight]
+ \setbox\scratchbox\hbox{\TitleColor\getvariable{magazine}{main}}
+ \ht\scratchbox1ex
+ \dp\scratchbox\zeropoint
+ \MainColor
+ \definedfont[Regular sa 2]
+ \doifsomething{\getvariable{magazine}{number}}
+ {\doifnot{\getvariable{magazine}{number}}{0}
+ {\#\getvariable{magazine}{number}}}
+ \quad
+ \currentdate
+ \quad
+ \scale[height=.25\bottomheight]{\box\scratchbox}
+ \quad
+ \hbox to 1.5em{\hss\pagenumber\hss}
+ \quad
+ \hskip-\backspace
+
+\stopsetups
+
+\startsetups [rightbanner]
+
+ \definedfont[Regular at \the\bottomheight]
+ \setbox\scratchbox\hbox{\TitleColor\getvariable{magazine}{main}}
+ \ht\scratchbox1ex
+ \dp\scratchbox\zeropoint
+ \MainColor
+ \hskip-\backspace
+ \definedfont[Regular sa 2]
+ \quad
+ \hbox to 1.5em{\hss\pagenumber\hss}
+ \quad
+ \scale[height=.25\bottomheight]{\box\scratchbox}
+ \quad
+ \currentdate
+ \quad
+ \doifmode{atpragma}{\#\getvariable{magazine}{number}}
+
+\stopsetups
+
+\startsetups[titlepage]
+
+ \disablemode[frame]
+
+ \setuplayout[makeup]
+
+ \startstandardmakeup[doublesided=no]
+
+ \dontcomplain
+
+ \definelayer
+ [makeup]
+ [width=\textwidth,
+ height=\textheight]
+
+ \setlayerframed
+ [makeup]
+ [corner={left,top},location={right,bottom}]
+ [frame=off,
+ foregroundcolor=MainColor]
+ {\scale
+ [width=\makeupwidth]
+ {\definedfont[Regular sa 10]%
+ \getvariable{magazine}{main}}}
+
+ \setlayerframed
+ [makeup]
+ [corner={right,top},location={left},y=.4\textheight]
+ [frame=off,
+ foregroundcolor=MainColor,
+ width=\textwidth,
+ align=left]
+ {\definedfont[Regular sa 2.5]\setupinterlinespace
+ \startmode[atpragma]
+ \strut \ConTeXt\ magazine \#\getvariable{magazine}{number}\endgraf
+ \stopmode
+ \strut \getvariable{magazine}{date} \endgraf
+ \blank
+ \strut \getvariable{magazine}{title}\endgraf
+ \doifsomething{\getvariable{magazine}{author}}
+ {\strut \getvariable{magazine}{author}\endgraf}
+ \doifsomething{\getvariable{magazine}{affiliation}}
+ {\strut \getvariable{magazine}{affiliation}\endgraf}}
+
+ \setlayerframed
+ [makeup]
+ [corner={right,bottom},location={left,top}]
+ [frame=off,
+ align=normal,
+ width=.8\textwidth,
+ foregroundcolor=MainColor]
+ {\getbuffer[abstract]}
+
+ \flushlayer[makeup]
+
+ \stopstandardmakeup
+
+ \setuplayout[reset]
+
+\stopsetups
+
+\startsetups[listing]
+
+ \page \disablemode[frame]
+
+ \setuptexttexts [][] \setuptexttexts []
+ \setupheadertexts[][] \setupheadertexts[source code of this document]
+ \setupfootertexts[][] \setupfootertexts[]
+
+ \start \dontcomplain
+
+ \typefile[TEX]{\inputfilename}
+
+ \stop
+
+\stopsetups
+
+\startsetups[lastpage]
+
+ \page \disablemode[frame] \page[even]
+
+ \doifoddpageelse
+ {}
+ {\setuplayout[makeup]
+ \startstandardmakeup[doublesided=no,page=]
+ \stopstandardmakeup
+ \setuplayout[reset]}
+
+\stopsetups
+
+\startsetups[title]
+
+ \disablemode[frame]
+
+ \setlayerframed
+ [title]
+ [corner={left,top},location={left,bottom},
+ rotation=90]
+ [frame=off,
+ foregroundcolor=MainColor]
+ {\definedfont[RegularBold sa 2]\strut\getvariable{magazine}{title}}
+
+ \setlayerframed
+ [title]
+ [corner={right,top},
+ rotation=270]
+ [frame=off,
+ foregroundcolor=MainColor]
+ {\definedfont[RegularBold sa 2]\strut\getvariable{magazine}{title}}
+
+\stopsetups
+
+\startbuffer[abstract]
+ % no abstract
+\stopbuffer
+
+\setuphead
+ [chapter]
+ [page=yes,
+ after={\blank[2*big]},
+ color=MainColor,
+ style=\bfc]
+
+\setuphead
+ [section]
+ [before={\blank[2*big]},
+ after=\blank,
+ color=MainColor,
+ style=\bfb]
+
+\setuphead
+ [subsection]
+ [before=\blank,
+ after=,
+ color=MainColor,
+ style=\bf]
+
+\setupwhitespace
+ [big]
+
+\definetyping[xtyping] [style=\ttx]
+\definetyping[xxtyping][style=\ttxx]
+
+\definetypeface
+ [narrowtt] [tt]
+ [mono] [modern-cond] [default] [encoding=\defaultencoding]
+
+\definetyping[ntyping] \setuptyping[ntyping][style=\narrowtt]
+\definetype [ntype] \setuptype [ntype] [style=\narrowtt]
+
+\doifnotmode{demo}{\endinput}
+
+% \usemodule[mag-01]
+
+\setvariables
+ [magazine]
+ [title={Introduction},
+ author=Hans Hagen,
+ affiliation=PRAGMA ADE,
+ date=Januari 2003,
+ number=0]
+
+\startbuffer[abstract]
+ This is the zero issue of a semi periodical. The
+ associated style can be used by \CONTEXT\ users to
+ typeset and publish their own issues.
+\stopbuffer
+
+\starttext \setups [titlepage] \setups [title]
+
+\setupheadertexts[welcome]
+
+This is the zero issue of a range of \CONTEXT\ related
+publications, in most cases short introductions to new
+functionality. The style may be used by users for providing
+similar documents, but preferably not for other purposes,
+since it may confuse readers in their expectations.
+
+We've chosen a layout which is more functional than
+beautiful. This layout provides several text areas: headers
+and footers, margins and edges as well as a main text area.
+The surrounding (gray) makes the main page (which is
+slightly smaller than A4) stand out and is suitable for
+viewing in spread mode.
+
+The documents produced at \PRAGMA\ are called {\bf This
+Way}, user documents gets the title {\bf My Way}. The
+\PRAGMA\ issues are numbered. We strongly advise you not to
+use the \type {mag-} prefix for your issues, since this may
+lead to clashes with files distributed by \PRAGMA.
+
+\setups [listing]
+
+\setups [lastpage]
+
+\stoptext
diff --git a/tex/context/modules/common/s-mod.ctx b/tex/context/modules/common/s-mod.ctx
new file mode 100644
index 000000000..09ecf714c
--- /dev/null
+++ b/tex/context/modules/common/s-mod.ctx
@@ -0,0 +1,24 @@
+<?xml version='1.0' standalone='yes'?>
+
+<ctx:job>
+ <ctx:message>TeX Documentation Generator</ctx:message>
+ <ctx:preprocess>
+ <ctx:processors>
+ <ctx:processor name='ted'>mtxrun --script modules --convert --prep <ctx:value name='old'/></ctx:processor>
+ </ctx:processors>
+ <ctx:files>
+ <ctx:file processor='ted'><ctx:value name='old'/></ctx:file>
+ </ctx:files>
+ </ctx:preprocess>
+ <ctx:flags>
+ <ctx:flag>global</ctx:flag>
+ <ctx:flag>prep</ctx:flag>
+ <ctx:flag>purge</ctx:flag>
+ </ctx:flags>
+ <ctx:process>
+ <ctx:resources>
+ <ctx:module>mod-01</ctx:module>
+ </ctx:resources>
+ </ctx:process>
+</ctx:job>
+
diff --git a/tex/context/modules/common/s-pre-00.tex b/tex/context/modules/common/s-pre-00.tex
new file mode 100644
index 000000000..7f217d5bb
--- /dev/null
+++ b/tex/context/modules/common/s-pre-00.tex
@@ -0,0 +1,202 @@
+%D \module
+%D [ file=s-pre-00,
+%D version=1997.07.22,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 0,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module provides some non core functionality that can
+%D be used in the presentations styles. This module contains
+%D experimental macros.
+%D
+%D The presentation environments are independent of each other.
+%D Although they have much in common, and in many cases can be
+%D exchanged, the common components are not collected in this
+%D file. That way they can serve as examples of style
+%D definitions.
+
+\unprotect
+
+\newbox \presentationstack
+\newcounter \presentationcounter
+\newdimen \presentationheight
+
+\appendtoks\doglobal\newcounter\presentationcounter\to\everyshipout
+
+\defineframedtext
+ [presentationshield]
+
+\setupframedtexts
+ [presentationshield]
+ [\c!background=\v!color,
+ \c!backgroundcolor=StepColor,
+ \c!offset=\v!overlay,
+ \c!frame=\v!off]
+
+\definecolor[StepColor][white]
+
+\def\enablepresentationstep%
+ {\let\enablepresentationstep\relax
+ \useJSpreamblenow{presentation}%
+ \setuptexttexts
+ [\vbox to \textheight
+ {\dopresentationstep1\box\presentationstack\vfill}]}
+
+\def\presentationstep
+ {\dopresentationstep0}
+
+\def\dopresentationstep#1% not ok yet
+ {\global\setbox\presentationstack=\vbox
+ {\ifnum\presentationcounter=0
+ \global\presentationheight=\!!zeropoint
+ \fi
+ \ifcase#1\relax
+ \scratchdimen=\pagetotal
+ \else
+ \scratchdimen=\textheight
+ \fi
+ \advance\scratchdimen by -\presentationheight
+ \edef\presentationstepheight{\the\scratchdimen}
+ \global\presentationheight=\pagetotal
+ \forgetall
+ \offinterlineskip
+ \dontcomplain
+ \box\presentationstack
+ \doglobal\increment\presentationcounter
+ \scratchcounter=\realpageno \multiply\scratchcounter by 100
+ \advance\scratchcounter by \presentationcounter
+ \edef\presentationtag{presentation:\the\scratchcounter}
+ \setupfield
+ [presentation]
+ [\c!width=\v!fit,\c!height=\v!fit,\c!offset=\v!overlay,
+ \c!strut=\v!no,\c!frame=\v!off,\c!option=\v!readonly]
+ \definesymbol
+ [\presentationtag]
+ [\presentationshade]
+ \def\presentationshade
+ {\presentationshield
+ [\c!width=\textwidth,\c!height=\presentationstepheight]{}}
+ \definefield[\presentationtag][check][presentation][\presentationtag,\v!none][\presentationtag]
+ \fitfield[\presentationtag]}}
+
+\startJSpreamble {presentation} used later
+ var presentation = new Array() ;
+ for (i=1;i<=\lastpage;i++)
+ { presentation[i] = 0 }
+ this.dirty = false ;
+ function NextPresentation (pagenumber)
+ { % ++presentation[pagenumber] ;
+ presentation[pagenumber] = presentation[pagenumber] + 1 ;
+ var dummy = 100*pagenumber + presentation[pagenumber] ;
+ var v = this.getField("presentation:"+dummy) ;
+ if (v)
+ { v.hidden = true }
+ % { v.display = display.hidden }
+ else
+ { ++pagenumber ;
+ if (pagenumber<=\lastpage)
+ { presentation[pagenumber] = presentation[pagenumber] + 1 ;
+ dummy = 100*(pagenumber) + presentation[pagenumber] ;
+ v = this.getField("presentation:"+dummy) ;
+ if (v) { v.hidden = true }
+ % if (v) { v.display = display.hidden }
+ ++this.pageNum } }
+ this.dirty = false }
+\stopJSpreamble
+
+\definereference[NextStep][JS(NextPresentation{\realfolio})]
+
+%D \macros
+%D {presentationstep}
+%D
+%D The macro \type {\presentationstep} provides a basic slide
+%D show functionality. It sort of records pieces of the page
+%D that will show up stepwise. It can be used like:
+%D
+%D \starttyping
+%D \startitemize
+%D \item eerste
+%D \item tweede
+%D \stopitemize
+%D
+%D \presentationstep
+%D
+%D \startformula
+%D ax^2+bx+c
+%D \stopformula
+%D
+%D \presentationstep
+%D \stoptyping
+%D
+%D When the document is opened, the two text fragments are
+%D covered by a shield. Each page has its own shield stack. The
+%D logical reference \type {NextStep} can be used to hide the
+%D shield.
+%D
+%D \starttyping
+%D \setupfootertexts[{\button{Show Up}[NextStep]}]
+%D \stoptyping
+%D
+%D In case of presentation style 2, you can say:
+%D
+%D \starttyping
+%D \definereference[Whatever][JS(NextPresentation{\realfolio})]
+%D \stoptyping
+%D
+%D Depending of the viewer, you need to reset the fields at
+%D startup:
+%D
+%D \starttyping
+%D \setupinteraction[openaction=ResetForm]
+%D \stoptyping
+%D
+%D Fixed spacing give you the best results:
+%D
+%D \starttyping
+%D \setupwhitespace[fixed]
+%D \setupblank[fixed]
+%D \stoptyping
+%D
+%D Sometimes you need to set the color of the background, as
+%D with style 2:
+%D
+%D \starttyping
+%D \definecolor[StepColor][Page]
+%D \stoptyping
+%D
+%D Special effects can be reached with:
+%D
+%D \starttyping
+%D \setupframedtexts
+%D [presentationshield]
+%D [background=color,backgroundcolor=red]
+%D \stoptyping
+%D
+%D There is also:
+%D
+%D \starttyping
+%D \autopresentationsteptrue
+%D \stoptyping
+%D
+%D One can enable this feature as \type {step} mode.
+
+\newif\ifautopresentationstep
+
+\appendtoks \ifautopresentationstep\presentationstep\fi \to \everypar
+
+\doifmode{step} {\enablepresentationstep}
+\doifmode{autostep}{\autopresentationsteptrue\enablepresentationstep}
+
+%D When in \type {comment} mode, embedded page comments are
+%D processed and put below the page. The default space of
+%D 5cm should be adequate but can of course be changed.
+
+\doifmode{comment}{\setuppagecomment[state=start,location=bottom]}
+
+\protect \endinput
diff --git a/tex/context/modules/common/s-pre-01.tex b/tex/context/modules/common/s-pre-01.tex
new file mode 100644
index 000000000..89c5642f9
--- /dev/null
+++ b/tex/context/modules/common/s-pre-01.tex
@@ -0,0 +1,404 @@
+%D \module
+%D [ file=s-pre-01,
+%D version=1997.07.22,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 1,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This environment can be used to typeset interactive
+%D presentations. This module was first used at the 1997 \TUG\
+%D meeting.
+
+\usemodule[pre-general]
+
+%D \macros
+%D {language}
+%D
+%D Because this module is defined in english, we default to the
+%D english hyphenation patterns and labels too.
+
+\language
+ [en]
+
+%D \macros
+%D {setupbodyfont,setuplayout}
+%D
+%D For screen reading, a Lucida Bright font looks nice. We use
+%D a 14.4 point bodyfont for the main text, but switch back to
+%D 12 points for ornaments.
+
+\startmode[asintended] \setupbodyfont[lbr] \stopmode
+
+\setupbodyfont[14.4pt]
+
+\setuplayout
+ [style=smallbodyfont]
+
+%D \macros
+%D {setupcolors,definecolor}
+%D
+%D Screen presentations without color just look dull, so we
+%D enable color support. We define ourselves a yellowish
+%D backgroundcolor and a not too dark blue interactioncolor.
+
+\setupcolors
+ [state=start]
+
+\definecolor [BackgroundColor] [r=1, g=1, b=.7]
+\definecolor [InteractionColor] [r=.1, g=.5, b=.8]
+\definecolor [ContrastColor] [r=.9, g=.5, b=.2]
+
+%D \macros
+%D {setuppapersize,setuplayout,setupinteractionscreen}
+%D
+%D
+%D We use a nice large screen, and dedicate the right edge and
+%D bottom part to navigational tools. We automatically set
+%D the width and height of the page and start up full screen.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [topspace=12pt,
+ header=0pt,
+ footer=0pt,
+ height=402pt, % 450 - 12 - 15 - 12 - 12 + 3
+ bottomdistance=15pt,
+ bottom=12pt,
+ backspace=12pt,
+ margin=0pt,
+ width=fit,
+ edgedistance=12pt,
+ rightedge=96pt]
+
+\setupinteractionscreen
+ [option=max]
+
+%D \macros
+%D {setupbackgrounds}
+%D
+%D We set the pagecolor to yellow except the part of the screen
+%D that is used to display the running text. By seting the
+%D offset to 3pt the text will not touch the yellow parts. We
+%D do not set the depth.
+
+\setupbackgrounds
+ [page]
+ [background=color,
+ backgroundcolor=BackgroundColor,
+ offset=3pt]
+
+\setupbackgrounds
+ [text][text]
+ [background=color,
+ backgroundcolor=white]
+
+%D I considered the next setup too, but finaly decided to
+%D comment it out.
+%D
+%D \starttyping
+%D \setupbackgrounds
+%D [bottom][text]
+%D [frame=on,
+%D framecolor=white]
+%D \stoptyping
+
+%D \macros
+%D {setupinteraction}
+%D
+%D We did not enable interactive text support yet, so let's do
+%D that now. We force page reference to circumvent problems
+%D with named destinations in buggy viewers.
+
+\setupinteraction
+ [page=yes,
+ color=InteractionColor,
+ contrastcolor=ContrastColor,
+ menu=on,
+ state=start]
+
+%D \macros
+%D {setupinteractionmenu,startinteractionmenu}
+%D
+%D At the bottom of the screen we show two navigational bars.
+%D At the left we show the subpage bar, at the right we use a
+%D non default backward|/|forward bar.
+
+\setupinteractionmenu
+ [bottom]
+ [leftoffset=-3pt,
+ rightoffset=-3pt]
+
+\startinteractionmenu[bottom]
+ \txt \InteractionBar \\
+ \txt \InteractionButtons \\
+\stopinteractionmenu
+
+%D \macros
+%D {interactionbar}
+%D
+%D The left bar gets a white border (on the yellow background).
+%D Because we don't want to typeset an empty frame when no
+%D subpage bar is shown, we check for the number of subpages.
+
+\def\InteractionBar%
+ {\ifnum\nofsubpages>1
+ \framed
+ [framecolor=white,rulethickness=1pt,
+ height=\bottomheight,strut=no]
+ {\interactionbar[alternative=f,width=.5\makeupwidth,height=1ex]}
+ \fi}
+
+%D \macros
+%D {setupinteractionbar, interactionbuttons}
+%D
+%D The right hand buttons enable us to jump backward and forward,
+%D as well as to the previous and next jump. We also enable to
+%D close the presentation.
+
+\setupinteractionbar
+ [framecolor=white,rulethickness=1pt,
+ height=\bottomheight,strut=no]
+
+\def\InteractionButtons%
+ {\interactionbuttons
+ [width=15em]
+ [PreviousJump,NextJump,
+ firstpage,
+ firstsubpage,previouspage,nextpage,lastsubpage,
+ lastpage,
+ CloseDocument]}
+
+%D \macros
+%D {StartTitlePage, TitlePage}
+%D
+%D The titlepage is rather simple and can be typeset in two
+%D ways:
+%D
+%D \starttyping
+%D \StartTitlePage
+%D text \\ text \\ text
+%D \StopTitlepage
+%D \stoptyping
+%D
+%D or more straightforward:
+%D
+%D \starttyping
+%D \TitlePage{text\\text\\text}
+%D \stoptyping
+%D
+%D The first alternative can be used for more complicated
+%D title pages.
+
+\def\StartTitlePage%
+ {\startstandardmakeup
+ \bfd\setupinterlinespace
+ \setupalign[middle]
+ \vfil
+ \let\\=\vfil}
+
+\def\StopTitlePage%
+ {\vfil\vfil\vfil
+ \stopstandardmakeup}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+%D \macros
+%D {TitlePage, Topics, Topic, Subject}
+%D
+%D A presentation after loading this module looks like:
+%D
+%D \starttyping
+%D \TitlePage {About Whatever\\Topics}
+%D
+%D \Topics {Todays Talk}
+%D
+%D \Topic {Some topic}
+%D
+%D \Subject {Alfa}
+%D
+%D .....
+%D
+%D \Subject {Beta}
+%D
+%D .....
+%D \stoptyping
+
+%D \macros
+%D {definehead}
+%D
+%D The commands \type{\Topic} and \type{\Subject} are defined
+%D as copies of head. We use \type{\Nopic} for internal
+%D purposes.
+
+\definehead [Topic] [chapter]
+\definehead [Subject] [section]
+
+\definehead [Nopic] [title]
+
+%D \macros
+%D {setuphead}
+%D
+%D Because chapters and sections do not make sense in
+%D presentations, we use our own command for typesetting the
+%D titles. Sectionnumbers are of course hidden from viewing.
+%D Each topic is followed by a list of subjects that belong
+%D to the topic.
+
+\setuphead
+ [Topic, Nopic, Subject]
+ [command=\HeadLine,
+ page=yes,
+ style=\tfb,
+ after=\blank,
+ sectionnumber=no]
+
+\setuphead
+ [Topic]
+ [after=\PlaceSubjectList]
+
+\setuphead
+ [Subject]
+ [continue=no]
+
+%D \macros
+%D {framed, midalined}
+%D
+%D The command used to typeset the head lines is rather simple.
+%D We just center the framed title. The frame macro optimizes
+%D the alignment and at the same time enables us to typeset a
+%D nice colored rule.
+
+\def\HeadLine#1#2%
+ {\midaligned
+ {\framed
+ [framecolor=BackgroundColor,rulethickness=1pt,
+ width=.8\hsize,align=middle,strut=no]
+ {#2}}}
+
+%D \macros
+%D {setuplist}
+%D
+%D The subject list is automatically placed. We center each
+%D subject line by using one of the default alternatives (g). We
+%D could have said:
+%D
+%D \starttyping
+%D \setuplist
+%D [Subject]
+%D [alternative=none,
+%D command=\SubjectListLine,
+%D interaction=all]
+%D
+%D \def\SubjectListLine#1#2#3%
+%D {\midaligned{#2}}
+%D \stoptyping
+%D
+%D But why should we complicate things when we can use
+%D alternative~\type{g}. The test is only needed if one
+%D does not automatically goes a new page with each subject.
+
+\def\PlaceSubjectList%
+ {\blank
+ \determinelistcharacteristics[Subject]
+ % \ifnum\utilitylistlength>0 \placelist[Subject] \fi}
+ \doifmode{*list}{\placelist[Subject]}}
+
+\setuplist
+ [Subject, Topic]
+ [alternative=g,
+ interaction=all,
+ before=,
+ after=]
+
+% %D \macros
+% %D {setuptexttexts}
+% %D
+% %D The topics will be listed in the right edge, using:
+%
+% \setuptexttexts
+% [edge]
+% [][\TopicList]
+
+%D \macros
+%D {setuplist, placelist,startinteractionmenu}
+%D
+%D The actual topic list is typeset using a \type{\vbox}. We
+%D have to specify \type{criteriumcriterium=all} because otherwise no
+%D list will be typeset. (By default lists are typeset
+%D locally.)
+
+\startinteractionmenu[right]
+ \placelist
+ [Topic]
+ [alternative=f, % command, % none,
+ maxwidth=\hsize,
+ width=\hsize,
+ offset=0pt,
+ criterium=all,
+ align=left,
+ style=\setsmallbodyfont\bfx]
+\stopinteractionmenu
+
+\def\Topics#1% temporary hack
+ {\Nopic{#1}
+ \placelist[Topic][criterium=all]}
+
+\def\Subjects%
+ {}
+
+%D \macros
+%D {setuptexttexts, button}
+%D
+%D During a presentation, we want to use the cursor to point to
+%D parts of the text. Furthermore we want to be able to jump to
+%D the next page, without the need to move the cursor on buttons.
+%D Therefore we make the text part of the screen into an
+%D invisible button.
+
+\setuptexttexts
+ [\GotoNextPage][]
+
+\def\GotoNextPage
+ {\button[width=\hsize,height=\vsize,frame=off]{}[nextpage]}
+
+%D \macros
+%D {setupsubpagenumber}
+%D
+%D The left bottom navigation bar shows the subpages, which will
+%D be counted by text. One can change this in the preentation
+%D itself by saying \type {[way=byTopic]}.
+
+\setupsubpagenumber
+ [way=bytext, % Topic,
+ state=start]
+
+\doifnotmode{demo}{\endinput}
+
+%D The (rather silly) demo section.
+
+\starttext
+
+\TitlePage{Title Page\\pre-original}
+
+\Topics{Some Nice Quotes}
+
+\Topic{A Few}
+
+\Subject{Knuth} \input knuth
+\Subject{Tufte} \input tufte
+
+\Topic{Some More}
+
+\Subject{Zapf} \input zapf
+\Subject{Bryson} \input bryson
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-02.tex b/tex/context/modules/common/s-pre-02.tex
new file mode 100644
index 000000000..d7a6fe458
--- /dev/null
+++ b/tex/context/modules/common/s-pre-02.tex
@@ -0,0 +1,381 @@
+%D \module
+%D [ file=s-pre-02,
+%D version=1998.04.21,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 2,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This environment can be used to typeset interactive
+%D presentations. This module was first used at the 1998
+%D publishers conference of the European Portable Document
+%D Association (now merged into a graphics association).
+
+\usemodule[pre-general]
+
+%D \macros
+%D {setupbodyfont, switchtobodyfont, setuplayout}
+%D
+%D At \PRAGMA\ we prefer using the Lucida Bright fonts, but
+%D one can of course load another typeface.
+
+\startmode[asintended] \setupbodyfont[lbr] \stopmode
+
+\setupbodyfont[14.4pt]
+
+\setuplayout
+ [style=smallbodyfont]
+
+%D \macros
+%D {setuppapersize, setuplayout}
+%D
+%D The papersize suits the screen dimensions. The layout is
+%D rather simple. We use the whole width of the screen and only
+%D have navigational tools at the bottom of the screen.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [backspace=1cm,
+ topspace=1cm,
+ margin=0pt,
+ header=0pt,
+ footer=0pt,
+ bottomdistance=.875cm,
+ bottom=1cm,
+ width=fit,
+ height=fit]
+
+%D \macros
+%D {setupwhitespace, setuptyping}
+%D
+%D We don't have much height, so we use a more cramped
+%D spacing. Verbatim text looks better when indented.
+%D
+
+\setupwhitespace
+ [medium]
+
+\setuptyping
+ [margin=standard]
+
+%D \macros
+%D {definecolor, setupcolors}
+%D
+%D Of course we enable color. We define some logical colors,
+%D of which most default to the same green shade.
+
+\definecolor [BackgroundColor] [r=.8, g=.8, b=.8]
+\definecolor [OrnamentColor] [r= 0, g=.7, b=.4]
+
+\setupcolors
+ [state=start]
+
+%D \macros
+%D {setupinteraction, setupinteractionscreen}
+%D
+%D We still have to enable interaction mode. We go full
+%D screen!
+
+\setupinteraction
+ [state=start,
+ color=OrnamentColor,
+ contrastcolor=OrnamentColor]
+
+\setupinteractionscreen
+ [option=max,
+ width=fit,
+ height=fit]
+
+%D \macros
+%D {setupitemize}
+%D
+%D And why not bring some color in itemizations too?
+
+\setupitemize
+ [color=OrnamentColor]
+
+%D \macros
+%D {defineoverlay, setupbackgrounds}
+%D
+%D The navigational elements and the backgrounds are
+%D provided by \METAPOST.
+%D
+%D When \METAPOST\ is used, it makes sense to generate the
+%D graphics at runtime. This is supported when one enables
+%D system calls in the local \type {texmf.cnf} file and add the
+%D switch \type {\runMPgraphicstrue} to the local file \type
+%D {cont-sys.tex}. When direct processing is disabled or not
+%D supported, \TEXEXEC\ will take care of graphic generation.
+
+\startuniqueMPgraphic{PageBackground}
+ fill unitsquare
+ xyscaled(OverlayWidth,OverlayHeight)
+ withcolor OverlayColor ;
+ draw unitsquare
+ xyscaled(OverlayWidth,OverlayHeight)
+ enlarged (-2*OverlayLineWidth)
+ withpen pencircle scaled OverlayLineWidth
+ withcolor OverlayLineColor ;
+\stopuniqueMPgraphic
+
+\defineoverlay
+ [PageBackground]
+ [\uniqueMPgraphic{PageBackground}]
+
+\setupbackgrounds
+ [page]
+ [background=PageBackground,
+ backgroundcolor=BackgroundColor,
+ rulethickness=.125cm,
+ framecolor=OrnamentColor]
+
+%D \macros
+%D {setuptexttexts}
+%D
+%D By clicking on the text area, one goes to the next page.
+%D We hook this feature into the text backgrounds.
+
+\startuniqueMPgraphic{TextBackground}
+ draw unitsquare
+ xyscaled(OverlayWidth,OverlayHeight)
+ enlarged (4*OverlayLineWidth)
+ withpen pencircle scaled OverlayLineWidth
+ withcolor OverlayLineColor ;
+\stopuniqueMPgraphic
+
+\defineoverlay
+ [TextBackground]
+ [\uniqueMPgraphic{TextBackground}]
+
+\defineoverlay
+ [NextPage]
+ [\overlaybutton{nextpage}]
+
+\setupbackgrounds
+ [text]
+ [background={TextBackground,NextPage},
+ backgroundcolor=BackgroundColor,
+ rulethickness=.0625cm,
+ framecolor=OrnamentColor]
+
+%D \macros
+%D {setupinteractionmenu,startinteractionmenu}
+%D
+%D At the bottom of the screen, we show three buttons. These
+%D direct us to the previous or next jump or exit the document.
+
+\setupMPvariables[RightArrow][height=\bottomheight]
+\setupMPvariables[LeftArrow] [height=\bottomheight]
+\setupMPvariables[Circle] [height=\bottomheight]
+\setupMPvariables[UpArrow] [height=\bottomheight]
+
+\startuniqueMPgraphic{RightArrow}{height}
+ z1=(0,0) ; z2=(\MPvar{height},.5y3) ; z3=(0,\MPvar{height}) ;
+ drawfill z1--z2--z3--cycle
+ withpen pencircle scaled (\MPvar{height}/5)
+ withcolor \MPcolor{OrnamentColor} ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{LeftArrow}{height}
+ z1=(\MPvar{height},0) ; z2=(0,.5y3) ; z3=(\MPvar{height},\MPvar{height}) ;
+ drawfill z1--z2--z3--cycle
+ withpen pencircle scaled (\MPvar{height}/5)
+ withcolor \MPcolor{OrnamentColor} ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{Circle}{height}
+ drawfill fullcircle scaled \MPvar{height}
+ withpen pencircle scaled (\MPvar{height}/5)
+ withcolor \MPcolor{OrnamentColor} ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{UpArrow}{height}
+ z1=(0,0) ; z2=(\MPvar{height},0) ; z3=(.5x2,\MPvar{height}) ;
+ drawfill z1--z2--z3--cycle
+ withpen pencircle scaled (\MPvar{height}/5)
+ withcolor \MPcolor{OrnamentColor} ;
+\stopuniqueMPgraphic
+
+\setupinteractionmenu
+ [bottom]
+ [state=start,
+ frame=off,
+ width=.3\textwidth,
+ height=\bottomheight]
+
+\setupinteraction
+ [menu=on]
+
+\def\WhateverButton
+ {\doifreferencefoundelse{Whatever}
+ {\raw [Whatever] \uniqueMPgraphic{UpArrow} \\}
+ {}}
+
+\startinteractionmenu[bottom]
+ \but [Topics] \\ % secret button
+ \hfill
+ \WhateverButton % user specific
+ \kern2\bottomheight
+ \raw [previouspage] \uniqueMPgraphic{LeftArrow} \\
+ \kern.5\bottomheight
+ \raw [CloseDocument] \uniqueMPgraphic{Circle} \\
+ \kern.5\bottomheight
+ \raw [nextpage] \uniqueMPgraphic{RightArrow} \\
+ \kern.5\bottomheight
+\stopinteractionmenu
+
+%D \macros
+%D {TitlePage, Topics, Topic, Subject}
+%D
+%D A presentation after loading this module looks like:
+%D
+%D \starttyping
+%D \TitlePage {About Whatever\\Topics}
+%D
+%D \Topics {Todays Talk}
+%D
+%D \Topic {Some topic}
+%D
+%D .....
+%D
+%D \Topic {Next Topic}
+%D
+%D .....
+%D \stoptyping
+
+%D \macros
+%D {StartTitlePage, TitlePage}
+%D
+%D The titlepage is rather simple and can be typeset in two
+%D ways:
+%D
+%D \starttyping
+%D \StartTitlePage
+%D text \\ text \\ text
+%D \StopTitlepage
+%D \stoptyping
+%D
+%D or as one||liner:
+%D
+%D \starttyping
+%D \TitlePage{text\\text\\text}
+%D \stoptyping
+%D
+%D The first alternative can be used for more complicated
+%D title pages.
+
+\def\StartTitlePage%
+ {\startstandardmakeup
+ \bfd\setupinterlinespace
+ \setupalign[middle]
+ \vfil
+ \let\\=\vfil}
+
+\def\StopTitlePage%
+ {\vfil\vfil\vfil
+ \stopstandardmakeup}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+%D \macros
+%D {definehead}
+%D
+%D The commands \type{\Topic} and \type{\Subject} are defined
+%D as copies of head. We use \type{\Nopic} for internal
+%D purposes.
+
+\definehead [Topic] [chapter]
+\definehead [Subject] [section]
+
+\definehead [Nopic] [title]
+
+%D \macros
+%D {setuphead}
+%D
+%D We use our own command for typesetting the titles. We hide
+%D sectionnumbers from viewing. Each topic is followed by a
+%D list of subjects that belong to the topic.
+
+\setuphead
+ [Topic, Nopic]
+ [after={\blank[3*medium]},
+ number=no,
+ style=\tfb,
+ page=yes,
+ alternative=middle]
+
+\setuphead
+ [Subject]
+ [after=\blank,
+ number=no,
+ page=yes,
+ continue=no,
+ style=\tfa]
+
+%D \macros
+%D {setuplist}
+%D
+%D When found, the subject list is automatically placed
+%D after the topic head.
+
+\setuplist
+ [Topic,Subject]
+ [alternative=g,
+ interaction=all,
+ before=,
+ after=]
+
+\setuplist
+ [Topic]
+ [criterium=all]
+
+\def\Topics#1%
+ {\determinelistcharacteristics[Topic]
+ \doifmode{*list}
+ {\Nopic[Topics]{#1}
+ \startcolumns
+ \placelist[Topic]
+ \stopcolumns}}
+
+\setuplist
+ [Subject]
+ [criterium=Topic]
+
+\def\Subjects%
+ {\determinelistcharacteristics[Subject]
+ \doifmode{*list}
+ {\placelist[Subject]}}
+
+\setuphead
+ [Topic]
+ [after={\blank[3*medium]\Subjects}]
+
+\doifnotmode{demo}{\endinput}
+
+%D The (rather silly) demo section.
+
+\starttext
+
+\TitlePage{Title Page\\pre-green}
+
+\Topics{Some Nice Quotes}
+
+\Topic{A Few}
+
+\Subject{Knuth} \input knuth
+\Subject{Tufte} \input tufte
+
+\Topic{Some More}
+
+\Subject{Zapf} \input zapf
+\Subject{Bryson} \input bryson
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-03.tex b/tex/context/modules/common/s-pre-03.tex
new file mode 100644
index 000000000..19a11d24e
--- /dev/null
+++ b/tex/context/modules/common/s-pre-03.tex
@@ -0,0 +1,257 @@
+%D \module
+%D [ file=s-pre-03,
+%D version=1998.09.06,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 3,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is the third environment for typesetting interactive
+%D presentations. I used this style for a talk on \TEX\ and
+%D \JAVASCRIPT\ at \TUG98, mainly because I didn't want to
+%D use the same style three times. Therefore this is a rather
+%D simple, silly style.
+
+\usemodule[pre-general]
+
+%D \macros
+%D {setupbodyfont}
+%D
+%D We use a large bodyfont. Combined with the fancy
+%D background, this does not leave that much room for text, but
+%D presentations should use much text anyway.
+
+\startmode[asintended] \setupbodyfont[lbr] \stopmode
+
+\setupbodyfont[14.4pt]
+
+%D \macros
+%D {setuppapersize,setuplayout,setupinteractionscreen}
+%D
+%D The page dimensions are set to size \type {S6}, being
+%D 600pt by 450pt. We use wide margins and discard headers
+%D and footers. We also launch the document full screen.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [width=middle,
+ height=middle,
+ topspace=75pt,
+ backspace=100pt,
+ header=0pt,
+ footer=0pt]
+
+\setupinteractionscreen
+ [option=max]
+
+%D \macros
+%D {setupcolors,definecolor}
+%D
+%D Next, color support is turned on and a dark red color is
+%D defined. Other red shades will be derived from this one
+%D color.
+
+\setupcolors
+ [state=start]
+
+\definecolor [PageColor] [black]
+\definecolor [BackgroundColor] [s=.85]
+\definecolor [OrnamentColor] [r=.75]
+
+%D \macros
+%D {setupinteraction}
+%D
+%D We turn on interaction mode and use the same color for
+%D hyperlinks and redundant hyperlinks (the ones that point
+%D to the current page).
+
+\setupinteraction
+ [state=start,
+ contrastcolor=OrnamentColor,
+ color=OrnamentColor]
+
+%D \macros
+%D {defineoverlay, setupbackgrounds}
+%D
+%D The joke in this presentation is the elliptical shape of
+%D which the bottom part includes a page indication.
+
+\defineoverlay
+ [PageShape][\useMPgraphic{PageShape}]
+
+% \startuseMPgraphic{PageShape}
+% lin := 20pt ; off := .75lin ;
+% wid := \overlaywidth ; hei := \overlayheight ;
+% pos := \currentpage ; tot := \lastpage ;
+% path bb; bb := unitsquare xscaled wid yscaled hei ;
+% filldraw bb withcolor \MPcolor{PageColor} ;
+% pickup pencircle xscaled .5lin yscaled lin rotated 45 ;
+% pair r, t, l, b ;
+% r := (wid-off,.5hei) ; t := (.5wid,hei-off) ;
+% l := (off,.5hei) ; b := (.5wid,off) ;
+% path p; p := superellipse(r,t,l,b,.8) ;
+% fill p withcolor \MPcolor{Backgroundcolor} ;
+% draw p withcolor \MPcolor{OrnamentColor} ;
+% color contrastcolor ; contrastcolor = 2/3 * \MPcolor{OrnamentColor} ;
+% if (pos>0) and (tot>0):
+% pair pa ; pa := point 5 of p ;
+% pair pb ; pb := point 7 of p ;
+% draw pa withcolor contrastcolor ;
+% draw pb withcolor contrastcolor ;
+% len := 2/tot ;
+% pair pa ; pa := point (5+len*pos) of p ;
+% pair pb ; pb := point (5+len*(pos-1)) of p ;
+% p := p cutafter pa ;
+% p := p cutbefore pb ;
+% draw p withcolor contrastcolor ;
+% fi ;
+% setbounds currentpicture to bb ;
+% \stopuseMPgraphic
+
+\startuseMPgraphic{PageShape}
+ StartPage ;
+ path p ; pair pa, pb ; numeric len ; color contrastcolor ;
+ fill Page withcolor \MPcolor {PageColor} ;
+ pickup pencircle rotated 45 xscaled 10pt yscaled 20pt ;
+ p := Page enlarged (-10pt,-15pt) superellipsed .8 ;
+ p := p shifted (-1.5pt,0) ; % looks better
+ fill p withcolor \MPcolor{BackgroundColor} ;
+ draw p withcolor \MPcolor{OrnamentColor} ;
+ contrastcolor = 2/3 * \MPcolor{OrnamentColor} ;
+ if (PageNumber>0) and (NOfPages>0):
+ draw point 5 of p withcolor contrastcolor ;
+ draw point 7 of p withcolor contrastcolor ;
+ len := 2/NOfPages ;
+ pa := point (5+len*PageNumber) of p ;
+ pb := point (5+len*(PageNumber-1)) of p ;
+ draw (p cutafter pa) cutbefore pb
+ withcolor contrastcolor ;
+ fi ;
+ StopPage ;
+\stopuseMPgraphic
+
+%D We use the viewer provided feature to go to the previous or
+%D next page.
+
+\defineoverlay[PrevButton][\overlaybutton{PreviousPage}]
+\defineoverlay[NextButton][\overlaybutton{NextPage}]
+
+\setupbackgrounds
+ [page]
+ [background={PageShape,PrevButton}]
+
+\setupbackgrounds
+ [text][text]
+ [background=NextButton]
+
+% or using hard coded next/prev pages:
+%
+% \defineoverlay[PrevButton][\overlaybutton{previouspage}]
+% \defineoverlay[NextButton][\overlaybutton{nextpage}]
+%
+% \setupbackgrounds[state=repeat]
+% \setupbackground[text][text][background=NextButton]
+%
+% or simply (using an repeated layer):
+%
+% \setupbackground[text][background=NextButton]
+
+%D \macros
+%D {definehead, setuphead}
+%D
+%D Like the other presentation styles, we use \type {\Topic}
+%D instead of \type {\chapters}. This time we don't provide
+%D an additional sectioning. So we have:
+%D
+%D \starttyping
+%D \TitlePage{How nice}
+%D
+%D \Topics{This is about ...}
+%D
+%D \Topic{The first one}
+%D
+%D \Topic{Another one}
+%D \stoptyping
+
+\definehead [Topic] [chapter]
+\definehead [Nopic] [title]
+
+\setuphead
+ [Topic,Nopic]
+ [after={\blank[3*medium]},
+ number=no,
+ style=\tfb,
+ page=yes,
+ alternative=middle]
+
+\setuplist
+ [Topic]
+ [alternative=g,
+ interaction=all,
+ before=,
+ after=]
+
+\def\Subject
+ {\Topic}
+
+%D The tables of contents is associated with \type
+%D {\Topics}.
+
+\def\Topics#1%
+ {\Nopic[Topics]{#1}
+ \placelist[Topic][criterium=all]}
+
+\def\Subjects
+ {}
+
+%D Instead of \type {\TitlePage}, one can use the pair
+%D \type {\StartTitlePage} -- \type {\StopTitlePage}:
+%D
+%D \starttyping
+%D \StartTitlePage
+%D A Self Made Title
+%D \StopTitlePage
+%D \stoptyping
+
+\def\StartTitlePage%
+ {\startstandardmakeup
+ \bfd\setupinterlinespace
+ \setupalign[middle]
+ \vfil
+ \def\\{\vfil\bfb\setupinterlinespace}}
+
+\def\StopTitlePage%
+ {\vfil\vfil\vfil
+ \stopstandardmakeup}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+\doifnotmode{demo}{\endinput}
+
+%D The (rather silly) demo section.
+
+\starttext
+
+\TitlePage{Title Page\\pre-funny}
+
+\Topics{Some Nice Quotes}
+
+\Topic{A Few}
+
+\Subject{Knuth} \input knuth
+\Subject{Tufte} \input tufte
+
+\Topic{Some More}
+
+\Subject{Zapf} \input zapf
+\Subject{Bryson} \input bryson
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-04.tex b/tex/context/modules/common/s-pre-04.tex
new file mode 100644
index 000000000..088f4e510
--- /dev/null
+++ b/tex/context/modules/common/s-pre-04.tex
@@ -0,0 +1,377 @@
+%D \module
+%D [ file=s-pre-04,
+%D version=1998.09.06,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 4,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\usemodule[pre-general]
+
+%D \macros
+%D {setupbodyfont}
+%D
+%D This is just another environment for typesetting interactive
+%D presentations. I wrote this module on behalf of a course I
+%D gave for the United Kingdom \TeX\ users group.
+
+\setupbodyfont[ams,pos,14.4pt]
+
+%D \macros
+%D {setupcolors,definecolor}
+%D
+%D I started using dark blue for the navigational elements. In
+%D that context, dark red is a logical choice for the contrast
+%D color. While playing around with the navigational elements
+%D I decided to use the not so dominant color yellow for the
+%D status bar.
+%D
+%D A few days before I wrote this style, the recent acquisition
+%D of Mondriaans last painting by the Dutch governement was a
+%D hot topic in the dutch news scenary. Therefore I decided to
+%D replace the rather dull title page by something more
+%D colorful, in mondriaan colors, but far more random than any
+%D of his paintings. For consistence we remap the already
+%D defined primary colors.
+
+\setupcolors [state=start]
+
+\definecolor [NoneColor] [s=.6]
+\definecolor [GotoColor] [b=.6] \definecolor[blue] [GotoColor]
+\definecolor [ExitColor] [r=.6] \definecolor[red] [ExitColor]
+\definecolor [JumpColor] [s=.6]
+\definecolor [UserColor] [g=.6] \definecolor[green] [UserColor]
+\definecolor [StepColor] [r=.6,g=.6] \definecolor[yellow][StepColor]
+
+\definecolor [PageColor] [s=.80] \definecolor[gray] [PageColor]
+\definecolor [TextColor] [s=.90]
+
+%D \macros
+%D {setuppapersize}
+%D
+%D As usual, we take a screen oriented paper size:
+
+\setuppapersize
+ [S6][S6]
+
+%D \macros
+%D {setuplayout,setupinteractionscreen}
+%D
+%D The layout definition fits into this $600\times450$ point
+%D area, but the dimensions are somewhat diffused by the text
+%D background offset.
+
+\setuplayout
+ [width=530pt,
+ height=400pt,
+ header=0pt,
+ footer=0pt,
+ backspace=15pt,
+ topspace=15pt,
+ bottomdistance=15pt,
+ bottom=10pt,
+ margin=0pt,
+ rightedgedistance=15pt,
+ rightedge=30pt]
+
+\setupinteractionscreen
+ [option=max]
+
+%D \macros
+%D {setupbackgrounds}
+%D
+%D Both the page and the text area have a gray background.
+%D The \type {[text,text]} area also has an offset. Later we
+%D will see that we have to compensate for that in the
+%D navigational areas.
+
+\setupbackgrounds
+ [page]
+ [background=color,
+ backgroundcolor=PageColor]
+
+\setupbackgrounds
+ [text][text]
+ [background=color,
+ backgroundcolor=TextColor,
+ backgroundoffset=5pt]
+
+%D \macros
+%D {setupinteraction}
+%D
+%D For convenient navigation, we turn on interaction.
+
+\setupinteraction
+ [state=start,
+ menu=on,
+ color=UserColor,
+ contrastcolor=NoneColor]
+
+%D \macros
+%D {setupsubpagenumber}
+%D
+%D When navigating the document, we keep the title page out
+%D of sight, therefore we use sub page numbers.
+
+\setupsubpagenumber
+ [state=start,
+ way=bytext]
+
+%D \macros
+%D {setupinteractionmenu}
+%D
+%D There is only one interaction menu, located in the right
+%D edge of the screen. Both offsets enlarge the edge by the
+%D same amount as the text background offset.
+
+\setupinteractionmenu
+ [right]
+ [state=start,
+ frame=off,
+ strut=no,
+ offset=0pt,
+ inbetween=,
+ bottomoffset=-5pt,
+ topoffset=-5pt]
+
+%D \macros
+%D {startinteractionmenu}
+%D
+%D The menu itself is not that spectacular. We use the
+%D start||stop alternative for setting the content. The macro
+%D \type {\interactioncolor} expands into either the
+%D interaction color or the contrast color, the latter only
+%D when no jump is possible.
+
+\startinteractionmenu[right]
+ \setupinteraction[color=GotoColor]
+ \but [previoussubpage] \Triangle {90}\framedwidth\interactioncolor \\
+ \vskip10pt
+ \but [nextsubpage] \Triangle{270}\framedwidth\interactioncolor \\
+ \vfill
+ \but [PreviousJump] \Triangle{180}\framedwidth{NoneColor} \\
+ \vskip-5pt
+ \but [NextJump] \Triangle {0}\framedwidth{NoneColor} \\
+\stopinteractionmenu
+
+%D \macros
+%D {setupinteractionbar}
+%D
+%D The interaction bar at the bottom is also larger than the
+%D normal width of the bottom area.
+
+\setupinteractionbar
+ [alternative=f,
+ width=\textwidth,
+ height=\bottomheight,
+ distance=10pt,
+ color=NoneColor,
+ contrastcolor=StepColor]
+
+%D \macros
+%D {setupbottomtexts}
+%D
+%D The bar is centered in the middle.
+
+\setupbottomtexts
+ [\interactionbar]
+
+%D We can exit viewing with a close button, located on the
+%D rightmost bottom area.
+
+\def\CloseButton
+ {\button
+ [width=\rightedgewidth,height=\bottomheight,offset=overlay,
+ background=color,backgroundcolor=ExitColor,frame=off]
+ {}%
+ [CloseDocument]}
+
+\setupbottomtexts
+ [edge][][\CloseButton]
+
+%D \macros
+%D {definesymbol,setupitemize}
+%D
+%D Because some prominent things are rectangular or triangular,
+%D we prefer some different symbols in itemizations:
+
+\definesymbol[1][$\blacktriangleright$]
+\definesymbol[2][$\blacktriangledown$]
+\definesymbol[3][$\blacktriangleright$]
+\definesymbol[4][$\blacktriangledown$]
+
+\setupitemize[each][color=NoneColor]
+
+%D \macros
+%D {TitlePage,defineoverlay,button,setupalign,
+%D setupbackgrounds,setupinteraction,setupinteractionbar,
+%D startstandardmakeup,switchtobodyfont,setupinterlinespace}
+%D
+%D Now the main layout and navigational definitions are
+%D done, it makes sense to define and tune some structuring
+%D commands. First we build the titlepage.
+
+\defineoverlay [TitleGraphic] [\useMPgraphic{title}]
+\defineoverlay [NextPage] [\overlaybutton{nextpage}]
+
+\def\StartTitlePage
+ {\setupbackgrounds[page][background={color,TitleGraphic,NextPage}]
+ \setupbackgrounds[text][text][background=]
+ \setupinteraction[menu=off]
+ \setupinteractionbar[state=stop]
+ \startstandardmakeup
+ \switchtobodyfont[24pt]
+ \bfd\setupinterlinespace
+ \setupalign[middle]
+ \vfil
+ \let\\=\vfil}
+
+\def\StopTitlePage
+ {\vfil\vfil\vfil
+ \stopstandardmakeup
+ \setupinteraction[menu=on]
+ \setupinteractionbar[state=start]
+ \setupbackgrounds[page][background=color]
+ \setupbackgrounds[text][text][background=color]
+ \setupsubpagenumber[reset]}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+%D \macros
+%D {Topic, Nopic, Subject,
+%D definehead, setuphead}
+%D
+%D We use \type {\Topic} and \type {\Subject} instead of
+%D chapters and sections. The \type {\Nopic} alternative is
+%D meant for internal use.
+
+\definehead [Topic] [chapter]
+\definehead [Nopic] [title]
+\definehead [Subject] [section]
+
+\setuphead
+ [Topic, Nopic]
+ [after={\blank[3*medium]},
+ number=no,
+ style=\tfb,
+ page=yes,
+ alternative=middle]
+
+\setuphead
+ [Subject]
+ [after=\blank,
+ number=no,
+ page=yes,
+ continue=no,
+ style=\tfa]
+
+%D \macros
+%D {Topics, Subjects,
+%D setuplist, placelist, startcolumns}
+%D
+%D This style is meant for the more large presentations, and
+%D therefore provided for a list of topics as well as local
+%D lists of subjects. When many topics are introduces, the
+%D list is typeset in columns.
+
+\setuplist
+ [Topic,Subject]
+ [alternative=g,
+ interaction=all,
+ before=,
+ after=]
+
+\setuplist
+ [Topic]
+ [criterium=all]
+
+\def\Topics#1%
+ {\determinelistcharacteristics[Topic]
+ \ifnum\utilitylistlength>0
+ \Nopic[Topics]{#1}
+ \ifnum\utilitylistlength>12
+ \startcolumns
+ \placelist[Topic]
+ \stopcolumns
+ \else
+ \placelist[Topic]
+ \fi
+ \fi}
+
+\def\Subjects%
+ {\placelist[Subject]}
+
+%D Last we define the overlays. Look at the way colors are
+%D linked into the macros.
+
+\startMPinclusions
+ def triangle (expr wid, rot, col) =
+ x1 := x3 := y1 := 0 ; x2 := y3 := wid ; y2 := .5y3 ;
+ fill (z1--z2--z3--cycle) rotated rot withcolor col ;
+ currentpicture := currentpicture xysized (wid,wid) ;
+ enddef ;
+\stopMPinclusions
+
+\setupMPvariables
+ [triangle]
+ [width=1cm,
+ rotation=0,
+ color=black]
+
+\startuniqueMPgraphic{triangle}{width,rotation,color}
+ triangle(\MPvar{width},\MPvar{rotation},\MPvar{color}) ;
+\stopuniqueMPgraphic
+
+\def\Triangle#1#2#3%
+ {\uniqueMPgraphic{triangle}{rotation=#1,width=#2,color=#3}}
+
+\startuseMPgraphic{title} % can be simplified with "randomized"
+ color c ; path p ;
+ for i=1 upto 250 :
+ x0 := uniformdeviate \overlaywidth ;
+ y0 := uniformdeviate \overlayheight ;
+ sx := uniformdeviate 20 ;
+ sy := uniformdeviate 20 ;
+ cc := round(uniformdeviate 2) ;
+ if cc=0 : c := \MPcolor{GotoColor} fi ;
+ if cc=1 : c := \MPcolor{ExitColor} fi ;
+ if cc=2 : c := \MPcolor{StepColor} fi ;
+ qq := round(uniformdeviate 1) ;
+ if qq=0 :
+ p := unitsquare xscaled sx yscaled sy ;
+ else :
+ rr := round(uniformdeviate 3) * 90 ;
+ x1 := x3 := y1 := 0 ; x2 := y3 := sx; y2 := .5y3 ;
+ p := (z1--z2--z3--cycle) rotated rr ;
+ fi ;
+ fill p shifted z0 withcolor c ;
+ endfor ;
+\stopuseMPgraphic
+
+\doifnotmode{demo}{\endinput}
+
+%D The (rather silly) demo section.
+
+\starttext
+
+\TitlePage{Title Page\\pre-colorfull}
+
+\Topics{Some Nice Quotes}
+
+\Topic{A Few}
+
+\Subject{Knuth} \input knuth
+\Subject{Tufte} \input tufte
+
+\Topic{Some More}
+
+\Subject{Zapf} \input zapf
+\Subject{Bryson} \input bryson
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-05.tex b/tex/context/modules/common/s-pre-05.tex
new file mode 100644
index 000000000..ccffd1f4d
--- /dev/null
+++ b/tex/context/modules/common/s-pre-05.tex
@@ -0,0 +1,240 @@
+%D \module
+%D [ file=s-pre-05,
+%D version=1998.12.12,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 5,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\usemodule[pre-general]
+
+%D As all styles sofar, this one has the same structuring
+%D commands.
+
+\startmode[asintended] \setupbodyfont[ludicaot] \stopmode
+
+\setupbodyfont[14.4pt]
+
+\setupcolors [state=start]
+
+\definecolor [BackgroundColor] [s=.95]
+\definecolor [OrnamentColor] [r=.6,g=.7,b=.8]
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [width=430pt,
+ height=400pt,
+ header=0pt,
+ footer=0pt,
+ margin=0pt,
+ backspace=25pt,
+ topspace=25pt,
+ rightedgedistance=20pt,
+ rightedge=110pt]
+
+\setupinteractionscreen
+ [option=max]
+
+\setupbackgrounds
+ [state=repeat]
+
+\setupbackgrounds
+ [page]
+ [backgroundcolor=white]
+
+\setupbackgrounds
+ [text][text]
+ [background={HashFrameA,NextPage},
+ backgroundoffset=20pt]
+
+\defineoverlay
+ [HashFrameA]
+ [\useMPgraphic{HashFrameA}]
+
+\defineoverlay
+ [HashFrameB]
+ [\useMPgraphic{HashFrameB}]
+
+\setupinteraction
+ [state=start,
+ menu=on,
+ color=OrnamentColor,
+ contrastcolor=OrnamentColor]
+
+%D Watch how we use a list alternative that matches the
+%D menu.
+
+\setupinteractionmenu
+ [right]
+ [background=HashFrameB,
+ style=smallbold,
+ frame=off,
+ offset=10pt,
+ height=35pt,
+ before=,
+ after=,
+ inbetween=\endgraf,
+ width=\rightedgewidth]
+
+\startinteractionmenu[right]
+ \placelist
+ [Topic]
+ [criterium=all,
+ alternative=right,
+ maxwidth=.8\rightedgewidth,
+ interaction=all,
+ before=,
+ after=]
+ \vfill
+ \setupinteractionmenu
+ [right]
+ [height=30pt]
+ \but [CloseDocument] Close \\
+\stopinteractionmenu
+
+\setupwhitespace
+ [big]
+
+\setupblank
+ [big]
+
+%D \macros
+%D {TitlePage}
+%D
+%D Now the main layout and navigational definitions are
+%D done, it makes sense to define and tune some structuring
+%D commands. First we build the titlepage.
+
+\defineoverlay [TitleGraphic] [\useMPgraphic{TitleGraphic}]
+\defineoverlay [NextPage] [\overlaybutton{forward}]
+
+\unexpanded\def\StartTitlePage
+ {\setupbackgrounds[page][background={color,TitleGraphic,NextPage}]
+ \setupbackgrounds[text][text][background=]
+ \setupinteraction[menu=off]
+ \setupinteractionbar[state=stop]
+ \setuplayout[width=550pt,rightedge=0pt]
+ \startstandardmakeup
+ \switchtobodyfont[24pt]
+ \bfd\setupinterlinespace
+ \setupalign[middle]
+ \vfil
+ \let\\=\vfil}
+
+\unexpanded\def\StopTitlePage
+ {\vfil\vfil\vfil
+ \stopstandardmakeup
+ \setuplayout[width=430pt,rightedge=110pt]
+ \setupinteraction[menu=on]
+ \setupinteractionbar[state=start]
+ \setupbackgrounds[page][background=color]
+ \setupbackgrounds[text][text][background={HashFrameA,NextPage}]}
+
+\unexpanded\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+%D \macros
+%D {Topics,Subjects}
+%D
+%D Since the lists are in the menu, we don't honor list
+%D placement macros.
+
+\unexpanded\def\Topics#1{}
+\unexpanded\def\Subjects{}
+
+%D \macros
+%D {Topic, Nopic, Subject}
+%D
+%D Since t his style is meant for rather flat structured
+%D documents, only \type {\Topic} makes sense.
+
+\definehead [Topic] [chapter]
+\definehead [Nopic] [title]
+\definehead [Subject] [section]
+
+\setuphead
+ [Topic, Nopic]
+ [after={\blank[3*medium]},
+ number=no,
+ style=\tfb,
+ page=yes,
+ alternative=middle]
+
+\setuphead
+ [Subject]
+ [after=\blank,
+ number=no,
+ page=yes,
+ continue=no,
+ style=\tfa]
+
+%D We use only one kind of base graphic, which is sligthly
+%D tuned for the different usage.
+
+\startMPinclusions
+ def random_hash_frame (expr width, height, offset, linewidth ) =
+
+ def delta = ((uniformdeviate .5offset) + .25offset) enddef ;
+ x1 := offset ; y1 := offset ; x2 := width-offset ; y2 := height-offset ;
+
+ drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{BackgroundColor}) ;
+ fill z1--(x2,y1)--z2--(x1,y2)--cycle ;
+
+ drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{OrnamentColor}) ;
+ draw (x1-delta,y1)--(x2+delta,y1) ;
+ draw (x2,y1-delta)--(x2,y2+delta) ;
+ draw (x2+delta,y2)--(x1-delta,y2) ;
+ draw (x1,y2+delta)--(x1,y1-delta) ;
+
+ drawoptions();
+ setbounds currentpicture to unitsquare xscaled width yscaled height ;
+ enddef ;
+\stopMPinclusions
+
+\startuseMPgraphic{HashFrameA}
+ random_hash_frame(OverlayWidth,OverlayHeight,15pt,2pt) ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{HashFrameB}
+ random_hash_frame(OverlayWidth,OverlayHeight, 5pt,2pt) ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{TitleGraphic}
+ for i=1 upto 300 :
+ offset := uniformdeviate 10pt ;
+ width := 2*offset + 30pt + uniformdeviate 30pt ;
+ height := 2*offset + 10pt + uniformdeviate 10pt ;
+ addto currentpicture also
+ image(random_hash_frame(width,height,offset,1pt)) shifted
+ (uniformdeviate OverlayWidth, uniformdeviate OverlayHeight) ;
+ endfor ;
+\stopuseMPgraphic
+
+\continueifinputfile{s-pre-05.tex}
+
+%D The (rather silly) demo section.
+
+\starttext
+
+\TitlePage{Title Page\\pre-fuzzy}
+
+\Topics{Some Nice Quotes}
+
+\Topic{A Few}
+
+\Subject{Knuth} \input knuth
+\Subject{Tufte} \input tufte
+
+\Topic{Some More}
+
+\Subject{Zapf} \input zapf
+\Subject{Bryson} \input bryson
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-06.tex b/tex/context/modules/common/s-pre-06.tex
new file mode 100644
index 000000000..47948262c
--- /dev/null
+++ b/tex/context/modules/common/s-pre-06.tex
@@ -0,0 +1,324 @@
+%D \module
+%D [ file=s-pre-06,
+%D version=1999.04.28,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 6,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D I wrote this sixth presentation style on behalf of a
+%D presentation at Bachotek~'99. The joke in this style is
+%D (ab)using the Antikwa Torunska, a rather Polish font. When I
+%D was first confronted with this font, the backward slant
+%D stoke me as very characteristic.
+%D
+%D Each page has a slightly different background consisting of
+%D three O's. Although \TEX\ could do the randomization,
+%D scaling and placement, I prefered to use \METAPOST. The
+%D backward slant is also reflected in the stepwise increasing
+%D left margin. Due to this characteristic and the trick used,
+%D this style is only suited for simple presentations, using
+%D itemizations.
+
+\usemodule[pre-general]
+
+%D \macros
+%D {setupbodyfont}
+%D
+%D As said, we will use the Antikwa Torunska, and because we
+%D want it to show up well, we use it large.
+
+\setupbodyfont
+ [ant,14.4pt]
+
+%D \macros
+%D {definecolor, setupcolors}
+%D
+%D Thus style only uses gray scales, but nevertheless we turn
+%D on color. We only use a few logical color names.
+
+\setupcolors
+ [state=start]
+
+\definecolor [BackgroundColor] [s=.8]
+\definecolor [ContrastColor] [s=.9]
+\definecolor [InteractionColor] [s=.6]
+
+%D \macros
+%D {setuppapersize}
+%D
+%D As (nearly) always, we use a 600 pt times 450 pt screen
+%D width, mapped on ditto paper dimensions.
+
+\setuppapersize
+ [S6][S6]
+
+%D \macros
+%D {setuplayout}
+%D
+%D The layout is rather symmetrical. We don't use headers and
+%D footers, and thereby automatically turn off the page
+%D numbering: no room, no number. We use the bottom to present
+%D a rather trivial menu.
+
+\setuplayout
+ [backspace=2cm,
+ topspace=2cm,
+ width=middle,
+ header=0pt,
+ height=middle,
+ footer=0pt,
+ bottomdistance=.5cm,
+ bottom=1cm]
+
+%D \macros
+%D {setupinteractionmenu,startinteractionmenu}
+%D
+%D This menu is slighly moved to the right because that looks
+%D better. The menu itself has one goto (\type {\got}) entry,
+%D which is forced to the right.
+
+\setupinteractionmenu
+ [bottom]
+ [rightoffset=-1cm]
+
+\startinteractionmenu[bottom]
+ \hfill \got [CloseDocument] \bfd Quit \\
+\stopinteractionmenu
+
+%D \macros
+%D {setupbackgrounds}
+%D
+%D Page background are calculated at each page, opposite to the
+%D other backgrounds, that are reused and only calculated when
+%D \CONTEXT\ is explictly told to do so. There are three
+%D overlays: a gray fill, the graphic, and a button that
+%D circulates the pages.
+
+\setupbackgrounds
+ [page]
+ [background={color,Joke,GoAround},
+ backgroundcolor=BackgroundColor]
+
+%D \macros
+%D {defineoverlay}
+%D
+%D The \type {forward} reference action circulates over the
+%D pages, so, at the last page, we are led back to the first.
+
+\defineoverlay [GoAround] [\overlaybutton{forward}]
+
+%D The joke is a simple \METAPOST\ routine. The picture is
+%D actually larger than the screen, but is clipped of when
+%D included.
+
+\defineoverlay [Joke] [\useMPgraphic{background}]
+
+\startuseMPgraphic{background}
+ width := \overlaywidth ;
+ height := \overlayheight ;
+ picture p ; p := char 79 infont "\truefontname{Regular}" scaled 1 ;
+ pwidth := xpart urcorner bbox p - xpart llcorner bbox p ;
+ pheight := ypart urcorner bbox p - ypart llcorner bbox p ;
+ def do (expr r) =
+ addto currentpicture also p shifted - center p scaled r
+ xscaled (width/pwidth) yscaled (height/pheight)
+ withcolor \MPcolor{ContrastColor} ;
+ enddef ;
+ do (0.9+uniformdeviate0.1) ;
+ do (1.4+uniformdeviate0.1) ;
+ do (1.9+uniformdeviate0.1) ;
+\stopuseMPgraphic
+
+%D \macros
+%D {setupinteraction,setupinteractionscreen}
+%D
+%D We did not yet turn on the interaction, so let's do that
+%D now. When opened, the document will fil the screen.
+
+\setupinteraction
+ [state=start,
+ color=InteractionColor,
+ contrastcolor=InteractionColor,
+ menu=on]
+
+\setupinteractionscreen
+ [option=max]
+
+%D \macros
+%D {TitlePage, Topics, Topic}
+%D
+%D A presentation normally consists of a title page, a list of
+%D topics, and the content itself. In this style, a further
+%D subdivision does not make sense, but because we want to be
+%D compatible with the other styles, they are added. A
+%D presentation looks like:
+%D
+%D \starttyping
+%D \usemodule[pre-antikwa]
+%D
+%D \startext
+%D
+%D \TitlePage{The Title}
+%D
+%D \Topics{Contents}
+%D
+%D \Topic{Some Topic}
+%D
+%D \startitemize
+%D \item first
+%D \item second
+%D \stopitemize
+%D
+%D \Topic{Some Topic}
+%D
+%D ...
+%D
+%D \stoptext
+%D \stoptyping
+
+%D \macros
+%D {definehead, Topic, Subject}
+%D
+%D We use dedicated sectioning commands.
+
+\definehead [Topic] [chapter]
+\definehead [Subject] [section]
+
+\definehead [Nopic] [title]
+
+%D \macros
+%D {setuphead}
+%D
+%D We turn of numbering. The assignment to \type {after} takes
+%D care of the increasing indentation. This indentation is the
+%D only low level \TEX\ code needed. Including this
+%D functionality in the core of \CONTEXT\ is not that useful
+%D and I would forget about this feature being present anyway.
+
+\setuphead
+ [Topic, Nopic, Subject]
+ [number=no,
+ after={\blank[2*big]\ToTheLeft\everypar{\ToTheRight}}]
+
+%D After section titles we set the \type {\leftskip} to a value
+%D that suits the Antikwa slant.
+
+\def\ToTheLeft%
+ {\gdef\LeftSkip{30}%
+ \rightskip0pt\relax
+ \leftskip30pt\relax}
+
+%D Each new paragraph adds to the \type {\leftskip}.
+
+\def\ToTheRight%
+ {\doglobal\increment(\LeftSkip,20)%
+ \leftskip=\LeftSkip pt\relax}
+
+%D \macros
+%D {Topics}
+%D
+%D The \type {\Topics} command uses a bot of low level
+%D \CONTEXT. We could have done with:
+%D
+%D \starttyping
+%D \def\Topics#1%
+%D {\Nopic[Topics]{#1}
+%D \placelist[Topic][criteriumcriterium=all]}
+%D \stoptyping
+%D
+%D but the next alternative sort of ignores this command when
+%D no list is found.
+
+\def\Topics#1%
+ {\determinelistcharacteristics[Topic]
+ \ifcase\utilitylistlength\else
+ \Nopic[Topics]{#1}
+ \placelist[Topic][criterium=all]
+ \fi}
+
+%D \macros
+%D {setuplist}
+%D
+%D We use the single item command to achieve a result similar
+%D to the itemizations.
+
+\setuplist
+ [Topic]
+ [alternative=command,
+ command=\TopicListCommand]
+
+\def\TopicListCommand#1#2#3%
+ {\item#2\par}
+
+%D A dummy command, needed to be compatible with the other
+%D presentation styles.
+
+\def\Subjects%
+ {}
+
+%D \macros
+%D {StartTitlePage}
+%D
+%D We use a nested \type {\everypar}; everything in there
+%D will be put in front of each paragraph. The nesting prevents
+%D the first paragraph from indenting. The struts give the
+%D lines a decent height, which looks better inrelation to the
+%D next pages.
+
+\def\StartTitlePage%
+ {\startstandardmakeup
+ \bfd\setupinterlinespace
+ \everypar{\everypar{\advance\leftskip30pt\relax}}
+ \let\\=\blank
+ \begstrut}
+
+\def\StopTitlePage%
+ {\endstrut
+ \vfill
+ \stopstandardmakeup}
+
+%D \macros
+%D {TitlePage}
+%D
+%D The title page can be generated with one command:
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+\doifnotmode{demo}{\endinput}
+
+%D The (rather silly) demo section.
+
+\usemodule[pre-antikwa]
+
+\starttext
+
+\TitlePage{Title Page\\pre-polish}
+
+\Topics{Some Nice Lists}
+
+\Topic{Some Lists}
+
+\Subject{A list}
+
+\startitemize
+\item first
+\item second
+\stopitemize
+
+\Subject{A bigger list}
+
+\startitemize
+\item first
+\item second
+\item third
+\item fourth
+\stopitemize
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-07.tex b/tex/context/modules/common/s-pre-07.tex
new file mode 100644
index 000000000..ba62b3236
--- /dev/null
+++ b/tex/context/modules/common/s-pre-07.tex
@@ -0,0 +1,212 @@
+%D \module
+%D [ file=s-pre-07,
+%D version=1999.08.20,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 7,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This style was made for the \NTS\ presentation at
+%D \EUROTEX\ 1999. It's a wink to programming in a webbed way.
+%D This is just one way of implementing such a style. Today
+%D we have more \METAPOST\ interfacing available, and
+%D thereby moore tools and alternative ways to reach such a
+%D goal. I must admit that the main macro looks fuzzy. On
+%D the other hand, the presentation can look quite structured.
+%D
+%D \starttyping
+%D \Topics{...}
+%D
+%D \StartIdeas
+%D \Topic{...}
+%D \StartIdea ... \StopIdea
+%D \StartIdea ... \StopIdea
+%D \StopIdeas
+%D \stoptyping
+
+\startmode[asintended] \setupbodyfont[lbr] \stopmode
+
+\setupbodyfont[14.4pt]
+
+\usemodule
+ [abr-02]
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [topspace=0cm,
+ backspace=0cm,
+ header=0pt,
+ footer=0pt,
+ width=middle,
+ height=middle]
+
+\setupinteractionscreen
+ [option=max]
+
+%D In order to prevent loops due to random placement, we
+%D keep the random seed reasonable constant.
+
+\setupsystem
+ [random=big]
+
+\setupcolors
+ [state=start]
+
+\definecolor[gray] [s=.4]
+\definecolor[lightgray][s=.9]
+
+\definecolor[red] [r=.4] \definecolor[cyan] [g=.4,b=.4]
+\definecolor[green][g=.4] \definecolor[magenta][r=.4,b=.4]
+\definecolor[blue] [b=.4] \definecolor[yellow] [r=.4,g=.4]
+
+\definecolor[PageColor][gray]
+\definecolor[TextColor][lightgray]
+\definecolor[LineColor][yellow]
+
+\definecolor[linecolor 1][red] \definecolor[linecolor 5][cyan]
+\definecolor[linecolor 2][green] \definecolor[linecolor 6][magenta]
+\definecolor[linecolor 3][blue] \definecolor[linecolor 4][yellow]
+
+\setupinteraction
+ [state=start,
+ display=new,
+ color=LineColor,
+ contrastcolor=LineColor]
+
+\startuseMPgraphic{shape}
+ path p ; color c, w ; numeric width, height ;
+ c := \MPcolor{LineColor} ; w := \MPcolor{TextColor} ;
+ width := \overlaywidth ; height := \overlayheight ;
+ pickup pencircle scaled .5cm ;
+ p := unitcircle
+ xscaled \MPw{\Idea} yscaled \MPh{\Idea}
+ shifted \MPxy{\Idea} ;
+ for z = (0,.5height), (width,.5height), (.5width,0), (.5width,height),
+ (0,0), (width,height), (0,height), (width,0) :
+ draw center p -- z withcolor c ;
+ endfor ;
+ fill p withcolor w ;
+ draw p withcolor c ;
+ p := unitcircle
+ xscaled \MPw{\Page} yscaled \MPh{\Page}
+ shifted \MPxy{\Page} ;
+ pickup pencircle scaled .25cm ;
+ fill p withcolor w ;
+ draw p withcolor c ;
+ draw unitsquare xscaled width yscaled height withcolor c ;
+\stopuseMPgraphic
+
+\defineoverlay [shape] [\useMPgraphic{shape}]
+\defineoverlay [nextpage] [\overlaybutton{nextpage}]
+\defineoverlay [previouspage] [\overlaybutton{previouspage}]
+\defineoverlay [content] [\overlaybutton{content}]
+\defineoverlay [forward] [\overlaybutton{forward}]
+
+\setupbackgrounds
+ [page]
+ [background={color,previouspage,shape},
+ backgroundcolor=PageColor]
+
+\def\StartIdea%
+ {\xdef\Idea{idea:\realfolio}
+ \xdef\Page{page:\realfolio}
+ \startstandardmakeup
+ \dontcomplain
+ \vbox to \makeupheight \bgroup
+ \getrandomdimen\scratchdimen{75pt}{600pt}\vskip 0pt plus \scratchdimen
+ \hbox to \makeupwidth \bgroup
+ \getrandomdimen\scratchdimen{75pt}{600pt}\hskip 0pt plus \scratchdimen
+ \hpos{idea:\realfolio} \bgroup
+ \framed
+ [width=.6\hsize,height=fit,offset=2cm,align=middle,
+ frame=off,strut=no,background=forward]
+ \bgroup
+ \setupwhitespace[big]}
+
+\def\StopIdea%
+ {\egroup
+ \egroup
+ \getrandomdimen\scratchdimen{75pt}{600pt}\hskip 0pt plus \scratchdimen
+ \egroup
+ \getrandomdimen\scratchdimen{75pt}{600pt}\vskip 0pt plus \scratchdimen
+ \egroup
+ \ifx\CurrentTopic\empty \else
+ \vskip-\makeupheight
+ \vbox to \makeupheight
+ {\vfill
+ \ifx\CurrentListTopic\empty\else
+ \writetolist[Topic]{}{\CurrentListTopic}
+ \fi
+ \hbox to \makeupwidth
+ {\hfill
+ \hpos{page:\realfolio}
+ {\framed
+ [offset=.5cm,frame=off,background=content]
+ {\bf\ignorespaces\CurrentTopic\unskip}}%
+ \hskip.5cm}
+ \vskip.5cm}
+ \fi
+ \stopstandardmakeup
+ \let\CurrentListTopic\empty}
+
+\definelist
+ [Topic]
+
+\setuplist
+ [Topic]
+ [alternative=f,
+ expansion=command]
+
+\let\CurrentTopic\empty
+\let\CurrentListTopic\empty
+
+\long\def\StartTopic#1\StopTopic
+ {\long\def\CurrentTopic{#1}
+ \let\CurrentListTopic\CurrentTopic}
+
+\def\Topic#1%
+ {\StartTopic#1\StopTopic}
+
+\def\Topics#1%
+ {\StartIdeas
+ \def\CurrentTopic{#1}
+ \StartIdea
+ \pagereference[content]
+ \placelist[Topic][criterium=all]
+ \StopIdea
+ \StopIdeas}
+
+\newcounter\CurrentIdeas
+
+\def\StartIdeas%
+ {\ifnum\CurrentIdeas=6 \doglobal\newcounter\CurrentIdeas \fi
+ \doglobal\increment\CurrentIdeas
+ \definecolor[LineColor][linecolor \CurrentIdeas]}
+
+\def\StopIdeas%
+ {}
+
+\doifnotmode{demo}{\endinput}
+
+%D The (rather silly) demo section.
+
+\starttext
+
+\Topics{This is about \unknown}
+
+\StartIdeas
+ \Topic{Some topic}
+ \StartIdea An idea \unknown \StopIdea
+ \StartIdea \unknown\ and another \StopIdea
+\StopIdeas
+
+\stoptext
+
+
diff --git a/tex/context/modules/common/s-pre-08.tex b/tex/context/modules/common/s-pre-08.tex
new file mode 100644
index 000000000..b545bef23
--- /dev/null
+++ b/tex/context/modules/common/s-pre-08.tex
@@ -0,0 +1,271 @@
+%D \module
+%D [ file=s-pre-08,
+%D version=1999.09.01,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 8,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is one of the 6 styles made for the \NTS\ presentation
+%D at \EUROTEX\ 1999. The idea was to demonstrate a couple of
+%D nasty things that one can do with \PDFTEX, being an example
+%D of an extension. Afterwards it was provded that this could
+%D also be done using traditional \TEX.
+%D
+%D This version is nearly the same as the original, although
+%D since then the \METAPOST\ related macro have become more
+%D smooth. The original used a couple of boxes, skipt and
+%D fills, while this version uses the layer mechanism that
+%D came available in fall 2000. This style is actually more a
+%D demonstration gimmick than a real useful one.
+
+%D You may want to turn on layer tracing:
+%D
+%D \starttyping
+%D \tracelayerstrue
+%D \stoptyping
+
+\setuppapersize
+ [S6][S6]
+
+\setupbodyfont
+ [pos,10pt]
+
+%D We use the whole page and have no margins.
+
+\setuplayout
+ [topspace=0cm,
+ backspace=0cm,
+ header=0pt,
+ footer=0pt,
+ width=middle,
+ height=middle]
+
+\setupcolors
+ [state=start]
+
+\definecolor[TextColor][s=.9]
+\definecolor[PageColor][r=.5,g=.4,b=.3]
+\definecolor[LineColor][r=.7,g=.6,b=.5]
+
+\definecolor[ColorPage][r=.5,g=.6,b=.7]
+\definecolor[ColorLine][r=.3,g=.4,b=.5]
+
+\setupinteraction
+ [state=start,
+ display=new]
+
+\setupinteractionscreen
+ [option=max]
+
+%D The page, sample text and pagenumber will have a background
+%D graphic.
+
+\defineoverlay [page] [\uniqueMPgraphic{page}]
+\defineoverlay [graphic] [\uniqueMPgraphic{graphic}]
+\defineoverlay [number] [\uniqueMPgraphic{number}]
+
+%D Each element will also be a button.
+
+\defineoverlay [nextpage] [\overlaybutton{nextpage}]
+\defineoverlay [previouspage] [\overlaybutton{previouspage}]
+\defineoverlay [forward] [\overlaybutton{forward}]
+
+%D We are going to put all three elements on a layer.
+
+\definelayer [main]
+\defineoverlay [main] [\composedlayer{main}]
+
+%D The page backgrounds are as follows:
+
+\setupbackgrounds
+ [page]
+ [background={previouspage,page}]
+
+%D We could have put the main layer on the page overlay, but
+%D the next solution makes us independent of the back and top
+%D margins. The \type {idea} layer is for user purposes.
+
+\setupbackgrounds
+ [text]
+ [background={main,idea}]
+
+%D The page number, sample text and explanation all have
+%D associated framed texts. The two overlays \type {sample}
+%D and \type {text} and there for special (user) purposes.
+
+\defineframedtext
+ [PageText]
+ [width=fit,offset=.5cm,
+ before=,after=,frame=off,background={number,forward}]
+
+\defineframedtext
+ [SampleText]
+ [width=.6\makeupwidth,height=fit,offset=2cm,align=middle,
+ before=,after=,frame=off,background={graphic,sample,nextpage}]
+
+\defineframedtext
+ [TextText]
+ [width=.6\makeupwidth,height=fit,offset=2cm,align=middle,
+ before=,after=,frame=off,background={text,nextpage}]
+
+%D Nothing goes on the page directly, since we use layers. The
+%D \type {\null} command makes sure that at least something is
+%D on the page so that the page is flushed. Here we also take
+%D care of placing the page number.
+
+\def\StartIdea
+ {\null \dontcomplain}
+
+\def\StopIdea
+ {\setlayer
+ [main]
+ [x=\makeupwidth,y=.5cm,hoffset=-.5cm,location=lb]
+ {\PageText{\pagenumber}}
+ \page}
+
+%D Both texts get their position registered.
+
+\def\StartSample
+ {\setlayer
+ [main]
+ [hoffset=.75cm,voffset=.75cm]
+ \bgroup \hpos {SampText:\realfolio} \bgroup \startSampleText [none]}
+
+\def\StopSample
+ {\stopSampleText \egroup \egroup}
+
+%D Here the position of the sample text and explanationary
+%D text are passed on to the graphic that concerns the latter.
+
+% use setlayertext instead
+
+\def\StartText
+ {\setMPpositiongraphic
+ {TextText:\realfolio}{text}{other=SampText:\realfolio}
+ \setlayer
+ [main]
+ [x=\makeupwidth,y=\makeupheight,
+ hoffset=-.75cm,voffset=-.75cm,
+ location=lt]
+ \bgroup \noindent \hpos {TextText:\realfolio} \bgroup \startTextText [none]}
+
+\def\StopText
+ {\stopTextText \egroup \egroup}
+
+%D The graphics that encircle the two texts are related to
+%D their position. This is because when they overlay, a shine
+%D through is shown. This only shows up when there is enough
+%D text to make them overlap.
+
+\startuniqueMPgraphic{page}
+ StartPage ;
+ pickup pencircle scaled .5cm ;
+ fill Page withcolor \MPcolor{PageColor} ;
+ draw Page withcolor \MPcolor{LineColor} ;
+ StopPage ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{number}
+ path p ; p := fullcircle xscaled OverlayWidth yscaled OverlayHeight;
+ pickup pencircle scaled .25cm ;
+ fill p withcolor \MPcolor{TextColor} ;
+ draw p withcolor (white-\MPcolor{PageColor}) ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{graphic}
+ path p ; p := fullcircle xscaled OverlayWidth yscaled OverlayHeight;
+ pickup pencircle scaled .5cm ;
+ fill p withcolor \MPcolor{TextColor} ;
+ draw p withcolor \MPcolor{LineColor} ;
+\stopuniqueMPgraphic
+
+%D This graphic is calculated when a position is flushed that
+%D has this graphics as attached. The \type {self} reference
+%D is provided by \CONTEXT\ itself.
+
+\startMPpositiongraphic{text}
+ initialize_box(\MPpos{\MPvar{other}}) ;
+ path p ; p := fullcircle xscaled wxy yscaled hxy shifted cxy ;
+ initialize_box(\MPpos{\MPvar{self}}) ;
+ path q ; q := fullcircle xscaled wxy yscaled hxy shifted cxy ;
+ pickup pencircle scaled .5cm ;
+ fill q withcolor \MPcolor{TextColor} ;
+ draw p withcolor (white-\MPcolor{PageColor}) ;
+ clip currentpicture to q ;
+ draw q withcolor \MPcolor{LineColor} ;
+ anchor_box(\MPanchor{\MPvar{self}}) ;
+\stopMPpositiongraphic
+
+%D In order to be complete, we also define a title page.
+%D Here suddenly the text background shows up.
+
+\def\StartTitlePage
+ {\startstandardmakeup
+ \dontcomplain
+ \setupframedtexts[TextText][width=fit]
+ \StartText
+ \bfd\setupinterlinespace
+ \def\\{\blank\bfc\setupinterlinespace\def\\{\blank}}}
+
+\def\StopTitlePage
+ {\StopText
+ \stopstandardmakeup}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+%D For this purpose, we redefine the position graphic to
+%D handle a text only case:
+
+\startMPpositiongraphic{text}
+ if box_found(\MPpos{\MPvar{other}}) :
+ initialize_box(\MPpos{\MPvar{other}}) ;
+ path p ; p := fullcircle xscaled wxy yscaled hxy shifted cxy ;
+ fi ;
+ initialize_box(\MPpos{\MPvar{self}}) ;
+ path q ; q := fullcircle xscaled wxy yscaled hxy shifted cxy ;
+ pickup pencircle scaled .5cm ;
+ fill q withcolor \MPcolor{TextColor} ;
+ if box_found(\MPpos{\MPvar{other}}) :
+ draw p withcolor (white-\MPcolor{PageColor}) ;
+ clip currentpicture to q ;
+ draw q withcolor \MPcolor{LineColor} ;
+ else :
+ draw q withcolor (white-\MPcolor{PageColor}) ;
+ fi ;
+ anchor_box(\MPanchor{\MPvar{self}}) ;
+% setbounds currentpicture to boundingbox origin ;
+\stopMPpositiongraphic
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+
+\TitlePage
+ {Fancy Styles:\\layers}
+
+\StartIdea
+ \StartSample
+ \input tufte
+ \StopSample
+ \StartText
+ \input reich
+ \StopText
+\StopIdea
+
+\StartIdea
+ \StartSample
+ \input knuth
+ \StopSample
+ \StartText
+ \input reich
+ \StopText
+\StopIdea
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-09.tex b/tex/context/modules/common/s-pre-09.tex
new file mode 100644
index 000000000..a20b9f31a
--- /dev/null
+++ b/tex/context/modules/common/s-pre-09.tex
@@ -0,0 +1,380 @@
+%D \module
+%D [ file=s-pre-09,
+%D version=unknown,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 9,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D I made this style when I had to give a presentation on
+%D the \MAPS\ bibliography production for several user group
+%D meetings. This style is rather tuned for combinations of
+%D examples and explanations. The colors match the \MAPS\
+%D bibliography colors.
+
+\startmode[asintended] \setupbodyfont[lbr] \stopmode
+
+\setupbodyfont[14.4pt]
+
+%D A couple of years later, in 2001 this style was documented
+%D and made public. While documenting, I also changed box
+%D building on top of overlays into the now available layer
+%D positioning. So, this styles demonstrates quite some
+%D tricks.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [topspace=0cm,
+ backspace=0cm,
+ header=0pt,
+ footer=0pt,
+ width=middle,
+ height=middle]
+
+%D Local environments can be set by using the setups commands.
+%D For downward compatibility, we keep supporting the \type
+%D {\...Settings} hooks. Using local environments is seldom
+%D needed.
+
+\let\TextSettings \empty
+\let\SampleSettings\empty
+
+\startsetups [text] \TextSettings \stopsetups
+\startsetups [sample] \SampleSettings \stopsetups
+
+%D The dimensions are kind of fixed.
+
+\def\FrameWidth {448pt}
+\def\FrameHeight {348pt}
+\def\FrameOffset {24pt}
+\def\FrameSkip {12pt}
+
+%D But they {\em can} and {\em will} be changed.
+
+\def\FrameWidth {408pt}
+\def\FrameHeight {318pt}
+
+%D The funny values come from the $3:4$ display aspect
+%D ratio.
+
+\setupcolors
+ [state=start]
+
+\definecolor[PageColor] [s=.40]
+\definecolor[TextColor] [s=.90]
+\definecolor[InteractionColor][r=.40]
+\definecolor[LineColor] [r=.60,g=.60]
+
+%D Of course we go interactive and since we will probably
+%D open other documents, we make sure that the viewer opens a
+%D new window.
+
+\setupinteraction
+ [color=InteractionColor,
+ contrastcolor=LineColor,
+ display=new,
+ state=start]
+
+\setupinteractionscreen
+ [option=max]
+
+%D Before we come to the real macros, we do a little bit of
+%D tuning.
+
+\setupitemize
+ [1][packed]
+
+\setuptyping
+ [blank=medium]
+
+%D Apart from the titlepage, the page gets a simple colored
+%D background. Later we will activate the background.
+
+\setupbackgrounds
+ [page]
+ [backgroundcolor=PageColor]
+
+%D Everything gets frames by a nice \METAPOST\ frame.
+
+\defineoverlay [background] [\uniqueMPgraphic{background}]
+
+\startuniqueMPgraphic{background}
+ path p ; color c, w, d ;
+ c := \MPcolor{PageColor} ;
+ w := \MPcolor{TextColor} ;
+ d := \MPcolor{LineColor} ;
+ p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
+ pickup pencircle scaled (1.5*\FrameSkip) ;
+ draw p withcolor c ;
+ pickup pencircle scaled \FrameSkip ;
+ fill p withcolor w ;
+ draw p withcolor d ;
+\stopuniqueMPgraphic
+
+%D We will present samples and explanation pair||wise, so
+%D we need a hyperlink that skips a page.
+
+\defineoverlay [nextpage] [\overlaybutton{nextpage}]
+\defineoverlay [previouspage] [\overlaybutton{previouspage}]
+\defineoverlay [skippage] [\overlaybutton{page(+2)}]
+
+%D Layers are normally used to position multiple content on
+%D a specific overlay. Here we will use them to position
+%D only and since the samples and text will swap place, we
+%D will use quite a few layers.
+
+\defineoverlay [text] [\composedlayer{text}]
+\defineoverlay [sample] [\composedlayer{sample}]
+\defineoverlay [common] [\composedlayer{common}]
+
+%D There are three positions. When combined, the sample and
+%D text windows overlap, otherwise the lone window is
+%D centered. We could have used one layer and reversed the
+%D order by setting the \type {direction} parameter, but
+%D this approach is more readable.
+
+\definelayer
+ [text]
+ [x=\makeupwidth,y=\makeupheight,location=lt,
+ hoffset=-\FrameSkip,voffset=-\FrameSkip]
+
+\definelayer
+ [sample]
+ [hoffset=\FrameSkip,voffset=\FrameSkip]
+
+\definelayer
+ [common]
+ [x=.5\makeupwidth,y=.5\makeupheight,location=c]
+
+%D The topic is put in the lower right corner of the text
+%D window.
+
+\defineoverlay [topic] [\composedlayer{topic}]
+
+\definelayer
+ [topic]
+ [x=\FrameWidth,y=\FrameHeight,location=lt,
+ hoffset=-\FrameOffset,voffset=-\FrameSkip]
+
+%D The topic is put in a framed box. That way we can make
+%D sure that it gets a background, which looks better when
+%D it covers something else. Otherwise we could have stuct
+%D to:
+%D
+%D \starttyping
+%D \def\Topic#1%
+%D {\setlayer[topic]{\color[PageColor]{\bfb\setstrut#1}}}
+%D \stoptyping
+%D
+%D But, we go for the nice alternative:
+
+\def\Topic#1%
+ {\doifsomething{#1}
+ {\setlayer [topic]
+ {\bfb\setstrut
+ \inframed
+ [frame=off,foregroundcolor=PageColor,offset=0pt,
+ background=color,backgroundcolor=TextColor]
+ {#1}}}}
+
+%D The sample as well as the explanation will be collected in
+%D a buffer. That way we can reuse the content. We could
+%D have used a box instead, but can we be sure that the content
+%D is not adapting itself? So, buffers we use.
+
+\resetbuffer[sample]
+\resetbuffer[text]
+
+%D Both the sample and explanation are kind of windowed.
+
+\defineframedtext
+ [SampleText]
+ [width=\FrameWidth,height=\FrameHeight,offset=\FrameOffset,
+ frame=off,align=normal,strut=no,before=,after=,
+ background={background,nextpage}]
+
+%D We safe some keying in by combining things in one macro.
+
+\def\DoSampleText#1#2#3% kind layer overlays
+ {\setupframedtexts[SampleText][background={background,#3}]
+ \setlayer[#2]
+ {\startSampleText[none]
+ \setups[#1]
+ \getbuffer[#1]
+ \stopSampleText}}
+
+\def\StartSample{\dostartbuffer[sample][StartSample][StopSample]}
+\def\StartText {\dostartbuffer[text] [StartText] [StopText]}
+
+%D The following definitions apply at the outer level.
+
+\def\StopSample
+ {\startstandardmakeup
+ \DoSampleText{sample}{common}{nextpage}
+ \stopstandardmakeup
+ \resetbuffer[sample]}
+
+\def\StopText
+ {\startstandardmakeup
+ \DoSampleText{text}{common}{topic,nextpage}
+ \stopstandardmakeup
+ \resetbuffer[text]}
+
+\setupbackgrounds[page][background={color,nextpage}]
+\setupbackgrounds[text][background=common]
+
+%D When we combine sample and text, we get slightly
+%D different definitions. As you can see we generate two
+%D pages. Watch how we manipulate the order of the
+%D overlays and teh nature of the buttons. Here data
+%D abstraction really pays off.
+
+\def\StartIdea
+ {\bgroup
+ \let\StopSample\relax
+ \let\StopText \relax}
+
+\def\StopIdea%
+ {\setupbackgrounds[page][background={color,skippage}]
+ \setupbackgrounds[text][background={text,sample}]
+ \startstandardmakeup
+ \DoSampleText{sample}{sample}{previouspage}
+ \DoSampleText{text} {text} {topic,nextpage}
+ \stopstandardmakeup
+ \setupbackgrounds[page][background={color,nextpage}]
+ \setupbackgrounds[text][background={sample,text}]
+ \startstandardmakeup
+ \DoSampleText{sample}{sample}{previouspage}
+ \DoSampleText{text} {text} {topic,nextpage}
+ \stopstandardmakeup
+ \egroup}
+
+%D The rest of the definitions takes care of the title page.
+%D Please don't steal this one for your own documents.
+
+\defineoverlay[joke] [\useMPgraphic{joke}{n=0}] % not to be changed!
+
+\startuseMPgraphic{joke}{n}
+ StartPage ;
+ path p, q ; numeric w ; pair xy ;
+ set_grid(OverlayWidth,OverlayHeight,OverlayWidth/8,OverlayHeight/8) ;
+ if \MPvar{n}=1 :
+ p := fulldiamond ; fill Page withcolor \MPcolor{TextColor} ;
+ else :
+ p := fullsquare ; fill Page withcolor \MPcolor{PageColor} ;
+ fi ;
+ forever :
+ xy := center Page randomized (OverlayWidth,OverlayHeight) ;
+ if new_on_grid(xpart xy, ypart xy) :
+ q := (p xyscaled (OverlayWidth/5,OverlayHeight/5))
+ randomized (\FrameSkip,\FrameSkip)
+ shifted xy ;
+ w := (\FrameSkip) randomized (\FrameSkip/2) ;
+ draw q withcolor \MPcolor{PageColor} withpen pencircle scaled (1.5w) ;
+ fill q withcolor \MPcolor{TextColor} ;
+ draw q withcolor \MPcolor{LineColor} withpen pencircle scaled ( w) ;
+ fi ;
+ exitif grid_full ;
+ endfor ;
+ StopPage ;
+\stopuseMPgraphic
+
+\defineoverlay[fuzzy][\useMPgraphic{fuzzy}]
+
+\startuseMPgraphic{fuzzy}
+ path p ; numeric w ;
+ p := (fullsquare xyscaled (OverlayWidth,OverlayHeight))
+ randomized (\FrameSkip,\FrameSkip) ;
+ w := (\FrameSkip) randomized (\FrameSkip/2) ;
+ draw p withcolor \MPcolor{PageColor} withpen pencircle scaled (1.5w) ;
+ fill p withcolor \MPcolor{TextColor} ;
+ draw p withcolor \MPcolor{LineColor} withpen pencircle scaled ( w) ;
+\stopuseMPgraphic
+
+%D This time we use a fit window, but with a slightly randomized
+%D frame, our trademark so to say.
+
+\def\StartTitlePage
+ {\bgroup
+ \setupbackgrounds[page][background={joke,nextpage}]
+ \startstandardmakeup
+ \switchtobodyfont[big]
+ \setupframedtexts
+ [SampleText]
+ [background=fuzzy,
+ foregroundcolor=PageColor,
+ width=fit,
+ height=fit,
+ align=middle]
+ \startSampleText[middle]
+ \bfd\setupinterlinespace
+ \def\\{\bfb\setupinterlinespace\vfil\def\\{\vfil}}}
+
+\def\StopTitlePage
+ {\stopSampleText
+ \stopstandardmakeup
+ \egroup}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+%D Let's nill some error prone presentation macros.
+
+\let\Subject \Topic
+\let\Topics \gobbleoneargument
+\let\Subjects \relax
+
+%D We will avoid \quote {overfull} messages.
+
+\dontcomplain
+
+\doifnotmode{demo}{\endinput}
+
+%D The (rather silly) demo section.
+
+\starttext
+
+\setupbodyfont[12pt]
+
+\TitlePage{Quotes, Quotes\\and more quotes}
+
+\StartIdea
+ \StartSample
+ \input knuth \par
+ \StopSample
+ \StartText
+ \Topic{Tufte}
+ \input tufte \par
+ \StopText
+ \StopIdea
+
+\StartIdea
+ \StartSample
+ \input materie \par
+ \StopSample
+ \StartText
+ \input reich \par
+ \StopText
+\StopIdea
+
+\StartText
+ \input tufte \par
+\StopText
+
+\StartIdea
+ \StartSample
+ \input knuth \par
+ \StopSample
+ \StartText
+ \input tufte \par
+ \StopText
+\StopIdea
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-10.tex b/tex/context/modules/common/s-pre-10.tex
new file mode 100644
index 000000000..a92e5af01
--- /dev/null
+++ b/tex/context/modules/common/s-pre-10.tex
@@ -0,0 +1,308 @@
+%D \module
+%D [ file=s-pre-10,
+%D version=unknown,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 10,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This style is derived from the ninth style, which was
+%D used first at \EUROTEX\ 99 and later at \TUG\ 2000. This
+%D alternative build up a page.
+
+\startmode [demo]
+ \disablemode[demo] \usemodule[pre-09] \enablemode[demo]
+\stopmode
+
+\startnotmode [demo]
+ \usemodule[pre-09]
+\stopnotmode
+
+%D We use blue colors instead of yellow ones. Since we have
+%D used symbolic names, we can easily overload the existing
+%D scheme.
+
+\definecolor[LineColor][r=.40,g=.40,b=1.00]
+
+%D Here we don't use fixed dimensions, but fit the sample
+%D windows and derive the text windows's width from this one.
+
+\setupframedtexts
+ [SampleText]
+ [width=fit,height=fit,
+ background={background,nextpage}]
+
+%D The topic goes to the top right corner of the screen which
+%D means that it is positioned left down to the reference
+%D point. Watch how we make data on this layer (here only
+%D the topic but it can be more) persistent.
+
+\setuplayer
+ [topic]
+ [y=0pt,x=\makeupwidth,location=lb,state=repeat,
+ hoffset=-\FrameSkip,voffset=\FrameSkip]
+
+%D Clicking on the page brings us back.
+
+\setupbackgrounds
+ [page]
+ [background={previouspage,color,topic}]
+
+%D All layers end up on the text area. This could have been
+%D the page area too since these have the same dimensions.
+
+\setupbackgrounds
+ [text]
+ [background={common,sample,text}]
+
+%D Because we build up the text window step by step, we will
+%D separate the entries by white space.
+
+\startsetups [always]
+ \setupwhitespace[big]
+ \setupblank[big]
+\stopsetups
+
+%D The \type {\Topic} commands can be simplified to:
+
+\def\Topic#1%
+ {\resetlayer[topic]
+ \setlayer[topic]{\bfb\setstrut\color[TextColor]{#1}}}
+
+%D We also provide a way to erase the topic.
+
+\def\NoTopic
+ {\resetlayer[topic]}
+
+%D We have to redefine the structuring commands to support
+%D the resetting of buffer counters.
+
+\newcounter\TextN
+
+\def\StartSample
+ {\doglobal\newcounter\TextN
+ \dostartbuffer[sample][StartSample][StopSample]}
+
+\def\StartText
+ {\doglobal\newcounter\TextN
+ \dostartbuffer[text][StartText][StopText]}
+
+\def\StartSubText
+ {\doglobal\increment\TextN
+ \dostartbuffer[text-\TextN][StartSubText][StopSubText]}
+
+\def\StopText
+ {\startstandardmakeup
+ \DoSampleText{text}{common}{nextpage}
+ \stopstandardmakeup}
+
+\def\StopSubText
+ {\startstandardmakeup
+ \DoSampleText{text}{common}{nextpage}
+ \stopstandardmakeup}
+
+%D The \type {\DoSampleText} command is adapted to support
+%D addition of subtexts (each subtext goes into its own
+%D buffer).
+
+\def\DoSampleText#1#2#3%
+ {\setupframedtexts[SampleText][background={background,#3}]
+ \bgroup
+ \setups[#1]%
+ \setups[always]%
+ \setbox\nextbox=\hbox
+ {\startSampleText[none]
+ \getbuffer[#1]\par
+ \doif{#1}{text}
+ {\dorecurse{\TextN}{\getbuffer[text-\recurselevel]\par}}
+ \stopSampleText}
+ \xdef\SampleTextWidth{\the\wd\nextbox}
+ \setlayer[#2]{\box\nextbox}%
+ \egroup}
+
+%D Since we are no longer swapping windows, we end up with a
+%D much simplier \type {\Stopidea} macro. We don't reset
+%D samples at the inner level.
+
+\def\StartIdea%
+ {\bgroup
+ \let\StopSample \relax
+ \let\StopText \relax
+ \let\StopSubText\relax
+ \def\StartSample{\dostartbuffer[sample][StartSample][StopSample]}}
+
+\def\StopIdea%
+ {\startstandardmakeup
+ \DoSampleText{sample}{sample}{nextpage}
+ \SetTextWidth
+ \DoSampleText{text} {text} {nextpage}
+ \stopstandardmakeup
+ \egroup}
+
+%D Here we determine the width of the text window. It is
+%D derived from the width of the sample and stays the same
+%D within a sequence.
+
+\def\SetTextWidth
+ {\ifnum\TextN<1 % yes or no, may change
+ \scratchdimen=\makeupwidth
+ \advance\scratchdimen by -\SampleTextWidth
+ \advance\scratchdimen by \FrameSkip
+ \xdef\SampleWidth{\the\scratchdimen}%
+ \fi
+ \setupframedtexts
+ [SampleText]
+ [width=\SampleWidth]}
+
+%D We use the (already implemented) second alternative of
+%D the titlepage graphic. Please don't change this.
+
+\defineoverlay[joke] [\useMPgraphic{joke}{n=1}] % not to be changed !
+
+\doifnotmode{demo}{\endinput}
+
+%D The demo section. The original presentation uses proper
+%D graphics and has better spacing.
+
+\def\SomeSymbol#1#2{\definedfont[ContextNavigation at #1]\char#2}
+
+\setupcombinations[distance=\FrameOffset,inbetween=\vskip\FrameOffset]
+
+\starttext
+
+\TitlePage{Some Famous Symbols}
+
+\Topic{Symbols}
+
+\StartSample
+ \startcombination[2*2]
+ {\SomeSymbol{5cm}{1}} {}
+ {\SomeSymbol{5cm}{3}} {}
+ {\SomeSymbol{5cm}{2}} {}
+ {\SomeSymbol{5cm}{4}} {}
+ \stopcombination
+\StopSample
+
+\Topic{Previous}
+
+\StartIdea
+ \StartSample
+ \SomeSymbol{7cm}{1}
+ \StopSample
+ \StartText
+ This symbol can be used to indicate a hyperlink to a
+ previous page.
+ \StopText
+\StopIdea
+
+\StartIdea
+ \StartSubText
+ As one can expect there is also a symbol for going to
+ the next page.
+ \StopSubText
+\StopIdea
+
+\Topic{Previous}
+
+\StartIdea
+ \StartSample
+ \SomeSymbol{9cm}{2}
+ \StopSample
+ \StartText
+ This symbol is actually just a mirrored version of the
+ first symbol we showed.
+ \StopText
+\StopIdea
+
+\NoTopic
+
+\StartText
+ Is this nice or not?
+\StopText
+
+\Topic{First and Last}
+
+\StartSample
+ \SomeSymbol{11cm}{3}
+\StopSample
+
+\StartSample
+ \SomeSymbol{11cm}{4}
+\StopSample
+
+\StartIdea
+ \StartSample
+ \SomeSymbol{5cm}{3}
+ \StopSample
+ \StartText
+ A few screens back, we saw this symbol.
+ \StopText
+\StopIdea
+
+\StartIdea
+ \StartSubText
+ This symbol represents the beginning of something.
+ \StopSubText
+\StopIdea
+
+\StartIdea
+ \StartSample
+ \SomeSymbol{5cm}{4}
+ \StopSample
+ \StartSubText
+ Just like this one represents an end.
+ \StopSubText
+\StopIdea
+
+\StartIdea
+ \StartSubText
+ They look just like the symbols found on audio and
+ video players.
+ \StopSubText
+\StopIdea
+
+\Topic{Summary}
+
+\StartIdea
+ \StartSample
+ \SomeSymbol{6cm}{1}
+ \StopSample
+ \StartText
+ So we have a symbol for previous \unknown
+ \StopText
+\StopIdea
+
+\StartIdea
+ \StartSample
+ \SomeSymbol{6cm}{2}
+ \StopSample
+ \StartSubText
+ \unknown\ and one for next \unknown
+ \StopSubText
+\StopIdea
+
+\StartIdea
+ \StartSample
+ \SomeSymbol{6cm}{3}
+ \StopSample
+ \StartSubText
+ \unknown\ and yet another for first \unknown
+ \StopSubText
+\StopIdea
+
+\StartIdea
+ \StartSample
+ \SomeSymbol{6cm}{4}
+ \StopSample
+ \StartSubText
+ \unknown\ and of course for last.
+ \StopSubText
+\StopIdea
+
+\stoptext
+
diff --git a/tex/context/modules/common/s-pre-11.tex b/tex/context/modules/common/s-pre-11.tex
new file mode 100644
index 000000000..551c5ebbc
--- /dev/null
+++ b/tex/context/modules/common/s-pre-11.tex
@@ -0,0 +1,220 @@
+%D \module
+%D [ file=s-pre-11,
+%D version=1999.08.20,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 11,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [topspace=0cm,
+ backspace=0cm,
+ header=0pt,
+ footer=0pt,
+ width=middle,
+ height=middle]
+
+\setupbodyfont
+ [14.4pt,lbr]
+
+\setupcolors
+ [state=start]
+
+\setupinteraction
+ [click=no,
+ display=new,
+ state=start]
+
+\setupinteractionscreen
+ [option=max]
+
+\def\SomeShape%
+ {\resetMPdrawing
+ \startMPdrawing
+ path p[], q[] ; pair a, b ;
+ StartPage ;
+ \stopMPdrawing
+ \dorecurse{\CurrentTopic}
+ {\startMPdrawing
+ initialize_box(\MPpos{topic-\realfolio-\recurselevel}) ;
+ p[\recurselevel] := tensecircle (wxy,hxy,.25cm) shifted cxy ;
+ fill p[\recurselevel] withcolor .9white ;
+ pickup pencircle scaled .25cm ;
+ \ifnum\recurselevel=\CurrentTopic\space
+ draw p[\recurselevel] withcolor \MPcolor{ShowColor} ;
+ \else
+ draw p[\recurselevel] withcolor \MPcolor{DoneColor} ;
+ \fi
+ \stopMPdrawing}%
+ \dorecurse{\CurrentMaxItem}
+ {\startMPdrawing
+ initialize_box(\MPpos{item-\realfolio-\recurselevel}) ;
+ linewidth := .25cm ;
+ q[\recurselevel] := tensecircle (wxy,hxy,linewidth) shifted cxy ;
+ fill q[\recurselevel] withcolor .9white ;
+ pickup pencircle scaled linewidth ;
+ \ifnum\recurselevel=\CurrentMaxItem\space
+ draw q[\recurselevel] withcolor \MPcolor{ShowColor} ;
+ \else
+ draw q[\recurselevel] withcolor \MPcolor{DoneColor} ;
+ \fi
+ \stopMPdrawing}%
+ \dostepwiserecurse{2}{\CurrentTopic}{1}
+ {\startMPdrawing
+ draw
+ rt point 3 of p[\recurselevel-1] --
+ lft point 7 of p[\recurselevel]
+ withcolor \MPcolor{ArrowColor} ;
+ \stopMPdrawing}%
+ \dostepwiserecurse{2}{\CurrentMaxItem}{1}
+ {\startMPdrawing
+ draw
+ bot point 9 of q[\recurselevel-1] --
+ top point 5 of q[\recurselevel]
+ withcolor \MPcolor{ArrowColor} ;
+ \stopMPdrawing}%
+ \startMPdrawing
+ draw Page
+ withpen pencircle scaled .5cm
+ withcolor \MPcolor{EdgeColor} ;
+ StopPage ;
+ \stopMPdrawing
+ \MPdrawingdonetrue
+ \getMPdrawing}
+
+\def\TitlePage#1%
+ {\startstandardmakeup
+ \setupalign[middle]
+ \def\\{\vfil\bfb\setupinterlinespace}
+ \bfd\setupinterlinespace
+ \vfil#1\vfil\vfil
+ \stopstandardmakeup}
+
+\definecolor[PageColor][r=.5,g=.4,b=.3]
+\definecolor[LineColor][r=.7,g=.6,b=.5]
+
+\definecolor[PageColor] [s=.60]
+\definecolor[ShowColor] [r=.40]
+\definecolor[EdgeColor] [g=.40]
+\definecolor[DoneColor] [r=.40,g=.40]
+\definecolor[ArrowColor] [b=.40]
+\definecolor[LineColor] [r=.60,g=.60]
+\definecolor[GotoColor] [ArrowColor]
+
+\setupinteraction[color=GotoColor,contrastcolor=GotoColor]
+
+\defineoverlay [shape] [\SomeShape]
+\defineoverlay [next] [\overlaybutton{forward}] % [{nextpage}]
+
+\setupbackgrounds
+ [page]
+ [background={color,next,shape},
+ backgroundcolor=PageColor]
+
+\doglobal\newcounter\CurrentMaxItem
+\doglobal\newcounter\CurrentItem
+\doglobal\newcounter\CurrentTopic
+
+\def\StartIdea%
+ {\doglobal\newcounter\CurrentItem}
+
+\def\StartTopic%
+ {\doglobal\increment\CurrentTopic
+ \dostartbuffer[topic-\CurrentTopic][StartTopic][StopTopic]}
+
+\def\StopIdea%
+ {\dorecurse{\CurrentItem}
+ {\let\CurrentMaxItem\recurselevel
+ \doStopIdea}}
+
+\def\doStopIdea%
+ {\startstandardmakeup
+ \dontcomplain
+ \vskip.875cm
+ \hbox to \makeupwidth
+ {\hfill
+ \dorecurse{\CurrentTopic}
+ {\edef\Topic{topic-\realfolio-\recurselevel}%
+ \hpos
+ {\Topic}
+ {\framed
+ [frame=off,align=middle,offset=.25cm]
+ {\getbuffer[topic-\recurselevel]}}%
+ \ifnum\recurselevel<\CurrentTopic
+ \hskip.875cm
+ \fi}%
+ \hfill}
+ \vskip.875cm
+ \vfilll
+ \dorecurse{\CurrentMaxItem}
+ {\edef\Item{item-\realfolio-\recurselevel}
+ \hbox to \makeupwidth
+ {\hfill
+ \hpos
+ {\Item}
+ {\framed
+ [width=.75\makeupwidth,
+ frame=off,
+ align=middle,offset=.125cm]
+ {\getbuffer[item-\recurselevel]}}%
+ \hfill}
+ \vskip.875cm}
+ \vfilll
+ \stopstandardmakeup}
+
+\def\StartItem%
+ {\doglobal\increment\CurrentItem
+ \dostartbuffer[item-\CurrentItem][StartItem][StopItem]}
+
+\lefthyphenmin =\maxdimen
+\righthyphenmin=\maxdimen
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+
+\StartIdea
+ \StartTopic
+ A Nice Idea
+ \StopTopic
+ \StartItem
+ \input reich \relax
+ \StopItem
+ \StartItem
+ \input reich \relax
+ \StopItem
+ \StartItem
+ \input reich \relax
+ \StopItem
+\StopIdea
+
+\StartIdea
+ \StartTopic
+ One More Nice Idea
+ \StopTopic
+ \StartItem
+ \input reich \relax
+ \StopItem
+ \StartItem
+ \input reich \relax
+ \StopItem
+\StopIdea
+
+\StartIdea
+ \StartTopic
+ The Last Idea
+ \StopTopic
+ \StartItem
+ \input tufte \relax
+ \StopItem
+\StopIdea
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-12.tex b/tex/context/modules/common/s-pre-12.tex
new file mode 100644
index 000000000..23418fbba
--- /dev/null
+++ b/tex/context/modules/common/s-pre-12.tex
@@ -0,0 +1,226 @@
+%D \module
+%D [ file=s-pre-12,
+%D version=1999.08.20,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 12,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [topspace=0cm,
+ backspace=0cm,
+ header=0pt,
+ footer=0pt,
+ width=middle,
+ height=middle]
+
+\setupbodyfont
+ [14.4pt,lbr]
+
+\setupcolors
+ [state=start]
+
+\setupinteraction
+ [click=no,
+ display=new,
+ state=start]
+
+\setupinteractionscreen
+ [option=max]
+
+\def\SomeShape%
+ {\resetMPdrawing
+ \startMPdrawing
+ path p ; pair a, b ;
+ ahlength := .375cm ;
+ StartPage ;
+ draw Page %unitsquare
+ %xscaled PaperWidth yscaled PaperHeight
+ withpen pencircle scaled .5cm
+ withcolor \MPcolor{EdgeColor} ;
+ \stopMPdrawing
+ \dorecurse{\CurrentTopic}
+ {\startMPdrawing
+ initialize_box(\MPpos{topic-\realfolio-\recurselevel}) ;
+ p := tensecircle (wxy,hxy,.25cm) shifted cxy ;
+ fill p withcolor .9white ;
+ pickup pencircle scaled .25cm ;
+ \ifnum\recurselevel=\CurrentTopic
+ draw p withcolor \MPcolor{ShowColor} ;
+ a := bot point 7 of p ;
+ \else
+ draw p withcolor \MPcolor{DoneColor} ;
+ \fi
+ \stopMPdrawing}
+ \dorecurse{\CurrentMaxItem}
+ {\startMPdrawing
+ initialize_box(\MPpos{item-\realfolio-\recurselevel}) ;
+ linewidth := .25cm ;
+ p := tensecircle (wxy,hxy,linewidth) shifted cxy ;
+ fill p withcolor .9white ;
+ pickup pencircle scaled linewidth ;
+ b := rt point 3 of p ;
+ \ifnum\recurselevel=\CurrentMaxItem
+ draw p withcolor \MPcolor{ShowColor} ;
+ \else
+ draw p withcolor \MPcolor{DoneColor} ;
+ \fi
+ dxab := xpart a-xpart b ;
+ dyab := ypart a-ypart b ;
+ sign := if dyab>0 : - fi 1 ;
+ drawarrow
+ a --
+ a shifted (+2linewidth-dxab/2,0) {left} ..
+ if abs(dyab)>4linewidth :
+ a shifted (-dxab/2,+sign*2linewidth) --
+ b shifted (+dxab/2,-sign*2linewidth) ..
+ fi
+ {left} b shifted (-2linewidth+dxab/2,0) --
+ b
+ withcolor \MPcolor{ArrowColor} ;
+ \stopMPdrawing}%
+ \startMPdrawing
+ StopPage ;
+ \stopMPdrawing
+ \MPdrawingdonetrue
+ \getMPdrawing}
+
+\definecolor[PageColor][r=.5,g=.4,b=.3]
+\definecolor[LineColor][r=.7,g=.6,b=.5]
+
+\definecolor[PageColor] [s=.60]
+\definecolor[ShowColor] [r=.40]
+\definecolor[EdgeColor] [g=.40]
+\definecolor[DoneColor] [r=.40,g=.40]
+\definecolor[ArrowColor] [b=.40]
+\definecolor[LineColor] [r=.60,g=.60]
+\definecolor[GotoColor] [ArrowColor]
+
+\setupinteraction[color=GotoColor,contrastcolor=GotoColor]
+
+\defineoverlay [shape] [\SomeShape]
+\defineoverlay [next] [\overlaybutton{forward}]
+
+\setupbackgrounds
+ [page]
+ [background={color,next,shape},
+ backgroundcolor=PageColor]
+
+\doglobal\newcounter\CurrentItem
+\doglobal\newcounter\CurrentTopic
+\doglobal\newcounter\CurrentMaxItem
+
+\def\StartIdea%
+ {\doglobal\newcounter\CurrentItem}
+
+\def\StartTopic%
+ {\doglobal\increment\CurrentTopic
+ \dostartbuffer[topic-\CurrentTopic][StartTopic][StopTopic]}
+
+\def\StopIdea%
+ {\dorecurse{\CurrentItem}
+ {\let\CurrentMaxItem\recurselevel
+ \doStopIdea}}
+
+\def\IdeaWidth {.6\makeupwidth} % .5
+\def\TopicWidth{.2\makeupwidth} % .3
+
+\def\doStopIdea%
+ {\startstandardmakeup
+ \dontcomplain
+ \vbox to \makeupheight
+ {\vskip.75cm \relax % \vfill
+ \dorecurse{\CurrentMaxItem}
+ {\edef\Item{item-\realfolio-\recurselevel}
+ \hbox to \makeupwidth
+ {\hskip.75cm
+ \hpos
+ {\Item}
+ {\framed
+ [width=\IdeaWidth,frame=off,
+ align=middle,offset=.125cm]
+ {\getbuffer[item-\recurselevel]}}}
+ \vskip.875cm}
+ \vfill}
+ \vskip-\makeupheight
+ \vbox to \makeupheight
+ {\vskip.75cm \relax
+ \dorecurse{\CurrentTopic}
+ {\edef\Topic{topic-\realfolio-\recurselevel}
+ \hbox to \makeupwidth
+ {\hfill
+ \hpos
+ {\Topic}
+ {\framed
+ [width=\TopicWidth,frame=off,
+ align=middle,offset=.25cm]
+ {\getbuffer[topic-\recurselevel]}}%
+ \hskip.75cm}
+ \vskip.875cm}
+ \vfill}
+ \stopstandardmakeup}
+
+\def\StartItem%
+ {\doglobal\increment\CurrentItem
+ \dostartbuffer[item-\CurrentItem][StartItem][StopItem]}
+
+\lefthyphenmin =\maxdimen
+\righthyphenmin=\maxdimen
+
+\def\TitlePage#1%
+ {\startstandardmakeup
+ \setupalign[middle]
+ \def\\{\vfil\bfb\setupinterlinespace}
+ \bfd\setupinterlinespace
+ \vfil#1\vfil\vfil
+ \stopstandardmakeup}
+
+\endinput
+
+% \starttext
+%
+% \StartIdea
+% \StartTopic
+% What a topic
+% \StopTopic
+% \StartItem
+% \input reich \relax
+% \StopItem
+% \StartItem
+% \input reich \relax
+% \StopItem
+% \StartItem
+% \input reich \relax
+% \StopItem
+% \StopIdea
+%
+% \StartIdea
+% \StartTopic
+% One More Nice Idea
+% \StopTopic
+% \StartItem
+% \input reich \relax
+% \StopItem
+% \StartItem
+% \input reich \relax
+% \StopItem
+% \StopIdea
+%
+% \StartIdea
+% \StartTopic
+% The Last Idea
+% \StopTopic
+% \StartItem
+% \input tufte \relax
+% \StopItem
+% \StopIdea
+%
+% \stoptext
diff --git a/tex/context/modules/common/s-pre-13.tex b/tex/context/modules/common/s-pre-13.tex
new file mode 100644
index 000000000..7b4daa4b3
--- /dev/null
+++ b/tex/context/modules/common/s-pre-13.tex
@@ -0,0 +1,302 @@
+%D \module
+%D [ file=s-pre-13,
+%D version=1999.08.20,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 13,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is again one of the \EUROTEX\ 99 styles. It's one of
+%D the quick and dirty styles supporting basic structuring.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [width=middle,
+ height=middle,
+ header=0pt,
+ footer=0pt,
+ bottomdistance=.5cm,
+ bottom=1cm,
+ topspace=2cm,
+ backspace=2cm]
+
+%D This style is meant to be used with lucida handwriting
+%D fonts. If you don't have that font, you may reconsider
+%D using this style.
+
+\startmode[asintended] \setupbodyfont[lbr,hw] \stopmode
+
+%D These colors will mostly be used in the graphics drawn by
+%D \METAPOST.
+
+\setupcolors
+ [state=start]
+
+\definecolor[PageColor] [s=.6]
+\definecolor[TextColor] [s=.8]
+\definecolor[LineColor] [g=.4]
+\definecolor[SymbolColor][r=.4]
+
+%D When interacting, we will use button shaped that are
+%D quite random and thereby regenerated for each instance.
+
+\setupinteractionscreen
+ [option=max]
+
+\setupinteractionmenu
+ [bottom]
+ [state=start,
+ height=1cm,
+ middle=\hskip1cm]
+
+\setupinteraction
+ [state=start,
+ menu=on,
+ display=new,
+ click=no,
+ color=SymbolColor,
+ contrastcolor=SymbolColor]
+
+\startinteractionmenu[bottom]
+ \hfill
+ \got [previouspage] \symbol[prevmark] \\
+ \got [nextpage] \symbol[nextmark] \\
+ \got [CloseDocument] \symbol[stopmark] \\
+ \txt \tfd \SymbolColor \pagenumber \\
+\stopinteractionmenu
+
+%D When not processed at runtime, the itemmark graphics can
+%D result in processing loops due to funny dimensions.
+%D Therefore, from now on, the itemize macros limit the height
+%D and depth.
+
+\definesymbol[itemmark][\useMPgraphic{itemmark}]
+\definesymbol[stopmark][\useMPgraphic{stopmark}]
+\definesymbol[nextmark][\useMPgraphic{nextmark}]
+\definesymbol[prevmark][\useMPgraphic{prevmark}]
+
+%D Of course we have some backgrounds.
+
+\defineoverlay [page] [\useMPgraphic{page}]
+\defineoverlay [next] [\overlaybutton{forward}]
+\defineoverlay [prev] [\overlaybutton{PreviousJump}]
+
+\setupbackgrounds
+ [page]
+ [background={page,prev}]
+
+\setupbackgrounds
+ [text]
+ [background=next]
+
+\setuphead
+ [chapter]
+ [alternative=middle,
+ number=no,
+ color=SymbolColor,
+ style=\tfc]
+
+%D A little bit of tweaking.
+
+\setupwhitespace
+ [big]
+
+\setupitemize
+ [1]
+ [symbol=itemmark,
+ width=3\bodyfontsize]
+
+\def\StartTitlePage%
+ {\setupinteractionmenu[bottom][state=stop] % will be named page block
+ \startstandardmakeup
+ \setupalign[middle]
+ \def\\%
+ {\stopcolor
+ \vfil
+ \bfb\setupinterlinespace
+ \startcolor[black]}
+ \bfd\setupinterlinespace
+ \vfil
+ \startcolor[SymbolColor]}
+
+\def\StopTitlePage
+ {\stopcolor
+ \vfil\vfil
+ \stopstandardmakeup
+ \setupinteractionmenu[bottom][state=start]}
+
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+\definehead[Topic][chapter]
+\definehead[Nopic][title]
+
+\setuplist
+ [Topic]
+ [criterium=all,
+ alternative=g,
+ interaction=all,
+ after=\blank]
+
+\def\Topics#1%
+ {\Nopic{#1}
+ \bgroup
+ \setupinteraction
+ [color=,
+ contrastcolor=]
+ \determinelistcharacteristics[Topic]
+ \ifnum\utilitylistlength>12
+ \startcolumns[n=2]
+ \placelist[Topic]
+ \stopcolumns
+ \else
+ \placelist[Topic]
+ \fi
+ \egroup}
+
+%D We don't support another level of structuring.
+
+\let\Subject \Topic
+\let\Subjects\relax
+
+%D Most of this style is \METAPOST\ definitions. We could
+%D have shared some code, but it would not on forehand make
+%D things more readable, so we stick to the following
+%D definitions.
+
+\startuseMPgraphic{page}
+
+ width := \overlaywidth ;
+ height := \overlayheight ;
+
+ d := 15 ; dd := d ; dd := 10 ;
+
+ def fuzzy (expr p,dx,dy) =
+ (xpart p +dx-uniformdeviate dx,ypart p+dy-uniformdeviate dy)
+ enddef ;
+
+ pair ll, lr, ur, ul ;
+
+ ll := (d,d) ;
+ lr := (width-d,d) ;
+ ur := (width-d,height-d) ;
+ ul := (d,height-d) ;
+
+ path p, q, r, s ;
+
+ p := ll.. for i=.1 step .1 until .9 : fuzzy (i[ll,lr],0,+dd).. endfor lr ;
+ q := lr.. for i=.1 step .1 until .9 : fuzzy (i[lr,ur],-dd,0).. endfor ur ;
+ r := ur.. for i=.1 step .1 until .9 : fuzzy (i[ur,ul],0,-dd).. endfor ul ;
+ s := ul.. for i=.1 step .1 until .9 : fuzzy (i[ul,ll],+dd,0).. endfor ll ;
+
+ fill unitsquare xscaled width yscaled height withcolor \MPcolor{PageColor} ;
+
+ fill p & q & r & s -- cycle withcolor \MPcolor{TextColor} ;
+
+ color c ; c := \MPcolor{LineColor} ;
+
+ draw p withpen pencircle xscaled 20 yscaled 5 rotated 30 withcolor c ;
+ draw q withpen pencircle xscaled 5 yscaled 20 rotated 30 withcolor c ;
+ draw r withpen pencircle xscaled 20 yscaled 5 rotated 30 withcolor c ;
+ draw s withpen pencircle xscaled 5 yscaled 20 rotated 30 withcolor c ;
+
+\stopuseMPgraphic
+
+\startuseMPgraphic{itemmark}
+ width := BodyFontSize ; height := width/4 ;
+ maxheight := StrutHeight ; line := 3width/2 ;
+
+ def fuzzy = -(height/4)+uniformdeviate (height/2) enddef ;
+
+ draw
+ ((0,0+fuzzy)--(width,height+fuzzy/2))
+ shifted (line/2,0)
+ withpen pencircle
+ xscaled line yscaled (line/4)
+ rotated (25+uniformdeviate 10) withcolor \MPcolor{SymbolColor} ;
+
+ setbounds currentpicture to unitsquare xyscaled(width,maxheight) ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{nextmark}
+ LoadPageState ; width := BottomHeight ; height := line := width/2 ;
+
+ def fuzzy = -(height/8)+uniformdeviate (height/4) enddef ;
+
+ z1 = (0,0+fuzzy) ; z2 = (width,height/2+fuzzy/2) ; z3 = (0,height+fuzzy) ;
+
+ draw
+ (z1..{right}z2 & z2{left}..z3)
+ withpen pencircle
+ xscaled line yscaled (line/4)
+ rotated 30 withcolor \MPcolor{SymbolColor} ;
+
+ setbounds currentpicture to unitsquare xyscaled(width,height) ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{prevmark}
+ LoadPageState ; width := BottomHeight ; height := line := width/2 ;
+
+ def fuzzy = -(height/8)+uniformdeviate (height/4) enddef ;
+
+ z1 = (width,0+fuzzy) ; z2 = (0,height/2+fuzzy/2) ; z3 = (width,height+fuzzy) ;
+
+ draw
+ (z1..{left}z2 & z2{right}..z3)
+ withpen pencircle
+ xscaled line yscaled (line/4)
+ rotated 30 withcolor \MPcolor{SymbolColor} ;
+
+ setbounds currentpicture to unitsquare xyscaled(width,height) ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{stopmark}
+ LoadPageState ; width := BottomHeight ; height := line := width/2 ;
+
+ def fuzzy = -(height/8)+uniformdeviate (height/4) enddef ;
+
+ z1 = (0,0+fuzzy) ;
+ z2 = (width,height+fuzzy) ;
+ z3 = (width,0+fuzzy) ;
+ z4 = (0,height+fuzzy) ;
+ z5 = (width/2,height/2) ;
+
+ drawoptions
+ (withpen pencircle
+ xscaled line yscaled (line/4)
+ rotated 30 withcolor \MPcolor{SymbolColor}) ;
+
+ draw z1..{right}z5..z2 ; draw z3..{left}z5..z4 ;
+
+ setbounds currentpicture to unitsquare xyscaled(width,height) ;
+\stopuseMPgraphic
+
+\doifnotmode{demo}{\endinput}
+
+%D The (rather silly) demo section.
+
+\starttext
+
+\TitlePage{Title Page\\pre-writing}
+
+\Topics{Some Nice Quotes}
+
+\Topic{A Few}
+
+\Subject{Knuth} \input knuth
+\Subject{Tufte} \input tufte
+
+\Topic{Some More}
+
+\Subject{Zapf} \input zapf
+\Subject{Bryson} \input bryson
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-14.tex b/tex/context/modules/common/s-pre-14.tex
new file mode 100644
index 000000000..4dae6c009
--- /dev/null
+++ b/tex/context/modules/common/s-pre-14.tex
@@ -0,0 +1,263 @@
+%D \module
+%D [ file=s-pre-14,
+%D version=1999.08.20,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 14,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D In the process of making a couple of simple styles for
+%D \EUROTEX\ 99, I came to this one. The joke is in the
+%D pagenumber. This style can be used for short presentations
+%D with much text.
+
+\startmode[asintended] \setupbodyfont[lbr] \stopmode
+
+\setupbodyfont[14.4pt]
+
+%D Since we expect text, we can best be very tolerant.
+
+\setuptolerance
+ [verytolerant,stretch]
+
+%D As most styles we choose a large screen page size.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [width=fit,
+ rightedge=3cm,
+ margin=0pt,
+ rightedgedistance=2cm,
+ height=middle,
+ header=0pt,
+ footer=0pt,
+ topspace=1cm,
+ backspace=1cm]
+
+%D We only use two colors, named \type {One} and \type
+%D {Two}:
+
+\setupcolors
+ [state=start]
+
+\definecolor [One] [r=.6,g=.4,b=.4]
+\definecolor [Two] [r=.4,g=.6,b=.6]
+
+%D If you've looked at the demo file, you will have noticed
+%D that the background consists of four pieces: two filled
+%D rectangles and two half numbers. These are put on th epage
+%D using four overlays:
+
+\setupbackgrounds
+ [page]
+ [background={one,two,three,four}]
+
+%D When we code this in \TEX, we get the following
+%D definitions. As an alternative we coudl have used layers
+%D but I'm afraid that it would not have led to less code.
+
+\defineoverlay
+ [one]
+ [{\framed
+ [frame=off,background=color,backgroundcolor=Two,
+ width=\overlaywidth,height=\overlayheight]
+ {}}]
+
+\defineoverlay
+ [three]
+ [{\hbox to \overlaywidth
+ {\hfill\SetOverlayWidth
+ \framed
+ [frame=off,background=color,backgroundcolor=One,
+ width=\overlaywidth,height=\overlayheight]
+ {}}}]
+
+%D We could have used the main backgroundcolor instead of
+%D overlay \type {one}.
+
+\definefont[NumberFont][RegularBold at 3cm]
+
+\defineoverlay
+ [two]
+ [{\framed
+ [frame=off,width=\overlaywidth,height=\overlayheight,
+ offset=overlay]
+ {\vfill
+ \NumberFont\setstrut\SetOverlayWidth
+ \hbox to \hsize
+ {\hfill
+ \setupinteraction[style=,color=]%
+ \setbox0=\hbox{\strut\One\pagenumber}%
+ \hbox to 0pt{\hss\gotobox{\box0}[previouspage]\hss}%
+ \hskip\overlaywidth}}}]
+
+\defineoverlay
+ [four]
+ [{\framed
+ [frame=off,width=\overlaywidth,height=\overlayheight,offset=overlay]
+ {\vfill
+ \hbox to \hsize
+ {\hfill
+ \SetOverlayWidth
+ \framed
+ [frame=off,width=\overlaywidth,height=\overlayheight,offset=overlay]
+ {\vfill\NumberFont\setstrut
+ \setbox0=\hbox{\strut\Two\pagenumber}%
+ \setbox2=\hbox{\clip[nx=2,ny=1,x=2,y=1]{\copy0}}%
+ \dp2=\dp0
+ \hbox to \hsize{\hbox to 0pt{\hss\hskip.5\wd0\box2\hss}\hfill}}}}}]
+
+\def\SetOverlayWidth%
+ {\scratchdimen = \rightedgedistance
+ \divide\scratchdimen by 2
+ \advance\scratchdimen by \rightedgewidth
+ \advance\scratchdimen by \backspace
+ \edef\overlaywidth{\the\scratchdimen}}
+
+%D A much cleaner implementation is the following. If you hate
+%D \METAPOST, you can run this style in the specified mode:
+
+\startnotmode[no-metapost]
+
+\setupbackgrounds
+ [page]
+ [background={number}]
+
+\defineoverlay[number][\useMPgraphic{number}]
+
+\startuseMPgraphic{number}
+ StartPage ;
+ path Vage ; picture Left, Right ;
+ x1 = x2 = xpart (llcorner Field[Text][RightEdge] shifted (-RightEdgeDistance/2,0)) ;
+ y1 = ypart llcorner Page ;
+ y2 = ypart ulcorner Page ;
+ Vage := llcorner Page -- z1 -- z2 -- ulcorner Page -- cycle ;
+ fill Page withcolor \MPcolor {One} ;
+ fill Vage withcolor \MPcolor {Two} ;
+ if PageNumber>0 :
+ defaultfont := "\truefontname{RegularBold}" ;
+ Left := Right := thelabel("\folio",origin) ysized 3cm ;
+ clip Right to boundingbox Right shifted (bbwidth(Right)/2,0) ;
+ draw Left shifted z1 shifted (0,2.25cm) withcolor \MPcolor {One} ;
+ draw Right shifted z1 shifted (0,2.25cm) withcolor \MPcolor {Two} ;
+ fi ;
+ StopPage ;
+\stopuseMPgraphic
+
+\stopnotmode
+
+%D We use the simple label typesetting present in \METAPOST\
+%D because digits are seldom kerned so real \TEX ing is not
+%D needed. As in the previous method, we let the graphics
+%D overlap so that we don't get white lines due to rounding
+%D problems in viewers.
+%D
+%D We put a button behind the text (this overlay is calculated
+%D each page).
+
+\defineoverlay
+ [nextpage]
+ [\overlaybutton{nextpage}]
+
+\setupbackgrounds
+ [text]
+ [backgroundoffset=.5cm,
+ background=nextpage]
+
+%D We still have to turn on interaction mode.
+
+\setupinteraction
+ [state=start,
+ display=new,
+ menu=on]
+
+\setupinteraction
+ [color=,
+ contrastcolor=]
+
+%D Next we define structuring commands.
+
+\definehead[Topic] [chapter] \setuphead[Topic] [style=\bfc]
+\definehead[Subject][section] \setuphead[Subject][style=\bfa]
+
+\setuphead
+ [Topic, Subject]
+ [number=no,
+ after={\blank[big]}]
+
+%D Because we will provide a menu, we don't offer lists.
+
+\let\Topics \gobbleoneargument
+\let\Subjects\relax
+
+%D The table of contents goes to the right edge.
+
+\startinteractionmenu[right]
+ \setupinteraction
+ [color=black,
+ contrastcolor=Two]
+ \placelist
+ [Topic]
+ [alternative=e,
+ frame=off,
+ criterium=all]
+ \vfill
+\stopinteractionmenu
+
+\setuplist
+ [Topic]
+ [width=\rightedgewidth,
+ maxwidth=\rightedgewidth,
+ style=\bfa]
+
+%D We safe some space:
+
+\setupwhitespace
+ [medium]
+
+\setupblank
+ [medium]
+
+%D In the titlepage, we still use the \TEX\ overlays,
+%D so that we don't have to define a second graphic.
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+\def\StartTitlePage%
+ {\bgroup
+ \setupbackgrounds[page][background={one,three}]
+ \startstandardmakeup
+ \setupalign[middle]
+ \def\\{\vfil\bfb\setupinterlinespace}
+ \bfd\setupinterlinespace
+ \vfil}
+
+\def\StopTitlePage%
+ {\vfil\vfil\vfil
+ \stopstandardmakeup
+ \egroup}
+
+%D This is it.
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+
+\TitlePage{Some Quotes\\(that you probably know by now)}
+
+\Topic{Tufte} \input tufte
+\Topic{Knuth} \input knuth
+\Topic{Reich} \input reich
+\Topic{Zapf} \input zapf
+\Topic{Materie} \input materie
+%Topic{Stork} \input stork
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-15.tex b/tex/context/modules/common/s-pre-15.tex
new file mode 100644
index 000000000..25fb35783
--- /dev/null
+++ b/tex/context/modules/common/s-pre-15.tex
@@ -0,0 +1,186 @@
+%D \module
+%D [ file=s-pre-15,
+%D version=1999.09.01,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 15,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is one of the styles I made for the presentation on
+%D the \NTS\ project at Euro\TeX\ 1998. You need balls to let
+%D \TEX\ typeset graphics, but this style demonstrates that it
+%D can be done.
+%D
+%D This presentation is meant for presentations that build up
+%D an idea stepwise.
+%D
+%D \starttyping
+%D \TitlePage{Do you know \TEX ?}
+%D
+%D \StartIdea
+%D \StartItem We use \TEX\ for typesetting \unknown \StopItem
+%D \StartItem mathematical text \unknown \StopItem
+%D \StartItem but also for text that has no math \unknown \StopItem
+%D \StartItem or presentations like this \unknown \StopItem
+%D \StartItem and whatever you can come up with! \StopItem
+%D \StopIdea
+%D \stoptyping
+
+%D The basic layout is rather simple and used as much of the
+%D screen as possible.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [backspace=25pt,
+ topspace=25pt,
+ width=middle,
+ height=middle,
+ header=0pt,
+ footer=0pt]
+
+\setupinteraction
+ [state=start,
+ display=new,
+ color=LineColor,
+ contrastcolor=LineColor,
+ click=no]
+
+\setupinteractionscreen
+ [option=max]
+
+\startmode[asintended] \setupbodyfont[lbr] \stopmode
+
+\setupbodyfont[14.4pt]
+
+%D We use a lot of color. You can remap them if you want
+%D differend ones. The ideas circulate over the colors.
+
+\setupcolors
+ [state=start]
+
+\definecolor[TextColor][s=.8]
+\definecolor[PageColor][s=.6]
+\definecolor[LineColor][s=.4]
+
+\definecolor[red] [r=.4] \definecolor[cyan] [g=.4,b=.4]
+\definecolor[green][g=.4] \definecolor[magenta][r=.4,b=.4]
+\definecolor[blue] [b=.4] \definecolor[yellow] [r=.4,g=.4]
+
+\definecolor[linecolor 1][red] \definecolor[linecolor 5][cyan]
+\definecolor[linecolor 2][green] \definecolor[linecolor 6][magenta]
+\definecolor[linecolor 3][blue] \definecolor[linecolor 4][yellow]
+
+%D We use variables to make sure that the graphics are reused
+%D but unique.
+
+\setupMPvariables[pageframe][pagecolor=PageColor,linecolor=LineColor]
+\setupMPvariables[textframe][textcolor=TextColor,linecolor=LineColor]
+
+\setupbackgrounds
+ [page]
+ [background={pageframe,nextpage}]
+
+\defineoverlay [pageframe] [\uniqueMPgraphic{pageframe}]
+\defineoverlay [textframe] [\uniqueMPgraphic{textframe}]
+\defineoverlay [nextpage] [\overlaybutton{forward}]
+
+\startuniqueMPgraphic{pageframe}{pagecolor,linecolor}
+ path p ; p := fullsquare xyscaled (\overlaywidth,\overlayheight) ;
+ pickup pencircle scaled 10pt ;
+ fill p withcolor \MPvar{pagecolor} ;
+ draw p withcolor \MPvar{linecolor} ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{textframe}{textcolor,linecolor}
+ path p ; p := fullcircle xyscaled (\overlaywidth,\overlayheight) ;
+ pickup pencircle scaled 10pt ;
+ fill p withcolor \MPvar{textcolor} ;
+ draw p withcolor \MPvar{linecolor} ;
+\stopuniqueMPgraphic
+
+%D The rest of the file implements the nasty part: typesetting
+%D text embedded in a graphic. The text is collected in a box
+%D so that we can reuse it.
+
+\newbox\CollectedIdeas
+\newcounter\CurrentTopic
+
+\def\StartItem%
+ {\setbox\CollectedIdeas=\hbox\bgroup
+ \ifdim\wd\CollectedIdeas>0pt \unhbox\CollectedIdeas\hskip25pt \fi
+ \setbox\scratchbox=\hbox\bgroup
+ \framed
+ [width=160pt,height=160pt,align=middle,frame=off,
+ background=textframe,offset=15pt,top=\vfill,bottom=\vfill]
+ \bgroup}
+
+\def\StopItem%
+ {\egroup
+ \egroup
+ \setbox\scratchbox=\hbox{\lower.5\ht\scratchbox\box\scratchbox}%
+ \ht\scratchbox=.5\ht\scratchbox
+ \dp\scratchbox= \ht\scratchbox
+ \box\scratchbox
+ \egroup
+ \startstandardmakeup
+ \dontcomplain
+ \leftskip 0pt plus 50pt
+ \rightskip 0pt plus 50pt
+ \parfillskip 0pt
+ \baselineskip 100pt
+ \unhcopy\CollectedIdeas
+ \stopstandardmakeup}
+
+\def\StartIdea%
+ {\ifnum\CurrentTopic=6 \doglobal\newcounter\CurrentTopic \fi
+ \doglobal\increment\CurrentTopic
+ \definecolor[LineColor][linecolor \CurrentTopic]
+ \setbox\CollectedIdeas=\null}
+
+\def\StopIdea%
+ {}
+
+\def\StartTitlePage%
+ {\startstandardmakeup
+ \setupalign[middle]
+ \def\\{\vfil\bfb\setupinterlinespace}
+ \bfd\setupinterlinespace
+ \vfil}
+
+\def\StopTitlePage%
+ {\vfil\vfil
+ \stopstandardmakeup}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+\doifnotmode{demo}{\endinput}
+
+%D A simple test on functionality.
+
+\setupoutput[pdftex]
+
+\starttext
+
+\TitlePage{Do you know \TEX ?}
+
+\startbuffer
+\StartIdea
+ \StartItem We use \TEX\ for typesetting \unknown \StopItem
+ \StartItem mathematical text \unknown \StopItem
+ \StartItem but also for text that has no math \unknown \StopItem
+ \StartItem or presentations like this \unknown \StopItem
+ \StartItem and whatever you can come up with! \StopItem
+\StopIdea
+\stopbuffer
+
+\dorecurse{6}{\getbuffer}
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-16.tex b/tex/context/modules/common/s-pre-16.tex
new file mode 100644
index 000000000..715936890
--- /dev/null
+++ b/tex/context/modules/common/s-pre-16.tex
@@ -0,0 +1,203 @@
+%D \module
+%D [ file=s-pre-16,
+%D version=1999.09.01,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 16,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The first version of this style was made late summer 1999,
+%D but its first usage was during a course I gave in BRNO.
+%D It's a rather simple style with a dominating background.
+
+\setuppapersize
+ [S6][S6]
+
+\setupbodyfont
+ [pos,14.4pt]
+
+\setuplayout
+ [topspace=100pt,
+ backspace=120pt,
+ header=0pt,
+ footer=0pt,
+ width=middle,
+ height=middle]
+
+\setupbackgrounds
+ [text]
+ [backgroundoffset=80pt,
+ background=GoOn]
+
+\setupbackgrounds
+ [page]
+ [background={FuzzyCircle,Again}]
+
+\setupcolors
+ [state=start]
+
+\definecolor[gray] [s=.4]
+\definecolor[white][s=.8]
+
+\definecolor[red] [r=.8] \definecolor[cyan] [g=.8,b=.8]
+\definecolor[green][g=.8] \definecolor[magenta][r=.8,b=.8]
+\definecolor[blue] [b=.8] \definecolor[yellow] [r=.8,g=.8]
+
+\definecolor[PageColor][gray]
+\definecolor[TextColor][yellow]
+\definecolor[LineColor][blue]
+
+\setupinteraction
+ [state=start,
+ color=LineColor,
+ contrastcolor=LineColor]
+
+\setupinteractionscreen
+ [option=max]
+
+\setupitemize
+ [each]
+ [color=blue,
+ symbol=FuzzyDot]
+
+\startuseMPgraphic{FuzzyCircle}
+ path p ; numeric w, h, l ;
+ w := OverlayWidth ; h := OverlayHeight ;
+ def dd = (1 randomized (1/5)) enddef ;
+ pickup pencircle xscaled 10pt yscaled 2pt rotated 30;
+ for i:=1 upto 50 :
+ p := (-dd,-dd)..(dd,-dd)..(dd,dd)..(-dd,dd)..cycle ;
+ p := p rotatedaround (center p, uniformdeviate 360) ;
+ p := p xscaled (w/2) yscaled (h/2) ;
+ l := length(p)/2 ;
+ p := p cutbefore point (uniformdeviate l) of p ;
+ p := p cutafter point (l+uniformdeviate l) of p ;
+ draw p withcolor \MPcolor{LineColor} randomized (.4,1) ;
+ endfor ;
+ picture s ; s := currentpicture xysized (w-15,h-15) ;
+ currentpicture := nullpicture ;
+ fill boundingbox s enlarged 60pt withcolor \MPcolor{PageColor} ;
+ addto currentpicture also s ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{FuzzyDot}
+ path p ; numeric w ;
+ w := BodyFontSize/2 ;
+ def dd = (w randomized (w/2)) enddef ;
+ pickup pencircle xscaled (w/2) yscaled (w/3) rotated 30 ;
+ for i=0 step 45 until 135 :
+ p := (-dd,0)--(dd,0) ;
+ p := p rotatedaround (origin,i-w+uniformdeviate w) ;
+ draw p withcolor \MPcolor{LineColor} randomized (.3,.8) ;
+ endfor ;
+\stopuseMPgraphic
+
+\defineoverlay [FuzzyCircle] [\useMPgraphic{FuzzyCircle}]
+\defineoverlay [GoOn] [{\setupinteraction[click=no]\overlaybutton{forward}}]
+\defineoverlay [Again] [\overlaybutton{firstpage}]
+
+\definesymbol
+ [FuzzyDot]
+ [\lower\dp\strutbox\hbox{\useMPgraphic{FuzzyDot}}]
+
+\def\Item%
+ {\par\noindent\symbol[FuzzyDot]\hskip.5em\nobreak}
+
+\setupitemize
+ [all]
+ [packed]
+ [symbol=FuzzyDot]
+
+\def\NextIdea%
+ {\blank[back,medium]
+ \midaligned{\symbol[FuzzyDot]}
+ \blank[medium]
+ \blank[disable]}
+
+\definehead [Topic] [chapter]
+\definehead [Nopic] [title]
+
+\setuphead
+ [Topic, Nopic]
+ [alternative=middle,
+ before=,
+ number=no,
+ style=\bfb]
+
+\setuplist
+ [Topic]
+ [alternative=g,
+ interaction=all]
+
+%D Since we want a colored text, and since color directive
+%D can spoil the spacing, we use a foregroundcolor.
+
+\setupbackgrounds
+ [text]
+ [foregroundcolor=TextColor]
+
+%D Unfortunately this does not work when on the page colors
+%D are set, so we play safe and say:
+
+\setupmakeup
+ [standard]
+ [color=TextColor]
+
+\def\StartIdea%
+ {\startstandardmakeup
+ \setupwhitespace[medium]
+ \setupblank[medium]
+ \setupalign[broad,middle]}
+
+\def\StopIdea%
+ {\stopstandardmakeup}
+
+\def\Topics#1%
+ {\Nopic{#1}
+ \startcolumns
+ \setupinteraction[color=TextColor,contrastcolor=TextColor]
+ \placelist[Topic]
+ \stopcolumns
+ \page}
+
+%D Some fakes.
+
+\def\Subject {\Topic}
+\def\Subjects {}
+
+%D A bonus (copied from \type {s-pre-02} but with a different
+%D vertical alignment.
+
+\def\StartTitlePage%
+ {\startstandardmakeup
+ \bfd\setupinterlinespace
+ \setupalign[middle]
+ \vfil
+ \let\\=\vfil}
+
+\def\StopTitlePage%
+ {\vfil
+ \stopstandardmakeup}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+
+\Topics{...}
+
+\StartIdea
+ \Topic{...}
+ ...
+ \NextIdea
+ ...
+\StopIdea
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-18.tex b/tex/context/modules/common/s-pre-18.tex
new file mode 100644
index 000000000..876eec5f1
--- /dev/null
+++ b/tex/context/modules/common/s-pre-18.tex
@@ -0,0 +1,173 @@
+%D \module
+%D [ file=s-pre-18,
+%D version=1999.08.20,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 18,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo: met pos en dan iedere titel
+
+\setuppapersize
+ [S6][S6]
+
+\setupbodyfont
+ [loc,ppl]
+
+\setupcolors
+ [state=start]
+
+\definecolor [shade-1] [s=.7]
+\definecolor [shade-2] [s=.1]
+
+\definecolor [shade-3] [s=.8]
+\definecolor [shade-4] [b=.8]
+
+\definecolor [shade-5] [g=.6]
+
+\setuplayout
+ [topspace=1cm,
+ height=fit,
+ backspace=1cm,
+ width=middle,
+ header=0pt,
+ footer=0pt,
+ bottomdistance=1cm]
+
+\setupbackgrounds
+ [state=repeat]
+
+\setupbackgrounds [page] [background=page]
+
+\defineoverlay [page] [\useMPgraphic{page}]
+\defineoverlay [text] [\useMPgraphic{text}]
+
+\startuseMPgraphic{page}
+ StartPage ;
+ path p ; numeric s ; pair cp ; cp := center Page ;
+ s := define_circular_shade(cp,cp,0,TextWidth,
+ \MPcolor{shade-1},\MPcolor{shade-2}) ;
+ fill Page withshade s ;
+ p := fullcircle xyscaled (TextWidth+1cm, TextHeight+1cm) shifted cp ;
+ s := define_circular_shade(cp,cp,0,TextWidth,\MPcolor{shade-3},
+ \MPcolor{shade-4}) ;
+ fill p withshade s ;
+ StopPage
+\stopuseMPgraphic
+
+\startuseMPgraphic{text}
+ StartPage ;
+ path p ; numeric s, t ; pair cp ; cp := center Page ;
+ s := define_circular_shade(cp,cp,0,TextWidth,
+ \MPcolor{shade-1},\MPcolor{shade-2}) ;
+ fill Page withshade s ;
+ p := llcorner Field[Text][Bottom] --
+ lrcorner Field[Text][Bottom] --
+ urcorner Field[Text][Text] --
+ ulcorner Field[Text][Text] -- cycle ;
+ p := p enlarged .5cm randomized .5cm ;
+ t := define_circular_shade(cp,cp,0,TextWidth,\MPcolor{shade-3},
+ \MPcolor{shade-4}) ;
+ fill p withshade t ;
+
+ def bottom_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) =
+ if (pp>0) and (rr>0) :
+ if nn = 1 :
+ p := (0,0)--(ww,hh/2)--(0,hh)--cycle ;
+ elseif nn = 2 :
+ p := (0,hh/2)--(ww,hh)--(ww,0)--cycle ;
+ else :
+ p := origin--cycle ;
+ fi ;
+ fill p randomized 2.5mm shifted (xx,yy) withshade s ;
+ fi ;
+ enddef ;
+
+ \MPmenubuttons{bottom}
+
+ if length \MPstring{topic} > 0 :
+ graphictext
+ \MPstring{topic}
+ scaled 3
+ shifted ulcorner Field[Text][Text]
+ shifted (0,-1.5cm)
+ withshade s ;
+ fi ;
+
+ StopPage ;
+\stopuseMPgraphic
+
+\setupinteractionmenu
+ [bottom]
+ [state=start,
+ frame=off,
+ left=\hfill,
+ middle=\hskip.5cm,
+ width=2\bottomheight,
+ position=yes]
+
+\startinteractionmenu[bottom]
+ \but [previouspage] \\
+ \but [nextpage] \\
+\stopinteractionmenu
+
+\setupinteraction
+ [state=start,
+ click=no,
+ color=shade-5,
+ contrastcolor=shade-5,
+ menu=on]
+
+\setupwhitespace
+ [big]
+
+\def\Topic#1%
+ {\page
+ \setMPtext{topic}{#1}
+ \vbox to 2cm{}}
+
+\setMPtext{topic}{}
+
+\def\StartTitlePage%
+ {\startstandardmakeup[bottomstate=none]
+ \setupalign[middle]
+ \vfill}
+
+\def\StopTitlePage%
+ {\stopstandardmakeup
+ \setuplayout[bottom=1.5cm]
+ \setupbackgrounds[page][background=text]}
+
+\def\TitleString#1#2%
+ {\indent
+ \startMPcode
+ graphictext
+ "#2"
+ scaled #1
+ withdrawcolor .4white
+ withfillcolor .7white
+ withpen pencircle scaled 2pt ;
+ \stopMPcode
+ \vfill}
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+
+\StartTitlePage
+ \TitleString{8}{Welcome}
+ \TitleString{4}{to my favourite}
+ \TitleString{8}{Quotes}
+\StopTitlePage
+
+\Topic {Douglas R. Hofstadter} \input douglas \page
+\Topic {Donald E. Knuth} \input knuth \page
+\Topic {Edward R. Tufte} \input tufte \page
+\Topic {Hermann Zapf} \input zapf \page
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-19.tex b/tex/context/modules/common/s-pre-19.tex
new file mode 100644
index 000000000..991d311ce
--- /dev/null
+++ b/tex/context/modules/common/s-pre-19.tex
@@ -0,0 +1,347 @@
+%D \module
+%D [ file=s-pre-19,
+%D version=2000.07.31,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 19,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This style is made in the process or writing the \METAFUN\
+%D manual. It exploits a few tricks, like graphics calculated
+%D using positional information. It also uses the (at that
+%D moment) new menu list placement alternative. If you forget
+%D about the definition of the button shapes, which is
+%D complicated in any system, this style is not even that hard
+%D to follow. Watch how the left side of the buttons follow
+%D the right side of the text graphic.
+%D
+%D While playing bit with this style, the random alternative
+%D made me think of those organic building with non equal
+%D windows (we have a few in The Netherlands), so I decided to
+%D label this style as \type {pre-organic}.
+%D
+%D At the end of this file, there is a small test file, so
+%D when you process this file with \TEXEXEC\ and the options
+%D \type {--mode=demo} and \type {--pdf}, you will get a demo
+%D document.
+
+%D We use one of the standard screen \quote {paper} sizes, and
+%D map it onto the same size, so that we get a nicely cropped
+%D page.
+
+\setuppapersize
+ [S6][S6]
+
+%D Like in the \METAFUN\ manual, we use the Palatino as main
+%D bodyfont. This font is quite readable on even low
+%D resolution screens, although I admit that this style is
+%D developed using an $1400\times1050$ pixel LCD screen, so I
+%D may be biased.
+
+%\startmode[asintended] \setupbodyfont[ppl] \stopmode
+
+%D The layout specification sets up a text area and a right
+%D edge area where the menus will go. Watch the rather large
+%D edge distance. By setting the header and footer dimensions
+%D to zero, we automatically get rid of page body ornaments,
+%D like the pagenumber.
+
+\setuplayout
+ [topspace=48pt,
+ backspace=48pt,
+ cutspace=12pt,
+ width=400pt,
+ margin=0cm,
+ rightedge=88pt,
+ rightedgedistance=48pt,
+ header=0cm,
+ footer=0cm,
+ height=middle]
+
+%D We use a moderate, about a line height, interparagraph
+%D white space.
+
+\setupwhitespace
+ [big]
+
+%D Of course we use colors, since on computer displays they
+%D come for free.
+
+\setupcolors
+ [state=start]
+
+\definecolor [red] [r=.75]
+\definecolor [yellow] [r=.75,g=.75]
+\definecolor [gray] [s=.50]
+\definecolor [white] [s=.85]
+
+\definecolor [PageColor] [yellow]
+\definecolor [TextColor] [white]
+\definecolor [OrnamentColor] [red]
+\definecolor [InteractionColor] [red]
+\definecolor [ContrastColor] [gray]
+
+%D This is an interactive document, so we enable interaction.
+%D In this style, we disable the viewer's \quote {highlight a
+%D hyperlink when it's clicked on} feature. We will use a
+%D menu, so we enable menus. Later we will see the contract
+%D color |<|hyperlinks gets that color when we are already on
+%D the location|>| in action.
+
+\setupinteraction
+ [state=start,
+ click=off,
+ color=InteractionColor,
+ contrastcolor=ContrastColor,
+ menu=on]
+
+%D The menu itself is set up as follows. Because we will
+%D calculate menubuttons based on their position on the page,
+%D we have to keep track of the positions. Therefore, we set
+%D the \type {position} variable to \type {yes}.
+
+\setupinteractionmenu
+ [right]
+ [frame=off,
+ position=yes,
+ align=middle,
+ topoffset=-.75cm,
+ bottomoffset=-.75cm,
+ color=gray,
+ contrastcolor=gray,
+ style=bold,
+ before=,
+ after=]
+
+%D The menu content is rather sober: a list of topics (later
+%D we will define the command that generates topic entries),
+%D and a close button.
+
+\startinteractionmenu[right]
+ \placelist[Topic][alternative=right]
+ \vfill
+ \but [CloseDocument] close \\
+\stopinteractionmenu
+
+%D We have now arived at the more interesting part of the style
+%D definition: the graphic that goes in the page background.
+%D Because this graphic will change, we define a usable
+%D \METAPOST\ graphic. Page backgrounds are recalculated each
+%D page, opposite to the other backgrounds that are calculated
+%D when a new background is defined, or when repetitive
+%D calculation is turned on.
+
+\setupbackgrounds
+ [page]
+ [background=page]
+
+\defineoverlay
+ [page]
+ [\useMPgraphic{page}]
+
+\setupMPvariables
+ [page]
+ [alternative=3]
+
+\startuseMPgraphic{page}
+
+ \includeMPgraphic{rightsuperbutton}
+
+ StartPage ;
+
+ path p, q ; pickup pencircle scaled 3pt ;
+
+ p := Field[Text][Text] enlarged 36pt superellipsed .90 ;
+
+ fill Page withcolor \MPcolor{PageColor} ;
+ fill p withcolor \MPcolor{TextColor} ;
+ draw p withcolor \MPcolor{OrnamentColor} ;
+
+ p := Field[Text][Text] enlarged 48pt superellipsed .90 ;
+
+ def right_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) =
+ if (pp>0) and (rr>0) :
+ q := rightsuperbutton(p,xx,yy,RightEdgeWidth,hh) ;
+ fill q withcolor \MPcolor{TextColor} ;
+ draw q withcolor if rr=2 : \MPcolor{ContrastColor}
+ else : \MPcolor{InteractionColor} fi ;
+ fi ;
+ enddef ;
+
+ \MPmenubuttons{right}
+
+ StopPage ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{page}
+
+ \includeMPgraphic{rightsuperbutton}
+
+ StartPage ;
+
+ numeric alternative, seed, superness, squeezeness, randomness ;
+ path p, q ; transform t ;
+
+ alternative := \MPvar{alternative} ;
+ seed := uniformdeviate 100 ;
+
+ if alternative > 10 :
+ superness := .85 + ((\realfolio-1)/\lastpage) * .15 ;
+ squeezeness := 12pt - ((\realfolio-1)/\lastpage) * 10pt ;
+ else :
+ superness := .90 ;
+ squeezeness := 12pt ;
+ fi ;
+
+ randomness := squeezeness ;
+
+ alternative := alternative mod 10 ;
+
+ t := identity if alternative=3: shifted (9pt,-9pt) fi ;
+
+ % first we draw the shape that surrounds the text
+
+ randomseed := seed ;
+
+ p := Field[Text][Text] enlarged if
+ alternative = 1 : 36pt superellipsed superness elseif
+ alternative = 2 : 36pt squeezed squeezeness elseif
+ alternative = 3 : 36pt randomized randomness else
+ : 36pt fi ;
+ pickup pencircle scaled 3pt ;
+
+ fill Page withcolor \MPcolor{PageColor} ;
+ fill p withcolor \MPcolor{TextColor} ;
+ draw p withcolor \MPcolor{OrnamentColor} ;
+
+ % we set p to the wider shape from which we will chip off pieces
+
+ randomseed := seed ;
+
+ p := ( Field[Text][Text] enlarged if
+ alternative = 1 : 48pt superellipsed superness elseif
+ alternative = 2 : 48pt squeezed squeezeness elseif
+ alternative = 3 : 36pt randomized randomness else
+ : 48pt fi ) transformed t ;
+
+ % calls to *_menu_button are generated automatically ...
+
+ vardef right_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) =
+ save q ; path q ;
+ if (pp>0) and (rr>0) :
+ q := rightsuperbutton(p,xx,yy,RightEdgeWidth,hh) ; % \MPw{menu:right:\realfolio}
+ fill q withcolor \MPcolor{TextColor} ;
+ draw q withcolor if rr=2 : \MPcolor{ContrastColor}
+ else : \MPcolor{InteractionColor} fi ;
+ fi ;
+ enddef ;
+
+ % ... and inserted when the graphic data is flushed here ...
+
+ \MPmenubuttons{right}
+
+ StopPage ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{rightsuperbutton}
+
+vardef rightsuperbutton (expr pat, xpos, ypos, wid, hei) =
+
+ save p, ptop, pbot, t, b, edge, shift, width, height ;
+ path p, ptop, pbot ; pair t, b ; numeric edge, shift, width, height ;
+
+ edge := xpos + wid ; shift := ypos + hei ;
+
+ p := rightpath pat ;
+
+ ptop := ((-infinity,shift)--(edge,shift)) ;
+ pbot := ((-infinity,shift-hei)--(edge,shift-hei)) ;
+
+ t := p intersection_point ptop ;
+ b := p intersection_point pbot ;
+
+ p := subpath(0,xpart (p intersectiontimes ptop)) of p ;
+ p := subpath(xpart (p intersectiontimes pbot),length(p)) of p ;
+
+ (p -- t -- point 1 of ptop &
+ point 1 of ptop -- point 1 of pbot &
+ point 1 of pbot -- b
+ -- cycle)
+
+enddef ;
+
+\stopuseMPgraphic
+
+%D Topics are identified with \type {\Topic}, which is an
+%D instance of chapter headings. The number is made invisible.
+%D Since it still is a numbered section header, \CONTEXT\ will
+%D write the header to the table of contents.
+
+\definehead
+ [Topic]
+ [chapter]
+
+\setuphead
+ [Topic]
+ [number=no]
+
+%D We will use a bold font in the table of contents. We also
+%D force a complete list.
+
+\setuplist
+ [Topic]
+ [criterium=all,
+ style=bold,
+ before=,
+ after=]
+
+%D The \type {\TitlePage} macro looks horrible, because we
+%D want to keep the interface simple: a list of small
+%D sentences, separated by \type {\\}.
+
+\def\StartTitlePage
+ {\startstandardmakeup
+ \switchtobodyfont[big]
+ \def\\{\vfill\bfb\let\\=\par}
+ \bfd\setupinterlinespace\gray
+ \vskip.5cm}
+
+\def\StopTitlePage
+ {\\\vskip.5cm % the \\ is really needed
+ \stopstandardmakeup}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+%D A couple of goodies:
+
+\def\Subject {\Topic}
+\def\Topics #1{}
+\def\Subjects {}
+
+%D For those who want to test:
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+
+\setupMPvariables[page][alternative=3]
+
+\TitlePage
+ {A Few Nice Quotes\\
+ A Simple Style Demo\\
+ Hans Hagen, August 2000}
+
+
+\Topic {Douglas R. Hofstadter} \input douglas \page
+\Topic {Donald E. Knuth} \input knuth \page
+\Topic {Edward R. Tufte} \input tufte \page
+\Topic {Hermann Zapf} \input zapf \page
+%Topic {David F. Stork} \input stork \page
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-22.tex b/tex/context/modules/common/s-pre-22.tex
new file mode 100644
index 000000000..be50ae195
--- /dev/null
+++ b/tex/context/modules/common/s-pre-22.tex
@@ -0,0 +1,319 @@
+%D \module
+%D [ file=s-pre-22,
+%D version=2000.08.07,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 22,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This style was made on behalf of the \PDFTEX\ presentation
+%D at \TUG\ 2000. It cycled a summary of each talk, with name
+%D and title. When documenting this style, I changed
+%D reprocessing into pushing on layers.
+%D
+%D A \quote {problem} like this can be solved in several ways:
+%D
+%D \startitemize
+%D \item writing a lot of semi||complex \TEX\ code as shown
+%D \item keeping track of positions and draw everything on the
+%D page layer
+%D \item defining an overlay for each summary and changing the
+%D order when flushing
+%D \item maintaining a so called field stack
+%D \stopitemize
+%D
+%D We go for the first method. We assume that summaries are
+%D simple text snippets.
+
+\startmode[asintended] \setupbodyfont[lbr] \stopmode
+
+\setupbodyfont[14.4pt]
+
+%D We use the whole page area.
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [topspace=0cm,
+ backspace=0cm,
+ header=0pt,
+ footer=0pt,
+ width=middle,
+ height=middle]
+
+%D We define a couple of matching colors and gray scales.
+%D Watch out, some are really meant to look dim.
+
+\setupcolors
+ [state=start]
+
+\definecolor[PageColor] [s=.50]
+\definecolor[TextColor] [s=.80]
+\definecolor[DoneColor] [s=.65]
+
+\definecolor[TopColor] [r=.5,g=.6,b=.7]
+\definecolor[BotColor] [r=.6,g=.7,b=.5]
+\definecolor[DotColor] [r=.7,g=.5,b=.6]
+
+%D We will use foreground colors. Because these can interfere
+%D with the colors they overload, we can bets make sure that
+%D we don't have local colors.
+
+\setupinteraction
+ [state=start,
+ color=,
+ contrastcolor=]
+
+%D The presentation is supposed to cycle automatically.
+
+\setupinteractionscreen
+ [option=max,
+ delay=5]
+
+\setuppagetransitions
+
+%D We will use random positioning of objects.
+
+\setupsystem
+ [random=medium]
+
+%D We have two kind of graphics: the page background and
+%D the shape around the textual elements.
+
+\defineoverlay [shape] [\uniqueMPgraphic{shape}]
+\defineoverlay [page] [\reuseMPgraphic{page}]
+
+\startreusableMPgraphic{page}
+ StartPage ;
+ filldraw Page withcolor \MPcolor{PageColor} ;
+ pickup pencircle scaled .375cm ;
+ for i=1 upto 200 :
+ drawdot center Page randomized (PaperWidth,PaperHeight)
+ withcolor \MPcolor {DotColor} ;
+ endfor ;
+ StopPage ;
+\stopreusableMPgraphic
+
+\startuniqueMPgraphic{shape}
+ path p ;
+ p := unitsquare xyscaled(OverlayWidth,OverlayHeight) superellipsed .90 ;
+ draw p withpen pencircle scaled .50cm withcolor \MPcolor{PageColor} ;
+ fill p withcolor OverlayColor ;
+ draw p withpen pencircle scaled .25cm withcolor OverlayLineColor ;
+ currentpicture := currentpicture xysized(OverlayWidth,OverlayHeight) ;
+\stopuniqueMPgraphic
+
+%D The resizing at the end is needed to get a nice inverted
+%D hyperlink when we click on it in a browser.
+
+%D Behind the page we put a forward button:
+
+\defineoverlay [forward] [\overlaybutton{forward}]
+
+%D The content will be managed by means of two layers.
+
+\definelayer [main] \defineoverlay [main] [\composedlayer{main}]
+\definelayer [temp] \defineoverlay [temp] [\composedlayer{temp}]
+
+%D The first layer will hold everything to be shown, while
+%D the second one gets the data we currently focus on.
+%D Therefore the first layer will not be flushed each page.
+
+\setuplayer
+ [main]
+ [state=repeat]
+
+%D All the overlays go onto the page area.
+
+\setupbackgrounds
+ [page]
+ [background={page,forward,main,temp}]
+
+%D We have to collect all data before we typeset it. Each
+%D element will be typeset dim and bright. The dim
+%D alternatives will be collected on the main layer, but each
+%D bring one goes onto a box stack.
+
+\initializeboxstack{Summary}
+\initializeboxstack{Subtext}
+
+%D The macros that take care of all this manipulations look
+%D more complicated than they actually are. We use a
+%D scratchbox to collect and inspect data. Also, because we
+%D typeset each element twice, we need to make sure that we use
+%D the same random seed for both.
+
+\doglobal\newcounter\CurrentSummary
+
+\def\StartSummary% bottom bot-title top-title
+ {\dodoublegroupempty\doStartSummary}
+
+\def\doStartSummary#1#2%
+ {\doglobal\increment\CurrentSummary
+ \setbox\scratchbox=\hbox{\strut#1}
+ \getrandomseed\RandomSeed
+ \setlayer[main]
+ {\RandomSubtextBox{DoneColor}{BotColor}{BotColor}}
+ \setrandomseed\RandomSeed
+ \savebox{Subtext}{\CurrentSummary}
+ {\RandomSubtextBox{TextColor}{BotColor}{black}}
+ \setbox\scratchbox=\hbox \bgroup
+ \setbox\scratchbox=\hbox{\bfb\setstrut\strut\quad#2\quad}%
+ \SetAcceptableWidth
+ \framed [offset=0pt,width=fit,frame=off,align=middle,strut=no]
+ \bgroup \setupwhitespace[big]
+ \doifsomething{#2}{\noindent\box\scratchbox\blank}}
+
+\def\StopSummary
+ {\egroup \egroup
+ \getrandomseed\RandomSeed
+ \setlayer[main]
+ {\RandomSummaryBox{DoneColor}{TopColor}{TopColor}}
+ \setrandomseed\RandomSeed
+ \savebox{Summary}{\CurrentSummary}
+ {\RandomSummaryBox{TextColor}{TopColor}{black}}}
+
+%D A \type {\doStartSummary#1#2#3\StopSummary} could have been
+%D used too but this one is less sensitive for catcode changes
+%D (not that we expect problems like this in this kind of
+%D application).
+
+%D The width is either derived from the width ot the title or
+%D at random. The final width of the box is detemined by the
+%D content.
+
+\def\SetAcceptableWidth
+ {\scratchdimen=.5\makeupwidth
+ \ifdim\wd\scratchbox>.5\makeupwidth
+ \getrandomdimen\hsize{\wd\scratchbox}{.8\makeupwidth}%
+ \else
+ \getrandomdimen\hsize{.5\makeupwidth}{.7\makeupwidth}%
+ \fi}
+
+%D The subtext box goes at the bottom, somewhere in the right
+%D corner.
+
+\def\RandomSubtextBox#1#2#3%
+ {\vbox to \makeupheight
+ {\vfill
+ \hbox to \makeupwidth
+ {\hfill
+ \button
+ [offset=2ex,frame=off,background=shape,strut=no,
+ backgroundcolor=#1,framecolor=#2,foregroundcolor=#3]
+ {\copy\scratchbox}%
+ [previouspage]%
+ \getrandomdimen\scratchdimen{.5cm}{2.5cm}%
+ \hskip\scratchdimen}
+ \getrandomdimen\scratchdimen{.5cm}{1.5cm}
+ \vskip \scratchdimen}}
+
+%D The main text goes in the top half of the page, not to
+%D far from the center. The last \type {\vskip} makes sure
+%D that we don't clash with the subtexts.
+
+\definereference[thispage][page(\CurrentSummary)]
+
+\def\RandomSummaryBox#1#2#3%
+ {\vbox to \makeupheight
+ {\getrandomdimen\scratchdimen{.5cm}\makeupheight
+ \vskip 0pt plus \scratchdimen
+ \hbox to \makeupwidth
+ {\getrandomdimen\scratchdimen{.5cm}\makeupwidth
+ \hskip 0pt plus \scratchdimen
+ \button
+ [offset=3ex,frame=off,background=shape,strut=no,
+ backgroundcolor=#1,framecolor=#2,foregroundcolor=#3]
+ {\copy\scratchbox}%
+ [thispage]%
+ \getrandomdimen\scratchdimen{.5cm}\makeupwidth
+ \hskip 0pt plus \scratchdimen}
+ \getrandomdimen\scratchdimen{.5cm}\makeupheight
+ \vskip 0pt plus \scratchdimen
+ \vskip.2\makeupheight}}
+
+%D Because we conly collect data, we hav eto make sure that at
+%D some moment it is processed and flushed. The following loop
+%D does this.
+
+\def\BuildPage
+ {\dorecurse{\CurrentSummary}
+ {\startstandardmakeup
+ \setlayer[temp]{\foundbox{Summary}\recurselevel}
+ \setlayer[temp]{\foundbox{Subtext}\recurselevel}
+ \stopstandardmakeup}}
+
+%D We hook this macro into the \type {\stoptext} macro.
+
+\appendtoks \BuildPage \to \everystoptext
+
+%D We still need a title page.
+
+\def\TitlePage%
+ {\dodoublegroupempty\doTitlePage}
+
+\long\def\doTitlePage#1#2%
+ {\ifsecondargument
+ \MakeTitlePage{#1}{#2}
+ \else\iffirstargument
+ \MakeTitlePage{\currentdate}{#1}
+ \else
+ \MakeTitlePage{\currentdate}{Welcome}
+ \fi\fi}
+
+\def\MakeTitlePage#1#2%
+ {\StartSummary{#1}{#2}\StopSummary}
+
+%D For old times sake:
+
+\long\def\StartTopic#1\StopTopic{\StartSummary#1\StopSummary}
+
+\doifnotmode{demo}{\endinput}
+
+%D The demo text.
+
+\starttext
+
+\TitlePage{Indeed}{The Title Page}
+
+\StartSummary{Alpha}{Title}
+ A simple and not too long text just to show the topic.
+ A simple and not too long text just to show the topic.
+ A simple and not too long text just to show the topic.
+\StopSummary
+
+\StartSummary{Beta and Gamma}{Another Title}
+ A simple and not too long text just to show the topic.
+ A simple and not too long text just to show the topic.
+\StopSummary
+
+\StartSummary{Delta}{Some Title}
+ A simple and not too long text just to show the topic.
+\StopSummary
+
+\StartSummary{Epsilon}{What A Title}
+ A simple and not too long text just to show the topic.
+ A simple and not too long text just to show the topic.
+ A simple and not too long text just to show the topic.
+\StopSummary
+
+\StartSummary{Zeta, Eta and Theta}{Eh, A Title}
+ A simple and not too long text just to show the topic.
+ A simple and not too long text just to show the topic.
+ A simple and not too long text just to show the topic.
+\StopSummary
+
+\StartSummary{Omega}
+ A simple and not too long text just to show the topic.
+ A simple and not too long text just to show the topic.
+ A simple and not too long text just to show the topic.
+ A simple and not too long text just to show the topic.
+\StopSummary
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-23.tex b/tex/context/modules/common/s-pre-23.tex
new file mode 100644
index 000000000..f9983a89e
--- /dev/null
+++ b/tex/context/modules/common/s-pre-23.tex
@@ -0,0 +1,109 @@
+%D \module
+%D [ file=s-pre-20,
+%D version=2000.08.07,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 20,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This style looks a lot like number 22. This time we don't
+%D cycle but build up the page. One can click on the text go
+%D to the page wanted. Clicking on the titl ebrings you to the
+%D previous page.
+
+\startmode [demo]
+ \disablemode[demo] \usemodule[pre-22] \enablemode[demo]
+\stopmode
+
+\startnotmode [demo]
+ \usemodule[pre-22]
+\stopnotmode
+
+%D We use a simple two||color scheme.
+
+\definecolor[DotColor][r=.5,g=.6,b=.7]
+\definecolor[TopColor][r=.7,g=.6,b=.5]
+\definecolor[BotColor][TopColor]
+
+%D We will not delay page building.
+
+\let\BuildPage\relax
+
+%D Instead, we will flush a page for each summary. The main
+%D layer is build up anyway, but we need to overlay the
+%D current summary.
+
+\let\normalStartSummary\StartSummary
+\let\normalStopSummary \StopSummary
+
+\def\StartSummary
+ {\startstandardmakeup
+ \normalStartSummary}
+
+\def\StopSummary
+ {\normalStopSummary
+ \setlayer[temp]{\foundbox{Summary}\CurrentSummary}
+ \setlayer[temp]{\foundbox{Subtext}\CurrentSummary}
+ \stopstandardmakeup}
+
+%D The title page is not added to the main layer (or
+%D actually, it is, but we erase the layer before it's
+%D used).
+
+\long\def\MakeTitlePage#1#2%
+ {\startstandardmakeup
+ \definereference[thispage][]
+ \switchtobodyfont[32pt]
+ \StartSummary{#1}{}#2\StopSummary
+ \resetlayer[main]
+ \setlayer[temp]{\foundbox{Summary}\CurrentSummary}
+ \setlayer[temp]{\foundbox{Subtext}\CurrentSummary}
+ \definereference[thispage][page(\CurrentSummary)]
+ \stopstandardmakeup}
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+
+\TitlePage{August 2000}{Something Very Important}
+
+\StartSummary{Alpha}
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+\StopSummary
+
+\StartSummary{Beta and Gamma}
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+\StopSummary
+
+\StartSummary{Delta}
+ A simple and not too long text just to show the idea.
+\StopSummary
+
+\StartSummary{Epsilon}
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+\StopSummary
+
+\StartSummary{Zeta, Eta and Theta}
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+\StopSummary
+
+\StartSummary{Omega}
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+\StopSummary
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-26.tex b/tex/context/modules/common/s-pre-26.tex
new file mode 100644
index 000000000..7c1dec5f8
--- /dev/null
+++ b/tex/context/modules/common/s-pre-26.tex
@@ -0,0 +1,255 @@
+%D \module
+%D [ file=s-pre-26,
+%D version=2001.02.18,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 26,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D modes: reverse
+
+%D This is a nice and simple style, written in februari
+%D 2001. It uses a square papersize, derived from \type {S4}.
+%D Because this style is meant to be used with Zapf
+%D Chancery, I dedicate this style to Volker Schaa, a fan of
+%D Zapf.
+
+\setuppapersize
+ [S44][S44]
+
+\startmode[asintended]
+ \definetypeface[zaphy][cg][calligraphy][chancery]
+ \setupbodyfont[zaphy,cg,12pt]
+\stopmode
+
+\startnotmode[asintended]
+ \setupbodyfont[13pt]
+\stopnotmode
+
+%D We use the whole page.
+
+\setuplayout
+ [backspace=0pt,
+ topspace=0pt,
+ header=0pt,
+ footer=0pt,
+ bottom=0pt,
+ width=middle,
+ height=middle]
+
+%D We will be very tolerant in alignment.
+
+\setuptolerance
+ [verytolerant,stretch]
+
+%D Of course use navigation, but we hide the in this case
+%D ugly reverse video hyper spot.
+
+\setupinteraction
+ [state=start,
+ color=white,
+ contrastcolor=white,
+ style=\underbar,
+ click=no]
+
+%D This style looks best in a dark room, full screen.
+
+\setupinteractionscreen
+ [option=max]
+
+%D We use colors and remap a couple of standard colors.
+
+\setupcolors
+ [state=start]
+
+\definecolor[white] [s=.8]
+\definecolor[red] [r=.7]
+\definecolor[green] [g=.7]
+\definecolor[blue] [b=.7]
+\definecolor[yellow][r=.7,g=.7]
+
+\definecolor [PageColor][black]
+
+%D These colors will cyclic be assigned to \type
+%D {TextColor}.
+
+\definecolor [TextColor 0][white]
+\definecolor [TextColor 1][red]
+\definecolor [TextColor 2][green]
+\definecolor [TextColor 3][blue]
+\definecolor [TextColor 4][yellow]
+
+\definecolor [TextColor] [TextColor 0]
+
+%D We will collect everything in a layer.
+
+\definelayer
+ [main]
+ [state=repeat]
+
+%D We have quite some overlays.
+
+\defineoverlay [page] [\reuseMPgraphic{page}]
+\defineoverlay [text] [\useMPgraphic{text}]
+\defineoverlay [next] [\overlaybutton{nextpage}]
+\defineoverlay [prev] [\overlaybutton{previouspage}]
+\defineoverlay [main] [\composedlayer{main}]
+
+%D These end up as paper, page and text backgrounds. We need
+%D to locate the foreground, otherwise hyperlinks will not
+%D work.
+
+\setupbackgrounds % otherwise in acrobat 5 rounding error
+ [paper] % and one pixel white line
+ [backgroundcolor=Pagecolor,
+ background=page]
+
+\setupbackgrounds
+ [page]
+ [background={page,prev,foreground,main}]
+
+\setupbackgrounds
+ [text]
+ [background=next,
+ backgroundoffset=-10pt]
+
+%D This means that clicking on the center brings you to the
+%D next page, while clicking on teh page frame brings you one
+%D page back.
+
+%D As usual, the graphics are handled by \METAPOST:
+
+\startuseMPgraphic{text}
+ path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
+ color c ; c := (.7+uniformdeviate.3)*\MPcolor{TextColor} ;
+ p := p enlarged -1.25pt ;
+ filldraw p withcolor c ;
+ draw p withpen pencircle scaled 2.5pt withcolor .75c ;
+\stopuseMPgraphic
+
+\startreusableMPgraphic{page}
+ path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
+ color c ; c := \MPcolor{PageColor} ;
+ filldraw p enlarged 5pt withcolor c ; % bleeding
+\stopreusableMPgraphic
+
+%D The text is typeset in a framed text. We cycle trough the
+%D colors by means of a counter. This counter also determines
+%D the positioning on the main layer. The width is slightly
+%D random.
+
+\newcounter\KindOfTopic % and cycle through corners
+\newdimen \TopicWidth % with randomized widths
+
+\defineframedtext
+ [TopicText]
+ [frame=off,
+ offset=10pt,
+ style=bold,
+ width=\TopicWidth,
+ background=text,
+ before=,
+ after=,
+ align=normal]
+
+\def\BeforeTopic
+ {\ifcase\KindOfTopic\relax
+ \TopicWidth=.7\textwidth
+ \definecolor[CharColor][black]
+ \else
+ \getrandomdimen\TopicWidth{.55\textwidth}{.7\textwidth}
+ \definecolor[CharColor][white]
+ \fi
+ \doifmode{reverse}
+ {\setupframedtexts[TopicText][foregroundcolor=CharColor]}
+ \definecolor[TextColor][TextColor \KindOfTopic]
+ \ifcase\KindOfTopic\relax
+ \setuplayer[main][x=.5\textwidth,y=.5\textheight,location=c] \or
+ \setuplayer[main][x=0pt, y=0pt, location=rb] \or
+ \setuplayer[main][x=\textwidth, y=0pt, location=lb] \or
+ \setuplayer[main][x=\textwidth, y=\textheight, location=lt] \or
+ \setuplayer[main][x=0pt, y=\textheight, location=rt] \fi}
+
+\def\AfterTopic
+ {\ifnum\KindOfTopic=4
+ \gdef\KindOfTopic{1}
+ \else
+ \doglobal\increment\KindOfTopic
+ \fi}
+
+\def\StartTopic
+ {\BeforeTopic
+ \startstandardmakeup
+ \setlayer[main] \bgroup \startTopicText[none]
+ }%\setupwhitespace[big]} % generates an empty line
+
+\def\StopTopic
+ {\stopTopicText \egroup
+ \stopstandardmakeup
+ \AfterTopic}
+
+%D The title and colofon page are centered on the page.
+
+\def\StartNopic
+ {\doglobal\newcounter\KindOfTopic % centered at the page
+ \StartTopic
+ \bfd\setupinterlinespace
+ \setupinteraction[color=,contrastcolor=]%
+ \def\\{\blank\bfb\setupinterlinespace\def\\{\blank}}%
+ \raggedcenter\ignorespaces}
+
+\def\StopNopic
+ {\StopTopic}
+
+\let\StartTitlePage\StartNopic \let\StartColofonPage\StartNopic
+\let\StopTitlePage \StopNopic \let\StopColofonPage \StopNopic
+
+\def\TitlePage #1{\StartTitlePage #1\StopTitlePage}
+\def\ColofonPage#1{\StartColofonPage#1\StopColofonPage}
+
+%D We provide a minimum of title commands.
+
+\definehead
+ [Title]
+ [title]
+
+\definehead
+ [Subject]
+ [subject]
+
+\setuphead
+ [Title]
+ [style=\bfb,
+ page=,
+ before=,
+ after=\blank]
+
+\setuphead
+ [Subject]
+ [style=\bfa,
+ before=\blank,
+ after=\blank]
+
+\doifnotmode{demo}{\endinput}
+
+\def\Sample #1 {\input #1 \par \rightaligned{--- #1 ---}}
+
+\starttext
+
+\StartNopic The \ConTeXt\ Test Quotes \\ \currentdate \StopNopic
+
+\StartTopic \Sample tufte \StopTopic
+\StartTopic \Sample knuth \StopTopic
+\StartTopic \Sample zapf \StopTopic
+\StartTopic \Sample douglas \StopTopic
+\StartTopic \Sample stork \StopTopic
+\StartTopic \Sample materie \StopTopic
+
+\StartNopic There Will Be Some More \StopNopic
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-27.tex b/tex/context/modules/common/s-pre-27.tex
new file mode 100644
index 000000000..2e201e8df
--- /dev/null
+++ b/tex/context/modules/common/s-pre-27.tex
@@ -0,0 +1,181 @@
+%D \module
+%D [ file=s-pre-27,
+%D version=1999.08.20,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 27,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\setuppapersize
+ [S6][S6]
+
+% \setupbodyfont[ppl]
+
+\definetypeface[main][rm][casual][informal][default]
+\loadmapfile[original-micropress-informal.map]
+
+\setupbodyfont[main,10pt]
+
+\setuplayout
+ [footerdistance=20pt,
+ footer=40pt,
+ %footer=24pt,
+ %bottomdistance=10pt,
+ %bottom=12pt,
+ header=0pt,
+ backspace=20pt,
+ topspace=20pt,
+ width=middle,
+ height=fit]
+
+% \def\MainTitle#1{\setupfootertexts[\hfill#1]}
+% \def\SubTitle #1{\setupbottomtexts[\hfill#1]}
+%
+% \MainTitle{a dull talk held at \currentdate}
+% \SubTitle {welcome to whatever}
+%
+% \setupbottom
+% [style=\ssbf,
+% color=white]
+%
+% \setupfooter
+% [style=\ssbfb,
+% color=white]
+
+\setupfooter
+ [strut=no,
+ style=\bfb,
+ color=white]
+
+\setupinteraction
+ [state=start]
+
+\setupinteractionscreen
+ [option=max]
+
+\definecolor[white] [s=.8]
+\definecolor[red] [r=.7]
+\definecolor[green] [g=.7]
+\definecolor[blue] [b=.7]
+\definecolor[yellow][r=.7,g=.7]
+
+\setupcolors
+ [state=start]
+
+\defineoverlay [page] [\reuseMPgraphic{page}]
+\defineoverlay [text] [\useMPgraphic {text}]
+\defineoverlay [continue] [\overlaybutton {forward}]
+
+\setupbackgrounds
+ [page]
+ [background={page,continue}]
+
+\definecolor [PageColor] [red]
+\definecolor [TextColor] [yellow]
+
+\defineframedtext
+ [TopicPage]
+
+\defineframedtext
+ [TopicText]
+
+\setupframedtexts
+ [TopicPage]
+ [width=\textwidth,
+ height=\textheight,
+ offset=overlay]
+
+\setupframedtexts
+ [TopicText]
+ [offset=10pt,
+ style=bold, % hm
+ width=\TopicWidth,
+ background=text,
+ align=normal]
+
+\setupframedtexts
+ [TopicPage,TopicText]
+ [frame=off,
+ depthcorrection=off,
+ before=,
+ after=]
+
+\newbox \TopicBox
+\newcounter \KindOfTopic
+\newdimen \TopicWidth
+
+\def\KindOfTopic{1}
+
+\def\StartTopic
+ {\getrandomdimen\TopicWidth{.5\textwidth}{.7\textwidth}
+ \ifcase\KindOfTopic\or
+ \setupframedtexts [TopicPage] [align={right,high}] \or
+ \setupframedtexts [TopicPage] [align={left,high}] \or
+ \setupframedtexts [TopicPage] [align={left,low}] \or
+ \setupframedtexts [TopicPage] [align={right,low}] \fi
+ \setbox\scratchbox=\vbox \bgroup \dontcomplain
+ \noindent \startTopicPage [none]
+ \noindent \startTopicText [none]
+ \setuptolerance [verytolerant,stretch]}
+
+\def\StopTopic%
+ {\stopTopicText
+ \stopTopicPage
+ \egroup
+ \global\setbox\TopicBox=\vbox
+ {\startoverlay
+ {\box\TopicBox} {\box\scratchbox}
+ \stopoverlay}
+ \copy\TopicBox
+ \ifnum\KindOfTopic=4
+ \def\KindOfTopic{1}
+ \else
+ \increment\KindOfTopic
+ \fi
+ \page}
+
+\startuseMPgraphic{text}
+ path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
+ color c ; c := (.7+uniformdeviate.3)*\MPcolor{TextColor} ;
+ p := p enlarged -1.25pt ;
+ fill p withcolor c ;
+ draw p withpen pencircle scaled 2.5pt withcolor .75c ;
+\stopuseMPgraphic
+
+\startreusableMPgraphic{page}
+ path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
+ color c ; c := \MPcolor{PageColor} ;
+ fill p withcolor c ;
+ draw p withpen pencircle scaled 2.5pt withcolor c ;
+\stopreusableMPgraphic
+
+\def\StartNopic#1\StopNopic
+ {\setupfootertexts
+ [\vbox to \footerheight
+ {\vfill
+ \raggedleft
+ \def\\{\endgraf\tx\setstrut\strut}
+ \setstrut\strut\ignorespaces#1\unskip\endgraf\removedepth}]
+ \null \page}
+
+\def\TitlePage#1%
+ {\StartNopic#1\StopNopic}
+
+\setuphead[title] [style=\bfc,after=\blank]
+\setuphead[subject][style=\bfa,before=\blank]
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+
+\TitlePage
+ {a dull talk held at \currentdate\\welcome to whatever}
+
+\dorecurse{10}{\StartTopic \input tufte \StopTopic}
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-50.tex b/tex/context/modules/common/s-pre-50.tex
new file mode 100644
index 000000000..ff3e48631
--- /dev/null
+++ b/tex/context/modules/common/s-pre-50.tex
@@ -0,0 +1,101 @@
+%D \module
+%D [ file=s-pre-50,
+%D version=2003.01.26,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 50,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D When my mailbox started to overflow with messages about
+%D problems with the presentation step mechanism, I looked up
+%D old presentaton, hacked a bit and cooked up an alternative
+%D that is less dependent on \PDF\ trickery.
+%D
+%D Consider it a cheap trick and prelude to a couple of new
+%D presentation styles. (At the time of writing this, I
+%D still have some 10 of those styles to clean up and
+%D document.) You can give it a try:
+%D
+%D \starttyping
+%D texexec --pdf --mode=demo s-pre-50
+%D \stoptyping
+
+% Basic definitions.
+
+\defineframedtext
+ [horizontal]
+ [width=\textwidth,
+ frame=off,
+ strut=no,
+ height=fit,
+ align={right,lohi},
+ before=,
+ after=]
+
+\definecollector
+ [contribution]
+ [state=repeat,
+ corner={left,bottom},
+ location={right,bottom}]
+
+%D An example of tuning:
+
+\startmode[demo]
+
+ \setupcollector
+ [contribution]
+ [voffset=-.25\bodyfontsize]
+
+ \setupframedtexts
+ [horizontal]
+ [background=color,
+ backgroundcolor=darkgray,
+ foregroundcolor=white]
+
+\stopmode
+
+%D Structure and trick.
+
+\def\StartSteps
+ {\doifnotmode{mkiv}{\checkutilities}}
+
+\def\StopSteps
+ {\resetcollector[contribution]}
+
+\long\def\StartStep#1\StopStep
+ {\setcollector
+ [contribution]
+ {\starthorizontal[none]#1\stophorizontal}
+ \flushcollector[contribution]
+ \page}
+
+%D Trick. Nowadays we can use streams.
+
+\installoutputroutine\FlushStep
+ {\StartStep\unvbox\normalpagebox\StopStep}
+
+%D Demo.
+
+\doifnotmode{demo}{\endinput}
+
+\setupcolors[state=start] \setuppapersize[S6][S6] \setuplayout[middle]
+
+\starttext
+
+\StartSteps
+
+ \title[whow]{How Much?} \FlushStep
+ \item More \FlushStep
+ \item And More \FlushStep
+ \item And Even More \FlushStep
+
+ \StartStep And So On \StopStep
+
+\StopSteps
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-61.tex b/tex/context/modules/common/s-pre-61.tex
new file mode 100644
index 000000000..48b9d09a0
--- /dev/null
+++ b/tex/context/modules/common/s-pre-61.tex
@@ -0,0 +1,275 @@
+%D \module
+%D [ file=s-pre-61,
+%D version=2004.03.15,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 61,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Optima
+
+\usemodule[pre-60]
+
+\doifmodeelse {mkiv} {
+ \usetypescriptfile[ghz]
+ \definetypeface[mainface][ss][sans][optima-nova][default]
+} {
+ \usetypescriptfile[type-ghz]
+ \definetypeface[mainface][ss][sans][optima-nova][default][encoding=\defaultencoding]
+}
+
+\setupbodyfont[mainface,ss,18pt]
+\setupinterlinespace[line=3.25ex]
+
+\setuppapersize
+ [S6][S6]
+
+% \setuppapersize
+% [SW][SW]
+
+\setuplayout
+ [topspace=10pt,
+ header=30pt,
+ headerdistance=20pt,
+ height=middle,
+ footerdistance=20pt,
+ footer=0pt,
+ bottomdistance=20pt,
+ bottom=20pt,
+ bottomspace=50pt,
+ backspace=30pt,
+ width=middle]
+
+\setupinteraction
+ [state=start,
+ click=off,
+ menu=on,
+ style=,
+ color=interactioncolor,
+ contrastcolor=interactioncolor]
+
+\setupinteractionscreen
+ [option=max]
+
+\setupinteractionmenu
+ [bottom]
+ [color=maincolor,
+ contrastcolor=maincolor,
+ style=\tfa, % acceptable
+ left=\hfill,
+ middle=,
+ right=,
+ height=\bottomheight,
+ width=2\bottomheight,
+ offset=overlay,
+ frame=off]
+
+\startinteractionmenu[bottom]
+ \but [firstpage] \symbol[firstpage] \\
+ \but [previouspage] \symbol[previouspage] \\
+ \but [InvokeStepper] \StartBusy\symbol[PauseRendering]\StopBusy \\
+ \but [nextpage] \symbol[nextpage] \\
+ \but [lastpage] \symbol[lastpage] \\
+ \but [CloseDocument] \symbol[CloseDocument] \\
+\stopinteractionmenu
+
+% maybe in colo-sjk : \setupcolor[sjk]
+
+\definecolor [dark] [s=.4]
+\definecolor [bright] [s=.9]
+
+\definecolor [red] [r=.4,g=.2,b=.2]
+\definecolor [green] [r=.2,g=.4,b=.2]
+\definecolor [blue] [r=.2,g=.2,b=.4]
+
+\definecolor [cyan] [r=.2,g=.4,b=.4]
+\definecolor [magenta][r=.4,g=.2,b=.4]
+\definecolor [yellow] [r=.4,g=.4,b=.2]
+
+\definecolor [pagecolor] [dark]
+\definecolor [maincolor] [bright]
+\definecolor [textcolor] [red]
+
+\definecolor [interactioncolor] [r=.8,g=.8,b=.6]
+
+\setupcolors
+ [state=start,
+ textcolor=maincolor]
+
+\setupbackgrounds
+ [page]
+ [background=page,
+ backgroundcolor=textcolor]
+
+\setupbackgrounds
+ [text]% [text]
+ [background={comments,text,invoke}]
+
+\definelayer
+ [text]
+ [width=\textwidth,
+ height=\textheight]
+
+\defineoverlay
+ [comments]
+ [{\setlayer[text][preset=middle]{\placecomments}}]
+
+\defineoverlay[page][\uniqueMPgraphic{page-\ifcase\realpageno\or one\else plus\fi}]
+
+\startuniqueMPgraphic{page-one}
+ StartPage ;
+ fill Page
+ enlarged 4pt
+ withcolor \MPcolor{pagecolor} ;
+ fill Field[Text][Text]
+ enlarged 10pt
+% topenlarged (HeaderHeight+HeaderDistance)
+ leftenlarged (BackSpace+4pt)
+ rightenlarged (CutSpace +4pt)
+ withcolor OverlayColor ;
+ StopPage ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{page-plus}
+ StartPage ;
+ fill Page
+ enlarged 4pt
+ withcolor \MPcolor{pagecolor} ;
+ fill Field[Text][Text]
+ enlarged 10pt
+ leftenlarged (BackSpace+4pt)
+ rightenlarged (CutSpace+4pt)
+ withcolor OverlayColor ;
+ StopPage ;
+\stopuniqueMPgraphic
+
+% this needs to be sorted out !
+
+\appendtoks
+ \NormalizeFontHeight \HeadFont {\setstrut\strut\quad} {1.0\headerheight} {SansBold}
+ \NormalizeFontHeight \TitleFont {\setstrut\strut\quad} {2.0\headerheight} {SansBold}
+ \NormalizeFontHeight \SubTitleFont {\setstrut\strut\quad} {1.5\headerheight} {SansBold}
+ \NormalizeFontHeight \SubSubTitleFont {\setstrut\strut\quad} {1.0\headerheight} {SansBold}
+\to \everystarttext
+
+\appendtoks
+ \NormalizeFontHeight \HeadFont {\setstrut\strut\quad} {1.0\headerheight} {SansBold}
+ \NormalizeFontHeight \TitleFont {\setstrut\strut\quad} {2.0\headerheight} {SansBold}
+ \NormalizeFontHeight \SubTitleFont {\setstrut\strut\quad} {1.5\headerheight} {SansBold}
+ \NormalizeFontHeight \SubSubTitleFont {\setstrut\strut\quad} {1.0\headerheight} {SansBold}
+\to \everystoptext
+
+\setuphead
+ [chapter]
+ [placehead=empty,
+ after={\blank[medium]},
+ color=maincolor,
+ placenumber=no,
+ style=\HeadFont]
+
+\setupheadertexts
+ [\doiftextelse{\currentheadnumber}{\placeheadtext[Topic]}{\placeheadtext[Nopic]}]
+ []
+
+\setuppagenumbering
+ [location=]
+
+\definesymbol
+ [emdash]
+ [\emdash]
+
+\setupitemize
+ [each]
+ [loose,serried,joinedup,broad]
+ [symbol=emdash]
+
+\setupalign
+ [broad,right]
+
+\def\doTitlePage#1#2#3%
+ {\startstandardmakeup[headerstate=high]
+ \def\\{\def\\{\endgraf\quad\quad}\endgraf\quad\ignorespaces#2}%
+ #1\setstrut\setupinterlinespace\vfil#3\vfil\vfil
+ \stopstandardmakeup}
+
+\def\TitlePage {\doTitlePage\TitleFont\relax}
+\def\SubTitlePage{\doTitlePage\TitleFont\SubTitleFont}
+
+\definehead[Topic][chapter]
+\definehead[Nopic][title]
+
+\def\Topics#1%
+ {\Nopic[topics]{#1}
+ \startcolumns
+ \placelist[Topic]
+ \stopcolumns}
+
+\setuplist
+ [Topic]
+ [alternative=f,
+ color=maincolor,
+ contrastcolor=maincolor,
+ criterium=all]
+
+\defineoverlay[topics][\overlaybutton{topics}]
+
+\setupbackgrounds
+ [bottom] [text]
+ [background=topics]
+
+\continueifinputfile{s-pre-61.tex}
+
+\starttext
+
+\TitlePage{Stepwise\\Refinement}
+
+\Topics{Topics}
+
+\Topic{Female Artists}
+
+\StartSteps
+
+\startitemize
+\item Fiona Apple \FlushStep
+\item Tori Amos \FlushStep
+\item Kate Bush \FlushStep
+\item Heather Nova \FlushStep
+\item Alanis Morissette \FlushStep
+\item Suzanne Vega \FlushStep
+\stopitemize
+
+\StopSteps
+
+\Topic{Male Composers}
+
+\StartSteps
+
+\startitemize
+\item John Adams \FlushStep
+\item Steve Reich \FlushStep
+\item Louis Andriessen \FlushStep
+\item Olivier Messiaen \FlushStep
+\stopitemize
+
+\StopSteps
+
+\Topic{And Some More}
+
+\StartSteps
+
+\startitemize
+\item Mark Hollis \FlushStep
+\item Roger Waters \FlushStep
+\item David Gilmore \FlushStep
+\item Peter Gabriel \FlushStep
+\item Randy Newman \FlushStep
+\stopitemize
+
+\StopSteps
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-62.tex b/tex/context/modules/common/s-pre-62.tex
new file mode 100644
index 000000000..a1a405c23
--- /dev/null
+++ b/tex/context/modules/common/s-pre-62.tex
@@ -0,0 +1,224 @@
+%D \module
+%D [ file=s-pre-62,
+%D version=2005.03.04,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 62,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Melior
+
+\usemodule[pre-60]
+
+\usetypescriptfile
+ [type-ghz]
+
+\doifmodeelse {mkiv} {
+
+ \definetypeface[mainface][rm][serif][melior] [default]
+ \definetypeface[mainface][tt][mono] [modern] [default][rscale=1.05]
+ \definetypeface[mainface][ss][serif][melior] [default]
+ \definetypeface[mainface][mm][math] [palatino][default][rscale=0.95]
+
+} {
+
+ \definetypeface[mainface][rm][serif][melior] [default][encoding=texnansi]
+ \definetypeface[mainface][tt][mono] [modern] [default][encoding=texnansi,rscale=1.05]
+ \definetypeface[mainface][ss][serif][melior] [default][encoding=texnansi]
+ \definetypeface[mainface][mm][math] [palatino][default][encoding=texnansi,rscale=0.95]
+
+}
+
+\setupbodyfont
+ [mainface,14.4pt]
+
+\setuppapersize
+ [S6][S6]
+
+\setvariables[layout][dx=0,dy=1,nx=2,ny=2,step=64]
+
+\definemeasure[layoutwd][\dimexpr\paperwidth /\getvariable{layout}{step}\relax]
+\definemeasure[layoutht][\dimexpr\paperheight/\getvariable{layout}{step}\relax]
+
+\setuplayout
+ [ width=middle,
+ height=middle,
+ header=0pt,
+ footer=0pt,
+ margin=0pt,
+ backspace=5\measure{layoutwd},
+ topspace=5\measure{layoutht}]
+
+\definelayout
+ [step]
+ [ backspace=\numexpr2+ \getvariable{layout}{dx}\relax\measure{layoutwd},
+ cutspace=\numexpr3+\getvariable{layout}{nx}-\getvariable{layout}{dx}\relax\measure{layoutwd},
+ topspace=\numexpr2+ \getvariable{layout}{dy}\relax\measure{layoutht},
+ bottomspace=\numexpr3+\getvariable{layout}{ny}-\getvariable{layout}{dy}\relax\measure{layoutht}]
+
+\definecolor[layout:left] [t=.5,a=1,b=1]
+\definecolor[layout:right] [t=.5,a=1,r=1]
+\definecolor[layout:top] [t=.5,a=1,g=1]
+\definecolor[layout:bottom][t=.5,a=1,y=1]
+\definecolor[layout:page] [s=.75]
+
+\definehspace[menu][\measure{layoutwd}]
+
+\setupinteraction
+ [state=start,
+ click=off,
+ style=,
+ color=interactioncolor,
+ contrastcolor=interactioncolor]
+
+\setupinteractionscreen
+ [option=max]
+
+\setupbuttons
+ [color=maincolor,
+ contrastcolor=maincolor,
+ style=\tf, % acceptable
+ height=2\measure{layoutht},
+ width=2\measure{layoutwd},
+ offset=overlay,
+ frame=off]
+
+\definecolor[interactioncolor][darkgray]
+\definecolor[maincolor] [lightgray]
+
+\setuptexttexts
+ []
+ [\vbox to \textheight{\vfill\hfill\setups{menu:content}}]
+
+\startsetups menu:content
+
+ \button{\symbol[firstpage]}[firstpage]
+ \hspace[menu]
+ \button{\symbol[previouspage]}[previouspage]
+ \hspace[menu]
+ \button{\StartBusy\symbol[PauseRendering]\StopBusy}[InvokeStepper]
+ \hspace[menu]
+ \button{\symbol[nextpage]}[nextpage]
+ \hspace[menu]
+ \button{\symbol[lastpage]}[lastpage]
+ \hspace[menu]
+ \button{\symbol[CloseDocument]}[CloseDocument]
+
+\stopsetups
+
+\startuseMPgraphic{page}{step}
+ StartPage ;
+ numeric dx, dy ; dx := PaperWidth/\MPvar{step} ; dy := PaperHeight/\MPvar{step} ;
+ fill Page withcolor .5white ;
+ fill
+ ulcorner Page -- urcorner Page --
+ urcorner Page shifted (0,-TopSpace+dy) -- ulcorner Page shifted (0,-TopSpace+dy) -- cycle
+ withcolor \MPcolor{layout:top} ;
+ fill
+ llcorner Page -- lrcorner Page --
+ lrcorner Page shifted (0,BottomSpace-dy) -- llcorner Page shifted (0,BottomSpace-dy) -- cycle
+ withcolor \MPcolor{layout:bottom} ;
+ fill
+ ulcorner Page -- llcorner Page --
+ llcorner Page shifted (BackSpace-dx,0) -- ulcorner Page shifted (BackSpace-dx,0) -- cycle
+ withcolor \MPcolor{layout:left} ;
+ fill
+ urcorner Page -- lrcorner Page --
+ lrcorner Page shifted (-CutSpace+dx,0) -- urcorner Page shifted (-CutSpace+dx,0) -- cycle
+ withcolor \MPcolor{layout:right} ;
+ fill Field[Text][Text] enlarged (dx,dy) withcolor white ;
+ fill Field[Text][Text] enlarged (dx,dy) withcolor \MPcolor{layout:page} ;
+ StopPage ;
+\stopuseMPgraphic
+
+\defineoverlay[page][\useMPgraphic{page}{step=\getvariable{layout}{step}}]
+
+\setupbackgrounds
+ [page]
+ [background=page]
+
+\setupcolors
+ [state=start]
+
+\startsetups nextstep
+ % pagebreak handlers are grouped, so we need to set global
+ \ifnum\getvariable{layout}{dx}=\getvariable{layout}{nx}\relax
+ \ifnum\getvariable{layout}{dy}=\getvariable{layout}{ny}\relax
+ \setxvariables[layout][dy=1]
+ \else
+ \setxvariables[layout][dy=\the\numexpr\getvariable{layout}{dy}+1\relax]
+ \fi
+ \setxvariables[layout][dx=1]
+ \else
+ \setxvariables[layout][dx=\the\numexpr\getvariable{layout}{dx}+1\relax]
+ \fi
+ % global anyway
+ \setuplayout[step]
+\stopsetups
+
+\definefontsynonym[MainTitleFont][SerifBold]
+
+\definefont[ChapterTitleFont][MainTitleFont sa 2]
+
+\appendtoks
+ \NormalizeFontHeight \TitleFont {\setstrut\strut\quad} {4\lineheight} {MainTitleFont}
+ \NormalizeFontHeight \SubTitleFont {\setstrut\strut\quad} {3\lineheight} {MainTitleFont}
+ \NormalizeFontHeight \ChapterNumberFont {XVI} {4\lineheight} {MainTitleFont}
+\to \everystarttext
+
+\setupsection
+ [section-2]
+ [bodypartconversion=Romannumerals]
+
+\installpagebreakhandler {step} {\setups{nextstep}}
+
+\definepagebreak[chapter][yes,step]
+
+\setuphead
+ [chapter]
+ [page=chapter,
+ command=\MyChapterCommand]
+
+\definehead[Topic][chapter]
+\definehead[Nopic][title]
+
+\setuphead[chapter,Topic,Nopic]
+ [numberstyle=\ChapterNumberFont,
+ textstyle=\ChapterTitleFont,
+ numbercolor=lightgray,
+ textcolor=darkgray]
+
+\def\MyChapterCommand#1#2%
+ {\hbox \bgroup % we need to nil the strut added by the headplacement
+ \setupframed[frame=off,lines=4,offset=overlay]%
+ \rlap{\hskip2\lineheight\framed{\setnostrut#1}}\framed{#2}%
+ \egroup}
+
+\setupitemize
+ [each]
+ [R,broad]
+ [stopper=,
+ color=lightgray]
+
+\def\doTitlePage#1#2#3%
+ {\startstandardmakeup[headerstate=high,textstate=stop]
+ \setupalign[middle]
+ \def\\{\def\\{\endgraf}\endgraf\vfil\ignorespaces#2}%
+ \startcolor[darkgray]
+ #1\setstrut\setupinterlinespace\vfil#3\vfil
+ \stopcolor
+ \stopstandardmakeup}
+
+\def\TitlePage {\doTitlePage\TitleFont\relax}
+\def\SubTitlePage{\doTitlePage\TitleFont\SubTitleFont}
+
+\long\def\StartTitlePage #1\StopTitlePage {\TitlePage {#1}}
+\long\def\StartSubTitlePage#1\StopSubTitlePage{\SubTitlePage{#1}}
+
+\endinput
+
diff --git a/tex/context/modules/common/s-pre-63.tex b/tex/context/modules/common/s-pre-63.tex
new file mode 100644
index 000000000..974c67a5f
--- /dev/null
+++ b/tex/context/modules/common/s-pre-63.tex
@@ -0,0 +1,77 @@
+%D \module
+%D [ file=s-pre-63,
+%D version=2006.05.11,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 63,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+this module is under reconstruction
+
+\endinput
+
+\usemodule[pre-61,streams]
+
+\definemeasure[textgap] [\dimexpr24pt\relax]
+
+\definemeasure[leftwidth] [\dimexpr.25\textwidth-.5\measure{textgap}\relax]
+\definemeasure[rightwidth][\dimexpr.75\textwidth-.5\measure{textgap}\relax]
+
+\definestreamlayer[left] [width=\measure{leftwidth}]
+\definestreamlayer[right][width=\measure{rightwidth}]
+
+\setupbodyfont[12pt]
+
+\definefont[LeftFont][Normal sa 3]
+
+\setupheader[style=\tfc,before=\vss,after=\vss]
+
+\startsetups streamlayer:left:settings
+ \hsize\measure{leftwidth}
+ \LeftFont
+ \setupinterlinespace
+\stopsetups
+
+\startsetups streamlayer:right:settings
+ \hsize\measure{rightwidth}
+\stopsetups
+
+\definecombination[both][distance=\measure{textgap},location=top]
+
+\startsetups place:both
+ \startcombination[both]
+ {\StartLocalStep\placestreamlayer[left]\StopLocalStep} {}
+ {\StartLocalStep\placestreamlayer[right]\StopLocalStep} {}
+ \stopcombination
+\stopsetups
+
+\def\StartPage {\page \StartLocalSteps}
+\def\StopPage {\StopLocalSteps \page}
+
+\def\StartLeft {\startstreamlayer[left]}
+\def\StartRight{\startstreamlayer[right]}
+
+\def\StopLeft {\stopstreamlayer}
+\def\StopRight {\stopstreamlayer}
+
+\def\StartPair {}
+\def\StopPair {\setups[place:both]}
+
+% \doifnotmode {demo} {\endinput}
+
+\setupbodyfont[8pt] \definefont[BigFont][Normal sa 4]
+
+\starttext
+
+\StartPage
+ \StartPair \StartLeft ZAPF \StopLeft \StartRight \input zapf \StopRight \StopPair
+ \StartPair \StartLeft DAVIS \StopLeft \StartRight \input davis \StopRight \StopPair
+ \StartPair \StartLeft WARD \StopLeft \StartRight \input ward \StopRight \StopPair
+\StopPage
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-64.tex b/tex/context/modules/common/s-pre-64.tex
new file mode 100644
index 000000000..ef4889bbb
--- /dev/null
+++ b/tex/context/modules/common/s-pre-64.tex
@@ -0,0 +1,208 @@
+%D \module
+%D [ file=s-pre-64,
+%D version=2006.05.11,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 64,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% To be documented, used in 2007
+
+\usemodule[s][pre-60]
+
+\newcounter\shapesynctag
+\newdimen\slantedshapedimen
+\newdimen\slantedshapestep
+\newdimen\slantedshapeleftskip
+\newdimen\slantedshapeoffset
+\newdimen\slantedshapeextra
+
+\positioningtrue
+
+\def\AdaptShape
+ {\doglobal\increment\shapesynctag
+ \getnoflines\textheight
+ \slantedshapestep\dimexpr\slantedshapeleftskip/\noflines\relax
+ \leftskip\slantedshapeleftskip
+ \scratchdimen\dimexpr\MPy{text:\MPp\shapesynctag}+\MPh{text:\MPp\shapesynctag}-\topskip-\MPy\shapesynctag\relax
+ \advance\scratchdimen\slantedshapeextra
+ \getnoflines\scratchdimen
+ \slantedshapedimen \noflines \slantedshapestep
+ \scratchtoks\emptytoks
+ \dorecurse{30}
+ {\appendetoks
+ \the\dimexpr-\slantedshapedimen+\slantedshapeoffset \relax\space
+ \the\dimexpr \hsize-2\slantedshapeoffset\relax\space
+ \to\scratchtoks
+ \advance\slantedshapedimen \slantedshapestep}%
+ \parshape 30 \the\scratchtoks
+ \strut\xypos\shapesynctag}
+
+\def\AdaptShapeX
+ {\doglobal\increment\shapesynctag
+ \getnoflines\textheight
+ \slantedshapestep\dimexpr\slantedshapeleftskip/\noflines\relax
+ \leftskip\slantedshapeleftskip
+ \scratchdimen\dimexpr\MPy{text:\MPp\shapesynctag}+\MPh{text:\MPp\shapesynctag}-\topskip-\MPy\shapesynctag\relax
+ \advance\scratchdimen\slantedshapeextra
+ \getnoflines\scratchdimen
+ \slantedshapedimen \noflines \slantedshapestep
+ \scratchtoks\emptytoks
+ \dorecurse{30}
+ {\appendetoks
+ \the\dimexpr-\slantedshapedimen+\slantedshapeoffset +5cm \relax\space
+ \the\dimexpr \hsize-2\slantedshapeoffset\relax\space
+ \to\scratchtoks
+ \advance\slantedshapedimen \slantedshapestep}%
+ \parshape 30 \the\scratchtoks
+ \strut\xypos\shapesynctag}
+
+\setuppapersize[S6][S6]
+
+\setupinteraction
+ [state=start,
+ click=no]
+
+\setupinteractionscreen
+ [option=max]
+
+\setuplayout
+ [backspace=12pt,
+ topspace=24pt,
+ height=middle,
+ width=middle,
+ header=0pt,
+ footer=0pt]
+
+\definecolor[maincolor][b=.5]
+\definecolor[somecolor][g=.5]
+\definecolor[morecolor][r=.5]
+
+\setupcolors
+ [textcolor=maincolor,
+ state=start]
+
+\setupbackgrounds
+ [text]% [text]
+ [background={base,text,invoke}]
+
+\definelayer
+ [text]
+ [width=\textwidth,
+ height=\textheight]
+
+\definelayer
+ [base]
+ [width=\textwidth,
+ height=\textheight]
+
+\definetype [epet] [style=,color=morecolor]
+\setuptype [style=,color=somecolor]
+
+\slantedshapeleftskip150pt
+\slantedshapeoffset12pt
+\slantedshapeextra10pt
+
+\startreusableMPgraphic{page}
+ StartPage ;
+ fill Page withcolor \MPcolor{maincolor} ;
+ path p ; p := Field[Text][Text] enlarged 6pt ;
+ p :=
+ llcorner p shifted (0,-12pt) --
+ lrcorner p shifted (-150pt,0) --
+ urcorner p shifted (0,12pt) --
+ ulcorner p shifted (150pt,0) --
+ cycle ;
+ fill p
+ withcolor .9white ;
+ StopPage ;
+\stopreusableMPgraphic
+
+\defineoverlay[page][\reuseMPgraphic{page}]
+\setupbackgrounds[page][background=page]
+
+\setupalign[flushleft]
+
+\def\StartItem
+ {\blank[line]
+ \begingroup
+ \EveryPar {\AdaptShape}} % beware: \ABBREV aan begin gaat fout
+
+\def\StopItem
+ {\endgraf
+ \endgroup
+ \blank[line]}
+
+\def\StartType
+ {\blank[halfline]
+ \begingroup
+ \EveryPar {\AdaptShape}
+ \dontleavehmode \quad}
+
+\def\StopType
+ {\endgraf
+ \endgroup
+ \blank[halfline]}
+
+\def\Title#1%
+ {\page
+ \setlayer
+ [text]
+ [preset=lefttop,
+ rotation=90]
+ {\color[white]{\scale[height=24pt]{\strut#1}}}}
+
+\def\SetBanner#1%
+ {\setuplayer[base][state=repeat]
+ \setlayer[base][preset=rightbottom]{\color[white]{\scale[height=9pt]{\strut#1}}}}
+
+\let\TitleFont\relax
+
+\startmode[atpragma]
+ \definefontfeature[default][method=node,script=latn,language=dflt,liga=yes,onum=yes,kern=yes]
+ \definefont[TitleFont][palatinosanscom-bold*default at 48pt]
+ \definefont[MainTextFont][palatinosanscom-regular*default at 12pt] \setupinterlinespace[line=15pt]
+ \appendtoks
+ \MainTextFont % hack, as we define a bodyfont at that point (better have a proper typeface)
+ \to \everystarttext
+\stopmode
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+
+\usemodule[abr-01]
+
+\SetBanner{tug 2007 san diego}
+
+\Title {hans hagen}
+
+\startstandardmakeup \TitleFont \setupinterlinespace[line=3ex] \vfill
+
+\StartItem \dontleavehmode \quad {\morecolor zapfino, a} \StopItem
+\StartItem \dontleavehmode \quad {\morecolor torture test} \StopItem
+\StartItem \dontleavehmode \quad {\morecolor for luatex} \StopItem
+
+\vfill \stopstandardmakeup
+
+\Title{loading fonts}
+
+\StartSteps
+
+\StartItem the \OPENTYPE\ font reader is borrowed from \FONTFORGE\ \FlushStep \StopItem
+\StartItem once it was ready, we could look into such a font \FlushStep \StopItem
+\StartItem it tooks while to figure out the format due to rather fuzzy specs \FlushStep \StopItem
+\StartItem it took us even more time to find out that the loader was flawed \FlushStep \StopItem
+\StartItem one reason was that fonts themselves may have bugs or be incomplete \FlushStep \StopItem
+\StartItem then we changed to \FONTFORGE\ version 2 \FlushStep \StopItem
+\StartItem this made the missing pieces surface in more complex feature handling \FlushStep \StopItem
+\StartItem while implementing features the new table format was cleaned up \FlushStep \StopItem
+
+\StopSteps
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-66.tex b/tex/context/modules/common/s-pre-66.tex
new file mode 100644
index 000000000..3e89e4a7e
--- /dev/null
+++ b/tex/context/modules/common/s-pre-66.tex
@@ -0,0 +1,161 @@
+%D \module
+%D [ file=s-pre-66,
+%D version=2009.02.24,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 66,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Cambria (made in the aftermath of testing \OPENTYPE\ math).
+
+% \enablemode[paper]
+
+\usemodule[pre-60]
+\usemodule[abr-01]
+
+\definepapersize
+ [wide]
+ [width=960pt,
+ height=600pt]
+
+\setuppapersize
+ [wide]
+ [wide]
+
+\setuplayout
+ [topspace=20pt,
+ bottomspace=20pt,
+ header=0pt,
+ footer=0pt,
+ backspace=20pt,
+ height=middle,
+ rightmargin=0pt,
+ rightedge=\dimexpr220pt-40pt\relax,
+ rightedgedistance=40pt,
+ leftedge=0pt,
+ leftmargin=0pt,
+ cutspace=220pt,
+ width=\dimexpr960pt-40pt-220pt\relax]
+
+\definebodyfontenvironment
+ [20pt]
+
+\definefontfeature[default][default][mode=node,script=latn]
+
+\usetypescript
+ [cambria]
+
+\setupbodyfont
+ [cambria,20pt] \bf
+
+\setupwhitespace
+ [big]
+
+\setupcolors
+ [state=start]
+
+\definecolor[pagecolor][s=.25]
+\definecolor[edgecolor][b=.50,g=.75,r=.75]
+
+\setupinteraction
+ [state=start,
+ click=no,
+ color=,
+ contrastcolor=]
+
+\defineoverlay[pagegraphic][\reuseMPgraphic{pagegraphic}]
+
+\startuseMPgraphic{pagegraphic}
+ StartPage ;
+ fill Page enlarged 10pt withcolor \MPcolor{pagecolor} ;
+ fill Page enlarged 10pt leftenlarged (CutSpace - bbwidth(Page) - 10pt) withcolor \MPcolor{edgecolor} ;
+ % fill Field[Text][RightEdge] withcolor green ;
+ % fill Field[Text][Text] withcolor yellow ;
+ StopPage ;
+\stopuseMPgraphic
+
+\setupbackgrounds
+ [page]
+ [background=pagegraphic]
+
+\setupbackgrounds
+ [text]
+ [rightedge]
+ [background=edge]
+
+\definelayer
+ [edge]
+ [width=\rightedgewidth,
+ state=repeat]
+
+\setuphead
+ [chapter]
+ [style=\bfc,
+ color=edgecolor]
+
+\setupcolors
+ [textcolor=edgecolor]
+
+\newcounter\MyCounter
+
+\def\StartRemark#1%
+ {\doglobal\increment\MyCounter % hm, we could use the autoref (todo in cont-xp)
+ \title[topic:\MyCounter]{#1}
+ \setlayer[edge][preset=middletop,y=\thelayerheight{edge}]{\strut\color[pagecolor]{\bf\goto{#1}[topic:\MyCounter]}}
+ \StartSteps}
+
+\def\StopRemark
+ {\StopSteps
+ \page}
+
+\def\StartRemark#1%
+ {\doglobal\increment\MyCounter % hm, we could use the autoref (todo in cont-xp)
+ \title[topic:\MyCounter]{#1}
+ \StartSteps
+ \def\StopRemark
+ {\StopSteps
+ \page
+ \setlayer[edge][preset=middletop,y=\thelayerheight{edge}]{\strut\color[pagecolor]{\bf\goto{#1}[topic:\MyCounter]}}}}
+
+\def\StartTitlePage
+ {\startstandardmakeup[top=\vss,bottom=\vss\vss]
+ \definedfont[Bold sa 4]
+ \raggedcenter
+ \setupinterlinespace
+ \baselineskip=1\baselineskip plus 1fil minus 1fil\relax}
+
+\def\StopTitlePage
+ {\stopstandardmakeup}
+
+\doifnotmode{demo} {\endinput}
+
+\starttext
+
+\StartTitlePage x\\y\\z \StopTitlePage
+
+\StartRemark{a}
+ a \FlushStep
+ a \FlushStep
+\StopRemark
+
+\StartRemark{b}
+ b \FlushStep
+ b \FlushStep
+ b \FlushStep
+\StopRemark
+
+\StartRemark{c}
+ c \FlushStep
+ c \FlushStep
+ c \FlushStep
+ c \FlushStep
+\StopRemark
+
+\stoptext
+
+
diff --git a/tex/context/modules/common/s-pre-67.tex b/tex/context/modules/common/s-pre-67.tex
new file mode 100644
index 000000000..84ea1a66c
--- /dev/null
+++ b/tex/context/modules/common/s-pre-67.tex
@@ -0,0 +1,155 @@
+% todo: version of placement that also takes the sync node
+
+\usemodule[s][abr-02]
+\usemodule[s][pre-60]
+
+\definecolor[red:fullcolor] [r=1]
+\definecolor[red:lightcolor] [r=.5]
+\definecolor[red:darkcolor] [r=.375]
+
+\definecolor[green:fullcolor] [g=1]
+\definecolor[green:lightcolor] [g=.5]
+\definecolor[green:darkcolor] [g=.375]
+
+\definecolor[blue:fullcolor] [b=1]
+\definecolor[blue:lightcolor] [b=.5]
+\definecolor[blue:darkcolor] [b=.375]
+
+\definepalet[red-scheme] [fullcolor=red:fullcolor, lightcolor=red:lightcolor, darkcolor=red:darkcolor]
+\definepalet[green-scheme][fullcolor=green:fullcolor,lightcolor=green:lightcolor,darkcolor=green:darkcolor]
+\definepalet[blue-scheme] [fullcolor=blue:fullcolor, lightcolor=blue:lightcolor, darkcolor=blue:darkcolor]
+
+\setuppalet[red-scheme]
+
+\setupcolors
+ [textcolor=darkcolor]
+
+\setupinteraction
+ [color=darkcolor,
+ contrastcolor=darkcolor]
+
+\startuseMPgraphic{bullet}
+ path b, p ;
+ p := fullsquare scaled .5LineHeight ;
+ b := boundingbox p ;
+ p := p rotatedaround(center p, 45) ;
+ p := p shifted (0,-.125StrutDepth) ;
+ fill p withcolor \MPcolor{lightcolor} ;
+ setbounds currentpicture to b ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{bar}
+ path b, p ;
+ p := fullsquare scaled .25LineHeight ;
+ b := boundingbox p ;
+ p := p rotatedaround(center p, 45) ;
+ p := p shifted (0,+.25StrutDepth) ;
+ fill p withcolor \MPcolor{lightcolor} ;
+ setbounds currentpicture to b ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{page}
+ StartPage ;
+ fill Page enlarged 5mm withcolor .1[white,\MPcolor{fullcolor}] ;
+ interim linecap := butt ;
+ numeric h ; h := bbheight(Page)/4 ;
+ numeric w ; w := bbwidth(Page)/4 ;
+ h := h randomized(h) ;
+ w := w randomized(w) ;
+ draw
+ ulcorner Page shifted (0,-h) -- ulcorner Page -- ulcorner Page shifted (w,0)
+ withpen pensquare scaled .5cm
+ withcolor \MPcolor{lightcolor} ;
+ numeric h ; h := bbheight(Page)/4 ;
+ numeric w ; w := bbwidth(Page)/4 ;
+ h := h randomized(h) ;
+ w := w randomized(w) ;
+ draw
+ lrcorner Page shifted (0,h) -- lrcorner Page -- lrcorner Page shifted (-w,0)
+ withpen pensquare scaled .5cm
+ withcolor \MPcolor{lightcolor} ;
+ setbounds currentpicture to Page ;
+ StopPage ;
+\stopuseMPgraphic
+
+\defineoverlay[page][\useMPgraphic{page}]
+
+\definesymbol[1][\reuseMPgraphic{bullet}]
+\definesymbol[2][\reuseMPgraphic{bar}]
+
+\setupitemgroup[itemize][2][width=1em]
+
+\setupinteraction
+ [state=start,
+ click=no]
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [width=middle,
+ height=middle,
+ header=0pt,
+ footer=0pt,
+ backspace=1cm,
+% topspace=1cm]
+ topspace=.5cm]
+
+\setupbackgrounds
+ [page]
+ [background=page]
+
+\setuphead
+ [chapter]
+ [command=\MyCommand,
+ before=,
+ after={\blank[disable]},
+ color=lightcolor,
+ style=\bfc]
+
+\definelayer
+ [title]
+ [width=\paperwidth,
+ height=\paperheight]
+
+\setupbackgrounds
+ [page]
+ [background={page,title}]
+
+\setupwhitespace
+ [big]
+
+\unexpanded\def\MyCommand#1#2%
+ {\setlayer[title][preset=rightbottom,x=.75cm,y=.5cm]{#2}}
+
+\def\titlepage#1#2%
+ {\startstandardmakeup
+ \definefont[LargeFont][Normal at 100pt]
+ \setlayerframed
+ [title]
+ [preset=lefttop,x=1cm,y=.25cm]
+ [align=flushleft,foregroundstyle=\LargeFont,offset=0pt,foregroundcolor=lightcolor,frame=off]
+ {#1}
+ \definefont[SmallFont][Normal at 50pt]
+ \setlayerframed
+ [title]
+ [preset=rightbottom,x=1cm,y=.5cm]
+ [align=flushright,foregroundstyle=\SmallFont,offset=0pt,foregroundcolor=lightcolor,frame=off]
+ {#2}
+ \stopstandardmakeup}
+
+\let\Title\title
+\let\TitlePage\titlepage
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+ \chapter{Test}
+ \startitemize
+ \startitem test \stopitem
+ \startitem test \stopitem
+ \startitem test \stopitem
+ \stopitemize
+\stoptext
+
+\endinput
diff --git a/tex/context/modules/common/s-pre-68.tex b/tex/context/modules/common/s-pre-68.tex
new file mode 100644
index 000000000..3c04a87e1
--- /dev/null
+++ b/tex/context/modules/common/s-pre-68.tex
@@ -0,0 +1,150 @@
+%D \module
+%D [ file=s-pre-68,
+%D version=2009.08.28,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 68,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\usemodule[pre-60,abr-02]
+
+% style
+
+\setuppapersize
+ [S66][S66]
+
+\setuplayout
+ [height=middle,
+ width=middle,
+ header=0pt,
+ footer=0pt,
+ backspace=2cm,
+ topspace=2cm]
+
+\setupinteraction
+ [state=start,
+ click=no]
+
+\definecolor[maincolor][r=.4]
+
+\startreusableMPgraphic{page}
+ StartPage ;
+ fill Page enlarged 5mm withcolor \MPcolor{maincolor} ;
+ StopPage ;
+\stopreusableMPgraphic
+
+\startreusableMPgraphic{next}
+ fill ultriangle scaled .15PaperWidth withcolor white ;
+\stopreusableMPgraphic
+
+\startreusableMPgraphic{last}
+ fill boundingbox(ultriangle scaled .15PaperWidth) withcolor white ;
+\stopreusableMPgraphic
+
+\startuniqueMPgraphic{bullit}
+ fill ultriangle scaled 2ExHeight withcolor white ;
+\stopuniqueMPgraphic
+
+\definelayer
+ [extra]
+ [width=\paperwidth,
+ height=\paperheight]
+
+\defineoverlay
+ [page]
+ [\reuseMPgraphic{page}]
+
+\setupbackgrounds
+ [page]
+ [background={page,extra}]
+
+\setupcolors
+ [state=start,
+ textcolor=white]
+
+\setuphead
+ [chapter]
+ [style=\bfc]
+
+\definehead[Title][title]
+
+\definesymbol[MyBullet][\uniqueMPgraphic{bullit}]
+
+\setupitemgroup[itemize][each][symbol=MyBullet]
+
+\usetypescript[cambria]
+\setupbodyfont[cambria,14.4pt]
+
+% interface
+
+\def\StartItems
+ {\begingroup
+ \StartSteps
+ \startitemize
+ \def\StartItems{\startitemize\def\StopItems{\stopitemize}}}
+
+\def\StopItems
+ {\FlushStep
+ \stopitemize
+ \NextPageSymbol
+ \StopSteps
+ \endgroup}
+
+\def\Item
+ {\def\Item{\FlushStep\item}
+ \item}
+
+\def\NextPageSymbol
+ {\setlayer
+ [extra]
+ [preset=rightbottom,offset=2mm]
+ {\ifnum\realpageno=\lastpage
+ \reuseMPgraphic{last}%
+ \else\ifnum\realpageno>1
+ \reuseMPgraphic{next}%
+ \fi\fi
+ \FlushStep}}
+
+\def\TitlePage#1#2%
+ {\startstandardmakeup[bottom=,top=]
+ \scale[width=\textwidth]{\framed[align=flushleft,foregroundstyle=\bf,frame=off]{#1}}
+ \vfilll
+ \hfill\scale[width=.5\textwidth]{\framed[align=flushright,foregroundstyle=\bf,frame=off]{#2}}
+ \stopstandardmakeup}
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+
+\TitlePage{I'm running\\out of examples}{Hans Hagen\\Someplace, 2031}
+
+\Title{Alpha}
+
+\StartItems
+\Item one
+\Item two
+\Item three
+\StopItems
+
+\Title{Beta}
+
+\StartItems
+\Item four
+\Item five
+\Item six
+\StopItems
+
+\Title{Gamma}
+
+\StartItems
+\Item seven
+\Item eight
+\Item nine
+\StopItems
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-93.tex b/tex/context/modules/common/s-pre-93.tex
new file mode 100644
index 000000000..c36762f38
--- /dev/null
+++ b/tex/context/modules/common/s-pre-93.tex
@@ -0,0 +1,208 @@
+%D \module
+%D [ file=s-pre-20,
+%D version=2000.08.07,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 20,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\setupbodyfont
+ [lbr,14.4pt]
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [topspace=0cm,
+ backspace=0cm,
+ header=0pt,
+ footer=0pt,
+ width=middle,
+ height=middle]
+
+\setupcolors
+ [state=start]
+
+\setupinteraction
+ [state=start,
+ click=no,
+ display=new,
+ color=LineColor,
+ contrastcolor=LineColor]
+
+\setupinteractionscreen
+ [option=max]
+
+\setupsystem
+ [random=big] % once per hour
+
+\startreusableMPgraphic{page}
+ StartPage ;
+ filldraw Page withcolor \MPcolor{PageColor} ;
+ pickup pencircle scaled (.25cm+uniformdeviate.25cm) ;
+ for i=1 upto 200 :
+ drawdot
+ (uniformdeviate PaperWidth,uniformdeviate PaperHeight)
+ withcolor \MPcolor {LineColor} ;
+ endfor ;
+ StopPage ;
+\stopreusableMPgraphic
+
+\startuseMPgraphic{idea}
+ StartPage ;
+ path p ;
+ p := unitsquare xyscaled(\MPw{idea:\realfolio},\MPh{idea:\realfolio}) superellipsed .90 ;
+ p := p shifted \MPxy{idea:\realfolio} ;
+ draw p withpen pencircle scaled .500cm withcolor \MPcolor{PageColor} ;
+ fill p withcolor \MPcolor{\overlaycolor} ;
+ draw p withpen pencircle scaled .250cm withcolor \MPcolor{LineColor} ;
+ p := unitsquare xyscaled(\MPw{title:\realfolio},\MPh{title:\realfolio}) superellipsed .90 ;
+ p := p shifted \MPxy{title:\realfolio} ;
+ draw p withpen pencircle scaled .250cm withcolor \MPcolor{PageColor} ;
+ fill p withcolor \MPcolor{\overlaycolor} ;
+ draw p withpen pencircle scaled .125cm withcolor \MPcolor{LineColor} ;
+ StopPage ;
+\stopuseMPgraphic
+
+\definecolor[PageColor][s=.50]
+\definecolor[TextColor][s=.80]
+\definecolor[DoneColor][s=.65]
+\definecolor[LineColor][r=.7,g=.6,b=.5]
+
+\defineoverlay [idea] [\useMPgraphic {idea}]
+\defineoverlay [page] [\reuseMPgraphic{page}]
+
+\setupbackgrounds
+ [page]
+ [background={page,forward}]
+
+\defineoverlay[forward][\overlaybutton{forward}]
+
+% alternatief: buffer en ander regime, zodat lokale kleuren
+% kunnen worden genilled. Pos gebruiken om te positioneren.
+
+\definereference[thispage][page(\realfolio)]
+
+\newbox\firstideabox \setbox\firstideabox =\null
+\newbox\secondideabox \setbox\secondideabox=\null
+\newbox\thirdideabox \setbox\thirdideabox =\null
+
+\def\StartTopic% bottom title, top title
+ {\dodoublegroupempty\doStartTopic}
+
+\def\doStartTopic#1#2% the positions end up at each page -)
+ {\setbox\firstideabox=
+ \vbox to \makeupheight
+ \bgroup
+ \getrandomdimen\scratchdimen{.5cm}\makeupheight
+ \vskip 0cm plus \scratchdimen
+ \hbox to \makeupwidth
+ \bgroup
+ \getrandomdimen\scratchdimen{.5cm}\makeupwidth
+ \hskip 0cm plus \scratchdimen
+ \setbox\scratchbox=\hbox\bgroup\hpos{idea:\realfolio}
+ \bgroup
+ \getrandomdimen\hsize{.5\makeupwidth}{.7\makeupwidth}%
+ \framed
+ [offset=3ex,align=middle,strut=no,frame=off,
+ before=,after=]
+ \bgroup
+ \setupwhitespace[big]%
+ \doifsomething{#2}{\Title{#2}}%
+ \def\StopTopic{%
+ \egroup
+ \egroup
+ \egroup
+ \gotobox{\box\scratchbox}[thispage]%
+ \getrandomdimen\scratchdimen{.5cm}\makeupwidth
+ \hskip 0cm plus \scratchdimen
+ \egroup
+ \getrandomdimen\scratchdimen{.5cm}\makeupheight
+ \vskip 0cm plus \scratchdimen
+ \hbox to \makeupwidth
+ \bgroup
+ \hfill
+ \hpos{title:\realfolio}
+ {\button[offset=1.5ex,frame=off]{#1}[backward]}%
+ \getrandomdimen\scratchdimen{.5cm}{2.5cm}%
+ \hskip \scratchdimen
+ \egroup
+ \getrandomdimen\scratchdimen{.5cm}{1.5cm}
+ \vskip \scratchdimen
+ \egroup
+ \setbox\secondideabox=\vbox
+ {\framed
+ [offset=overlay,frame=off,background=idea,backgroundcolor=TextColor]
+ {\copy\firstideabox}}
+ \setbox\firstideabox=\vbox
+ {\framed
+ [offset=overlay,frame=off,background=idea,backgroundcolor=DoneColor]
+ {\LineColor\copy\firstideabox}}
+ \startstandardmakeup
+ \startoverlay
+ {\copy\thirdideabox }
+ {\copy\secondideabox}
+ \stopoverlay
+ \stopstandardmakeup
+ \setbox\thirdideabox=\vbox
+ {\startoverlay
+ {\copy\thirdideabox }
+ {\copy\firstideabox}
+ \stopoverlay}}}
+
+\long\def\TitlePage#1#2%
+ {\bgroup
+ \switchtobodyfont[32pt]
+ \StartTopic{#1}#2\StopTopic
+ \egroup}
+
+\def\Title#1{\midaligned{\bfb#1}\blank}
+
+\doifnotmode{demo}{\endinput}
+
+% \usemodule[pre-super] % super ellipse as well as superpositioned
+
+\starttext
+
+\TitlePage{August 2000}{Something Very Important}
+
+\StartTopic{Alpha}
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+\StopTopic
+
+\StartTopic{Beta and Gamma}
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+\StopTopic
+
+\StartTopic{Delta}
+ A simple and not too long text just to show the idea.
+\StopTopic
+
+\StartTopic{Epsilon}
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+\StopTopic
+
+\StartTopic{Zeta, Eta and Theta}
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+\StopTopic
+
+\StartTopic{Omega}
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+ A simple and not too long text just to show the idea.
+\StopTopic
+
+\stoptext
diff --git a/tex/context/modules/common/s-pre-96.tex b/tex/context/modules/common/s-pre-96.tex
new file mode 100644
index 000000000..2ad752007
--- /dev/null
+++ b/tex/context/modules/common/s-pre-96.tex
@@ -0,0 +1,188 @@
+%D \module
+%D [ file=s-pre-26,
+%D version=1999.08.20,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 26,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\setuppapersize
+ [S44][S44]
+
+\definetypeface[main][rm][casual][informal][default]
+
+\setupbodyfont[main,13pt]
+
+\setuplayout
+ [backspace=0pt,
+ topspace=0pt,
+ header=0pt,
+ footer=0pt,
+ bottom=0pt,
+ width=middle,
+ height=fit]
+
+\setupbottom
+ [style=\ssbf,
+ color=white]
+
+\setupfooter
+ [style=\ssbfb,
+ color=white]
+
+\setupinteraction
+ [state=start,
+ click=no]
+
+\setupinteractionscreen
+ [option=max]
+
+\definecolor[white] [s=.8]
+\definecolor[red] [r=.7]
+\definecolor[green] [g=.7]
+\definecolor[blue] [b=.7]
+\definecolor[yellow][r=.7,g=.7]
+
+\setupcolors
+ [state=start]
+
+\defineoverlay [page] [\reuseMPgraphic{page}]
+\defineoverlay [text] [\useMPgraphic {text}]
+\defineoverlay [continue] [\overlaybutton {nextpage}]
+
+\setupbackgrounds % otherwise in acrobat 5 rounding error
+ [paper] % and one pixel white line
+ [background=page]
+
+\setupbackgrounds
+ [page]
+ [background={page,continue}]
+
+\definecolor [PageColor][black]
+
+\definecolor [TextColor 0][white]
+\definecolor [TextColor 1][red]
+\definecolor [TextColor 2][green]
+\definecolor [TextColor 3][blue]
+\definecolor [TextColor 4][yellow]
+
+\definecolor [TextColor] [TextColor 0]
+
+\defineframedtext
+ [TopicPage]
+
+\defineframedtext
+ [TopicText]
+
+\setupframedtexts
+ [TopicPage]
+ [width=\textwidth,
+ height=\textheight,
+ offset=overlay]
+
+\setupframedtexts
+ [TopicText]
+ [offset=10pt,
+ style=bold,
+ width=\TopicWidth,
+ background=text,
+ align=normal]
+
+\setupframedtexts
+ [TopicPage,TopicText]
+ [frame=off,
+ depthcorrection=off,
+ before=,
+ after=]
+
+\newbox \TopicBox % we stack old pages
+\newcounter\KindOfTopic % and cycle through corners
+\newdimen \TopicWidth % with randomized widths
+
+\setupinteraction
+ [color=lightgray,
+ contrastcolor=lightgray,
+ style=]
+
+\def\StartTopic
+ {\definecolor[TextColor][TextColor \KindOfTopic]
+ \ifcase\KindOfTopic\relax
+ \TopicWidth=.7\textwidth
+ \else
+ \getrandomdimen\TopicWidth{.55\textwidth}{.7\textwidth}
+ \fi
+ \ifcase\KindOfTopic\relax
+ \setupframedtexts [TopicPage] [align={middle,lohi}] \or
+ \setupframedtexts [TopicPage] [align={right,high}] \or
+ \setupframedtexts [TopicPage] [align={left,high}] \or
+ \setupframedtexts [TopicPage] [align={left,low}] \or
+ \setupframedtexts [TopicPage] [align={right,low}] \fi
+ \setbox\scratchbox=\vbox \bgroup \dontcomplain
+ \noindent \startTopicPage [none]
+ \noindent \startTopicText [none] }
+
+\def\StopTopic%
+ {\stopTopicText
+ \stopTopicPage
+ \egroup
+ \global\setbox\TopicBox=\vbox
+ {\startoverlay
+ {\box\TopicBox} {\box\scratchbox}
+ \stopoverlay}
+ \copy\TopicBox
+ \ifnum\KindOfTopic=4
+ \def\KindOfTopic{1}
+ \else
+ \increment\KindOfTopic
+ \fi
+ \getrandomdimen\TopicWidth{.55\textwidth}{.7\textwidth}
+ \page}
+
+\startuseMPgraphic{text}
+ path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
+ color c ; c := (.7+uniformdeviate.3)*\MPcolor{TextColor} ;
+ p := p enlarged -1.25pt ;
+ filldraw p withcolor c ;
+ draw p withpen pencircle scaled 2.5pt withcolor .75c ;
+\stopuseMPgraphic
+
+\startreusableMPgraphic{page}
+ path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
+ color c ; c := \MPcolor{PageColor} ;
+ filldraw p enlarged 5pt withcolor c ; % bleeding
+ draw p withpen pencircle scaled 2.5pt withcolor c ;
+\stopreusableMPgraphic
+
+\def\StartNopic
+ {\def\KindOfTopic{0} % centered at the page
+ \StartTopic
+ \bfd\setupinterlinespace
+ \def\\{\blank\bfb\setupinterlinespace}
+ \raggedcenter}
+
+\def\StopNopic
+ {\StopTopic}
+
+\def\TitlePage#1%
+ {\StartNopic#1\StopNopic}
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+
+\StartNopic
+ a dull talk \\ \currentdate
+\StopNopic
+
+\dorecurse{10}{\StartTopic \input tufte \StopTopic}
+
+\StartNopic
+ that's it \\ goodbye
+\StopNopic
+
+\stoptext