summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/colo-ini.tex670
-rw-r--r--tex/context/base/cont-fil.tex34
-rw-r--r--tex/context/base/cont-new.tex215
-rw-r--r--tex/context/base/cont-sys.ori88
-rw-r--r--tex/context/base/context.tex3
-rw-r--r--tex/context/base/core-fig.tex60
-rw-r--r--tex/context/base/core-fld.tex24
-rw-r--r--tex/context/base/core-grd.tex4
-rw-r--r--tex/context/base/core-int.tex15
-rw-r--r--tex/context/base/core-itm.tex4
-rw-r--r--tex/context/base/core-mis.tex6
-rw-r--r--tex/context/base/core-not.tex33
-rw-r--r--tex/context/base/core-pos.tex222
-rw-r--r--tex/context/base/core-ref.tex9
-rw-r--r--tex/context/base/core-rul.tex6
-rw-r--r--tex/context/base/core-spa.tex85
-rw-r--r--tex/context/base/core-tbl.tex17
-rw-r--r--tex/context/base/core-ver.tex2
-rw-r--r--tex/context/base/enco-ans.tex20
-rw-r--r--tex/context/base/enco-com.tex43
-rw-r--r--tex/context/base/enco-fde.tex8
-rw-r--r--tex/context/base/enco-ini.tex18
-rw-r--r--tex/context/base/enco-mis.tex2
-rw-r--r--tex/context/base/enco-run.tex41
-rw-r--r--tex/context/base/enco-tbo.tex148
-rw-r--r--tex/context/base/font-arb.tex11
-rw-r--r--tex/context/base/font-ini.tex103
-rw-r--r--tex/context/base/font-run.tex80
-rw-r--r--tex/context/base/hand-def.tex2
-rw-r--r--tex/context/base/java-fld.tex208
-rw-r--r--tex/context/base/m-chart.tex5
-rw-r--r--tex/context/base/m-steps.tex31
-rw-r--r--tex/context/base/math-run.tex7
-rw-r--r--tex/context/base/meta-ini.tex33
-rw-r--r--tex/context/base/meta-pag.tex4
-rw-r--r--tex/context/base/meta-pre.tex3
-rw-r--r--tex/context/base/mult-con.tex9
-rw-r--r--tex/context/base/mult-sys.tex2
-rw-r--r--tex/context/base/page-bck.tex76
-rw-r--r--tex/context/base/page-flt.tex2
-rw-r--r--tex/context/base/page-lay.tex8
-rw-r--r--tex/context/base/page-lyr.tex48
-rw-r--r--tex/context/base/page-mak.tex5
-rw-r--r--tex/context/base/page-mul.tex66
-rw-r--r--tex/context/base/page-num.tex22
-rw-r--r--tex/context/base/page-one.tex10
-rw-r--r--tex/context/base/page-set.tex20
-rw-r--r--tex/context/base/page-sid.tex2
-rw-r--r--tex/context/base/page-txt.tex48
-rw-r--r--tex/context/base/regi-il1.tex2
-rw-r--r--tex/context/base/regi-ini.tex2
-rw-r--r--tex/context/base/regi-win.tex2
-rw-r--r--tex/context/base/s-abr-01.tex3
-rw-r--r--tex/context/base/s-fnt-01.tex60
-rw-r--r--tex/context/base/s-pre-00.tex2
-rw-r--r--tex/context/base/s-pre-01.tex45
-rw-r--r--tex/context/base/s-pre-02.tex302
-rw-r--r--tex/context/base/s-pre-03.tex179
-rw-r--r--tex/context/base/s-pre-04.tex131
-rw-r--r--tex/context/base/s-pre-05.tex127
-rw-r--r--tex/context/base/s-pre-06.tex11
-rw-r--r--tex/context/base/s-pre-07.tex198
-rw-r--r--tex/context/base/s-pre-08.tex267
-rw-r--r--tex/context/base/s-pre-09.tex380
-rw-r--r--tex/context/base/s-pre-10.tex306
-rw-r--r--tex/context/base/s-pre-13.tex282
-rw-r--r--tex/context/base/s-pre-14.tex264
-rw-r--r--tex/context/base/s-pre-15.tex21
-rw-r--r--tex/context/base/s-pre-16.tex203
-rw-r--r--tex/context/base/s-pre-19.tex58
-rw-r--r--tex/context/base/s-pre-22.tex319
-rw-r--r--tex/context/base/s-pre-23.tex109
-rw-r--r--tex/context/base/setupb.tex22
-rw-r--r--tex/context/base/spec-fdf.tex118
-rw-r--r--tex/context/base/spec-ini.tex2
-rw-r--r--tex/context/base/spec-win.tex4
-rw-r--r--tex/context/base/supp-box.tex6
-rw-r--r--tex/context/base/supp-lan.tex9
-rw-r--r--tex/context/base/supp-mpe.tex49
-rw-r--r--tex/context/base/supp-pdf.tex40
-rw-r--r--tex/context/base/supp-ran.tex13
-rw-r--r--tex/context/base/syst-ext.tex40
-rw-r--r--tex/context/base/syst-new.tex18
-rw-r--r--tex/context/base/type-buy.tex225
-rw-r--r--tex/context/base/type-enc.tex604
-rw-r--r--tex/context/base/type-exa.tex106
-rw-r--r--tex/context/base/type-ini.tex270
-rw-r--r--tex/context/base/type-map.tex83
-rw-r--r--tex/context/base/type-pre.tex64
-rw-r--r--tex/context/base/type-siz.tex35
-rw-r--r--tex/context/base/type-syn.tex152
-rw-r--r--tex/context/base/verb-ini.tex12
-rw-r--r--tex/context/base/x-fig-00.tex3
-rw-r--r--tex/context/base/x-fig-01.tex2
-rw-r--r--tex/context/base/x-fig-02.tex76
-rw-r--r--tex/context/base/x-fig-03.tex46
-rw-r--r--tex/context/base/xtag-ini.tex44
-rw-r--r--tex/context/base/xtag-ini.tex~1161
-rw-r--r--tex/context/user/cont-sys.rme88
-rw-r--r--tex/context/user/cont-sys.tex96
100 files changed, 6047 insertions, 3196 deletions
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex
index 95baa0067..e98e14217 100644
--- a/tex/context/base/colo-ini.tex
+++ b/tex/context/base/colo-ini.tex
@@ -8,30 +8,30 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\writestatus{loading}{Context Color Macros}
-%D To do: stroke versus fill color
+%D To do: stroke versus fill color
\unprotect
-%D Color support is not present in \TEX. Colorful output can
-%D however be accomplished by using specials. This also means
-%D that this support depends on the \DVI\ driver used. At the
-%D moment this module was written, still no decent standard on
-%D color specials has been agreed upon. We therefore decided to
-%D implement a mechanism that is as independant as possible of
-%D drivers.
-%D
+%D Color support is not present in \TEX. Colorful output can
+%D however be accomplished by using specials. This also means
+%D that this support depends on the \DVI\ driver used. At the
+%D moment this module was written, still no decent standard on
+%D color specials has been agreed upon. We therefore decided to
+%D implement a mechanism that is as independant as possible of
+%D drivers.
+%D
%D Color support shares with fonts that is must be implemented
%D in a way that permits processing of individual \DVI\ pages.
%D Furthermore it should honour grouping. The first condition
%D forces us to use a scheme that keeps track of colors at
%D page boundaries. This can be done by means of \TEX's
-%D marking mechanism (\type{\mark}).
-%D
+%D marking mechanism (\type{\mark}).
+%D
%D When building pages, \TEX\ periodically looks at the
%D accumulated typeset contents and breaks the page when
%D suitable. At that moment, control is transfered to the
@@ -41,28 +41,28 @@
%D headers and footers are often in black upon white or
%D background. If colors are applied there, they definitely
%D are used local, which means that they don't cross page
-%D borders.
-%D
-%D Boxes are handled as a whole, which means that when we
-%D apply colors inside a box, those colors don't cross page
-%D boundaries, unless of course boxes are split or unboxed.
-%D Especially in interactive texts, colors are often used in
-%D such a local way: in boxes (buttons and navigational tools)
-%D or in the pagebody (backgrounds).
-%D
+%D borders.
+%D
+%D Boxes are handled as a whole, which means that when we
+%D apply colors inside a box, those colors don't cross page
+%D boundaries, unless of course boxes are split or unboxed.
+%D Especially in interactive texts, colors are often used in
+%D such a local way: in boxes (buttons and navigational tools)
+%D or in the pagebody (backgrounds).
+%D
%D So we can distinguish local colors, that don't cross
-%D pages from global colors, of which we can end many pages
-%D later. The color macros will treat both types in a different
-%D way, thus gaining some speed.
-%D
+%D pages from global colors, of which we can end many pages
+%D later. The color macros will treat both types in a different
+%D way, thus gaining some speed.
+%D
%D This module also deals with gray scales. Because similar
%D colors can end up in the same gray scale when printed in
%D black and white, we also implement a palet system that deals
%D with these matters. Because of fundamental differences
%D between color and gray scale printing, in \CONTEXT\ we also
%D differ between these. For historic reasons |<|we first
-%D implemented gray scales using patterns of tiny periods|>|
-%D and therefore called them {\em rasters}. So don't be
+%D implemented gray scales using patterns of tiny periods|>|
+%D and therefore called them {\em rasters}. So don't be
%D surprised if this term shows up.
\startmessages dutch library: colors
@@ -82,16 +82,16 @@
\startmessages english library: colors
title: color
- 1: system -- is global activated
- 2: system -- is local activated
+ 1: system -- is global activated
+ 2: system -- is local activated
3: -- is not defined
4: system -- is loaded
5: unknown system --
6: palette -- is available
- 7: palette -- is not available
+ 7: palette -- is not available
8: specification -- at color -- becomes black
- 9: -- color space is not supported
- 10: -- color space is supported
+ 9: -- color space is not supported
+ 10: -- color space is supported
11: color is converted to gray
\stopmessages
@@ -106,7 +106,7 @@
7: palette -- ist nicht verfuegbar
8: Spezifikation -- bei Farbe -- wird schwarz
9: -- Farbraum wird nicht unterstuetzt
- 10: -- Farbraum wird unterstuetzt
+ 10: -- Farbraum wird unterstuetzt
11: Farbe wird in Grau umgewandelt
\stopmessages
@@ -131,7 +131,7 @@
2: sistema -- attivato localmente
3: -- non definito
4: sistema -- caricato
- 5: sistema -- sconosciuto
+ 5: sistema -- sconosciuto
6: tavolozza -- resa disponibile
7: tavolozza -- non disponibile
8: specifica -- del colore -- convertita in nero
@@ -145,36 +145,36 @@
1: system -- er aktivert globalt
2: system -- er aktivert lokalt
3: -- er udefinert
- 4: system -- er lest inn
+ 4: system -- er lest inn
5: ukjent system --
6: palett -- er tilgjengelig
7: palett -- er ikke tilgjengelig
8: spesifikasjon -- for farge -- gir kun svart
9: -- fargerom er ikke støttet
- 10: -- fargerom er støttet
+ 10: -- fargerom er støttet
11: fargen vil bli vist som grå
\stopmessages
\startmessages romanian library: colors
title: culori
- 1: sistem -- este activata global
+ 1: sistem -- este activata global
2: sistem -- este activata local
3: -- nu este definita
4: sistem -- este incarcata
5: sistem -- necunoscuta
6: paleta -- este disponibila
- 7: palette -- nu este disponibila
+ 7: palette -- nu este disponibila
8: specificatia -- la culoarea -- devine neagra
9: spatiul de culoare -- nu este suportat
- 10: spatiul de culoare -- este suportat
+ 10: spatiul de culoare -- este suportat
11: culoarea este convertita la gri
\stopmessages
%D \macros
%D {definecolor}
%D
-%D We will enable users to specify colors in \kap{RGB} and
-%D \kap{CMYK} color spaces or gray scales using
+%D We will enable users to specify colors in \kap{RGB} and
+%D \kap{CMYK} color spaces or gray scales using
%D
%D \showsetup{\y!definecolor}
%D
@@ -183,30 +183,30 @@
%D \starttypen
%D \definecolor [SomeKindOfRed] [r=.8,g=.05,b=.05]
%D \stoptypen
-%D
-%D Such color specifications are saved in a macro in the
+%D
+%D Such color specifications are saved in a macro in the
%D following way:
-%D
-%D \starttypen
+%D
+%D \starttypen
%D \setvalue{\??cr name}{R:r:g:b}
%D \setvalue{\??cr name}{C:c:m:y:k}
%D \setvalue{\??cr name}{S:s}
%D \stoptypen
%D
-%D Gray scales are specified with the \type{s} parameter,
+%D Gray scales are specified with the \type{s} parameter,
%D where the is derived from screen.
\def\colorlist{}
-\def\@@cl@@z{0}
-\def\@@cl@@o{1}
+\def\@@cl@@z{0}
+\def\@@cl@@o{1}
\def\definecolor%
{\dodoubleargument\dodefinecolor}
\def\dodefinecolor[#1][#2]%
{% beware
-\saveglobal % ? \dodoglobal
+\saveglobal % ? \dodoglobal
\addtocommalist{#1}\colorlist
\restoreglobal
\doifassignmentelse{#2}
@@ -227,12 +227,12 @@
{\showmessage{\m!colors}{3}{#1}}}%
\dodoglobal\setvalue{#1}{\color[#1]}}
-%D The names of colors are stored in a comma separated list
+%D The names of colors are stored in a comma separated list
%D only for the purpose of showing them with \type{\showcolor}.
-%D
-%D Colors can be defined global by using \type{\doglobal},
-%D like in
-%D
+%D
+%D Colors can be defined global by using \type{\doglobal},
+%D like in
+%D
%D \startbuffer
%D \doglobal\definecolor [SomeKindOfRed] [r=.8,g=.05,b=.05]
%D \stopbuffer
@@ -240,31 +240,31 @@
%D \typebuffer
%D
%D \haalbuffer
-%D
-%D This color shows up as \color[SomeKindOfRed]{some kind
+%D
+%D This color shows up as \color[SomeKindOfRed]{some kind
%D of red}.
%D \macros
%D {setupcolor}
%D
-%D Color definitions can be grouped in files with the name:
+%D Color definitions can be grouped in files with the name:
%D
%D \starttypen
%D \f!colorprefix-identifier.tex
%D \stoptypen
%D
-%D where \type{\f!colorprefix} is \unprotect {\tttf \f!colorprefix}.
+%D where \type{\f!colorprefix} is \unprotect {\tttf \f!colorprefix}.
%D Loading such a file is done by \protect
%D
-%D \showsetup{\y!setupcolor}
+%D \showsetup{\y!setupcolor}
%D
%D Some default colors are specified in \type{colo-rgb.tex},
-%D which is loaded into the format by:
+%D which is loaded into the format by:
%D
%D \starttypen
%D \setupcolor[rgb]
%D \stoptypen
-
+
\def\colorstyle{}
\def\setupcolor%
@@ -280,26 +280,26 @@
{\showmessage{\m!colors}{5}{\colorstyle}}}%
\processcommalist[#1]\dodosetupcolor}}
-%D When typesetting for paper, we prefer using the \kap{CMYK}
-%D color space, but for on||screen viewing we prefer \kap{RGB}
-%D (the previous implementation supported only this scheme).
-%D Independant of such specifications, we support some automatic
-%D conversions:
-%D
+%D When typesetting for paper, we prefer using the \kap{CMYK}
+%D color space, but for on||screen viewing we prefer \kap{RGB}
+%D (the previous implementation supported only this scheme).
+%D Independant of such specifications, we support some automatic
+%D conversions:
+%D
%D \startopsomming[opelkaar]
%D \som convert all colors to \kap{RGB}
%D \som convert all colors to \kap{CMYK}
%D \som convert all colors to gray scales
%D \stopopsomming
-%D
-%D We also support optimization of colors to gray scales.
-%D
+%D
+%D We also support optimization of colors to gray scales.
+%D
%D \startopsomming[verder]
%D \som reduce gray colors to gray scales
%D \som reduce \kap{CMY} components to \kap{K}
%D \stopopsomming
-%D
-%D These options are communicated by means of:
+%D
+%D These options are communicated by means of:
\newif\ifRGBsupported
\newif\ifCMYKsupported
@@ -308,21 +308,21 @@
\newif\ifGRAYprefered
\newif\ifreduceCMYK
-%D needs:
+%D needs:
% \newif\ifMPgraphics
% \newif\ifinpagebody
-%D The last boolean controls reduction of \kap{CMYK} to
-%D \kap{CMY} colors. When set to true, the black component
-%D is added to the other ones.
+%D The last boolean controls reduction of \kap{CMYK} to
+%D \kap{CMY} colors. When set to true, the black component
+%D is added to the other ones.
-%D Color modes are entered using the next set of commands.
-%D The \type{\stop} alternatives are implemented in a way
-%D that permits non||grouped use.
+%D Color modes are entered using the next set of commands.
+%D The \type{\stop} alternatives are implemented in a way
+%D that permits non||grouped use.
%D
-%D The, for this module redundant, check if we are in color
-%D mode is needed when we use these macros in other modules.
+%D The, for this module redundant, check if we are in color
+%D mode is needed when we use these macros in other modules.
\def\dostartcolormodeR#1:#2:#3\od%
{\bgroup
@@ -352,7 +352,7 @@
\ifpreferGRAY\ifx\@@cl@@k\@@cl@@z\ifx\@@cl@@c\@@cr@@m\ifx\@@cl@@c\@@cl@@y
\GRAYpreferedtrue
\fi\fi\fi\fi
- \ifincolor\else\RGBsupportedfalse\CMYKsupportedfalse\fi
+ \ifincolor\else\RGBsupportedfalse\CMYKsupportedfalse\fi
\ifGRAYprefered
\dostartgraycolormode\@@cl@@c
\else\ifCMYKsupported
@@ -374,25 +374,25 @@
\def\dostartcolormodeS#1\od%
{\dostartgraycolormode{#1}}
-%D Prefering gray is not the same as converting to gray. Conversion treats
-%D each color components in a different way, while prefering is just a
+%D Prefering gray is not the same as converting to gray. Conversion treats
+%D each color components in a different way, while prefering is just a
%D reduction and thus a space||saving option.
%D \macros
%D {startcolormode,stopcolormode,permitcolormode}
-%D
-%D We use \type{\stopcolormode} to reset the color in
+%D
+%D We use \type{\stopcolormode} to reset the color in
%D whatever color space and do so by calling the corresponding
-%D special. Both commands can be used for fast color
+%D special. Both commands can be used for fast color
%D switching, like in colored verbatim,
\newif\ifpermitcolormode \permitcolormodetrue
\def\dostartcolormode#1:%
- {\getvalue{dostartcolormode#1}}
+ {\getvalue{dostartcolormode#1}}
-\def\startcolormode#1%
- {\ifincolor\ifpermitcolormode
+\def\startcolormode#1%
+ {\ifincolor\ifpermitcolormode
\doifcolorelse{#1}
{\getcurrentcolorspecs{#1}%
\expandafter\dostartcolormode\currentcolorspecs\od}
@@ -405,9 +405,9 @@
%D \macros
%D {startregistercolor,stopregistercolor,permitcolormode}
%D
-%D If you only want to register a color, the switch \type
-%D {\ifpermitcolormode} can be used. That way the nested
-%D colors know where to go back to.
+%D If you only want to register a color, the switch \type
+%D {\ifpermitcolormode} can be used. That way the nested
+%D colors know where to go back to.
\def\startregistercolor[#1]%
{\permitcolormodefalse\startcolor[#1]\permitcolormodetrue}
@@ -415,38 +415,38 @@
\def\stopregistercolor%
{\permitcolormodefalse\stopcolor\permitcolormodetrue}
-%D We use some reserved names for local color components.
-%D Consistent use of these scratch variables saves us
-%D unneccessary hash entries.
-%D
-%D \starttypen
+%D We use some reserved names for local color components.
+%D Consistent use of these scratch variables saves us
+%D unneccessary hash entries.
+%D
+%D \starttypen
%D \@@cl@@r \@@cl@@g \@@cl@@b
%D \@@cl@@c \@@cl@@m \@@cl@@y \@@cl@@k
%D \@@cl@@s
%D \stoptypen
-%D
-%D We implement several conversion routines.
+%D
+%D We implement several conversion routines.
%D
%D \starttypen
-%D \convertRGBtoCMYK {r} {g} {b}
-%D \convertRGBtoGRAY {r} {g} {b}
-%D \convertCMYKtoRGB {c} {m} {y} {k}
+%D \convertRGBtoCMYK {r} {g} {b}
+%D \convertRGBtoGRAY {r} {g} {b}
+%D \convertCMYKtoRGB {c} {m} {y} {k}
%D \convertCMYKtoGRAY {c} {m} {y} {k}
%D \convertCMYKtoCMY {c} {m} {y} {k}
%D \stoptypen
-%D
-%D The relation between \kap{Gray}, \kap{RGB} and \kap{CMYK}
-%D is:
-%D
+%D
+%D The relation between \kap{Gray}, \kap{RGB} and \kap{CMYK}
+%D is:
+%D
%D \plaatsformule[-]
%D \startformule
-%D G = .30r + .59g + .11b
+%D G = .30r + .59g + .11b
%D = 1.0 - \min(1.0,\ .30c + .59m + .11y + k)
%D \stopformule
-%D
-%D When converting from \kap{CMYK} to \kap{RGB} we use the
-%D formula:
-%D
+%D
+%D When converting from \kap{CMYK} to \kap{RGB} we use the
+%D formula:
+%D
%D \plaatsformule[-]
%D \startformule
%D \eqalign
@@ -454,11 +454,11 @@
%D g &= 1.0 - \min(1.0,\ m+k) \cr
%D b &= 1.0 - \min(1.0,\ y+k)}
%D \stopformule
-%D
-%D In the conversion routine the color components are calculated
-%D in three digits precision.
+%D
+%D In the conversion routine the color components are calculated
+%D in three digits precision.
-\def\realcolorvalue#1%
+\def\realcolorvalue#1%
{\ifnum #1<10 0.00\the#1%
\else\ifnum#1<100 0.0\the#1%
\else\ifnum#1<1000 0.\the#1%
@@ -514,8 +514,8 @@
\doconvertRGBtoCMYK#3\to\@@cl@@y
\let\@@cl@@k=\@@cl@@z}
-%D The following switch is mainly meant for (hidden)
-%D documentation purposes.
+%D The following switch is mainly meant for (hidden)
+%D documentation purposes.
\newif\ifweightGRAY \weightGRAYtrue
@@ -524,7 +524,7 @@
\def\gGRAYfactor{\ifweightGRAY590\else\nGRAYfactor\fi}
\def\bGRAYfactor{\ifweightGRAY110\else\nGRAYfactor\fi}
-\def\convertRGBtoGRAY#1#2#3%
+\def\convertRGBtoGRAY#1#2#3%
{\scratchdimen=#1\s!pt
\scratchdimen=\rGRAYfactor\scratchdimen
\scratchcounter=\scratchdimen
@@ -535,10 +535,10 @@
\scratchdimen=\bGRAYfactor\scratchdimen
\advance\scratchcounter by \scratchdimen
\advance\scratchcounter by \!!medcard
- \divide\scratchcounter by \!!maxcard
+ \divide\scratchcounter by \!!maxcard
\edef\@@cl@@s{\realcolorvalue\scratchcounter}}
-\def\convertCMYKtoGRAY#1#2#3#4%
+\def\convertCMYKtoGRAY#1#2#3#4%
{\convertCMYKtoRGB{#1}{#2}{#3}{#4}%
\convertRGBtoGRAY\@@cl@@r\@@cl@@g\@@cl@@b}
@@ -562,10 +562,10 @@
\doconvertCMYKtoCMY#3\k#4\to\@@cl@@y
\let\@@cl@@k=\@@cl@@z}
-%D Before we present the color macros, we first define the
-%D setup command. This command takes care of setting up the
-%D booleans that control local and global behavior (more on
-%D that later) and conversion to other color spaces.
+%D Before we present the color macros, we first define the
+%D setup command. This command takes care of setting up the
+%D booleans that control local and global behavior (more on
+%D that later) and conversion to other color spaces.
\newif\ifincolor
\newif\iflocalcolor
@@ -577,16 +577,16 @@
{\getparameters[\??cl][#1]%
\doifelse{\@@clreductie}{\v!ja}
{\reduceCMYKtrue}
- {\reduceCMYKfalse}%
+ {\reduceCMYKfalse}%
\doifelse{\@@clrgb}{\v!nee}
- {\showmessage{\m!colors}{9}{\v!rgb}\RGBsupportedfalse}
- {\showmessage{\m!colors}{10}{\v!rgb}\RGBsupportedtrue}%
+ {\ifRGBsupported \showmessage{\m!colors} {9}{\v!rgb}\RGBsupportedfalse\fi}
+ {\ifRGBsupported\else\showmessage{\m!colors}{10}{\v!rgb}\RGBsupportedtrue \fi}%
\doifelse{\@@clcmyk}{\v!nee}
- {\showmessage{\m!colors}{9}{\v!cmyk}\CMYKsupportedfalse}
- {\showmessage{\m!colors}{10}{\v!cmyk}\CMYKsupportedtrue}%
+ {\ifCMYKsupported \showmessage{\m!colors} {9}{\v!cmyk}\CMYKsupportedfalse\fi}
+ {\ifCMYKsupported\else\showmessage{\m!colors}{10}{\v!cmyk}\CMYKsupportedtrue \fi}%
\doifelse{\@@clmpcmyk}{\v!nee}
- {\showmessage{\m!colors}{9} {\v!mp\v!cmyk}\MPcmykfalse}
- {\showmessage{\m!colors}{10}{\v!mp\v!cmyk}\MPcmyktrue}%
+ {\ifMPcmyk \showmessage{\m!colors} {9}{\v!mp\v!cmyk}\MPcmykfalse\fi}
+ {\ifMPcmyk\else\showmessage{\m!colors}{10}{\v!mp\v!cmyk}\MPcmyktrue \fi}%
\processaction
[\@@clconversie]
[ \v!ja=>\preferGRAYtrue,
@@ -596,7 +596,7 @@
\CMYKsupportedfalse,
\s!default=>\preferGRAYfalse,
\s!unknown=>\preferGRAYfalse]%
- \ifRGBsupported
+ \ifRGBsupported
\converttoGRAYfalse
\forcegrayMPcolorsfalse
\else\ifCMYKsupported
@@ -607,36 +607,36 @@
\reduceMPcolorstrue
\fi
\else
+ \ifconverttoGRAY\else\showmessage{\m!colors}{11}{}\fi
\converttoGRAYtrue
\forcegrayMPcolorstrue
\convertMPcolorsfalse
\reduceMPcolorsfalse
- \showmessage{\m!colors}{11}{}%
\fi\fi
\processaction
[\@@clstatus]
- [\v!globaal=>\incolortrue\localcolorfalse
- \showmessage{\m!colors}{1}{\colorstyle},
- \v!lokaal=>\incolortrue\localcolortrue
- \showmessage{\m!colors}{2}{\colorstyle},
- \v!start=>\let\@@clstatus=\v!globaal
+ [\v!globaal=>\ifincolor\else\showmessage{\m!colors}{1}{\colorstyle}\fi
+ \incolortrue\localcolorfalse,
+ \v!lokaal=>\ifincolor\else\showmessage{\m!colors}{2}{\colorstyle}\fi
+ \incolortrue\localcolortrue,
+ \v!start=>\ifincolor\else\showmessage{\m!colors}{1}{\colorstyle}\fi
\incolortrue\localcolorfalse
- \showmessage{\m!colors}{1}{\colorstyle},
+ \let\@@clstatus=\v!globaal,
\v!stop=>\incolorfalse\localcolorfalse
\forcegrayMPcolorstrue]}
%D \macros
%D {doifcolorelse}
%D
-%D Switching to a color is done by means of the following
-%D command. Later on we will explain the use of palets. We
-%D define ourselves a color conditional first.
+%D Switching to a color is done by means of the following
+%D command. Later on we will explain the use of palets. We
+%D define ourselves a color conditional first.
% \let\currentpalet\empty
-%
+%
% \def\doifcolorelse#1%
% {\doifdefinedelse{\??cr\currentpalet#1}}
-%
+%
% \def\getcurrentcolorspecs#1%
% {\edef\currentcolorspecs{\getvalue{\??cr\currentpalet#1}}}
@@ -659,7 +659,7 @@
\endETEX
-\beginTEX
+\beginTEX
\def\doifcolorelse#1%
{\@EA\ifx\csname\??cr\@EA\ifx\csname\??cr\currentpalet#1\endcsname\relax\else\currentpalet\fi#1\endcsname\relax
@@ -679,10 +679,10 @@
%D \macros
%D {localstartcolor,localstopcolor}
%D
-%D Simple color support, that is without nesting, is provided
+%D Simple color support, that is without nesting, is provided
%D by:
-\def\localstartcolor[#1]%
+\def\localstartcolor[#1]%
{\ifincolor
\localcolortrue
\doglobalstartcolor[#1]%
@@ -696,8 +696,8 @@
%D \macros
%D {startcolor,stopcolor}
%D
-%D The more save method, the one that saves the current color
-%D state and returns to this state afterward, is activated by:
+%D The more save method, the one that saves the current color
+%D state and returns to this state afterward, is activated by:
%D
%D \showsetup{\y!startcolor}
@@ -711,21 +711,21 @@
\doglobalstopcolor
\fi}
-%D This macros call the global color switching ones. Starting
-%D a global, i.e. a possible page boundary crossing, color
-%D mode also sets a \type{\mark} in \TEX's internal list.
+%D This macros call the global color switching ones. Starting
+%D a global, i.e. a possible page boundary crossing, color
+%D mode also sets a \type{\mark} in \TEX's internal list.
\newcount\colorlevel
-\setvalue{\??cl0C}{} % saved color
+\setvalue{\??cl0C}{} % saved color
\setvalue{\??cl0S}{} % stop command
-%D We keep a positive color stack for foreground colors, and
-%D a negative one for backgrounds. Not that brilliant a
-%D solution, but it suits. The signs are swapped when the
-%D page ornaments are typeset.
+%D We keep a positive color stack for foreground colors, and
+%D a negative one for backgrounds. Not that brilliant a
+%D solution, but it suits. The signs are swapped when the
+%D page ornaments are typeset.
-\def\@@colorplus {+}
+\def\@@colorplus {+}
\def\@@colorminus{-}
\def\dodoglobalstartcolor[#1]%
@@ -772,12 +772,12 @@
\docolormark{}%
\stopcolormode
\else % let's do a bit redundant testing here
- \docolormark{\previouscolor}%
+ \docolormark{\previouscolor}%
\doifelsenothing{\previouscolor}
{\dostopcolormode}
- {\doifcolorelse{\previouscolor}
+ {\doifcolorelse{\previouscolor}
{\doifnot{\currentcolor}{\previouscolor}
- {\startcolormode{\previouscolor}}}
+ {\startcolormode{\previouscolor}}}
{\dostopcolormode}}%
\fi
\fi}
@@ -785,10 +785,10 @@
\def\doglobalstopcolor%
{\getvalue{\??cl\the\colorlevel S}}
-%D We don't use grouping and save each stop alternative. This
-%D permits be especially useful in for instance local color
-%D support in verbatim. Using \type{\bgroup}||\type{\egroup}
-%D pairs could interfere with calling commands
+%D We don't use grouping and save each stop alternative. This
+%D permits be especially useful in for instance local color
+%D support in verbatim. Using \type{\bgroup}||\type{\egroup}
+%D pairs could interfere with calling commands
%D This color mechanism takes care of nested colors, like in:
%D
@@ -802,82 +802,82 @@
%D \kleur[]{zwart \kleur[rood]{rood} zwart}
%D \kleur[]{zwart}
%D \stopbuffer
-%D
+%D
%D \typebuffer
-%D
-%D or
-%D
+%D
+%D or
+%D
%D \startvoorbeeld
%D \startregels
%D \haalbuffer
%D \stopregels
%D \stopvoorbeeld
%D
-%D Crossing page boundaries is of course also handled.
-%D Undefined or empty color specifications are treated as
-%D efficient as possible.
-%D
+%D Crossing page boundaries is of course also handled.
+%D Undefined or empty color specifications are treated as
+%D efficient as possible.
+%D
%D \startbuffer
%D \startkleur[groen]
-%D [groen] \input tufte [groen] \par
+%D [groen] \input tufte [groen] \par
%D \startkleur[]
-%D [groen] \input knuth [groen] \par
+%D [groen] \input knuth [groen] \par
%D \startkleur[rood]
-%D [rood] \input tufte [rood] \par
+%D [rood] \input tufte [rood] \par
%D \startkleur[geel]
-%D [geel] \input knuth [geel] \par
+%D [geel] \input knuth [geel] \par
%D \stopkleur
-%D [rood] \input tufte [rood] \par
+%D [rood] \input tufte [rood] \par
%D \stopkleur
-%D [groen] \input knuth [groen] \par
+%D [groen] \input knuth [groen] \par
%D \stopkleur
-%D [groen] \input tufte [groen] \par
+%D [groen] \input tufte [groen] \par
%D \stopkleur
%D \stopbuffer
-%D
+%D
%D \startopelkaar
%D \haalbuffer
%D \stopopelkaar
-%D
+%D
%D These quotes are typeset by saying:
-%D
+%D
%D \typebuffer
-
+
%D We already mentioned that colors interfere with building
%D the pagebody. This means that when the page is composed,
%D the colors temporary have to be reset. After the page is
-%D shipped out, we have to revive the current color.
-%D
-%D We use \type{\marks} to keep track of colors across page
-%D boundaries. Unfortunately standard \TEX\ supports only one mark,
-%D and using this one for color support only would be a waste.
+%D shipped out, we have to revive the current color.
+%D
+%D We use \type{\marks} to keep track of colors across page
+%D boundaries. Unfortunately standard \TEX\ supports only one mark,
+%D and using this one for color support only would be a waste.
%D We therefore use an adapted version of J.~Fox's multiple mark
-%D mechanism as (re|)|implemented in \module{supp-mrk}.
+%D mechanism as (re|)|implemented in \module{supp-mrk}.
\doifdefinedelse{newmark}
- {\newmark\colormark}
+ {\newmark\colormark}
{\def\colormark#1{}}
-%D Using this mark mechanism with lots of colors has one
-%D major drawback: \TEX's memory tends to overflow when
+%D Using this mark mechanism with lots of colors has one
+%D major drawback: \TEX's memory tends to overflow when
%D very colorful text is stored in a global box. Even worse is that
%D the processing time grows considerably. We therefore support
-%D local as well as global color switching.
-%D
+%D local as well as global color switching.
+%D
%D Of the next macros, \type{\popcolor} is to be used after
%D the actual \type{\shipout} and \type{\startcolorpage} and
%D \type{\stopcolorpage} are called when entering and leaving
%D the \type{\pagebody} builder. In case of emergencies
-%D \type{\pushcolor} can be used to undo the current color,
-%D for instance when insertions are appended to the page.
+%D \type{\pushcolor} can be used to undo the current color,
+%D for instance when insertions are appended to the page.
%D
-%D Out of efficiency we only use marks when needed. The next
-%D macro tries to find out if indeed a mark should be set.
-%D This macro uses the boolean \type{\ifinpagebody}, which can
-%D be defined and set in the module that handles the pagebody.
+%D Out of efficiency we only use marks when needed. The next
+%D macro tries to find out if indeed a mark should be set.
+%D This macro uses the boolean \type{\ifinpagebody}, which can
+%D be defined and set in the module that handles the pagebody.
\def\docolormark#1%
- {\iflocalcolor \else \ifinpagebody \else \ifinframed \else
+ {\iflocalcolor \else \ifinpagebody \else \ifinframed \else
\dodocolormark{#1}%
\fi \fi \fi}
@@ -891,20 +891,20 @@
%D \macros
%D {pushcolor, popcolor}
%D
-%D Pushing the current state in the output routine simply comes
-%D to resetting the color to black, while popping restores the
-%D color state to that of before the break.
+%D Pushing the current state in the output routine simply comes
+%D to resetting the color to black, while popping restores the
+%D color state to that of before the break.
\def\pushcolor%
- {\stopcolormode}
+ {\stopcolormode}
\def\popcolor%
{\doifsomething{\getbotmark\colormark}
{%\debuggerinfo{\m!colors}{popping \getbotmark\colormark}%
\startcolormode{\getbotmark\colormark}}}
-\def\popsplitcolor%
- {\getsplitmarks\colormark % hier wel
+\def\popsplitcolor%
+ {\getsplitmarks\colormark % hier wel
\doifsomething{\getsplitbotmark\colormark}
{%\debuggerinfo{\m!colors}{split popping \getsplitbotmark\colormark}%
\startcolormode{\getsplitbotmark\colormark}}}
@@ -912,35 +912,35 @@
%D \macros
%D {startcolorpage, stopcolorpage}
%D
-%D Local use can be forced with the next two macros. Nesting
-%D is still supported but colors are no longer marked.
+%D Local use can be forced with the next two macros. Nesting
+%D is still supported but colors are no longer marked.
%D \starttypen
-%D \def\startcolorpage%
+%D \def\startcolorpage%
%D {\bgroup
%D \let\docolormark=\gobbleoneargument
%D \edef\savedcolorlevel{\the\colorlevel}%
%D \ifnum\colorlevel>0
%D \stopcolormode
%D \fi
-%D \global\colorlevel=1000\relax} % a save offset
-%D
+%D \global\colorlevel=1000\relax} % a save offset
+%D
%D \def\stopcolorpage%
%D {\global\colorlevel=\savedcolorlevel\relax
%D \egroup}
%D \stoptypen
-%D The next alternative makes (simple) color separation more
-%D easy. It also supports nested colors in page backgrounds
-%D and texts.
+%D The next alternative makes (simple) color separation more
+%D easy. It also supports nested colors in page backgrounds
+%D and texts.
-\def\startcolorpage%
+\def\startcolorpage%
{\bgroup
\def\@@colorplus{-}%
\def\@@colorminus{+}%
\let\docolormark=\gobbleoneargument
\edef\savedcolorlevel{\the\colorlevel}%
- \global\colorlevel=0 % before \localstartcolor of
+ \global\colorlevel=0 % before \localstartcolor of
\localstartcolor[black]} % course, ugly bug removed
\def\stopcolorpage%
@@ -950,19 +950,19 @@
%D \macros
%D {color,graycolor}
-%D
-%D This leaves the simple color command:
+%D
+%D This leaves the simple color command:
%D
%D \showsetup{\y!color}
%D \showsetup{\y!graycolor}
%D
-%D Which can be used straightforward: \color[groen]{green as gras}.
-%D We want color support to be similar to font support and
+%D Which can be used straightforward: \color[groen]{green as gras}.
+%D We want color support to be similar to font support and
%D therefore implement \type{\color} as:
\unexpanded\def\color[#1]%
{\groupedcommand
- {\startcolor[#1]}
+ {\startcolor[#1]}
{\stopcolor}}
\unexpanded\def\graycolor[#1]% not \gray because this is a color
@@ -975,15 +975,15 @@
%D This implementation enables use of defined colors like:
%D
%D \starttypen
-%D Look at the {\brightgreen bright} side of life and get
+%D Look at the {\brightgreen bright} side of life and get
%D yourself no \red{red} head!
%D \stoptypen
-%D \macros
+%D \macros
%D {colorvalue, grayvalue}
-%D
-%D We can typeset the color components using \type{\colorvalue} and
-%D \type{\grayvalue}. The commands:
+%D
+%D We can typeset the color components using \type{\colorvalue} and
+%D \type{\grayvalue}. The commands:
%D
%D \startbuffer
%D color value of SomeKindOfRed: \colorvalue{SomeKindOfRed} \crlf
@@ -992,13 +992,13 @@
%D
%D \typebuffer
%D
-%D show us:
+%D show us:
%D
%D \startvoorbeeld
%D \haalbuffer
%D \stopvoorbeeld
-\def\realcolorformat#1%
+\def\realcolorformat#1%
{\ifnum#1<10 0.00\the#1%
\else\ifnum#1<100 0.0\the#1%
\else\ifnum#1<1000 0.\the#1%
@@ -1019,22 +1019,22 @@
\def\doformatcolorR#1:#2:#3\od%
{\dodoformatcolor{#1}\colorformatseparator
- \dodoformatcolor{#2}\colorformatseparator
+ \dodoformatcolor{#2}\colorformatseparator
\dodoformatcolor{#3}}
\def\doformatcolorC#1:#2:#3:#4\od%
- {\dodoformatcolor{#1}\colorformatseparator
- \dodoformatcolor{#2}\colorformatseparator
- \dodoformatcolor{#3}\colorformatseparator
+ {\dodoformatcolor{#1}\colorformatseparator
+ \dodoformatcolor{#2}\colorformatseparator
+ \dodoformatcolor{#3}\colorformatseparator
\dodoformatcolor{#4}}
\def\doformatcolorS#1\od%
{\dodoformatcolor{#1}}
\def\doformatcolor#1:%
- {\getvalue{doformatcolor#1}}
+ {\getvalue{doformatcolor#1}}
-\def\colorvalue#1%
+\def\colorvalue#1%
{\doifcolorelse{#1}
{\getcurrentcolorspecs{#1}%
\expandafter\doformatcolor\currentcolorspecs\od}
@@ -1052,9 +1052,9 @@
{\dodoformatcolor{#1}}
\def\doformatgray#1:%
- {\getvalue{doformatgray#1}}
+ {\getvalue{doformatgray#1}}
-\def\grayvalue#1%
+\def\grayvalue#1%
{\doifcolorelse{#1}
{\getcurrentcolorspecs{#1}%
\expandafter\doformatgray\currentcolorspecs\od}
@@ -1062,23 +1062,23 @@
%D \macros
%D {localstartraster,localstopraster,
-%D startraster,stopraster}
-%D
+%D startraster,stopraster}
+%D
%D The previous conversions are not linear and treat each color
%D component according to human perception curves. Pure gray
%D (we call them rasters) has equal color components. In
%D \CONTEXT\ rasters are only used as backgrounds and these
%D don't cross page boundaries in the way color does. Therefore
%D we don't need stacks and marks. Just to be compatible with
-%D color support we offer both 'global' and 'local' commands.
+%D color support we offer both 'global' and 'local' commands.
-\def\localstartraster[#1]%
- %{\doifinstringelse{.}{#1} % no, we also want 0 and 1
+\def\localstartraster[#1]%
+ %{\doifinstringelse{.}{#1} % no, we also want 0 and 1
{\doifelsenothing{#1}
{\dostartgraymode{\@@rsraster}}
{\dostartgraymode{#1}}}
-\def\localstopraster%
+\def\localstopraster%
{\dostopgraymode}
\def\startraster%
@@ -1089,34 +1089,34 @@
%D In this documentation we will not go into too much details
%D on palets. Curious users can find more information on this
-%D topic in \uit[use of color].
-%D
+%D topic in \uit[use of color].
+%D
%D At the moment we implemented color in \CONTEXT\ color
%D printing was not yet on the desktop. In spite of this lack our
%D graphics designer made colorfull illustrations. When printed
%D on a black and white printer, distinctive colors can come
%D out equally gray. We therefore decided to use only colors
%D that were distinctive in colors as well as in black and
-%D white print.
-%D
+%D white print.
+%D
%D Although none of the graphic packages we used supported
%D logical colors and global color redefition, we build this
%D support into \CONTEXT. This enabled us to experiment and
-%D also prepared us for the future.
+%D also prepared us for the future.
%D \macros
%D {definepalet}
-%D
+%D
%D Colors are grouped in palets. The colors in such a palet can
%D have colorful names, but best is to use names that specify
%D their use, like {\em important} or {\em danger}. As a sort
-%D of example \CONTEXT\ has some palets predefined,
-%D like:\voetnoot{At the time I wrote the palet support, I was
+%D of example \CONTEXT\ has some palets predefined,
+%D like:\voetnoot{At the time I wrote the palet support, I was
%D reading 'A hort history of time' of S.~Hawkins, so that's
-%D why we stuck to quarks.}
-%D
+%D why we stuck to quarks.}
+%D
%D \starttypen
-%D \definepalet
+%D \definepalet
%D [alfa]
%D [ top=rood:7,
%D bottom=groen:6,
@@ -1126,21 +1126,21 @@
%D charm=geel:2]
%D \stoptypen
%D
-%D It's formal definition is:
-%D
+%D It's formal definition is:
+%D
%D \showsetup{\y!definepalet}
%D
-%D Visualized, such a palet looks like:
-%D
+%D Visualized, such a palet looks like:
+%D
%D \startbuffer[palet]
%D \showpalet [alfa] [horizontaal,naam,nummer,waarde]
%D \stopbuffer
-%D
+%D
%D \startregelcorrectie
%D \haalbuffer[palet]
%D \stopregelcorrectie
%D
-%D This bar shows both the color and gray alternatives of the
+%D This bar shows both the color and gray alternatives of the
%D palet components (not visible in black and white print).
%D
%D When needed, one can copy a palet by saying:
@@ -1173,10 +1173,10 @@
{\doifdefined{\??pa#2}
{\expanded{\dodefinepalet[#1][\getvalue{\??pa\??pa#2}]}}}}
-%D \macros
+%D \macros
%D {setuppalet}
%D
-%D Colors are taken from the current palet, if defined.
+%D Colors are taken from the current palet, if defined.
%D Setting the current palet is done by:
%D
%D \showsetup{\y!setuppalet}
@@ -1194,14 +1194,14 @@
\let\currentpalet\empty}
{\def\currentpalet{#1:}}}}
-%D \macros
+%D \macros
%D {showpalet}
-%D
-%D The previous visualization was typeset with:
-%D
+%D
+%D The previous visualization was typeset with:
+%D
%D \typebuffer[palet]
%D
-%D This commands is defined as:
+%D This commands is defined as:
%D
%D \showsetup{\y!showpalet}
@@ -1210,9 +1210,9 @@
%D \macros
%D {definecolorgroup}
%D
-%D The naming of the colors in this palet suggests some
-%D ordening, which in turn is suported by color grouping.
-%D
+%D The naming of the colors in this palet suggests some
+%D ordening, which in turn is suported by color grouping.
+%D
%D \starttypen
%D \definecolorgroup
%D [rood]
@@ -1225,14 +1225,14 @@
%D 1.00:0.15:0.15,
%D 0.90:0.00:0.00]
%D \stoptypen
-%D
-%D In such a color group colors are numbered from~$1$ to~$n$.
+%D
+%D In such a color group colors are numbered from~$1$ to~$n$.
%D
%D \showsetup{\y!definecolorgroup}
%D
-%D This kind of specification is not only more compact than
-%D defining each color separate, it also loads faster and takes
-%D less bytes.
+%D This kind of specification is not only more compact than
+%D defining each color separate, it also loads faster and takes
+%D less bytes.
\def\definecolorgroup%
{\dotripleempty\dodefinecolorgroup}
@@ -1263,22 +1263,22 @@
%D \macros
%D {showcolorgroup}
-%D
+%D
%D We can show the group by:
-%D
+%D
%D \startbuffer
%D \showcolorgroup [blauw] [horizontaal,naam,nummer,waarde]
%D \stopbuffer
-%D
+%D
%D \typebuffer
-%D
-%D or in color:
-%D
+%D
+%D or in color:
+%D
%D \startregelcorrectie
%D \haalbuffer
%D \stopregelcorrectie
%D
-%D which uses:
+%D which uses:
%D
%D \showsetup{\y!showcolorgroup}
@@ -1287,8 +1287,8 @@
%D There are ten predefined color groups, like
%D \color[groen]{\em groen}, \color[rood]{\em rood},
%D \color[blauw]{\em blauw}, \color[cyaan]{\em cyaan},
-%D \color[magenta]{\em magenta} and \color[geel]{\em geel}.
-%D
+%D \color[magenta]{\em magenta} and \color[geel]{\em geel}.
+%D
%D \startregelcorrectie
%D \hbox to \hsize
%D {\hss
@@ -1299,13 +1299,13 @@
%D \showcolorgroup [magenta] [vertikaal,naam]\hss
%D \showcolorgroup [geel] [vertikaal,naam]\hss}
%D \stopregelcorrectie
-%D
+%D
%D These groups are used to define palets {\em alfa} upto {\em
%D zeta}. As long as we don't use colors from the same row, we
%D get ourselves distinctive palets. By activating such a palet
%D one gains access to its members {\em top} to {\em charm} (of
-%D course one should use more suitable names than these).
-%D
+%D course one should use more suitable names than these).
+%D
%D \startregelcorrectie
%D \hbox to \hsize
%D {\showpalet [alfa] [vertikaal,naam,nummer]\hss
@@ -1315,30 +1315,30 @@
%D \showpalet [epsilon] [vertikaal,naam]\hss
%D \showpalet [zeta] [vertikaal,naam]}
%D \stopregelcorrectie
-%D
+%D
%D By using the keyword \type{\v!waarde} the individual color
%D components are shown too. When printed in color, these
-%D showcases show both the colors and the gray value.
+%D showcases show both the colors and the gray value.
%D \macros
%D {comparepalet}
-%D
+%D
%D There are some more testing macros available:
-%D
+%D
%D \startbuffer
%D \comparepalet [alfa]
%D \stopbuffer
-%D
+%D
%D \typebuffer
-%D
+%D
%D shows the palet colors against a background:
-%D
+%D
%D \startregelcorrectie
%D \haalbuffer
%D \stopregelcorrectie
%D
-%D The formal definition is:
-%D
+%D The formal definition is:
+%D
%D \showsetup{\y!comparepalet}
\fetchruntimecommand \comparepalet {\f!colorprefix\s!run}
@@ -1346,37 +1346,37 @@
%D \macros
%D {comparecolorgroup}
%D
-%D The similar command:
+%D The similar command:
%D
%D \startbuffer
%D \comparecolorgroup [blauw]
%D \stopbuffer
-%D
+%D
%D \typebuffer
-%D
+%D
%D shows color groups:
-%D
+%D
%D \startregelcorrectie
%D \haalbuffer
%D \stopregelcorrectie
%D
-%D this commands are defined as:
+%D this commands are defined as:
%D
%D \showsetup{\y!comparecolorgroup}
\fetchruntimecommand \comparecolorgroup {\f!colorprefix\s!run}
-%D \macros
+%D \macros
%D {showcolor}
-%D
-%D But let's not forget that we also have the more traditional
-%D non||related colors. These show up after:
-%D
+%D
+%D But let's not forget that we also have the more traditional
+%D non||related colors. These show up after:
+%D
%D \starttypen
%D \showcolor [name]
%D \stoptypen
-%D
-%D Where \type{name} for instance can be \type{rgb}.
+%D
+%D Where \type{name} for instance can be \type{rgb}.
%D
%D \showsetup{\y!showcolor}
@@ -1385,44 +1385,44 @@
%D \macros
%D {negativecolorbox}
%D
-%D Sometimes, especially when we deal with typesetting
-%D devices, we want to reverse the color scheme. Instead of
-%D recalculating all those colors, we use a quick and dirty
-%D approach:
-%D
+%D Sometimes, especially when we deal with typesetting
+%D devices, we want to reverse the color scheme. Instead of
+%D recalculating all those colors, we use a quick and dirty
+%D approach:
+%D
%D \starttypen
%D \negativecolorbox0
%D \stoptypen
-%D
-%D will negate the colors in box zero.
+%D
+%D will negate the colors in box zero.
\def\negatecolorbox#1%
{\setbox#1=\hbox
- {\dostartnegative
+ {\dostartnegative
\localstartcolor[white]%
\vrule\!!height\ht#1\!!depth\dp#1\!!width\wd#1%
\localstopcolor
\hskip-\wd#1%
\box#1\dostopnegative}}
-%D \macros
+%D \macros
%D {ifMPgraphics, ifMPcmyk, MPcolor}
-%D
-%D A very special macro is \type{\MPcolor}. This one can be
-%D used to pass a \CONTEXT\ color to \METAPOST.
+%D
+%D A very special macro is \type{\MPcolor}. This one can be
+%D used to pass a \CONTEXT\ color to \METAPOST.
%D
%D \starttypen
%D \MPcolor{my own red}
%D \stoptypen
%D
-%D This macro returns a \METAPOST\ triplet \type{(R,G,B)}.
-%D Unless \CMYK\ color support is turned on with \type
-%D {MPcmyk}, only \kap{RGB} colors and gray scales are
-%D supported.
+%D This macro returns a \METAPOST\ triplet \type{(R,G,B)}.
+%D Unless \CMYK\ color support is turned on with \type
+%D {MPcmyk}, only \kap{RGB} colors and gray scales are
+%D supported.
\newif\ifMPcmyk % \MPcmykfalse
-\beginTEX
+\beginTEX
\def\MPcolor#1%
{\ifMPgraphics
@@ -1459,14 +1459,14 @@
\else (0,0,0)%
\fi\fi\fi}
-%D \macros
+%D \macros
%D {PDFcolor,FDFcolor}
-%D
+%D
%D Similar alternatives are avaliable for \PDF:
\def\PDFcolor#1%
{\@EA\@EA\@EA\doPDFcolor\csname\??cr#1\endcsname:::::\end}
-
+
\def\doPDFcolor#1:#2:#3:#4:#5:#6\end%
{\if #1R#2 #3 #4 rg%
\else\if#1C#2 #3 #4 #5 k%
@@ -1476,7 +1476,7 @@
\def\FDFcolor#1%
{\@EA\@EA\@EA\doFDFcolor\csname\??cr#1\endcsname:::::\end}
-
+
\def\doFDFcolor#1:#2:#3:#4:#5:#6\end%
{[\if #1R#2 #3 #4%
\else\if#1C#2 #3 #4 #5%
@@ -1485,7 +1485,7 @@
\fi\fi\fi]}
%D We default to the colors defined in \module{colo-rgb} and
-%D support both \kap{RGB} and \kap{CMYK} output.
+%D support both \kap{RGB} and \kap{CMYK} output.
\setupcolors
[\c!status=\v!stop,
@@ -1498,7 +1498,7 @@
\setupcolor
[\v!rgb]
-%D As we can see, color support is turned off by default.
-%D Reduction of gray colors to gray scales is turned on.
+%D As we can see, color support is turned off by default.
+%D Reduction of gray colors to gray scales is turned on.
\protect \endinput
diff --git a/tex/context/base/cont-fil.tex b/tex/context/base/cont-fil.tex
index d13131e45..ccd78f287 100644
--- a/tex/context/base/cont-fil.tex
+++ b/tex/context/base/cont-fil.tex
@@ -23,15 +23,16 @@
\definefilesynonym [fig-base] [fig-00]
\definefilesynonym [fig-make] [fig-01]
+\definefilesynonym [fig-fake] [fig-02]
\definefilesynonym [pre-general] [pre-00]
-\definefilesynonym [pre-original] [pre-01] % public
-\definefilesynonym [pre-green] [pre-02] % public
-\definefilesynonym [pre-funny] [pre-03] % public
-\definefilesynonym [pre-colorful] [pre-04] % public
-\definefilesynonym [pre-fuzzy] [pre-05] % public
-\definefilesynonym [pre-polish] [pre-06] % public
+\definefilesynonym [pre-original] [pre-01]
+\definefilesynonym [pre-green] [pre-02]
+\definefilesynonym [pre-funny] [pre-03]
+\definefilesynonym [pre-colorful] [pre-04]
+\definefilesynonym [pre-fuzzy] [pre-05]
+\definefilesynonym [pre-polish] [pre-06]
\definefilesynonym [pre-spider] [pre-07]
\definefilesynonym [pre-wonder] [pre-08]
\definefilesynonym [pre-windows] [pre-09]
@@ -40,16 +41,25 @@
\definefilesynonym [pre-arrows] [pre-12]
\definefilesynonym [pre-writing] [pre-13]
\definefilesynonym [pre-split] [pre-14]
-\definefilesynonym [pre-balls] [pre-15] % public
+\definefilesynonym [pre-balls] [pre-15]
\definefilesynonym [pre-knot] [pre-16]
-
-% [pre-17] % experimental
-% [pre-18] % experimental
-
+\definefilesynonym [pre-weird] [pre-17]
+\definefilesynonym [pre-shade] [pre-18]
\definefilesynonym [pre-organic] [pre-19]
-\definefilesynonym [pre-super] [pre-20]
+\definefilesynonym [pre-speckle] [pre-20]
\definefilesynonym [pre-zoom] [pre-21]
\definefilesynonym [pre-cycle] [pre-22]
+\definefilesynonym [pre-super] [pre-23]
+
+%definefilesynonym [pre-more] [pre-24]
+%definefilesynonym [pre-more] [pre-25]
+
+\definefilesynonym [pre-more] [pre-26]
+
+%definefilesynonym [pre-more] [pre-27]
+%definefilesynonym [pre-more] [pre-28]
+%definefilesynonym [pre-more] [pre-29]
+%definefilesynonym [pre-more] [pre-30]
\definefilesynonym [abr-pseudocaps] [abr-01]
\definefilesynonym [abr-smallcaps] [abr-02]
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 94494cf6e..68a2c17a6 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -15,11 +15,168 @@
\unprotect
+\def\savefont % do we also need to store the encoding ?
+ {\edef\savedfont{\the\font}%
+ \pushmacro\savedfont
+ \pushmacro\characterregime
+ \pushmacro\charactermapping
+ \pushmacro\characterencoding}
+
+\def\restorefont%
+ {\popmacro\characterencoding
+ \popmacro\charactermapping
+ \popmacro\characterregime
+ \popmacro\savedfont
+ \savedfont}
+
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks and new features.
\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex!}
+\def\setraggedparagraphmode#1#2%
+ {\ifinpagebody
+ \ifdubbelzijdig
+ \ifodd\realfolio#1\else#2\fi
+ \else
+ #2\relax
+ \fi
+ \else\ifinner
+ \ifdubbelzijdig
+ \gettwopassdata{\s!paragraph}%
+ \iftwopassdatafound
+ \ifodd\twopassdata#1\else#2\fi
+ \else
+ \ifodd\realfolio#1\else#2\fi
+ \fi
+ \doparagraphreference
+ \else
+ #2\relax
+ \fi
+ \else
+ #2\relax
+ \fi\fi}
+
+% no, too buggy, leads to top of page crap
+%
+%\def\flushsidefloats%
+% {\par
+% \dochecksidefloat
+% \scratchcounter=-\hangafter
+% \dorecurse{\scratchcounter}{\strut\hfill\strut\par}}
+
+\def\flushsidefloats%
+ {\par
+ \!!heighta=\sidefloatvsize
+ \advance\!!heighta by -\pagetotal
+ \ifdim\!!heighta>\zeropoint
+ % to be checked for interference
+ \witruimte
+ % will be option
+ \getnoflines\!!heighta
+ \!!heighta=\noflines\lineheight
+ % so far for option
+ \kern\!!heighta
+ \fi
+ \global\sidefloatvsize=\nofloatvsize
+ \global\floatflagfalse}
+
+\def\thinrule%
+ {\strut
+ \bgroup
+ \chardef\ruletype=1
+ \processaction
+ [\@@dlvariant]
+ [ \v!a=>\chardef\ruletype=0,% no line
+ %\v!b=>\chardef\ruletype=1,% height/depth
+ \v!c=>\chardef\ruletype=2,% topheight/botdepth
+ % 11=>\chardef\ruletype=1,% fallback for backgrounds
+ 0=>\chardef\ruletype=0,% compatible with backgrounds
+ % 1=>\chardef\ruletype=1,% compatible with backgrounds
+ 2=>\chardef\ruletype=2]% compatible with backgrounds
+ \doifsomething{\@@dllijndikte}
+ {\linewidth=\@@dllijndikte}%
+ \ifdim\linewidth=\zeropoint
+ \chardef\ruletype=0
+ \else
+ \doifnot{\@@dlkader}{\v!aan}{\chardef\ruletype=0\relax}%
+ \fi
+ \ifnum\ruletype=1
+ \doif{\@@dlhoogte}{\v!max}{\def\@@dlhoogte{1}}%
+ \doif{\@@dldiepte}{\v!max}{\def\@@dldiepte{1}}%
+ \else
+ \def\@@dlhoogte{1}%
+ \def\@@dldiepte{1}%
+ \fi
+ \freezedimensionwithunit\@@dlhoogte{\ht\strutbox}%
+ \freezedimensionwithunit\@@dldiepte{\dp\strutbox}%
+ \divide\linewidth 2
+ \doifelse{\@@dlachtergrond}{\v!kleur}
+ {\startcolor[\@@dlachtergrondkleur]%
+ \dimen0=\@@dlhoogte
+ \dimen2=\@@dldiepte
+ \ifnum\ruletype=2 % prevent overshoot due to rounding
+ \advance\dimen0 by -.5\linewidth
+ \advance\dimen2 by -.5\linewidth
+ \fi
+ \leaders\hrule\!!height\dimen0\!!depth\dimen2\hfill
+ \stopcolor
+ \ifcase\ruletype
+ % no rule
+ \or
+ \startcolor[\@@dlkleur]%
+ \hfillneg
+ \leaders\hrule\!!height\linewidth\!!depth\linewidth\hfill
+ \stopcolor
+ \or
+ \startcolor[\@@dlkleur]%
+ \dimen2=\@@dldiepte\dimen0=-\dimen2 \advance\dimen0 \linewidth
+ \hfillneg\leaders\hrule\!!height\dimen0\!!depth\dimen2\hfill
+ \dimen2=\@@dlhoogte\dimen0=-\dimen2 \advance\dimen0 \linewidth
+ \hfillneg\leaders\hrule\!!height\dimen2\!!depth\dimen0\hfill
+ \stopcolor
+ \fi}
+ {\ifcase\ruletype \else
+ \startcolor[\@@dlkleur]%
+ \leaders\hrule\!!height\@@dlhoogte\!!depth\@@dldiepte\hfill
+ \stopcolor
+ \fi}%
+ \strut
+ \carryoverpar\egroup}
+
+\setupthinrules
+ [\c!kader=\v!aan, % compatible with textbackgrounds
+ \c!variant=\v!b,
+ \c!achtergrondkleur=,
+ \c!achtergrond=,
+ \c!lijndikte=]
+
+% \thinruled[n=3,alternative=a]
+% \thinruled[n=3,alternative=b]
+% \thinruled[n=3,alternative=c]
+% \thinruled[n=3,alternative=a,background=color]
+% \thinruled[n=3,alternative=b,background=color]
+% \thinruled[n=3,alternative=c,background=color]
+
+\def\dothinrules[#1]%
+ {\bgroup
+ \dosetupthinrules[#1]%
+ \@@dlvoor
+ \assignvalue{\@@dlinterlinie}{\@@dlinterlinie}{1.0}{1.5}{2.0}%
+ \spacing\@@dlinterlinie
+ \dorecurse
+ {\@@dln}
+ {\ifnum\recurselevel=\@@dln \dothinrulesnobreak \else
+ \ifnum\recurselevel=2 \dothinrulesnobreak \fi\fi
+ \thinrule
+ %\ifnum\recurselevel<\@@dln \endgraf \fi}%
+ \ifnum\recurselevel<\@@dln \endgraf \geenwitruimte \@@dltussen \fi}%
+% \@@dlna
+% \egroup}
+ \doifelsenothing{\@@dlna}
+ {\carryoverpar\egroup}
+ {\@@dlna\egroup}}
+
\def\dodousemodules#1#2%
{\setfalse\moduleisloaded
\doifelsenothing{#1}
@@ -94,22 +251,52 @@
% \VL text \VL text \VL \AR
% \stoptable
-\def\placefloatlabel
- {\dodoublempty\doplacefloatlabel}
+% Quite experimental !
+
+% the split is needed when for instance the float goes into
+% a multi page field and the list of figs becomes larger than
+% one page: cycle between 'only flush when object ref ok'
+% and 'one/many page fig list'; see "uguide finometer"
+
+\def\placefloatcaption
+ {\dodoubleempty\doplacefloatcaption}
+
+\def\doplacefloatcaption[#1][#2]#3%
+ {\setfloatcaption[#1][#2]{#3}%
+ \placefloatcaptiontext[#1]%
+ \placefloatcaptionreference[#1]}
+
+\def\setfloatcaption
+ {\dodoubleempty\dodosetfloatcaption} % beware, name clash
-\def\placefloatlabel[#1][#2]#3%
- {\doifvalue{\??kj#1\c!nummer}{\v!ja}
- {\doglobal\convertargument#3\to\asciititle % \asciititle is global
- \verhoognummer[#1]%
+\def\dodosetfloatcaption[#1][#2]#3% to do namespace for number/ascii
+ {\doifelsevalue{\??kj#1\c!nummer}{\v!ja} % also handle trialtypesetting
+ {\verhoognummer[#1]%
\maakhetnummer[#1]%
- \dofloatreference
- \redofloatorder{#1}%
- \doifsomething{#2}{\rawreference{\s!flt}{#2}{{\hetnummer}{\asciititle}}}%
- \doschrijfnaarlijst{#1}{\hetnummer}{#3}{#1}%
- \doattributes{\??kj#1}\c!kopletter\c!kopkleur
- {\labeltexts{#1}{\hetnummer}}%
- \doattributes{\??kj#1}\c!letter\c!kleur
- {\tfskip#3}}}
+ \global\let\flhetnummer\hetnummer
+ \setgvalue{@fl@r@#1}%
+ {\dofloatreference
+ \redofloatorder{#1}%
+ \doschrijfnaarlijst{#1}{\flhetnummer}{#3}{#1}%
+ \doglobal\convertargument#3\to\flasciititle % \asciititle is global
+ \doifsomething{#2}{\rawreference{\s!flt}{#2}{{\flhetnummer}{\flasciititle}}}%
+ \global\letvalue{@fl@r@#1}\relax}% nills
+ \setgvalue{@fl@t@#1}%
+ {\doattributes{\??kj#1}\c!kopletter\c!kopkleur
+ {\labeltexts{#1}{\flhetnummer}}%
+ \doattributes{\??kj#1}\c!letter\c!kleur
+ {\tfskip#3}}}
+ {\global\letvalue{@fl@r@#1}\relax
+ \global\letvalue{@fl@t@#1}\relax}}
+
+\def\placefloatcaptiontext [#1]{\getvalue{@fl@t@#1}}
+\def\placefloatcaptionreference[#1]{\getvalue{@fl@r@#1}}
+
+% still needed for uguide
+
+\let\placefloatlabel \placefloatcaption
+\let\placefloatlabeltext \placefloatcaptiontext
+\let\placefloatlabelreference \placefloatcaptionreference
\def\checkframedtext%
{\ifinsidefloat
diff --git a/tex/context/base/cont-sys.ori b/tex/context/base/cont-sys.ori
index 69483c98d..4da61099c 100644
--- a/tex/context/base/cont-sys.ori
+++ b/tex/context/base/cont-sys.ori
@@ -16,47 +16,66 @@
% Here you can take care of overloading some (style)
% defaults. What goes here, depends on your local system.
%
-% Set default file name mapping (not really needed):
+% The following commands sets the default font encoding:
%
-% \usetypescript [ber]
+% \setupencoding [\s!default=ec]
%
-% Overload Lucida by Adobe-15:
+% You can let \CONTEXT\ load the map files for \PDFTEX.
+%
+% \autoloadmapfilestrue
+%
+% If you use the more verbose naming scheme, uncomment this:
+%
+% \usetypescript [map] [default,\defaultencoding]
+%
+% or :
+%
+% \usetypescript [map] [all]
+%
+% In case you have set psfonts.map already, you can comment
+% the following lines. Beware: pdftex uses the fontname
+% (second entry on map file lines) for (not so) clever
+% remapping, so in case of troubles, remove the names (is
+% safe)!
+%
+% \preloadmapfile [original-ams-cmr]
+% \preloadmapfile [original-ams-euler]
+% \preloadmapfile [il2-ams-cmr]
+% \preloadmapfile [pl0-ams-cmr]
+%
+% If you want the default berry names (ec and 8r only):
+%
+% \usetypescript [berry] [\defaultencoding]
+%
+% Overload Lucida by Times cum suis:
%
% \definetypescriptsynonym [lbr] [pos]
%
% Compensate for missing files:
%
-% \definefontsynonym [Courier-Bold] [Courier]
-% \definefontsynonym [Courier-BoldOblique] [Courier]
-%
% \definefontsynonym [gbhei] [gbsong]
% \definefontsynonym [gbheisl] [gbsong]
% \definefontsynonym [gbheisl] [gbsong]
%
-% You can let \CONTEXT\ load the map files for \PDFTEX.
+% The already loaded map file list can be reset with:
%
-% \autoloadmapfilestrue
+% \forgetmapfiles
%
-% Setting up a global figure path (beware, \c!gebied may change):
+% Setting up a global figure path:
%
-% \setupexternalfigures
-% [\c!gebied={e:/fig/eps,t:/pragma/metapost/symbols}]
+% \setupexternalfigures [\c!gebied={e:/fig/eps,t:/mine/figs}]
%
% Loading a specific special driver:
%
-% \setupoutput
-% [dviwindo]
+% \setupoutput [dviwindo]
%
% Enabling \CONTEXT\ navigation symbols as well as \euro's.
-\usesymbols
- [nav,eur]
+\usesymbols [nav,eur]
-\setupsymbolset
- [navigation 1]
+\setupsymbolset [navigation 1]
-\setupinteraction
- [\c!symboolset=navigation 1]
+\setupinteraction [\c!symboolset=navigation 1]
% Changing language defaults:
%
@@ -64,31 +83,38 @@
% [nl]
% [\c!leftquote=\upperleftsinglesixquote,
% \c!leftquotation=\upperleftdoublesixquote]
-%
-% So far for the settings.
-% Loading local preferences:
+% Loading local preferences, for example
%
% \input prag-gen % company styles
% \input prag-log % more company styles
%
-% Enabling run time \METAPOST\ (also enable \write18 in texmf.cnf):
+% Enabling run time \METAPOST\ (also enable \write18 in
+% texmf.cnf):
+
+% \runMPgraphicstrue
+% \runMPTEXgraphicstrue
+% \recycleMPslotstrue
+
+% This saves some runtime, but needs a format, which you can
+% make with 'texexec --make --alone metafun'. Make sure that
+% the mem files are moved to the used web2c path (locate with
+% 'kpsewhich plain.mem').
- \runMPgraphicstrue
-\runMPTEXgraphicstrue
- \recycleMPslotstrue
\useMETAFUNformattrue
% Enabling nested pretty printing:
- \newprettytrue
+\newprettytrue
-% Protect filenames:
+% This can be a way to get things working on system with
+% name clashes. (Some \TeX's tend do search system wide.)
- \protectbufferstrue
-
-% not really needed
+\protectbufferstrue
+% You can enable a rigurous figure searching, but normally
+% this is not really needed and even annoying.
+%
% \runutilityfiletrue
% So far.
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index b4f2845e6..923836a70 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -13,7 +13,7 @@
\catcode`\{=1 \catcode`\}=2
-\def\contextversion{2001.7.11}
+\def\contextversion{2001.8.28}
%D Welcome to the main module. When this module is ran through
%D \type{initex} or \type{tex -i} or \type{whatevertex} using
@@ -256,6 +256,7 @@
\input xtag-ini.tex
\input xtag-ext.tex
%input xtag-map.tex
+%input xtag-ent.tex
%D The next two modules implement some additional
%D functionality concenring classes of documents and output.
diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex
index 2af9525e1..86c22ee9c 100644
--- a/tex/context/base/core-fig.tex
+++ b/tex/context/base/core-fig.tex
@@ -161,6 +161,7 @@
%D possible.
\newif\ifrunutilityfile % \runutilityfiletrue
+\newif\ifconsultutilityfile \consultutilityfiletrue
%D When I ever decide to change the format of the figure
%D directory file that \TEXUTIL\ produces, the next number
@@ -390,25 +391,27 @@
\fi}
\def\getfiguredimensionsC%
- {\ifcase\figurestatus\ifrunutilityfile\ifcase\figurefilemode\else
- %\doif{\@@efcurrenttype}{\c!tex} % oeps, was wrong
- \doifnotinset{\@@efextension}{\c!tex,\c!tmp}
- {\doiffileelse{\@@efcurrentfile}
- {\edef\@@effilenametype{\@@effilename.\@@efcurrenttype}%
- \@@eftrace{running texutil on \@@effilenametype}%
- \def\@@efloadname{\f!utilityfilename.\f!temporaryextension}%
- \executesystemcommand
- {texutil --fig --out=\@@efloadname\space\@@effilenametype}%
- \@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}%
- \pushendofline
+ {\ifconsultutilityfile \ifrunutilityfile
+ \ifcase\figurestatus\ifcase\figurefilemode\else
+ %\doif{\@@efcurrenttype}{\c!tex} % oeps, was wrong
+ \doifnotinset{\@@efextension}{\c!tex,\c!tmp}
+ {\doiffileelse{\@@efcurrentfile}
+ {\edef\@@effilenametype{\@@effilename.\@@efcurrenttype}%
+ \@@eftrace{running texutil on \@@effilenametype}%
+ \def\@@efloadname{\f!utilityfilename.\f!temporaryextension}%
+ \executesystemcommand
+ {texutil --fig --out=\@@efloadname\space\@@effilenametype}%
+ \@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}%
+ \pushendofline
\startreadingfile
- \let\presetfigure=\presetfigureB
- \readsetfile{.}{\@@efloadname}\relax\relax
+ \let\presetfigure=\presetfigureB
+ \readsetfile{.}{\@@efloadname}\relax\relax
\stopreadingfile
- \popendofline
- \@@eftrace{\ifcase\figurestatus not \fi found}}
- {}}%
- \fi\fi\fi}
+ \popendofline
+ \@@eftrace{\ifcase\figurestatus not \fi found}}
+ {}}%
+ \fi\fi
+ \fi\fi}
\def\presetfigureB[#1][#2]%
{\getparameters[\??ep][#2]%
@@ -420,7 +423,7 @@
%D utilility files.
\def\doanalyzefigurefilesB%
- {\ifcase\figurestatus\ifcase\figurefilemode\else
+ {\ifconsultutilityfile\ifcase\figurestatus\ifcase\figurefilemode\else
%\def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}%
\assignfullfilename\@@efcurrentpath\@@exfile\to\@@efloadname
\edef\@@effilenametype{\@@effilename.\figureextension{\@@efcurrenttype}}%
@@ -434,7 +437,7 @@
\stopreadingfile
\popendofline
\@@eftrace{\ifcase\figurestatus not \fi found}%
- \fi\fi}
+ \fi\fi\fi}
\def\presetfigureC[#1][#2]%
{\ifcase\figurestatus
@@ -452,7 +455,7 @@
%D being more tolerant.
\def\doanalyzefigurefilesC%
- {\ifcase\figurestatus\ifcase\figurefilemode\else
+ {\ifconsultutilityfile\ifcase\figurestatus\ifcase\figurefilemode\else
%\def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}%
\assignfullfilename\@@efcurrentpath\@@exfile\to\@@efloadname
\@@eftrace{analyzing \@@efloadname\space
@@ -465,7 +468,7 @@
\stopreadingfile
\popendofline
\@@eftrace{\ifcase\figurestatus not \fi found}%
- \fi\fi}
+ \fi\fi\fi}
\def\presetfigureD[#1][#2]%
{\ifcase\figurestatus
@@ -989,10 +992,10 @@
\iftraceexternalfigures
\message
{\externalfigurelog
- [\@@effullname:
- t={\@@eftype}\space m={\@@efmethode}\space l=\@@eflabel\space
- w=\number\figwid\space h=\number\fighei\space
- sx=\scax\space sy=\scay\space ox=\figx\space oy=\figy]}%
+ [\@@effullname:
+ t={\@@eftype}\space m={\@@efmethode}\space l=\@@eflabel\space
+ w=\number\figwid\space h=\number\fighei\space
+ sx=\scax\space sy=\scay\space ox=\figx\space oy=\figy]}%
\fi
\doif{\v!leeg}{\@@exoptie}
{\skipexternalfigurestrue
@@ -1045,6 +1048,7 @@
\fi\fi}%
\wd0=\figwid
\setobject{FIG}{\@@efobjectname}\vbox{\box0}%
+ \setxvalue{\@@efobjectname\c!n}{\number\nofinsertpages}%
\egroup}%
\fi
\xdef\figurewidth {\the\figwid}%
@@ -1056,7 +1060,8 @@
\dimen0=\scax pt\divide\dimen0 by 100\edef\scax{\@EA\withoutpt\the\dimen0}%
\dimen0=\scay pt\divide\dimen0 by 100\edef\scay{\@EA\withoutpt\the\dimen0}%
\schaal[sx=\scax,sy=\scay]{\dowithfigure{\getobject{FIG}{\@@efobjectname}}}%
- \else\ifdim\wd\foundexternalfigure=\!!zeropoint
+ \xdef\noffigurepages{\number\getvalue{\@@efobjectname\c!n}}%
+ \else\ifdim\wd\foundexternalfigure=\zeropoint
\dowithfigure
{\doinsertfile
{\@@eftype,\@@efmethode}{\@@effullname,\@@eflabel}
@@ -1064,13 +1069,16 @@
{\figx}{\figy}
{\number\figwid}{\number\fighei}
{\@@efoptions}}%
+ \xdef\noffigurepages{\number\nofinsertpages}%
\else
\dimen0=\scax pt\divide\dimen0 by 100\edef\scax{\@EA\withoutpt\the\dimen0}%
\dimen0=\scay pt\divide\dimen0 by 100\edef\scay{\@EA\withoutpt\the\dimen0}%
\schaal[sx=\scax,sy=\scay]{\dowithfigure{\box\foundexternalfigure}}%
+ \xdef\noffigurepages{\number\nofinsertpages}%
\fi\fi}%
\global\wd\foundexternalfigure=\figwid}
+
%D In \PDF\ one can specify an alternative graphic. This means
%D that for instance a low resolution graphic can be used for
%D viewing and a high res one for printing. Because this
diff --git a/tex/context/base/core-fld.tex b/tex/context/base/core-fld.tex
index a240bfa2b..f57b835bc 100644
--- a/tex/context/base/core-fld.tex
+++ b/tex/context/base/core-fld.tex
@@ -57,7 +57,7 @@
{\@@fdoptie}
{\@@fduitlijnen}
{\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
\def\presettextfield%
{\dopresettextfield
@@ -70,7 +70,7 @@
{\@@fdoptie}
{\@@fduitlijnen}
{\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
\def\presetchoicefield%
{\dopresetchoicefield
@@ -82,7 +82,7 @@
{\@@fdoptie}
{\@@FieldValues}
{\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
\def\presetpopupfield%
{\dopresetpopupfield
@@ -94,7 +94,7 @@
{\@@fdoptie}
{\@@FieldValues}
{\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
\def\presetcombofield%
{\dopresetcombofield
@@ -106,7 +106,7 @@
{\@@fdoptie}
{\@@FieldValues}
{\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
\def\presetcheckfield%
{\presetfieldsymbols[\@@FieldValues]%
@@ -119,7 +119,7 @@
{\@@fdoptie}
{\@@FieldValues}
{\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
\def\presetpushfield%
{%\edef\@@FieldValues{{\@@FieldValues}}% makes sure {a,b,c} is passed
@@ -132,7 +132,7 @@
{\@@fdoptie}
{\@@FieldValues}
{\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
\def\presetradiofield%
{\presetfieldsymbols[\@@FieldValues]%
@@ -144,7 +144,7 @@
{\@@FieldRoot}
{\@@FieldValues}
{\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
\def\presetradiorecord%
{\dopresetradiorecord
@@ -153,7 +153,7 @@
{\@@fdoptie}
{\@@FieldKids}
{\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
- \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken,\@@fdfocusin,\@@fdfocusuit}}
\def\setfieldmodes#1#2#3%
{\xdef\@@FieldMode{#1}% % 0 1 2 3
@@ -750,6 +750,7 @@
[\c!kleur=,\c!letter=,\c!uitlijnen=\v!rechts,\c!optie=,
\c!klikin=,\c!klikuit=,\c!gebiedin=,\c!gebieduit=,
\c!natoets=,\c!formatteer=,\c!valideer=,\c!bereken=,
+ \c!focusin=,\c!focusuit=,
\c!veldoffset=\!!zeropoint,\c!veldachtergrondkleur=,
\c!veldkaderkleur=,#5]%
\dimen0=\framedwidth \edef\@@FieldWidth {\number\dimen0}%
@@ -786,6 +787,7 @@
[\??fd]
[\c!n=1,\c!strut=\v!nee,\c!kleur=,\c!letter=,\c!optie=,
\c!klikin=,\c!klikuit=,\c!gebiedin=,\c!gebieduit=,
+ \c!focusin=,\c!focusuit=,
\c!natoets=,\c!formatteer=,\c!valideer=,\c!bereken=,
\c!veldoffset=\!!zeropoint,\c!veldachtergrondkleur=,
\c!veldkaderkleur=,#5,\c!uitlijnen=]
@@ -863,7 +865,9 @@
[dummy][\currentsystemfield:txt][\currentsystemfield:txt]%
\setupfield
[dummy]
- [\c!kader=\v!uit,\c!optie=\v!verborgen]%
+ [\c!kader=\v!uit,
+ \c!gebieduit=JS(Hide_Field{\currentsystemfield:txt}),
+ \c!optie=\v!verborgen]%
\hbox to \!!zeropoint
{\dimen0=\wd2\advance\dimen0 by -\wd0
\doifelse{#1}{\v!links}
diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex
index 2b7db091b..b5868d718 100644
--- a/tex/context/base/core-grd.tex
+++ b/tex/context/base/core-grd.tex
@@ -116,6 +116,10 @@
\fi
\fi}
+% Beware, keep this one as it is, see for instance module
+% m-steps.tex, where we apply a \localhsize to the \vbox, in
+% order to follow narrower and side floats !
+
\def\startbaselinecorrection%
{\baselinecorrection
\ifvmode
diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex
index 5cc0d9537..2ff563e1f 100644
--- a/tex/context/base/core-int.tex
+++ b/tex/context/base/core-int.tex
@@ -787,6 +787,8 @@
\newcounter\currentamposition
+\newtoks\everysetmenucommands
+
\def\setamboxcommands#1#2%
{\def\@@amboxcommand##1\\%
{\bgroup
@@ -797,6 +799,8 @@
\egroup
\ignorespaces}%
\doglobal\newcounter\currentamposition %%% experiment
+ \def\currentmenu{#1}% to be sure
+ % here, but could go into \everysetmenucommands
\def\raw[##1]##2\\%
{\@@amboxcommand\naarbox{\ignorespaces##2\unskip}[##1]\\}%
\def\but[##1]##2\\%
@@ -810,14 +814,18 @@
\def\rul##1\\% ook \do@@amposition !
{\@@amboxcommand\localframed[\??am#1][]{\ignorespaces##1\unskip}\\}%
\def\com##1\\%
- {\ignorespaces##1\unskip\ignorespaces}}
+ {\ignorespaces##1\unskip\ignorespaces}%
+ \the\everysetmenucommands}
\ifx\do@@amposition\undefined
\let\do@@amposition\gobbletwoarguments % hook for positional thingies
\fi
+\let\currentmenu\empty
+
\def\@@amhbox#1#2#3#4%
- {\testinteractiemenu{#3}%
+ {\def\currentmenu{#3}%
+ \testinteractiemenu{#3}%
\iflocationmenupermitted
\bgroup
\showcomposition
@@ -843,7 +851,8 @@
\fi}
\def\@@amvbox#1#2#3#4% don't change skipping, this one works!
- {\testinteractiemenu{#3}%
+ {\def\currentmenu{#3}%
+ \testinteractiemenu{#3}%
\iflocationmenupermitted
\bgroup
\showcomposition
diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex
index 6493e93cc..ba1e65a4a 100644
--- a/tex/context/base/core-itm.tex
+++ b/tex/context/base/core-itm.tex
@@ -630,6 +630,10 @@
{\setbox8=\hbox{\naar{\box8}[\somdestination]}}%
\global\let\somdestination=\empty
\dimen2=\getvalue{\??op\itemlevel\c!breedte}\relax
+% new, prevents loops when symbol is (not yet found) graphic
+\ht8=\strutheight
+\dp8=\strutdepth
+% so that content differs per run (esp mp graphics afterwards)
\ifdim\dimen2<\!!zeropoint\relax
\llap{\ifsubsom\llap{+}\fi\box8\hskip\linkermargeafstand}%
\else
diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex
index d19ca2326..7f22ee895 100644
--- a/tex/context/base/core-mis.tex
+++ b/tex/context/base/core-mis.tex
@@ -812,20 +812,20 @@
\def\startspeech
{\doglobal\increment\speechlevel\relax
\dohandlequotation\c!leftspeech\relax
- \doglobal\settrue\insidespeech
+ \global\settrue\insidespeech
\ignorespaces}
\def\stopspeech
{\dohandlequotation\c!rightspeech\unskip
\doglobal\decrement\speechlevel\relax
- \ifcase\speechlevel\relax \doglobal\setfalse\insidespeech \fi}
+ \ifcase\speechlevel\relax \global\setfalse\insidespeech \fi}
\def\dohandlespeech%
{\relax \ifcase\speechlevel
\or\ifconditional\insidespeech
\dohandlequotation\c!middlespeech\relax
\else
- \doglobal\settrue\insidespeech
+ \global\settrue\insidespeech
\fi\fi}
\unexpanded\def\speech%
diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex
index 9d4499615..69e62dc5b 100644
--- a/tex/context/base/core-not.tex
+++ b/tex/context/base/core-not.tex
@@ -13,6 +13,9 @@
\writestatus{loading}{Context Core Macros / Footnote Handling}
+%D Unfortunately we cannot force an even number of lines in
+%D a two column footnote placement.
+
%D There are some (still) dutch core commands used in this
%D file.
@@ -116,10 +119,17 @@
\getparameters[\??vn][#1]%
\processaction
[\@@vnlijn]
- [ \v!aan=>\let\dofootnoterule=\dodofootnoterule,
- \v!uit=>\let\dofootnoterule=\relax,
- \s!default=>\let\dofootnoterule=\relax,
- \s!unknown=>\let\dofootnoterule=\@@vnlijn]%
+ [ \v!aan=>\let\dofootnoterule\dodofootnoterule,
+ \v!uit=>\let\dofootnoterule\relax,
+ \s!default=>\let\dofootnoterule\relax,
+ \s!unknown=>\let\dofootnoterule\@@vnlijn]%
+ \processaction
+ [\@@vnsplitsen]
+ [ \v!soepel=>\footnotepenalty\zeropoint,
+ \v!streng=>\footnotepenalty9999,
+ \v!zeerstreng=>\footnotepenalty\maxdimen,
+ \s!default=>\footnotepenalty\zeropoint,
+ \v!unknown=>\footnotepenalty\commalistelement]%
\fi
\setfootnotedistance
\count\footins=1000
@@ -370,6 +380,9 @@
\let\stoppushfootnote = \relax
\newsignal\footnotesignal
+\newcount \footnotepenalty
+
+\footnotepenalty=0 % needed in order to split in otrset
\def\dostartfootnote% nog gobble als in pagebody
{\bgroup
@@ -385,14 +398,19 @@
\fi
\ignorespaces
\localfootinsert\footins\bgroup
- \allowbreak % needed in order to split in otrset
+ \penalty\footnotepenalty
\forgetall
\setfootnotebodyfont
\redoconvertfont % to undo \undo calls in in headings etc
\splittopskip\ht\strutbox % not actually needed here
\splitmaxdepth\dp\strutbox % not actually needed here
- \def\linkermargeafstand{\@@vnmargeafstand}%
- \def\rechtermargeafstand{\@@vnmargeafstand}%
+ \iffixedlayoutdimensions % ugly hack, will change
+ \linkermargeafstand\@@vnmargeafstand
+ \rechtermargeafstand\linkermargeafstand
+ \else
+ \def\linkermargeafstand{\@@vnmargeafstand}%
+ \let\rechtermargeafstand\linkermargeafstand
+ \fi
\ifcase\@@vnn\relax % new 31-07-99 ; always ?
\doifnotinset{\@@vnbreedte}{\v!passend,\v!ruim}
{\setfootnotehsize}%
@@ -822,6 +840,7 @@
\c!afstand=.125em,
\c!uitlijnen=\v!normaal,
\c!tolerantie=\v!soepel,
+ \c!splitsen=\v!soepel,
%\c!breedte=\zetbreedte,
%\c!breedte=\ifdim\hsize<\zetbreedte\hsize\else\zetbreedte\fi,
\c!breedte=\defaultfootnotewidth,
diff --git a/tex/context/base/core-pos.tex b/tex/context/base/core-pos.tex
index 84e26650a..6d00fb8db 100644
--- a/tex/context/base/core-pos.tex
+++ b/tex/context/base/core-pos.tex
@@ -434,6 +434,12 @@
% \def\lpos#1{\lrpos{l:#1}{\kern\leftskip}}
% \def\rpos#1{\lrpos{r:#1}{\hskip\hsize\hskip-\rightskip}}
+%
+% \def\lrpos#1#2%
+% {\dontleavehmode\vadjust % may disappear if buried
+% {\setbox0=\hbox{\raise\dp\strutbox\hbox{\hpos{#1}{\strut}}}%
+% \smashbox0
+% \rlap{#2\box0}}}
\def\bpos#1{\hpos{b:#1}{\strut}\ignorespaces}
\def\epos#1{\ifhmode\unskip\fi\hpos{e:#1}{\strut}}
@@ -446,6 +452,24 @@
{\ifhmode\unskip\fi
\setpositionplus{e:#1}{\parposcounter}\hbox{\strut}}
+\def\ffpos#1%
+ {\setpositionbox{b:#1}\hbox{\strut}\wpos{#1}%
+ \ignorespaces}
+
+\def\ttpos#1%
+ {\ifhmode\unskip\fi
+ \setpositionbox{e:#1}\hbox{\strut}}
+
+\def\wpos#1%
+ {\dontleavehmode\vadjust % may disappear if buried
+ {\setbox0=\hbox{\raise\dp\strutbox\hbox{\hpos{w:#1}
+ {\strut
+ \hskip-\leftskip
+ \hskip\hsize
+ \hskip-\rightskip}}}%
+ \smashbox0
+ \rlap{\box0}}}
+
%D When we want to calculate more complex backgrounds, we
%D need to know what the current indentation scheme is. At
%D the cost of many positions and memory, we can keep track
@@ -464,23 +488,26 @@
\def\registerparoptions%
{\ifinpagebody \else \ifpositioning \ifpositioningpar
\ifmmode \else \ifinformula \else
- \doglobal\increment\parposcounter
- \bgroup
- \leftskip =1\leftskip
- \rightskip=1\rightskip
- \setpositionplus
- {p:\parposcounter}% % identifier
- {\efficientdimen\hsize ,% 1
- \efficientdimen\leftskip ,% 2
- \efficientdimen\rightskip ,% 3
- \efficientdimen\hangindent,% 4
- \the\hangafter ,% 5
- \efficientdimen\parindent }% 6
- \hbox{\strut\registerparsymbol}%
- \egroup
+ \doregisterparoptions
\fi \fi
\fi \fi \fi}
+\def\doregisterparoptions%
+ {\doglobal\increment\parposcounter
+ \bgroup
+ \leftskip =1\leftskip
+ \rightskip=1\rightskip
+ \setpositionplus
+ {p:\parposcounter}% % identifier
+ {\efficientdimen\hsize ,% 1
+ \efficientdimen\leftskip ,% 2
+ \efficientdimen\rightskip ,% 3
+ \efficientdimen\hangindent,% 4
+ \the\hangafter ,% 5
+ \efficientdimen\parindent }% 6
+ \hbox{\strut\registerparsymbol}%
+ \egroup}
+
\newif\iftracepositions
\def\registerparsymbol
@@ -675,7 +702,7 @@
\def\MPanchoridentifier{mp-anchor}
\def\MPoverlayposprefix{MO::}
-\long\def\defineMPpositiongraphic#1%
+\long\def\defineMPpositiongraphic#1%
{\long\setvalue{\MPoverlayposprefix#1}}
%D The rest of the definitions concerning such overlays may
@@ -753,7 +780,7 @@
\fi}
\appendtoks
- \let\dohandlepositionboxes\dohandlepositionboxes
+ \let\dohandlepositionboxes\doinsertpositionboxes % was handle ?
\to \everyinsertpositionaction
\def\docleanpositionboxes#1#2#3% pos tag setups
@@ -928,6 +955,9 @@
%D This is already cleaned up.
+% gridtype = 1 => baseline
+% gridtype = 2 => betweenline
+
\setupMPvariables
[mpos:par]
[mp=mpos:par:shape,
@@ -958,17 +988,27 @@
\stopuseMPgraphic
\startMPpositionmethod{mpos:par}
- \startMPpositiongraphic{mpos:par}%
- {fillcolor,linecolor,gridcolor,linewidth,gridwidth,lineradius}
- initialize_par(\MPpos{b:\MPvar{self}},
- \MPpos{e:\MPvar{self}},
- \MPpos{text:\realfolio},
- \MPpos{p:\parcounter},
- \MPvv {p:\parcounter}{0,0,0,0,0,0}) ;
- \includeMPgraphic{mpos:par:setup} ;
- \includeMPgraphic{\MPvar{mp}} ; % \includeMPgraphic{mpos:par:shape} ;
- anchor_par(\MPanchor{b:\MPvar{self}}) ;
- \stopMPpositiongraphic
+ \doifpositionelse{w:\MPvar{self}}
+ {\startMPpositiongraphic{mpos:par}%
+ {fillcolor,linecolor,gridcolor,linewidth,gridwidth,lineradius}
+ initialize_area_par(\MPpos{b:\MPvar{self}},
+ \MPpos{e:\MPvar{self}},
+ \MPpos{w:\MPvar{self}}) ;
+ \includeMPgraphic{mpos:par:setup} ;
+ \includeMPgraphic{\MPvar{mp}} ; % \includeMPgraphic{mpos:par:shape} ;
+ anchor_par(\MPanchor{b:\MPvar{self}}) ;
+ \stopMPpositiongraphic}
+ {\startMPpositiongraphic{mpos:par}%
+ {fillcolor,linecolor,gridcolor,linewidth,gridwidth,lineradius}
+ initialize_par(\MPpos{b:\MPvar{self}},
+ \MPpos{e:\MPvar{self}},
+ \MPpos{text:\realfolio},
+ \MPpos{p:\parcounter},
+ \MPvv {p:\parcounter}{0,0,0,0,0,0}) ;
+ \includeMPgraphic{mpos:par:setup} ;
+ \includeMPgraphic{\MPvar{mp}} ; % \includeMPgraphic{mpos:par:shape} ;
+ anchor_par(\MPanchor{b:\MPvar{self}}) ;
+ \stopMPpositiongraphic}%
\MPpositiongraphic{mpos:par}{}%
\stopMPpositionmethod
@@ -979,22 +1019,51 @@
\def\MPself {\MPvar{self}}
\def\MPbself {b:\MPself}
\def\MPeself {e:\MPself}
+\def\MPwself {w:\MPself}
\def\paranchor{p:\parcounter}
+% \startMPpositionmethod{mpos:par}
+% \edef\parcounter{\MPv\MPbself{1}{0}}%
+% \startMPpositiongraphic{mpos:par}%
+% {fillcolor,linecolor,gridcolor,linewidth,gridwidth,lineradius}
+% initialize_par(\MPpos\MPbself, \MPpos\MPeself,
+% \MPpos\textanchor, \MPpos\paranchor,
+% \MPvv\paranchor{0,0,0,0,0,0}) ;
+% \includeMPgraphic{mpos:par:setup} ;
+% \includeMPgraphic{\MPvar{mp}} ; % \includeMPgraphic{mpos:par:shape} ;
+% anchor_par(\MPanchor\MPbself) ;
+% \stopMPpositiongraphic
+% \MPpositiongraphic{mpos:par}{}%
+% \stopMPpositionmethod
+
\startMPpositionmethod{mpos:par}
\edef\parcounter{\MPv\MPbself{1}{0}}%
- \startMPpositiongraphic{mpos:par}%
- {fillcolor,linecolor,gridcolor,linewidth,gridwidth,lineradius}
- initialize_par(\MPpos\MPbself, \MPpos\MPeself,
- \MPpos\textanchor, \MPpos\paranchor,
- \MPvv\paranchor{0,0,0,0,0,0}) ;
- \includeMPgraphic{mpos:par:setup} ;
- \includeMPgraphic{\MPvar{mp}} ; % \includeMPgraphic{mpos:par:shape} ;
- anchor_par(\MPanchor\MPbself) ;
- \stopMPpositiongraphic
+ \doifpositionelse\MPwself
+ {\startMPpositiongraphic{mpos:par}%
+ {fillcolor,linecolor,gridcolor,linewidth,gridwidth,lineradius}
+ initialize_area_par(\MPpos\MPbself,
+ \MPpos\MPeself,
+ \MPpos\MPwself) ;
+ \includeMPgraphic{mpos:par:setup} ;
+ \includeMPgraphic{\MPvar{mp}} ;
+ anchor_par(\MPanchor\MPbself) ;
+ \stopMPpositiongraphic}
+ {\startMPpositiongraphic{mpos:par}%
+ {fillcolor,linecolor,gridcolor,linewidth,gridwidth,lineradius}
+ initialize_par(\MPpos\MPbself,
+ \MPpos\MPeself,
+ \MPpos\textanchor,
+ \MPpos\paranchor,
+ \MPvv \paranchor{0,0,0,0,0,0}) ;
+ \includeMPgraphic{mpos:par:setup} ;
+ \includeMPgraphic{\MPvar{mp}} ;
+ anchor_par(\MPanchor\MPbself) ;
+ \stopMPpositiongraphic}%
\MPpositiongraphic{mpos:par}{}%
\stopMPpositionmethod
+%D So far for the unreadable alternative.
+
\appendtoks
\savecurrentvalue\totalnofparbackgrounds\nofparbackgrounds
\to \everybye
@@ -1171,6 +1240,18 @@
\fi
\edef\textparwidth{\the\scratchdimen}}
+\def\dontsplitnexttextbackground % dangerous but useful
+ {\ifdim\pagetotal>\teksthoogte \else
+ \ifdim\pagegoal=\maxdimen \else
+ \calculatenexttextpardimensions
+ \scratchdimen=\textparheight
+ \advance\scratchdimen\pagetotal\relax
+ \ifdim\scratchdimen>\pagegoal
+ \pagina
+ \fi
+ \fi
+ \fi}
+
\def\definetextbackground%
{\dodoubleempty\dodefinetextbackground}
@@ -1203,14 +1284,8 @@
\let\currenttextbackground\empty
-\def\checktextbackgrounds % maybe we need a dedicated layer
- {\ifproductionrun % for this kind of trickery, but
- \setupbackgrounds % for the moment this one will do
- [\v!tekst] % or maybe an \extendbackgrounds
- % [\c!achtergrond={\v!tekst-2,\v!tekst-1,\v!voorgrond,\v!tekst+1,\v!tekst+2}]%
- [\c!achtergrond={\v!tekst-1,\v!voorgrond,\v!tekst+1}]%
- \let\checktextbackgrounds\relax
- \fi}
+\def\checktextbackgrounds
+ {\ifproductionrun \enablehiddenbackground \fi}
\defineoverlay[\v!tekst-2][\positionoverlay{\v!tekst-2}]
\defineoverlay[\v!tekst-1][\positionoverlay{\v!tekst-1}]
@@ -1235,26 +1310,55 @@
\c!kaderkleur=blue,
\c!lijndikte=\linewidth]
-% lelijk, aanpassen
+% lelijk, aanpassen, opties
\setupMPvariables
[mpos:connect]
- [linecolor=blue,
- linewidth=1pt,
- arrowcolor=red]
-
-\startMPpositiongraphic{mpos:connect}{linecolor,linewidth,arrowcolor}
- path pa, pb ; pair ca, cb ;
- initialize_box(\MPpos{\MPvar{from}}) ; pa := pxy ; ca := cxy ;
- initialize_box(\MPpos{\MPvar{to}}) ; pb := pxy ; cb := cxy ;
- drawoptions(withpen pencircle scaled \MPvar{linewidth}) ;
- draw pa withcolor \MPvar{linecolor} ;
- draw pb withcolor \MPvar{linecolor} ;
- drawoptions(withpen pencircle scaled (3*\MPvar{linewidth})) ;
- drawarrow ca -- cb withcolor \MPvar{arrowcolor} ;
- anchor_box(\MPanchor{\MPvar{from}}) ;
+ [linecolor=red,
+ linewidth=1pt]
+
+\setupMPvariables
+ [mpos:encircle]
+ [fillcolor=lightgray,
+ linecolor=blue,
+ linewidth=1pt]
+
+\startuseMPgraphic{mpos:common:ec}
+ path pa ; pair ca ; color lc ; numeric lw ;
+ lw := \MPvar{linewidth} ;
+ lc := \MPvar{linecolor} ;
+ initialize_box(\MPpos{\MPvar{self}}) ;
+ pa := pxy ; ca := cxy ; pa := boundingbox pa enlarged 2lw ;
+ pa := llcorner pa...lrcorner pa...urcorner pa...ulcorner pa...cycle ;
+ drawoptions (withpen pencircle scaled lw withcolor lc) ;
+\stopuseMPgraphic
+
+\startMPpositiongraphic{mpos:encircle}{linecolor,fillcolor,linewidth}
+ \includeMPgraphic{mpos:common:ec}
+ fill pa withcolor \MPvar{fillcolor} ; draw pa ;
+ anchor_box(\MPanchor{\MPvar{self}}) ;
+\stopMPpositiongraphic
+
+\startMPpositiongraphic{mpos:connect}{linecolor,linewidth}
+ path pb, pc ; pair cb, cc ;
+ \includeMPgraphic{mpos:common:ec}
+ initialize_box(\MPpos{\MPvar{to}}) ;
+ pb := pxy ; cb := cxy ; pb := boundingbox pb enlarged 2lw ;
+ pb := llcorner pb...lrcorner pb...urcorner pb...ulcorner pb...cycle ;
+ pc := ca {up} .. {down} cb ;
+ cc := (pc intersection_point pa) ;
+ if intersection_found :
+ pc := pc cutbefore cc ;
+ cc := (pc intersection_point pb) ;
+ if intersection_found :
+ pc := pc cutafter cc ;
+ drawarrow pc ; drawarrow reverse pc ;
+ fi ;
+ fi ;
+ anchor_box(\MPanchor{\MPvar{self}}) ;
\stopMPpositiongraphic
+
%D \macros
%D {stackposdown, stackposup, stackposleft,stackposright}
%D
diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex
index fb8a0d5c2..8c17146a7 100644
--- a/tex/context/base/core-ref.tex
+++ b/tex/context/base/core-ref.tex
@@ -2632,6 +2632,8 @@
{\tttf[#2]}%
\egroup}
+% needs an update: program(abc{arg})
+
\definespeciallocation\v!programma#1#2%
{\bgroup
\iflocation
@@ -2646,7 +2648,8 @@
\start
\dostartrunprogram
{\number\buttonwidth}{\number\buttonheight}
- {\@@prgebied\ascii\space\currentreferencearguments}%
+ {\@@prgebied\ascii}
+ {\currentreferencearguments}%
\stop
\dostoprunprogram
\dostopgoto
@@ -2919,7 +2922,7 @@
\presetlocalframed[\??bt]
-\def\docomplexbutton#1[#2]#3#4% get rid of possible space before [#4]
+\long\def\docomplexbutton#1[#2]#3#4% get rid of possible space before [#4]
{\dodocomplexbutton#1[#2]{#3}#4} % #4 == [
% \def\dodocomplexbutton#1[#2]#3[#4]%
@@ -2949,7 +2952,7 @@
% \fi
% \egroup}
-\def\dodocomplexbutton#1[#2]#3[#4]% #3 can contain [] -> {#3} later
+\long\def\dodocomplexbutton#1[#2]#3[#4]% #3 can contain [] -> {#3} later
{\bgroup
\doifvalue{#1\c!status}{\v!stop}{\locationfalse}%
\iflocation
diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex
index 41f5d4577..cca5ac4d5 100644
--- a/tex/context/base/core-rul.tex
+++ b/tex/context/base/core-rul.tex
@@ -2341,8 +2341,8 @@
\egroup}
\def\dotoptextrule#1%
- {\pagina[\v!voorkeur]
- \witruimte
+ {\pagina[\v!voorkeur] % interferes
+ %\witruimte % no
\@@tlvoor
\docomplextextrule{#1}%
\geenwitruimte
@@ -2489,7 +2489,7 @@
%D \macros
%D {fillinline, setupfillinlines}
%D
-%D Another member of the family takes care of putting a (often
+%D Another member of the family takes care of putting a (often
%D small) rule after a piece of text, like
%D
%D \startbuffer
diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex
index 1abd6014e..36d1ac5f4 100644
--- a/tex/context/base/core-spa.tex
+++ b/tex/context/base/core-spa.tex
@@ -79,7 +79,7 @@
%D what we want. Therefore one can also say:
%D
%D \starttypen
-%D \definecorpsenvironment[9pt][interlinespace=11pt]
+%D \definebodyfontenvironment[9pt][interlinespace=11pt]
%D \stoptypen
%D
%D One can still use \type{\setupinterlinespace} (without
@@ -253,11 +253,11 @@
\global\blankogeenwitfalse
\global\lokaalblankoflexibelfalse
\global\lokaalblankovastfalse
- \global\blankoskip=\!!zeropoint
+ \global\blankoskip=\zeropoint
\global\blankoforceerfalse
\blankobuitenfalse
\processcommalist[#1]\doblanko
-\ifdim\blankoskip=\!!zeropoint\relax
+\ifdim\blankoskip=\zeropoint\relax
\iflokaalblankoflexibel \dosingleblanko\currentblanko \fi
\iflokaalblankovast \dosingleblanko\currentblanko \fi
\fi
@@ -295,9 +295,9 @@
\else
\ifdim\lastskip=\parskip
\else % force this due to previous comment
- \ifdim\parskip>\!!zeropoint\relax
+ \ifdim\parskip>\zeropoint\relax
\ifdim\blankoskip<\parskip\relax
- \global\blankoskip=\!!zeropoint
+ \global\blankoskip=\zeropoint
\else
\global\advance\blankoskip by -\parskip
\fi
@@ -519,9 +519,9 @@
%D Now.
-\definieerblanko
- [\s!default]
- [\v!wit]
+\definieerblanko [\s!default] [\v!wit]
+\definieerblanko [\v!hoogte] [\strutheight]
+\definieerblanko [\v!diepte] [\strutdepth]
\let\currentvoorwit=\empty
@@ -573,7 +573,7 @@
\v!eerste=>\indentfirstparagraphtrue,
\v!volgende=>\indentfirstparagraphfalse,
\v!altijd=>\parindent=\voorwit\relax, % geen \indent !
- \v!nooit=>\parindent=\!!zeropoint\relax]}
+ \v!nooit=>\parindent=\zeropoint\relax]}
\def\inspringen%
{\dosingleargument\doinspringen}
@@ -629,20 +629,12 @@
{\nointerlineskip
\vskip#1 }
-\newskip\tussenwit
-\tussenwit=\!!zeropoint
+\newskip\tussenwit \tussenwit=\zeropoint
-\def\blankokleinmaat%
- {\smallskipamount}
-
-\def\blankomiddelmaat%
- {\medskipamount}
-
-\def\blankogrootmaat%
- {\bigskipamount}
-
-\def\currentwitruimte%
- {\!!zeropoint}
+\def\blankokleinmaat {\smallskipamount}
+\def\blankomiddelmaat {\medskipamount}
+\def\blankogrootmaat {\bigskipamount}
+\def\currentwitruimte {\!!zeropoint}
\def\stelwitruimteopnieuwin%
{\expanded{\stelwitruimtein[\currentwitruimte]}}
@@ -863,6 +855,9 @@
\stopbaselinecorrection}%
\vbox}
+\def\removeunwantedspaces % too dumb macro
+ {\ifhmode\unskip\unskip\unskip\unskip\fi}
+
\def\toonstruts%
{\setteststrut}
@@ -1094,7 +1089,7 @@
\def\endstrut%
{\relax\ifhmode\ifdim\ht\strutbox=\!!zeropoint\else
- \unskip\unskip\unskip
+ \removeunwantedspaces
\normalpenalty\!!tenthousand
\normalhskip\!!zeropoint
\strut
@@ -1127,11 +1122,10 @@
\let\pseudobegstrut\pseudostrut
-\def\pseudoendstrut% removes all kind of signals
- {\ifhmode\unskip\unskip\unskip\unskip\fi}
+\let\pseudoendstrut\removeunwantedspaces
\def\resetteststrut%
- {\let\strutwidth=\!!zeropoint
+ {\let\strutwidth=\zeropoint
\setstrut}
\ifx\setfontparameters\undefined
@@ -1462,11 +1456,11 @@
\def\forgetbothskips%
{\tolerance=1500
- \leftskip\!!zeropoint
- \rightskip\!!zeropoint\relax}
+ \leftskip\zeropoint
+ \rightskip\zeropoint\relax}
\def\forgetspacing%
- {\emergencystretch\!!zeropoint\relax}
+ {\emergencystretch\zeropoint}
\def\forgetall%
{\the\everyforgetall}
@@ -1617,15 +1611,29 @@
\setvalue{@lsa@\empty}%
{\zeropoint}
+% not safe for 2\parindent
+%
+% \def\dosetleftskipadaption#1%
+% {\leftskipadaption
+% \ifcsname @lsa@#1\endcsname
+% \csname @lsa@#1\endcsname
+% \else
+% #1%
+% \fi
+% \relax}
+
\def\dosetleftskipadaption#1%
- {\leftskipadaption
- \ifcsname @lsa@#1\endcsname
- \csname @lsa@#1\endcsname
+ {\edef\ascii{@lsa@#1}%
+ \convertcommand\ascii\to\ascii
+ \leftskipadaption
+ \ifcsname\ascii\endcsname
+ \csname\ascii\endcsname
\else
#1%
\fi
\relax}
+
\endETEX
% Dit hoort eigenlijk thuis onder het kopje boodschappen cq,
@@ -1781,7 +1789,7 @@
\rightskip=1\rightskip\!!plus#3\relax % zie: Tex By Topic 8.1.3
\spaceskip#4\relax
\xspaceskip#5\relax
- \parfillskip\!!zeropoint\!!plus#6\relax
+ \parfillskip\zeropoint\!!plus#6\relax
\parindent#7\relax}
% \def\notragged%
@@ -1791,9 +1799,9 @@
{\chardef\raggedstatus=0
\leftskip1\leftskip
\rightskip1\rightskip
- \spaceskip\!!zeropoint
- \xspaceskip\!!zeropoint
- \parfillskip\!!zeropoint\!!plus1fil\relax
+ \spaceskip\zeropoint
+ \xspaceskip\zeropoint
+ \parfillskip\zeropoint\!!plus1fil\relax
\let\updateraggedskips\relax} % new
\let\forgetragged\notragged
@@ -1953,6 +1961,7 @@
{\ExpandFirstAfter\processallactionsinset
[#1]
[ \v!rek=>\emergencystretch=\bodyfontsize,
+ \v!spatie=>\spaceskip.5em\!!plus.25em\!!minus.25em\relax,
\v!zeerstreng=>\tolerance=200,
\v!streng=>\tolerance=1500,
\v!soepel=>\tolerance=3000,
@@ -1962,7 +1971,7 @@
{\dosingleargument\dosteltolerantiein}
\def\woordrechts%
- {\groupedcommand{\hfill\hbox}{\parfillskip\!!zeropoint}}
+ {\groupedcommand{\hfill\hbox}{\parfillskip\zeropoint}}
%D \macros
%D {pushindentation,popindentation}
@@ -1981,7 +1990,7 @@
\setbox\indentationboxB=\lastbox % get \indent generated box
\unskip
\else
- \hskip\!!zeropoint % switch to horizontal mode
+ \hskip\zeropoint % switch to horizontal mode
\unskip
\setbox\indentationboxA=\lastbox % get \indent generated box
\setbox\indentationboxB=\box\voidb@x
diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex
index 075bf0c0e..a2b458d94 100644
--- a/tex/context/base/core-tbl.tex
+++ b/tex/context/base/core-tbl.tex
@@ -102,6 +102,23 @@
% \NG 10 \NG 10 \NG 0,00 \NC\NR
% \stoptabulate
+% nice demo (for BG)
+%
+% \starttabulate[|r|b{$\star$}|ra{\percent}|b{=}|r|]
+% \NC 500 \NC \NC 60 \NC \NC 300 \NC \NR
+% \NC 500 \NC \NC 55 \NC \NC 275 \NC \NR
+% \NC 500 \NC \NC 50 \NC \NC 250 \NC \NR
+% \NC 500 \NC \NC 45 \NC \NC 225 \NC \NR
+% \NC 500 \NC \NC 40 \NC \NC 200 \NC \NR
+% \NC 500 \NC \NC 35 \NC \NC 175 \NC \NR
+% \NC 500 \NC \NC 30 \NC \NC 150 \NC \NR
+% \NC 500 \NC \NC 25 \NC \NC 125 \NC \NR
+% \NC 500 \NC \NC 20 \NC \NC 100 \NC \NR
+% \stoptabulate
+
+
+
+
\newtoks \tabulatepreamble
\newtoks \tabulatebefore
\newtoks \tabulateafter
diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex
index 428dbf6ef..575e237cd 100644
--- a/tex/context/base/core-ver.tex
+++ b/tex/context/base/core-ver.tex
@@ -154,7 +154,7 @@
\installnewpretty J {\setupprettiesintype {JV}\setupprettytype}
\installnewpretty S {\setupprettiesintype{SQL}\setupprettytype}
\installnewpretty W {\setupprettiesintype{PAS}\setupprettytype} % Wirth
-\installnewpretty E {\setupprettiesintype{EIF}\setupprettytype}
+\installnewpretty I {\setupprettiesintype{EIF}\setupprettytype} % E taken
\installnewpretty X {\setupprettiesintype{XML}\setupprettytype}
\def\setupcommonverbatim#1%
diff --git a/tex/context/base/enco-ans.tex b/tex/context/base/enco-ans.tex
index 38f07f130..e78b816b4 100644
--- a/tex/context/base/enco-ans.tex
+++ b/tex/context/base/enco-ans.tex
@@ -47,6 +47,12 @@
\definecasemap 241 241 209 \definecasemap 209 241 209
\definecasemap 245 245 213 \definecasemap 213 245 213
+% texnansx
+
+\definecasemap 26 26 29 \definecasemap 29 26 29
+\definecasemap 27 27 30 \definecasemap 30 27 30
+\definecasemap 28 28 31 \definecasemap 31 28 31
+
\stopmapping
\startencoding[texnansi]
@@ -138,7 +144,19 @@
\definecharacter yacute 253
\definecharacter thorn 254
\definecharacter ydiaeresis 255
-
+
+% texnansx
+
+\definecharacter aeligature 26
+\definecharacter oeligature 27
+\definecharacter ostroke 28
+
+\definecharacter AEligature 29
+\definecharacter OEligature 30
+\definecharacter Ostroke 31
+
+\definecharacter ssharp 25
+
\stopencoding
% will be replaced by math collection, fails anyway
diff --git a/tex/context/base/enco-com.tex b/tex/context/base/enco-com.tex
index 271b6ccbb..06c15eb70 100644
--- a/tex/context/base/enco-com.tex
+++ b/tex/context/base/enco-com.tex
@@ -12,30 +12,27 @@
%C details.
%D Here we map some \quote {short} names onto the more
-%D verbose glyph names. Unless one wants special effects,
-%D these definitions are only needed in the default encoding
-%D vector.
+%D verbose glyph names.
-\startencoding[default]
-\definecharacter AA {\Aring}
-\definecharacter aa {\aring}
-\definecharacter AE {\AEligature}
-\definecharacter ae {\aeligature}
-\definecharacter CC {\Ccedilla}
-\definecharacter cc {\ccedilla}
-\definecharacter L {\Lstroke}
-\definecharacter l {\lstroke}
-\definecharacter O {\Ostroke}
-\definecharacter o {\ostroke}
-\definecharacter OE {\OEligature}
-\definecharacter oe {\oeligature}
-\definecharacter SZ {\Ssharp}
-\definecharacter sz {\ssharp}
-\definecharacter SS {\ssharp}
-\definecharacter IJ {\IJligature}
-\definecharacter ij {\ijligature}
-
-\stopencoding
+\def\AA{\Aring}
+\def\aa{\aring}
+\def\AE{\AEligature}
+\def\ae{\aeligature}
+\def\CC{\Ccedilla}
+\def\cc{\ccedilla}
+\def \L{\Lstroke}
+\def \l{\lstroke}
+\def \O{\Ostroke}
+\def \o{\ostroke}
+\def\OE{\OEligature}
+\def\oe{\oeligature}
+\def\SZ{\Ssharp}
+\def\sz{\ssharp}
+\def\SS{\ssharp}
+\def\IJ{\IJligature}
+\def\ij{\ijligature}
+\def \i{\dotlessi}
+\def \j{\dotlessj}
\endinput
diff --git a/tex/context/base/enco-fde.tex b/tex/context/base/enco-fde.tex
index 70301668b..6678a2125 100644
--- a/tex/context/base/enco-fde.tex
+++ b/tex/context/base/enco-fde.tex
@@ -71,11 +71,15 @@
\c!leftsubsentence=\leftsubguillemot,
\c!rightsubsentence=\rightsubguillemot]}
- \installcompoundcharacter "< {{\setupDElanguage|<|}}
- \installcompoundcharacter "> {{\setupDElanguage|>|}}
+ \installcompoundcharacter "< {{\setupDElanguage|<|}}
+ \installcompoundcharacter "> {{\setupDElanguage|>|}}
+ \installcompoundcharacter "| {|*|}
\stoplanguagespecifics
+% \hyphenatedword{hinauff|*|liegen}
+% \hyphenatedword{hinauff"|liegen}
+
%D An experimental hack:
\startencoding[pdfdoc]
diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex
index 82f29e6ae..44029c7f0 100644
--- a/tex/context/base/enco-ini.tex
+++ b/tex/context/base/enco-ini.tex
@@ -259,6 +259,20 @@
\fi}
%D \macros
+%D {setupencoding}
+%D
+%D The following setup command is used to tune encoding
+%D handling.
+
+\def\setupencoding%
+ {\dosingleargument\dosetupencoding}
+
+\def\dosetupencoding[#1]%
+ {\getparameters[\??ec][#1]%
+ \edef\defaultencoding
+ {\ifx\@@ecdefault\empty\s!default\else\@@ecdefault\fi}}
+
+%D \macros
%D {useencoding}
%D
%D Encodings things are defined in separate files and are
@@ -1351,6 +1365,8 @@
\useencoding[def,acc,raw,com,cas,mis]
-\useencoding[ans,il2,ec,pdf,uc,pol,x5]
+\useencoding[ans,il2,ec,tbo,pdf,uc,pol,x5]
+
+\setupencoding[\s!default=\s!default]
\protect \endinput
diff --git a/tex/context/base/enco-mis.tex b/tex/context/base/enco-mis.tex
index 9de15de2e..6c8064d57 100644
--- a/tex/context/base/enco-mis.tex
+++ b/tex/context/base/enco-mis.tex
@@ -25,6 +25,8 @@
\stopmapping
+%D We need proper names like in enco-com.tex!
+
\definecharacter dj {\pseudoencodeddj}
\definecharacter Dj {\pseudoencodedDJ}
\definecharacter DJ {\pseudoencodedDJ}
diff --git a/tex/context/base/enco-run.tex b/tex/context/base/enco-run.tex
index c278b6870..13f292a08 100644
--- a/tex/context/base/enco-run.tex
+++ b/tex/context/base/enco-run.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=enco-run,
-%D version=2000.27.12, % moved to runtime module
+%D version=2000.27.12, % moved to runtime module
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=Runtime Macros,
%D author=Hans Hagen,
@@ -8,14 +8,14 @@
%D copyright=Hans Hagen \& Ton Otten]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
-\unprotect
+\unprotect
-\gdef\visualizecharacters% {}'s needed
+\gdef\visualizecharacters% {}'s needed
{\def\uchar##1##2{\hbox to 2.5em
- {\ifcase##1\relax\red\or\blue\else\green\fi##1\hss##2}}%
+ {\ifcase##1\relax\red\or\blue\else\green\fi##1\hss##2}}%
\let\normalbuildtextaccent\buildtextaccent
\let\normalbottomaccent \bottomaccent
%\def\char{\green\normalchar}%
@@ -25,29 +25,31 @@
\def\buildtextaccent{\let\green\empty\blue\normalbuildtextaccent}%
\def\bottomaccent{\let\green\empty\red\normalbottomaccent}}
-\gdef\visualizecharacterslegend%
- {\hbox{\currentencoding\space\fontname\font:\space
- {\blue composed}\space{\red bottom}\space{\green char}\space raw}}
+\unexpanded\gdef\visualizecharacterslegend%
+ {\hbox
+ {\edef\banner{\currentencoding\space\fontname\font}%
+ \tttf\banner:\space
+ {\blue composed}\space{\red bottom}\space{\green char}\space raw}}
\gdef\showaccents%
{\bgroup
- %\savefont
+ \savefont
\setuptextrules[\c!korps=,\c!letter=]
\starttextrule{\visualizecharacterslegend}
\witruimte
- %\restorefont\stelinterliniein
+ \restorefont\stelinterliniein
\visualizecharacters
\def\do##1%
{{\def\dodo####1%
{\hss\hbox to 1em{\hss\expanded{##1####1\recurselevel}\hss}}%
\hbox to \hsize
{\strut
- \localcolortrue
+ \localcolortrue
\hbox to 2em{\tttf\string##1\hss}%
\dorecurse{26}{\dodo\character}}%
\hbox to \hsize
{\strut
- \localcolortrue
+ \localcolortrue
\hskip2em
\dorecurse{26}{\dodo\Character}}}%
\par}
@@ -59,7 +61,7 @@
\gdef\showcharacters%
{\bgroup
- %\savefont
+ \savefont
\setuptextrules[\c!korps=,\c!letter=]
\starttextrule{\visualizecharacterslegend}
\witruimte
@@ -72,20 +74,21 @@
\def\definecharacter ##1 ##2 %
{\setbox0=\hbox spread 1em{\getvalue{##1}}%
\ifdim\wd0>\dimen0 \dimen0=\wd0 \fi
- \setbox2=\hbox spread 1em{\box0 ##1}
+ \setbox2=\hbox spread 1em{\box0 \tttf##1}
\ifdim\wd2>\dimen2 \dimen2=\wd2 \fi}%
\readsysfile{\f!encodingprefix def}{}{}
\edef\encwidth{\the\dimen0}
\dimen0=\hsize
\advance\dimen0 2em
\advance\dimen2 2em
- \divide \dimen0 by \dimen2 \advance\dimen0 1sp
+ \divide \dimen0 by \dimen2 \advance\dimen0 1sp
\edef\enccols{\number\dimen0}
\visualizecharacters
\startcolumns[\c!n=\enccols,\c!afstand=2em]
- %\restorefont\stelinterliniein
+ \restorefont\stelinterliniein
\def\definecharacter ##1 ##2 %
- {\hbox{\strut\localcolortrue\hbox to \encwidth{\getvalue{##1}\hss}##1}\par}
+ {\setbox0=\hbox to \hsize{\localcolortrue\hbox to \encwidth{\getvalue{##1}\hss}\tttf##1}%
+ \ht0\strutheight \dp0\strutdepth \box0 \allowbreak}
\readsysfile{\f!encodingprefix def}{}{}
\stopcolumns
\stoptextrule
@@ -100,4 +103,4 @@
\NC sample \NC \hyphenatedword{#1} \NC \NR
\stoptabulate}
-\protect \endinput
+\protect \endinput
diff --git a/tex/context/base/enco-tbo.tex b/tex/context/base/enco-tbo.tex
new file mode 100644
index 000000000..ea32a53da
--- /dev/null
+++ b/tex/context/base/enco-tbo.tex
@@ -0,0 +1,148 @@
+%D \module
+%D [ file=enco-tbo,
+%D version=2001.8.4,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=TeXBaseOne Encoding,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=Hans Hagen]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\startmapping[8r]
+
+\definecasemap 228 228 196 \definecasemap 196 228 196
+\definecasemap 235 235 203 \definecasemap 203 235 203
+\definecasemap 239 239 207 \definecasemap 207 239 207
+\definecasemap 246 246 214 \definecasemap 214 246 214
+\definecasemap 252 252 220 \definecasemap 220 252 220
+\definecasemap 255 255 159 \definecasemap 159 255 159
+
+\definecasemap 225 225 193 \definecasemap 193 225 193
+\definecasemap 233 233 201 \definecasemap 201 233 201
+\definecasemap 237 237 205 \definecasemap 205 237 205
+\definecasemap 243 243 211 \definecasemap 211 243 211
+\definecasemap 250 250 218 \definecasemap 218 250 218
+\definecasemap 253 253 221 \definecasemap 221 253 221
+
+\definecasemap 224 224 192 \definecasemap 192 224 192
+\definecasemap 232 232 200 \definecasemap 200 232 200
+\definecasemap 236 236 204 \definecasemap 204 236 204
+\definecasemap 242 242 210 \definecasemap 210 242 210
+\definecasemap 249 249 217 \definecasemap 217 249 217
+
+\definecasemap 226 226 194 \definecasemap 194 226 194
+\definecasemap 234 234 202 \definecasemap 202 234 202
+\definecasemap 238 238 206 \definecasemap 206 238 206
+\definecasemap 244 244 212 \definecasemap 212 244 212
+\definecasemap 251 251 219 \definecasemap 219 251 219
+
+\definecasemap 227 227 195 \definecasemap 195 227 195
+\definecasemap 241 241 209 \definecasemap 209 241 209
+\definecasemap 245 245 213 \definecasemap 213 245 213
+
+\stopmapping
+
+\startencoding[8r]
+
+\definecharacter textgrave 30
+\definecharacter textacute 180
+\definecharacter textcircumflex 136
+\definecharacter texttilde 152
+\definecharacter textdiaeresis 168
+\definecharacter texthungarumlaut 5
+\definecharacter textring 9
+\definecharacter textcaron 16
+\definecharacter textbreve 11
+\definecharacter textmacron 175
+\definecharacter textdotaccent 1
+\definecharacter textcedilla 184
+\definecharacter textogonek 8
+
+\definecharacter dotlessi 17
+\definecharacter dotlessj 18
+
+\definecharacter Lslash 6
+\definecharacter lslash 7
+
+\definecharacter Scaron 138
+
+\definecharacter OEligature 140
+\definecharacter Zcaron 141
+
+\definecharacter scaron 154
+
+\definecharacter oeligature 156
+
+\definecharacter Ydiaeresis 159
+
+\definecharacter Agrave 192
+\definecharacter Aacute 193
+\definecharacter Acircumflex 194
+\definecharacter Atilde 195
+\definecharacter Adiaeresis 196
+\definecharacter Aring 197
+\definecharacter AEligature 198
+\definecharacter cCedile 199
+\definecharacter Egrave 200
+\definecharacter Eacute 201
+\definecharacter Ecircumflex 202
+\definecharacter Ediaeresis 203
+\definecharacter Igrave 204
+\definecharacter Iacute 205
+\definecharacter Icircumflex 206
+\definecharacter Idiaeresis 207
+
+\definecharacter Ntilde 209
+\definecharacter Ograve 210
+\definecharacter Oacute 211
+\definecharacter Ocircumflex 212
+\definecharacter Otilde 213
+\definecharacter Odiaeresis 214
+
+\definecharacter Ostoke 216
+\definecharacter Ugrave 217
+\definecharacter Uacute 218
+\definecharacter Ucircumflex 219
+\definecharacter Udiaeresis 220
+\definecharacter Yacute 221
+\definecharacter Thorn 222
+\definecharacter ssharp 223
+\definecharacter agrave 224
+\definecharacter aacute 225
+\definecharacter acircumflex 226
+\definecharacter atilde 227
+\definecharacter adiaeresis 228
+\definecharacter aring 229
+\definecharacter aeligature 230
+\definecharacter ccedile 231
+\definecharacter egrave 232
+\definecharacter eacute 233
+\definecharacter ecircumflex 234
+\definecharacter ediaeresis 235
+\definecharacter igrave 236
+\definecharacter iacute 237
+\definecharacter icircumflex 238
+\definecharacter idiaeresis 239
+
+\definecharacter ntilde 241
+\definecharacter ograve 242
+\definecharacter oacute 243
+\definecharacter ocircumflex 244
+\definecharacter otilde 245
+\definecharacter odiaeresis 246
+
+\definecharacter ostroke 248
+\definecharacter ugrave 249
+\definecharacter uacute 250
+\definecharacter ucircumflex 251
+\definecharacter udiaeresis 252
+\definecharacter yacute 253
+\definecharacter thorn 254
+\definecharacter ydiaeresis 255
+
+\stopencoding
+
+\endinput
diff --git a/tex/context/base/font-arb.tex b/tex/context/base/font-arb.tex
index cd915fdff..d468f6c28 100644
--- a/tex/context/base/font-arb.tex
+++ b/tex/context/base/font-arb.tex
@@ -44,17 +44,6 @@
\definesystemvariable{ARABTEX}
-%D This will go to into font-ini.tex (moved from font-uni.tex):
-
-\def\fontstylesuffix%
- {\ifnum\fam=\tffam \s!Regular \else
- \ifnum\fam=\bffam \s!Bold \else
- \ifnum\fam=\slfam \s!Slanted \else
- \ifnum\fam=\itfam \s!Italic \else
- \ifnum\fam=\bsfam \s!BoldSlanted \else
- \ifnum\fam=\bifam \s!BoldItalic \else
- \s!Regular \fi\fi\fi\fi\fi\fi}
-
%D A few (maybe too) simple hooks into the font mechanism. The
%D hook into the language module is not yet done.
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex
index e0bf5f838..3abd84a58 100644
--- a/tex/context/base/font-ini.tex
+++ b/tex/context/base/font-ini.tex
@@ -27,12 +27,13 @@
\newcounter\pushedfont
-\def\savefont%
- {\increment\pushedfont
- \expanded{\definefont[\string\pushedfont:\pushedfont][\lastfontname]}}
+\def\savefont % do we also need to store the encoding ?
+ {\edef\savedfont{\the\font}%
+ \pushmacro\savedfont}
\def\restorefont%
- {\getvalue{\string\pushedfont:\pushedfont}}
+ {\popmacro\savedfont
+ \savedfont}
% new
@@ -1030,7 +1031,7 @@
\def\doparsefontspec#1 #2%
{\def\somefontname{#1}%
- \ifx#1\relax\relax % space before filename
+ \ifx\somefontname\empty % space before fontname
\@EA\doparsefontspec
\else
\ifx#2\relax
@@ -1367,7 +1368,54 @@
\fi\fi}
\endETEX
+
+%D \macros
+%D {tracedfontname}
+%D
+%D A goody:
+
+\beginTEX
+
+\def\tracedfontencoding#1%
+ {\expandafter\ifx\csname\??ff#1\s!encoding\endcsname\relax\else
+ \space[\csname\??ff#1\s!encoding\endcsname]%
+ \fi}
+
+\def\tracedfontname#1%
+ {\expandafter\ifx\csname\??ff\fontclass#1\endcsname\relax
+ \expandafter\ifx\csname\??ff#1\endcsname\relax
+ #1%
+ \else
+ #1\tracedfontencoding{#1}\space->\space
+ \@EA\tracedfontname\csname\??ff#1\endcsname
+ \fi
+ \else
+ #1\tracedfontencoding{\fontclass#1}\space->\space
+ \@EA\tracedfontname\csname\??ff\fontclass#1\endcsname
+ \fi}
+\endTEX
+
+\beginETEX
+
+\def\tracedfontencoding#1%
+ {\ifcsname\??ff#1\s!encoding\endcsname
+ \space[\csname\??ff#1\s!encoding\endcsname]%
+ \fi}
+
+\def\tracedfontname#1%
+ {\ifcsname\??ff\fontclass#1\endcsname
+ #1\tracedfontencoding{\fontclass#1}\space->\space
+ \@EA\tracedfontname\csname\??ff\fontclass#1\endcsname
+ \else\ifcsname\??ff#1\endcsname
+ #1\tracedfontencoding{#1}\space->\space
+ \@EA\tracedfontname\csname\??ff#1\endcsname
+ \else
+ #1%
+ \fi\fi}
+
+\endETEX
+
%D \macros
%D {getfontfileparameters}
%D
@@ -2013,18 +2061,22 @@
\fi}
\def\checkbodyfont#1#2#3#4% body style alt size / gdef % #4 can be empty
- {%\def\c!mm!{#2}\ifx\c!mm!\c!mm \else % test first
- \unexpanded\setgvalue {#2#4}{\setcurrentfontstylesize {#2}{#4}}% \rma
- \unexpanded\setgvalue {#3#4}{\setcurrentfontalternativesize {#3}{#4}}% \sla
- \unexpanded\setgvalue {#2#3#4}{\setcurrentfontstylealternativesize{#2}{#3}{#4}}% \rmsla
- \unexpanded\setgvalue {#2}{\setcurrentfontstyle {#2}}% \rm
- \unexpanded\setgvalue {#3}{\setcurrentfontalternative {#3}}% \sl
- \unexpanded\setgvalue {#2\c!x}{\setcurrentfontxstylealternative {#3}}% \rmx
- \unexpanded\setgvalue{#2\c!xx}{\setcurrentfontxxstylealternative {#3}}% \rmxx
- \unexpanded\setgvalue {#3\c!x}{\setcurrentfontxalternative {#3}}% \slx
- \unexpanded\setgvalue{#3\c!xx}{\setcurrentfontxxalternative {#3}}% \slxx
- \unexpanded\setgvalue {#2#3}{\setcurrentfontstylealternative {#2}{#3}}}% \rmsl
- %\fi}
+ {\def\c!mm!{#2}%
+ \ifx\c!mm!\c!mm % prevents \max and alike (re)defs
+ \unexpanded\setgvalue {#2}{\setcurrentfontstyle {#2}}% \rm
+ \unexpanded\setgvalue {#3}{\setcurrentfontalternative {#3}}% \sl
+ \else
+ \unexpanded\setgvalue {#2#4}{\setcurrentfontstylesize {#2}{#4}}% \rma
+ \unexpanded\setgvalue {#3#4}{\setcurrentfontalternativesize {#3}{#4}}% \sla
+ \unexpanded\setgvalue {#2#3#4}{\setcurrentfontstylealternativesize{#2}{#3}{#4}}% \rmsla
+ \unexpanded\setgvalue {#2}{\setcurrentfontstyle {#2}}% \rm
+ \unexpanded\setgvalue {#3}{\setcurrentfontalternative {#3}}% \sl
+ \unexpanded\setgvalue {#2\c!x}{\setcurrentfontxstylealternative {#3}}% \rmx
+ \unexpanded\setgvalue{#2\c!xx}{\setcurrentfontxxstylealternative {#3}}% \rmxx
+ \unexpanded\setgvalue {#3\c!x}{\setcurrentfontxalternative {#3}}% \slx
+ \unexpanded\setgvalue{#3\c!xx}{\setcurrentfontxxalternative {#3}}% \slxx
+ \unexpanded\setgvalue {#2#3}{\setcurrentfontstylealternative {#2}{#3}}% \rmsl
+ \fi}
\def\dodefinedefaultbodyfont[#1][#2][#3]% sizes styles identifier
{\def\dododefinedefaultbodyfont##1%
@@ -2990,10 +3042,10 @@
\doswitchstyle[\fontstyle]%
\the\everybodyfont}
-\def\setsmallbodyfont{\setbodyfontstep\v!klein}
-\def\setbigbodyfont {\setbodyfontstep\v!groot}
+\unexpanded\def\setsmallbodyfont{\setbodyfontstep\v!klein}
+\unexpanded\def\setbigbodyfont {\setbodyfontstep\v!groot}
-\def\setmainbodyfont%
+\unexpanded\def\setmainbodyfont%
{\doswitchpoints[\normalizedbodyfontsize]%
\doswitchstyle[\fontstyle]%
\the\everybodyfont}
@@ -3233,13 +3285,14 @@
\emphasiscorrection}
%D The next feature was not present in previous versions. It
-%D takes are of \type {\em \bf ...} sitiations.
+%D takes care of \type {\em \bf ...} sitiations.
\def\setemphasisboldface%
{\let\normalbf\bf
\let\setemphasisboldface\relax
- \def\bf%
- {\relax
+ \unexpanded\def\bf%
+ {%\relax
+ \let\bf\relax % new
\ifx\fontalternative\c!it % \ifnum\fam=\itfam
\bi
\else\ifx\fontalternative\c!sl % \ifnum\fam=\slfam
@@ -3399,7 +3452,7 @@
\fetchruntimecommand \showbodyfontenvironment {\f!fontprefix\s!run}
%D \macros
-%D {showfont,showfontstyle}
+%D {showfont,showfontstyle,showligatures}
%D
%D The following command generates a fontmap:
%D
@@ -3419,6 +3472,8 @@
\fetchruntimecommand \showfont {\f!fontprefix\s!run}
\fetchruntimecommand \showfontstyle {\f!fontprefix\s!run}
+\fetchruntimecommand \showligature {\f!fontprefix\s!run}
+\fetchruntimecommand \showligatures {\f!fontprefix\s!run}
%D \macros
%D {getglyph, symbolicfont}
diff --git a/tex/context/base/font-run.tex b/tex/context/base/font-run.tex
index c7ad85df6..26f224d91 100644
--- a/tex/context/base/font-run.tex
+++ b/tex/context/base/font-run.tex
@@ -12,10 +12,10 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D [This code is hooked into the core macros and saves some
-%D format space.]
+%D [This code is hooked into the core macros and saves some
+%D format space.]
-\unprotect
+\unprotect
\gdef\dosetshowfonttitle#1%
{\tabskip\!!zeropoint
@@ -32,7 +32,7 @@
{\dosingleempty\doshowbodyfont}
\gdef\doshowbodyfont[#1]%
- {\startbaselinecorrection
+ {\ifinsidefloat\else\startbaselinecorrection\fi
\vbox
{\dosetshowfonttitle{#1}%
\def\bigstrut##1##2%
@@ -64,24 +64,24 @@
\noalign{\hrule}\next{\tt\string\ss}{\ss}{Ag}
\noalign{\hrule}\next{\tt\string\tt}{\tt}{Ag}
\noalign{\hrule}}}
- \stopbaselinecorrection}
+ \ifinsidefloat\else\stopbaselinecorrection\fi}
\gdef\showbodyfontenvironment%
{\dosingleempty\doshowbodyfontenvironment}
\gdef\doshowbodyfontenvironment[#1]%
- {\startbaselinecorrection
+ {\ifinsidefloat\else\startbaselinecorrection\fi
\vbox
{\dosetshowfonttitle{#1}%
\def\next##1%
- {&&\getvalue{\bodyfontvariable{##1\s!text}}%
- &&\getvalue{\bodyfontvariable{##1\s!script}}%
- &&\getvalue{\bodyfontvariable{##1\s!scriptscript}}%
- &&\getvalue{\bodyfontvariable{##1\c!x}}%
- &&\getvalue{\bodyfontvariable{##1\c!xx}}%
- &&\getvalue{\bodyfontvariable{##1\interfaced\v!klein}}%
+ {&&\getvalue{\bodyfontvariable{##1\s!text}}%
+ &&\getvalue{\bodyfontvariable{##1\s!script}}%
+ &&\getvalue{\bodyfontvariable{##1\s!scriptscript}}%
+ &&\getvalue{\bodyfontvariable{##1\c!x}}%
+ &&\getvalue{\bodyfontvariable{##1\c!xx}}%
+ &&\getvalue{\bodyfontvariable{##1\interfaced\v!klein}}%
&&\getvalue{\bodyfontvariable{##1\interfaced\v!groot}}%
- &&\getvalue{\bodyfontvariable{##1\c!interlinie}}&\cr
+ &&\getvalue{\bodyfontvariable{##1\c!interlinie}}&\cr
\noalign{\hrule}}
\halign to \localhsize
{##&\vrule##\strut
@@ -94,11 +94,11 @@
&\multispan{17}{\vrule\hfil\tttf\strut\title\hfil}\vrule\cr
\noalign{\hrule}
&&\tttf\tx\s!text&&\tttf\tx\s!script&&\tttf\tx\s!scriptscript
- &&\tttf\tx\c!x&&\tttf\tx\c!xx&&\tttf\tx\v!klein&&\tttf\tx\v!groot
+ &&\tttf\tx\c!x&&\tttf\tx\c!xx&&\tttf\tx\v!klein&&\tttf\tx\v!groot
&&\tttf\tx\c!interlinie&\cr
\noalign{\hrule}
\@EA\globalprocesscommalist\@EA[\bodyfontenvironmentlist]\next}}
- \stopbaselinecorrection}
+ \ifinsidefloat\else\stopbaselinecorrection\fi}
\gdef\showfont%
{\dosingleempty\doshowfont}
@@ -112,17 +112,17 @@
\gdef\doshowfont[#1]%
{\bgroup
\setupcolors[\c!status=\v!lokaal]%
- \iffirstargument
+ \iffirstargument
\definefont[\s!dummy][#1]\dummy
\else\ifdim2.5em>.05\hsize \tx
- \ifdim2.5em>.05\hsize \txx
+ \ifdim2.5em>.05\hsize \txx
\fi\fi\fi
- \startbaselinecorrection
+ \ifinsidefloat\else\startbaselinecorrection\fi
\vbox\bgroup
- \forgetall
+ \forgetall
\startoverlay
{\vbox
- {\tf \setstrut \dummy
+ {\tf \setstrut \dummy
\localcolortrue \offinterlineskip
\dostepwiserecurse{0}{15}{1}
{\let\row\recurselevel
@@ -140,9 +140,9 @@
\setbox\scratchbox\hbox{\gray\vrule\!!width1ex\!!height.5ex\!!depth.5ex}%
\fi
\startoverlay
- {\tf\vbox to 2.5em
+ {\tf\vbox to 2.5em
{\vss
- \hbox to 2.5em
+ \hbox to 2.5em
{\dummy\ifdim\fontdimen2\font=\!!zeropoint
\setbox\scratchbox=\hbox
{\raise.5\dp\scratchbox\hbox
@@ -156,16 +156,16 @@
\fi
\hss\copy\scratchbox\hss}
\vss}}
- {\tf\vbox to 2.3em
+ {\tf\vbox to 2.3em
{\ifdone
- \blue \hsize2.4em
+ \blue \hsize2.4em
\edef\ascii
- {\ifnum\hyphenchar\font=\scratchcounter
+ {\ifnum\hyphenchar\font=\scratchcounter
hyph%
- \else\ifnum\skewchar\font=\scratchcounter
+ \else\ifnum\skewchar\font=\scratchcounter
skew%
\fi\fi}%
- \tinyfont
+ \tinyfont
{\red\ascii}\hfill
\number\scratchcounter
\vfill
@@ -181,12 +181,12 @@
\edef\ascii
{name:~{\black\fontname\font}\quad
encoding:~{\black\currentencoding}\quad
- mapping:~{\black\currentmapping}\quad
+ mapping:~{\black\currentmapping}\quad
handling:~{\black\fonthandling}}%
\tf\hbox to 40em
{\blue\hfill\tinyfont\setstrut\strut\ascii}
\egroup
- \stopbaselinecorrection
+ \ifinsidefloat\else\stopbaselinecorrection\fi
\egroup}
\gdef\showfontstyle%
@@ -198,7 +198,7 @@
\raggedright
\switchtobodyfont[#1]
\def\dodocommando##1##2%
- {\starttextrule{\tttf #1 ##1 ##2}
+ {\starttextrule{\tttf #1 ##1 ##2}
\nobreak \getvalue{##2}%
\dorecurse{255}
{\iffontchar\font\recurselevel\relax
@@ -208,7 +208,7 @@
\stoptextrule}
\def\docommando##1%
{\getvalue{##1}\processcommacommand[#3]{\dodocommando{##1}}}
- \processcommalist[#2]\docommando
+ \processcommalist[#2]\docommando
\egroup
\else\ifsecondargument
\showfontstyle[#1][#2][\alternativetextlist]%
@@ -218,4 +218,20 @@
\showfontstyle[#1][\c!tt]\showfontstyle[#1][\c!mm]
\fi\fi}
-\protect \endinput
+\gdef\showligature#1%
+ {\hbox{\type{#1}\enspace\red\ruledhbox{\black#1}}}
+
+\gdef\showligatures[#1]%
+ {\bgroup
+ \setupcolors[\c!status=\v!lokaal]%
+ \def\show##1{\hbox{\red\ruledhbox{\black##1}}}%
+ \definefont[\s!dummy][#1]\dummy
+ \starttabulate[|*{9}{c|}]
+ \NC\type{ff}\NC\type{fi}\NC\type{fl}\NC\type{ffi}\NC\type{ffl}\NC
+ \type{``}\NC\type{''}\NC\type{--}\NC\type{---}\NC\NR
+ \NC\show{ff}\NC\show{fi}\NC\show{fl}\NC\show{ffi}\NC\show{ffl}\NC
+ \show{``}\NC\show{''}\NC\show{--}\NC\show{---}\NC\NR
+ \stoptabulate
+ \egroup}
+
+\protect \endinput
diff --git a/tex/context/base/hand-def.tex b/tex/context/base/hand-def.tex
index 66e10aac8..04eb0a8c0 100644
--- a/tex/context/base/hand-def.tex
+++ b/tex/context/base/hand-def.tex
@@ -23,7 +23,7 @@
\defineprotrudefactor hyphen 0 1
\defineprotrudefactor endash 0 .5
- \defineprotrudefactor emdash 0 .5
+ \defineprotrudefactor emdash 0 .33 % .5
\stopfonthandling
diff --git a/tex/context/base/java-fld.tex b/tex/context/base/java-fld.tex
index fc78e4c93..c5df7b08c 100644
--- a/tex/context/base/java-fld.tex
+++ b/tex/context/base/java-fld.tex
@@ -8,26 +8,26 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
-% will be simplified, since we now parse functions
+% will be simplified, since we now parse functions
% nu nog alles geladen, moet dus anders
-\startJSpreamble {Sanitize_TeX_Input} used later
+\startJSpreamble {Sanitize_TeX_Input} used later
function Sanitized_TeX_String (value)
{ var v = value ;
- % v = v.replace(/\\\\\\/L/g,"\\225") ; % problematic
- % v = v.replace( /\\\\OE/g,"\\226") ; % problematic
- % v = v.replace( /\\\\vS/g,"\\227") ; % problematic
- % v = v.replace( /\\\\"Y/g,"\\230") ; % problematic
- % v = v.replace( /\\\\vZ/g,"\\231") ; % problematic
- % v = v.replace(/\\\\\\/l/g,"\\233") ; % problematic
- v = v.replace( /\\\\oe/g,"\\234") ;
- % v = v.replace( /\\\\vs/g,"\\235") ; % problematic
- % v = v.replace( /\\\\vz/g,"\\236") ; % problematic
+ % v = v.replace(/\\\\\\/L/g,"\\225") ; % problematic
+ % v = v.replace( /\\\\OE/g,"\\226") ; % problematic
+ % v = v.replace( /\\\\vS/g,"\\227") ; % problematic
+ % v = v.replace( /\\\\"Y/g,"\\230") ; % problematic
+ % v = v.replace( /\\\\vZ/g,"\\231") ; % problematic
+ % v = v.replace(/\\\\\\/l/g,"\\233") ; % problematic
+ v = v.replace( /\\\\oe/g,"\\234") ;
+ % v = v.replace( /\\\\vs/g,"\\235") ; % problematic
+ % v = v.replace( /\\\\vz/g,"\\236") ; % problematic
v = v.replace( /\\\\<</g,"\\253") ;
v = v.replace( /\\\\>>/g,"\\273") ;
v = v.replace( /\\\\`A/g,"\\300") ;
@@ -52,7 +52,7 @@
v = v.replace( /\\\\^O/g,"\\324") ;
v = v.replace( /\\\\~O/g,"\\325") ;
v = v.replace( /\\\\"O/g,"\\326") ;
- % v = v.replace(/\\\\\\/O/g,"\\330") ; % problematic
+ % v = v.replace(/\\\\\\/O/g,"\\330") ; % problematic
v = v.replace( /\\\\`U/g,"\\331") ;
v = v.replace( /\\\\'U/g,"\\332") ;
v = v.replace( /\\\\^U/g,"\\333") ;
@@ -81,7 +81,7 @@
v = v.replace( /\\\\^o/g,"\\364") ;
v = v.replace( /\\\\~o/g,"\\365") ;
v = v.replace( /\\\\"o/g,"\\366") ;
- % v = v.replace(/\\\\\\/o/g,"\\370") ; % problematic
+ % v = v.replace(/\\\\\\/o/g,"\\370") ; % problematic
v = v.replace( /\\\\`u/g,"\\371") ;
v = v.replace( /\\\\'u/g,"\\372") ;
v = v.replace( /\\\\^u/g,"\\373") ;
@@ -90,7 +90,7 @@
v = v.replace( /\\\\"y/g,"\\377") ;
return(v) }
- var TeX_Key_Mode = 0 ;
+ var TeX_Key_Mode = 0 ;
function Initialize_TeX_Keystroke ()
{ TeX_Key_Char = "" ;
@@ -100,95 +100,95 @@
{ if (change=="\\\\")
{ TeX_Key_Mode = 1 ;
return("") }
- else if (TeX_Key_Mode==1)
+ else if (TeX_Key_Mode==1)
{ TeX_Key_Mode = 2 ;
TeX_Key_Char = change ;
- return("") }
+ return("") }
else if (TeX_Key_Mode==2)
{ TeX_Key_Mode = 0 ;
TeX_Key_Char = "\\\\"+TeX_Key_Char+change ;
- return(Sanitized_TeX_String(TeX_Key_Char)) }
- else
+ return(Sanitized_TeX_String(TeX_Key_Char)) }
+ else
{ TeX_Key_Mode = 0 ;
- return(change) } }
+ return(change) } }
\stopJSpreamble
\startJScode {Initialize_TeX_Key} uses {Sanitize_TeX_Input}
- Initialize_TeX_Keystroke() ;
+ Initialize_TeX_Keystroke() ;
\stopJScode
\startJScode {Convert_TeX_Key} uses {Sanitize_TeX_Input}
- if (!event.willCommit)
+ if (!event.willCommit)
{ event.change = Sanitized_TeX_Keystroke(event.change) }
\stopJScode
\startJScode{Convert_TeX_String} uses {Sanitize_TeX_Input}
- event.value = Sanitized_TeX_String(event.value) ;
+ event.value = Sanitized_TeX_String(event.value) ;
\stopJScode
-%\startJSpreamble {Do_With_Field} used now
+%\startJSpreamble {Do_With_Field} used now
-\startJSpreamble {Field} used now
+\startJSpreamble {Field} used now
-var visible_field = new Array() ; % no garbage collection !
-var visible_fields = 0 ;
+var visible_field = new Array() ; % no garbage collection !
+var visible_fields = 0 ;
function Hide_When_Down ()
{ event.target.hidden = true }
-function Hide_Field ( Name )
- { var v = this.getField(Name) ;
- if (v)
- { % this.dirty = false ;
- v.hidden = true } }
-
-function Vide_Field ( Name )
- { var v = this.getField(Name) ;
- if (v)
- { ++visible_fields ;
- visible_field[visible_fields] = Name ;
- % this.dirty = false ;
- v.hidden = false } }
-
-function Hide_Fields ()
+function Hide_Field ( Name )
+ { var v = this.getField(Name) ;
+ if (v)
+ { v.hidden = true ;
+ this.dirty = false } }
+
+function Vide_Field ( Name )
+ { var v = this.getField(Name) ;
+ if (v)
+ { ++visible_fields ;
+ visible_field[visible_fields] = Name ;
+ v.hidden = false ;
+ this.dirty = false } }
+
+function Hide_Fields ()
{ while (visible_fields>0)
{ Hide_Field(visible_field[visible_fields]) ;
- --visible_fields } }
+ --visible_fields } }
-function Vide_Fields ( Name ) % show only one field
- { Hide_Fields () ;
- Vide_Field ( Name) }
+function Vide_Fields ( Name ) % show only one field
+ { Hide_Fields () ;
+ Vide_Field ( Name) }
-function Toggle_Hide ( Name )
- { var v = this.getField(Name) ;
- if (v) { v.hidden = !v.hidden } }
+function Toggle_Hide ( Name )
+ { var v = this.getField(Name) ;
+ if (v) { v.hidden = !v.hidden } }
-function Field_On ( Name )
- { v = this.getField(Name) ;
- if (v) { v.value = "On" } }
+function Field_On ( Name )
+ { v = this.getField(Name) ;
+ if (v) { v.value = "On" } }
-function Field_Off ( Name )
- { var v = this.getField(Name) ;
+function Field_Off ( Name )
+ { var v = this.getField(Name) ;
if (v) { v.value = "Off" } }
-function Toggle_Value ( Name )
+function Toggle_Value ( Name )
{ var v = this.getField(Name) ;
- if (v)
- { if (v.value=="On")
+ if (v)
+ { if (v.value=="On")
{ v.value = "Off" }
- else
+ else
{ v.value = "On" } } }
-function Toggle_Read ( Name )
- { var v = this.getField(Name);
+function Toggle_Read ( Name )
+ { var v = this.getField(Name);
if (v) { v.readonly = !v.readonly } }
-function Flip_Fields ( Name )
+function Flip_Fields ( Name )
{ var Names = Name.split(",") ;
for (var i=0;i<Names.length;i++)
- { v = this.getField(Names[i]) ;
- if (v)
+ { v = this.getField(Names[i]) ;
+ if (v)
{ v.hidden = !v.hidden ;
v.value = "On" } } }
@@ -211,56 +211,56 @@ function Forget_Changes ()
\definereference[ForgetChanges][JS(Forget_Changes)]
-% This can be done more efficient, by keeping track of the
-% current top of the stack.
+% This can be done more efficient, by keeping track of the
+% current top of the stack.
\startJSpreamble {FieldStack} used later
-function Reset_Fields ( FieldSet )
- { var i = 1 ;
- while (true)
- { v = this.getField(FieldSet+":"+i) ;
- if (!v)
- { break }
- else
- { v.value = "Off" }
- i++ } }
-
-function Set_Fields ( FieldSet )
- { var i = 1 ;
- while (true)
- { v = this.getField(FieldSet+":"+i) ;
- if (!v)
- { break }
- else
- { v.value = "On" }
- i++ } }
-
-function Set_Field ( FieldSet, FieldName )
- { Reset_Fields(FieldSet) ;
- v = this.getField(FieldSet+":"+FieldName) ;
+function Reset_Fields ( FieldSet )
+ { var i = 1 ;
+ while (true)
+ { v = this.getField(FieldSet+":"+i) ;
+ if (!v)
+ { break }
+ else
+ { v.value = "Off" }
+ i++ } }
+
+function Set_Fields ( FieldSet )
+ { var i = 1 ;
+ while (true)
+ { v = this.getField(FieldSet+":"+i) ;
+ if (!v)
+ { break }
+ else
+ { v.value = "On" }
+ i++ } }
+
+function Set_Field ( FieldSet, FieldName )
+ { Reset_Fields(FieldSet) ;
+ v = this.getField(FieldSet+":"+FieldName) ;
if (v) { v.value = "On" } }
-function Reset_Field ( FieldSet, FieldName )
- { Set_Fields(FieldSet) ;
- v = this.getField(FieldSet+":"+FieldName) ;
+function Reset_Field ( FieldSet, FieldName )
+ { Set_Fields(FieldSet) ;
+ v = this.getField(FieldSet+":"+FieldName) ;
if (v) { v.value = "Off" } }
-function Walk_Field ( FieldSet )
- { var i = 1 ;
- while (true)
- { v = this.getField(FieldSet+":"+i) ;
- if (v)
- { if (v.value=="On")
- { v.value = "Off" ;
- var ii = i ; ii++ ;
- v = this.getField(FieldSet+":"+ii) ;
- if (!v)
+function Walk_Field ( FieldSet )
+ { var i = 1 ;
+ while (true)
+ { v = this.getField(FieldSet+":"+i) ;
+ if (v)
+ { if (v.value=="On")
+ { v.value = "Off" ;
+ var ii = i ; ii++ ;
+ v = this.getField(FieldSet+":"+ii) ;
+ if (!v)
{ v = this.getField(FieldSet+":"+1) }
- if (v)
+ if (v)
{ v.value = "On" }
break }
- i++ }
+ i++ }
else
{ break } } }
diff --git a/tex/context/base/m-chart.tex b/tex/context/base/m-chart.tex
index 3cd670d2c..708aa791d 100644
--- a/tex/context/base/m-chart.tex
+++ b/tex/context/base/m-chart.tex
@@ -1241,6 +1241,8 @@
%D The XML interface [will be mode protected or separate x-chart file]
+\startXMLdefinitions flowchart
+
\defineXMLargument [flowchartdefinition]
{\defineFLOWchart[\XMLpar{flowchartdefinition}{identifier}{unknown}]}
@@ -1267,6 +1269,9 @@
\defineXMLdirective [flowchart] [shapes] \setupFLOWshapes
\defineXMLdirective [flowchart] [lines] \setupFLOWlines
+
+\stopXMLdefinitions
+
\protect
\endinput
diff --git a/tex/context/base/m-steps.tex b/tex/context/base/m-steps.tex
index c5c660924..72a30b6eb 100644
--- a/tex/context/base/m-steps.tex
+++ b/tex/context/base/m-steps.tex
@@ -395,7 +395,13 @@
{\dosingleempty\dostartSTEPchart}
\long\def\dostartSTEPchart[#1]#2\stopSTEPchart
- {\ifinsidefloat \else \witruimte \@@STPCvoor \startbaselinecorrection \fi
+ {\ifinsidefloat \else
+ \witruimte
+ \@@STPCvoor
+ \startbaselinecorrection
+ \setlocalhsize
+ \noindent
+ \fi
\vbox\bgroup
\setupSTEPcharts[#1]%
\forgetall
@@ -883,3 +889,26 @@
\egroup}
\protect \endinput
+
+% A simple paragraph-flow test:
+
+\starttext
+
+\startbuffer
+\startSTEPchart
+\cells {A} {B}
+\cells {one} {five} \texts{$+2$}{$-2$}
+\cells {two} {four} \texts{$+3$}{$-3$}
+\cells {three} {three} \texts{$+4$}{$-4$}
+\cells {four} {two} \texts{$+5$}{$-5$}
+\cells {five} {one}
+\stopSTEPchart
+\stopbuffer
+
+\getbuffer
+
+\startnarrower \getbuffer \stopnarrower
+
+\placefigure[left]{}{} \getbuffer
+
+\stoptext
diff --git a/tex/context/base/math-run.tex b/tex/context/base/math-run.tex
index e0647172b..4f0f61f4e 100644
--- a/tex/context/base/math-run.tex
+++ b/tex/context/base/math-run.tex
@@ -14,7 +14,8 @@
\unprotect
\gdef\showmathcharacters% nearly \showcharacters
- {\bgroup
+ {\par
+ \bgroup
\setuptextrules[\c!korps=,\c!letter=]
\starttextrule{math characters}
\witruimte
@@ -26,7 +27,7 @@
\dimen2=\!!zeropoint
\def\definemathsymbol {\dosixtupleempty\dodefinemathsymbol}
\def\definemathcharacter{\dosixtupleempty\dodefinemathcharacter}
- \def\definemathcommand {\dodoubleempty \dodefinemathcommand}
+ \def\definemathcommand {\dotripleempty \dodefinemathcommand}
%\newcounter\mathcolor
\def\dodefinemathsymbol[##1][##2][##3][##4][##5][##6]%
{%\doifcolorelse{math \purefamilyhex{##3}}{}
@@ -39,7 +40,7 @@
{\hbox to 1em{\tttf\purefamilyhex{##3}\hss}\box0 ##1}
\ifdim\wd2>\dimen2 \dimen2=\wd2 \fi}
\def\dodefinemathcharacter[##1][##2][##3][##4][##5][##6]{}
- \def\dodefinemathcommand[##1][##2]##3{}
+ \def\dodefinemathcommand[##1][##2][##3]##4{}
\readsysfile{\f!mathprefix tex}{}{}
\edef\encwidth{\the\dimen0}
\dimen0=\hsize
diff --git a/tex/context/base/meta-ini.tex b/tex/context/base/meta-ini.tex
index d635571ee..6a8d90399 100644
--- a/tex/context/base/meta-ini.tex
+++ b/tex/context/base/meta-ini.tex
@@ -429,13 +429,28 @@
%D We don't want spurious files, do we?
-\def\initializeMPgraphics% \unlinkfile{\MPgraphicfile.mp} -> empty file
- {%\ifx\bufferprefix\empty \else
- \immediate\openout\MPwrite\MPgraphicfile.mp
- \immediate\write\MPwrite{end.}%
- \immediate\closeout\MPwrite
- }%\fi}
-
+%\def\initializeMPgraphics
+% {%\ifx\bufferprefix\empty \else
+% \immediate\openout\MPwrite\MPgraphicfile.mp
+% \immediate\write\MPwrite{end.}%
+% \immediate\closeout\MPwrite
+% }%\fi}
+
+
+\def\initializeMPgraphicfile
+ {\immediate\openout\MPwrite\MPgraphicfile.mp
+ \immediate\write\MPwrite{end.}%
+ \immediate\closeout\MPwrite}
+
+\def\initializeMPgraphics%
+ {\bgroup
+ \initializeMPgraphicfile
+ \ifx\bufferprefix\empty\else
+ \let\bufferprefix\empty
+ \initializeMPgraphicfile
+ \fi
+ \egroup}
+
%D Loading specific \METAPOST\ related definitions is
%D accomplished by:
@@ -514,8 +529,8 @@
EmWidth := \the\fontdimen6\font ;
ExHeight := \the\fontdimen5\font ;
%
- PageNumber := \the\realpageno ;
- RealPageNumber := \the\pageno ;
+ PageNumber := \the\pageno ;
+ RealPageNumber := \the\realpageno ;
LastPageNumber := \lastpage ;
\stopuseMPgraphic
diff --git a/tex/context/base/meta-pag.tex b/tex/context/base/meta-pag.tex
index b94a5b1db..e1deafb21 100644
--- a/tex/context/base/meta-pag.tex
+++ b/tex/context/base/meta-pag.tex
@@ -31,7 +31,9 @@
boolean OnRightPage ; OnRightPage := true ;
def LoadPageState =
OnRightPage := \MPonrightpage ;
- PageNumber := \realfolio ;
+ RealPageNumber := \the\realpageno ;
+ PageNumber := \the\pageno ;
+ NOfPages := \lastpage ;
PaperHeight := \the\papierhoogte ;
PaperWidth := \the\papierbreedte ;
PrintPaperHeight := \the\printpapierhoogte ;
diff --git a/tex/context/base/meta-pre.tex b/tex/context/base/meta-pre.tex
index 6194cba21..cb861ff20 100644
--- a/tex/context/base/meta-pre.tex
+++ b/tex/context/base/meta-pre.tex
@@ -13,7 +13,8 @@
%D In this library, we define a couple of handy graphics.
-% todo: use the predefine grid macros
+% todo: use the predefine grid macros, mp code will move to
+% mp-* file
\startuseMPgraphic{pagegrid}
StartPage ;
diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex
index bbf1959b5..d7cc303ae 100644
--- a/tex/context/base/mult-con.tex
+++ b/tex/context/base/mult-con.tex
@@ -1245,6 +1245,12 @@
gebieduit: gebieduit regionout
regionaus oblastvne
esciregione regiuneiesire
+ focusin: focusin focusin
+ focusin focusin
+ focusin focusin
+ focusuit: focusuit focusout
+ focusout focusout
+ focusout focusout
natoets: natoets afterkey
nachtaste klavesapo
dopotasto dupatasta
@@ -1815,6 +1821,9 @@
soepel: soepel tolerant
tolerant tolerantni
tollerante tolerant
+ spatie: spatie space
+ spatium mezera
+ spazio spatiu %% check
standaard: standaard standard
standard standardni
standard standard
diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex
index 7fa91515f..2b0d9b7a2 100644
--- a/tex/context/base/mult-sys.tex
+++ b/tex/context/base/mult-sys.tex
@@ -357,6 +357,7 @@
\definesystemvariable {do} % DefinieerOpmaak
\definesystemvariable {ds} % DoorSpringen
\definesystemvariable {ef} % ExternFiguur
+\definesystemvariable {ec} % Encoding
\definesystemvariable {ep} % ExternfiguurPreset
\definesystemvariable {ex} % ExterneFiguren
\definesystemvariable {ht} % HiddenText
@@ -526,6 +527,7 @@
\defineinterfacevariable {a} {a}
\defineinterfacevariable {b} {b}
\defineinterfacevariable {c} {c}
+\defineinterfacevariable {d} {d}
%D The names of files and their extensions are fixed.
%D \CONTEXT\ uses as less files as possible. Utility files can
diff --git a/tex/context/base/page-bck.tex b/tex/context/base/page-bck.tex
index 5027d4ff2..0885dcf33 100644
--- a/tex/context/base/page-bck.tex
+++ b/tex/context/base/page-bck.tex
@@ -180,10 +180,15 @@
%D Finaly there is an aditional {\em text} background, again
%D useful for special purposes only. This one is calculated
-%D each time.
+%D each time. The hidden backgrounds are not meant for users!
+
+\newconditional\hiddenbackgroundenabled
\def\addtextbackground#1%
- {\addsomebackground\v!tekst{#1}\zetbreedte\teksthoogte}
+ {\ifconditional\hiddenbackgroundenabled
+ \addsomebackground\v!verborgen{#1}\zetbreedte\teksthoogte% mine !
+ \fi
+ \addsomebackground\v!tekst{#1}\zetbreedte\teksthoogte}
%D The next couple of macros implement the area backgrounds.
%D As said, these are cached in dedicated boxes. The offsets
@@ -199,22 +204,31 @@
\ifdubbelzijdig
\setbackgroundbox\rightbackground\doswapmargins
\fi
- \doifnot{\@@mastatus}{\v!herhaal}{\global\newbackgroundfalse}%
- \global\let\pagebackgroundhoffset=\!!zeropoint
- \global\let\pagebackgroundvoffset=\!!zeropoint
- \global\let\pagebackgrounddepth =\!!zeropoint
- \doifsomebackgroundelse{\v!tekst\v!tekst}
- {\bgroup
- \scratchdimen=\getvalue{\??ma\v!pagina\c!offset}%
- \doifsomebackgroundelse{\v!boven\v!tekst}\donothing
- {\doifsomebackgroundelse{\v!onder\v!tekst}\donothing
- {\xdef\pagebackgroundhoffset{\the\scratchdimen}}}%
- \doifsomebackgroundelse{\v!tekst\v!rechterrand}\donothing
- {\doifsomebackgroundelse{\v!tekst\v!linkerrand}\donothing
- {\xdef\pagebackgroundvoffset{\the\scratchdimen}%
- \scratchdimen=\getvalue{\??ma\v!pagina\c!diepte}%
- \xdef\pagebackgrounddepth{\the\scratchdimen}}}%
- \egroup}\donothing}
+ \doifnot{\@@mastatus}{\v!herhaal}{\global\newbackgroundfalse}}
+
+\def\setbackgroundoffsets
+ {\ifsomebackground \ifnewbackground
+ \global\let\pagebackgroundhoffset=\!!zeropoint
+ \global\let\pagebackgroundvoffset=\!!zeropoint
+ \global\let\pagebackgrounddepth =\!!zeropoint
+ \doifsomebackgroundelse{\v!tekst\v!tekst}\donetrue\donefalse
+ \ifdone\else\doifsomebackgroundelse{\v!tekst}\donetrue\donothing\fi
+ \ifdone
+ \bgroup
+ \scratchdimen=\getvalue{\??ma\v!pagina\c!offset}%
+ \doifsomebackgroundelse{\v!boven\v!tekst}\donothing
+ {\doifsomebackgroundelse{\v!onder\v!tekst}\donothing
+ {\xdef\pagebackgroundhoffset{\the\scratchdimen}}}%
+ \doifsomebackgroundelse{\v!tekst\v!rechterrand}\donothing
+ {\doifsomebackgroundelse{\v!tekst\v!linkerrand}\donothing
+ {\xdef\pagebackgroundvoffset{\the\scratchdimen}%
+ \scratchdimen=\getvalue{\??ma\v!pagina\c!diepte}%
+ \xdef\pagebackgrounddepth{\the\scratchdimen}}}%
+ \egroup
+ \fi
+ \fi \fi}
+
+\appendtoks \setbackgroundoffsets \to \everypagebody
\def\setbackgroundbox#1#2%
{\global\setbox#1=\vbox
@@ -305,7 +319,7 @@
\processcommalist[#1]\docommando
\else\ifsecondargument
\global\somebackgroundtrue
- \doifcommonelse{#1}{\v!tekst,\v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina}
+ \doifcommonelse{#1}{\v!tekst,\v!verborgen,\v!papier,\v!pagina,\v!linkerpagina,\v!rechterpagina}
{\def\docommando##1%
{\getparameters[\??ma##1][#2]\checkbackground{##1}}%
\processcommalist[#1]\docommando}%
@@ -379,9 +393,10 @@
%D The stand alone text area inherits from the page too.
-\dodocommando\v!tekst\empty
+\dodocommando\v!tekst \empty
+\dodocommando\v!verborgen\empty
-%D We now define all 25 areas in a row.
+%D We now define all 25 main areas in a row.
\def\docommando#1%
{\dodocommando#1\v!linkerrand
@@ -432,6 +447,25 @@
\let\docommando\relax
+%D The hidden layer can be populated by extending the
+%D following comma separated list. This only happens in core
+%D modules.
+
+\def\enablehiddenbackground
+ {\global\settrue\hiddenbackgroundenabled
+ \global\somebackgroundtrue % also make these
+ \global\newbackgroundtrue} % two conditionals
+
+\def\disablehiddenbackground
+ {\global\setfalse\hiddenbackgroundenabled}
+
+\def\hiddenbackground
+ {\v!tekst-2,\v!tekst-1,\v!voorgrond,\v!tekst+1,\v!tekst+2}
+
+\setupbackgrounds
+ [\v!verborgen]
+ [\c!achtergrond=\hiddenbackground]
+
%D Because we haven't really set up backgrounds yet, we set
%D the main efficiency switch to false.
diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex
index a400ffaa1..3fd29d64d 100644
--- a/tex/context/base/page-flt.tex
+++ b/tex/context/base/page-flt.tex
@@ -745,7 +745,7 @@
\def\floatcaptionsuffix{} % an optional suffix
\def\floatcaptionnumber{} % a logical counter
-\def\dosetfloatcaption#1#2#3%
+\def\dosetfloatcaption#1#2#3% name will change
{\def\dofloattekst%
{{\doattributes{\??kj#1}\c!letter\c!kleur{#3}}}%
\doifelsevalue{\??kj#1\c!nummer}{\v!ja}
diff --git a/tex/context/base/page-lay.tex b/tex/context/base/page-lay.tex
index b54a02bff..25360af97 100644
--- a/tex/context/base/page-lay.tex
+++ b/tex/context/base/page-lay.tex
@@ -246,7 +246,7 @@
\setuppapersize
\fi}
-%D For the momenn we need to fake this macro.
+%D For the moment we need to fake this macro.
\ifx\setuppapersize\undefined
\let\setuppapersize\relax
@@ -310,6 +310,10 @@
\global\printpapierhoogte=\getvalue{\??pp##1\c!hoogte}%
\xdef\printpapersize{##1}}}}%
\processcommacommand[#2]\docommando
+ \global\setdimentoatleast\papierbreedte \!!onepoint
+ \global\setdimentoatleast\papierhoogte \!!onepoint
+ \global\setdimentoatleast\printpapierbreedte\!!onepoint
+ \global\setdimentoatleast\printpapierhoogte \!!onepoint
\ifcase\paperlandscape\else
\doglobal\swapdimens\papierbreedte\papierhoogte
\fi
@@ -445,6 +449,8 @@
\global\advance\zethoogte by \voethoogte}%
\rugoffset=\layoutparameter\c!rugoffset
\kopoffset=\layoutparameter\c!kopoffset
+\global\setdimentoatleast\zetbreedte\!!onepoint
+\global\setdimentoatleast\zethoogte\!!onepoint
\calculatehsizes
\calculatevsizes
\recalculatelogos
diff --git a/tex/context/base/page-lyr.tex b/tex/context/base/page-lyr.tex
index bdd08eaed..7bc27b31f 100644
--- a/tex/context/base/page-lyr.tex
+++ b/tex/context/base/page-lyr.tex
@@ -66,7 +66,7 @@
{\ifundefined{\@@layerbox#1}%
\expandafter\newbox\csname\@@layerbox#1\endcsname
\else
- \setbox\csname\@@layerbox#1\endcsname=\voidb@x
+ \resetlayer[#1]%
\fi
\defineoverlay
[#1][\composedlayer{#1}]%
@@ -87,13 +87,14 @@
\def\setuplayer%
{\dodoubleargument\dosetuplayer}
-\def\dosetuplayer[#1]%
- {\getparameters[\??ll#1]}
+\def\dosetuplayer[#1][#2]%
+ {\def\docommando##1{\getparameters[\??ll##1][#2]}%
+ \processcommalist[#1]\docommando}
%D \macros
%D {setlayer}
%D
-%D Data is moved intoa layer with the following macro. When
+%D Data is moved into a layer with the following macro. When
%D \type {position} is set, relative positioning is used, with
%D the current point as reference point. Otherwise the topleft
%D corner is used as reference point.
@@ -148,7 +149,7 @@
{\hbox to \getvalue{\??ll#1\c!breedte} % \wd\nextbox
{\xypos{lyr:\currentlayerdata}\hss}%
\vss}}
- {\setbox\layerbox=\box\voidb@x
+ {\setbox\layerbox=\emptybox
\edef\layerpage{\getvalue{\??ll#1\c!pagina}}}%
\doifsomething{\layerpage}
{\edef\layerpage{:\layerpage}%
@@ -157,9 +158,9 @@
\global\setbox\csname\@@layerbox#1\layerpage\endcsname=\vbox
{\offinterlineskip
\ifvoid\csname\@@layerbox#1\layerpage\endcsname\else
- \ht \csname\@@layerbox#1\layerpage\endcsname\!!zeropoint
- \dp \csname\@@layerbox#1\layerpage\endcsname\!!zeropoint
- \wd \csname\@@layerbox#1\layerpage\endcsname\!!zeropoint
+ \ht\csname\@@layerbox#1\layerpage\endcsname\zeropoint
+ \dp\csname\@@layerbox#1\layerpage\endcsname\zeropoint
+ \wd\csname\@@layerbox#1\layerpage\endcsname\zeropoint
\doifnotvalue{\??ll#1\c!richting}{\v!omgekeerd}
{\box\csname\@@layerbox#1\layerpage\endcsname}%
\fi
@@ -196,23 +197,30 @@
%D macro does not takes hash space.
\def\flushlayer[#1]%
- {\doifvalue{\??ll#1\c!status}{\v!start}
+ {\doifnotvalue{\??ll#1\c!status}{\v!stop}
{\startoverlay
- {\doflushlayer1{#1}}
- {\doflushlayer0{#1:\realfolio}}
+ {\doflushlayer1{#1}{#1}}
+ {\doflushlayer0{#1}{#1:\realfolio}}
\stopoverlay}}
-\def\doflushlayer#1#2%
- {\ifundefined{\@@layerbox#2}%
- \ifcase#1\else\writestatus{layer}{unknown layer #2}\fi
+\def\doflushlayer#1#2#3%
+ {\ifundefined{\@@layerbox#3}%
+ \ifcase#1\else\writestatus{layer}{unknown layer #3}\fi
\else
- \doifvalue{\??ll#1\c!optie}{\v!test}\tracelayerstrue
+ \doifvalue{\??ll#2\c!optie}{\v!test}\tracelayerstrue
\iftracelayers \ruledvbox \else \vbox \fi to \overlayheight
{\forgetall
\hbox to \overlaywidth
- {\doifvalue{\??ll#2\realfolio\c!positie}{\v!ja}
- {\xypos{lyr:#2:\realfolio}}%
- \box\csname\@@layerbox#2\endcsname\hss}%
+ {\doifvalue{\??ll#3\realfolio\c!positie}{\v!ja}
+ {\xypos{lyr:#3:\realfolio}}%
+ \let\next\box
+ \ifcase#1\else
+ \doifnotvalue{\??ll#2\c!positie}{\v!ja}
+ {\doifvalue{\??ll#2\c!status}{\v!herhaal}
+ {\let\next\copy}}%
+ \fi
+ \next\csname\@@layerbox#3\endcsname
+ \hss}%
\vss}%
\fi}
@@ -232,8 +240,8 @@
%D needed as well).
\def\doresetlayer#1%
- {\ifundefined{\@@layerbox#1}\else
- \global\setbox\csname\@@layerbox#1\endcsname\voidb@x
+ {\ifundefined{\@@layerbox#1}\else
+ \global\@EA\setbox\csname\@@layerbox#1\endcsname\emptybox
\fi}
\def\resetlayer[#1]%
diff --git a/tex/context/base/page-mak.tex b/tex/context/base/page-mak.tex
index d40dde3c5..239707ecb 100644
--- a/tex/context/base/page-mak.tex
+++ b/tex/context/base/page-mak.tex
@@ -56,6 +56,7 @@
\c!tekststatus=\v!normaal,
\c!hoofdstatus=\v!stop,
\c!voetstatus=\v!stop,
+ \c!kleur=,
#2]%
\setvalue{\e!start#1\e!opmaak}{\startmakeup[#1]}%
\setvalue{\e!stop #1\e!opmaak}{\stopmakeup}}
@@ -114,6 +115,7 @@
\soortpagina[\currentmakeup]
\setupmakeuplayout
\makeupparameter\c!commandos
+\startregistercolor[\makeupparameter\c!kleur]%
\global\setbox\makeupbox=\vbox to \makeupparameter\c!hoogte
\bgroup
\forgetall
@@ -124,6 +126,7 @@
{\endgraf
\makeupparameter\c!onder
\egroup
+\stopregistercolor
\doflushmakeup
\egroup
\calculatehsizes
@@ -147,7 +150,7 @@
\def\doshipoutmakeup%
{\makeupparameter\c!voor
- \box\makeupbox
+ \vbox{\hbox{\color[\makeupparameter\c!kleur]{\box\makeupbox}}}%
\setupmakeuplayout
\pagina
\makeupparameter\c!na
diff --git a/tex/context/base/page-mul.tex b/tex/context/base/page-mul.tex
index 40f211090..ca8d8aea7 100644
--- a/tex/context/base/page-mul.tex
+++ b/tex/context/base/page-mul.tex
@@ -1206,12 +1206,70 @@
\newif\ifflushingcolumnfloats \flushingcolumnfloatstrue
+% \def\doflushcolumnfloat%
+% {\ifpostponecolumnfloats\else\ifflushingcolumnfloats\ifprocessingverbatim\else\ifsomefloatwaiting
+% \bgroup
+% \forgetall
+% \let\doflushcolumnfloat=\relax
+% \getcolumnstatus\column\count255\total\dimen0\goal\dimen2\\%
+% \ifdim\dimen0>\zeropoint
+% \dogetfloat
+% \ifdim\wd\floatbox>\hsize
+% \doresavefloat
+% \else
+% %\setbox2=\vbox
+% % {\blanko[\@@bkvoorwit]
+% % \snaptogrid\vbox{\copy\floatbox}%
+% % \blanko[\@@bknawit]
+% \setbox2=\vbox
+% {\blanko[\@@bkvoorwit]
+% \snaptogrid\vbox{\copy\floatbox}}%
+% \advance\dimen0 by \ht2
+% \ifdim\dimen0>\dimen2
+% \ifnum\count255<\nofcolumns
+% \advance\count255 by 1
+% \edef\currenttopcolumnbox{\getvalue{\@@topcol\the\count255}}%
+% \ifdim\ht\currenttopcolumnbox=\zeropoint
+% \global\setbox\currenttopcolumnbox=\vbox
+% {\snaptogrid\vbox{\copy\floatbox}
+% \witruimte % nodig ?
+% \blanko[\@@bknawit]}%
+% \dimen4=\ht\currenttopcolumnbox
+% \advance\dimen4 by \dp\currenttopcolumnbox
+% \global\advance\vsize by -\dimen4
+% \advance\dimen4 by -\pagegoal
+% \global\pagegoal=-\dimen4
+% \showmessage{\m!columns}{12}{a}%
+% \else
+% \showmessage{\m!columns}{12}{b}%
+% \doresavefloat
+% \fi
+% \else
+% \showmessage{\m!columns}{12}{c}%
+% \doresavefloat
+% \fi
+% \else
+% \ifhmode{\setbox0=\lastbox}\fi% waar is die er in geslopen
+% \par
+% \ifdim\prevdepth<\zeropoint \else % anders bovenaan kolom witruimte
+% \nobreak
+% \blanko[\@@bkvoorwit]
+% \nobreak
+% \fi
+% \flushfloatbox
+% \blanko[\@@bknawit]
+% \fi
+% \fi
+% \fi
+% \egroup
+% \fi\fi\fi\fi}
+
\def\doflushcolumnfloat%
{\ifpostponecolumnfloats\else\ifflushingcolumnfloats\ifprocessingverbatim\else\ifsomefloatwaiting
\bgroup
\forgetall
\let\doflushcolumnfloat=\relax
- \getcolumnstatus\column\count255\total\dimen0\goal\dimen2\\%
+ \getcolumnstatus\column\mofcolumns\total\dimen0\goal\dimen2\\%
\ifdim\dimen0>\zeropoint
\dogetfloat
\ifdim\wd\floatbox>\hsize
@@ -1226,9 +1284,9 @@
\snaptogrid\vbox{\copy\floatbox}}%
\advance\dimen0 by \ht2
\ifdim\dimen0>\dimen2
- \ifnum\count255<\nofcolumns
- \advance\count255 by 1
- \edef\currenttopcolumnbox{\getvalue{\@@topcol\the\count255}}%
+ \ifnum\mofcolumns<\nofcolumns
+ \advance\mofcolumns by 1
+%% bug %% \edef\currenttopcolumnbox{\getvalue{\@@topcol\the\count255}}%
\ifdim\ht\currenttopcolumnbox=\zeropoint
\global\setbox\currenttopcolumnbox=\vbox
{\snaptogrid\vbox{\copy\floatbox}
diff --git a/tex/context/base/page-num.tex b/tex/context/base/page-num.tex
index 96576d42c..e7f0a2109 100644
--- a/tex/context/base/page-num.tex
+++ b/tex/context/base/page-num.tex
@@ -36,9 +36,20 @@
[\s!subpage]
[\c!wijze=\@@snwijze]
-\def\resetsubpaginanummer%
- {\resetnummer[\s!subpage]%
- \global\subpageno=\ruwenummer[\s!subpage]}
+% hard to sync
+%
+% \def\resetsubpaginanummer%
+% {\resetnummer[\s!subpage]%
+% \global\subpageno=\ruwenummer[\s!subpage]}
+%
+% better sync
+
+\newif\ifresettingsubpagenumber
+
+\def\resetsubpaginanummer
+ {\global\resettingsubpagenumbertrue}
+
+% so far for sync, see \gotonext...
\def\dostelsubpaginanummerin[#1]%
{\doifelse{#1}{\v!reset}
@@ -47,6 +58,7 @@
\processaction
[\@@snstatus]
[ \v!stop=>\ifsubpaging
+\resetsubpaginanummer % new, see sync
\else
\subpagingfalse
\fi
@@ -102,6 +114,10 @@
\def\gotonextsubpage% overlapt behoorlijk met realpage macro
{\global\let\checksubpages=\relax
+ \ifresettingsubpagenumber
+ \resetnummer[\s!subpage]%
+ \global\resettingsubpagenumberfalse
+ \fi
\ifsubpaging
\edef\oldsubpage{\the\subpageno}%
\verhoognummer[\s!subpage]%
diff --git a/tex/context/base/page-one.tex b/tex/context/base/page-one.tex
index 58e552a51..e2fd95d14 100644
--- a/tex/context/base/page-one.tex
+++ b/tex/context/base/page-one.tex
@@ -131,7 +131,7 @@
\def\OTRONEdodosettopinserts%
{\ifnum\noffloatinserts<\noftopfloats
\dogetfloat
- \ifdim\topinserted=\!!zeropoint\relax
+ \ifdim\topinserted=\zeropoint
\topofinserttrue
\else
\topofinsertfalse
@@ -209,11 +209,11 @@
\def\OTRONEdosetbothinserts%
{\ifflushingfloats
- \global\topinserted=\!!zeropoint
- \global\botinserted=\!!zeropoint
+ \global\topinserted=\zeropoint
+ \global\botinserted=\zeropoint
\else
- \global\topinserted=\!!zeropoint \OTRONEdosettopinserts
- \global\botinserted=\!!zeropoint \OTRONEdosetbotinserts
+ \global\topinserted=\zeropoint \OTRONEdosettopinserts
+ \global\botinserted=\zeropoint \OTRONEdosetbotinserts
\fi}
\def\OTRONEdotopinsertions%
diff --git a/tex/context/base/page-set.tex b/tex/context/base/page-set.tex
index 560cd6438..a0509bba0 100644
--- a/tex/context/base/page-set.tex
+++ b/tex/context/base/page-set.tex
@@ -61,8 +61,9 @@
\def\columnerasegridboxes%
{\bgroup
- \increment\columnmaxcells
- \ifodd\realpageno \else % we are on the other page
+ \increment\columnmaxcells\relax
+ \ifodd\realpageno
+ \else % we are on the other page
\columnspreadfalse
\fi
\ifcolumnspread
@@ -112,7 +113,7 @@
\def\columnerasegridboxes%
{\bgroup
- \increment\columnmaxcells
+ \increment\columnmaxcells\relax
\ifodd\realpageno \else % we are on the other page
\columnspreadfalse
\fi
@@ -307,7 +308,7 @@
{\ifcollectingcontent
\global\mofcolumns=1
\else
- \OTRSETdofinalflush
+ \OTRSETdofinalflush
\OTRSETinitializecolumns
\OTRSETmanualbalance % or after \gotonextpage
%\OTRSETdoflushfloats
@@ -915,7 +916,7 @@
\fi}}%
\fi}
-\def\OTRSETinitializecolumns%
+\def\OTRSETinitializecolumns% once per page
{\columnspreadtrue % todo
\ifcolumnspread
\global\rofcolumns=\getvalue{\??mc\OTRSETidentifier\c!nrechts}
@@ -935,8 +936,7 @@
\fi
\OTRSETassignwidths
\global\mofcolumns=1
- \columnerasegridboxes
- \initializecolumntextareas}
+ \columnerasegridboxes}
% vanaf hier:
@@ -1112,7 +1112,7 @@
\doglobal\replaceincommalist\OTRSETlist1%
\OTRSETrestart}}
-\def\OTRSETrestart% % weed
+\def\OTRSETrestart% weed
{\OTRSETinitializefeatures
\OTRSETflushpreposttext
\OTRSETinitializecolumns
@@ -1120,10 +1120,12 @@
\OTRSETcheckgrid
\OTRSETsetvsize
\OTRSETsethsize
- \OTRSETsetplaceholders
+ \OTRSETsetplaceholders
\OTRSEThandlepreposttext
+\initializecolumntextareas % name !
\OTRSETsetvsize}
+
\OTRSEToutput
{\OTRSETnaturalflush
% \OTRSETgotonextpage
diff --git a/tex/context/base/page-sid.tex b/tex/context/base/page-sid.tex
index f50356b29..894a91ac8 100644
--- a/tex/context/base/page-sid.tex
+++ b/tex/context/base/page-sid.tex
@@ -68,7 +68,7 @@
{\par
\!!heighta=\sidefloatvsize
\advance\!!heighta by -\pagetotal
- \ifdim\!!heighta>\!!zeropoint
+ \ifdim\!!heighta>\zeropoint
\witruimte % nog checken op interferentie
\kern\!!heighta
\fi
diff --git a/tex/context/base/page-txt.tex b/tex/context/base/page-txt.tex
index 52e118958..89abd3f15 100644
--- a/tex/context/base/page-txt.tex
+++ b/tex/context/base/page-txt.tex
@@ -307,22 +307,30 @@
\offinterlineskip
\vskip-\bovenhoogte
\vskip-\bovenafstand
- \the\toptextcontent
- \vskip\bovenhoogte
+ \ifdim\bovenhoogte>\zeropoint
+ \the\toptextcontent
+ \vskip\bovenhoogte
+ \fi
\vskip\bovenafstand
- \the\headertextcontent
- \vskip\hoofdhoogte
+ \ifdim\hoofdhoogte>\zeropoint
+ \the\headertextcontent
+ \vskip\hoofdhoogte
+ \fi
\vskip\hoofdafstand
\placepositionanchors
\vskip-\teksthoogte
\the\texttextcontent
\vskip\teksthoogte
\vskip\voetafstand
- \the\footertextcontent
- \vskip\voethoogte
+ \ifdim\voethoogte>\zeropoint
+ \the\footertextcontent
+ \vskip\voethoogte
+ \fi
\vskip\onderafstand
- \the\bottomtextcontent
- \vskip\onderhoogte
+ \ifdim\onderhoogte>\zeropoint
+ \the\bottomtextcontent
+ \vskip\onderhoogte
+ \fi
\vfilll}%
\smashbox\scratchpagebox
\box\scratchpagebox}
@@ -339,11 +347,15 @@
{\bgroup
\swapmargins
\goleftonpage
- \the\leftedgetextcontent
- \hskip\linkerrandbreedte
+ \ifdim\linkerrandbreedte>\zeropoint
+ \the\leftedgetextcontent
+ \hskip\linkerrandbreedte
+ \fi
\hskip\linkerrandafstand
- \the\leftmargintextcontent
- \hskip\linkermargebreedte
+ \ifdim\linkermargebreedte>\zeropoint
+ \the\leftmargintextcontent
+ \hskip\linkermargebreedte
+ \fi
\hskip\linkermargeafstand
\egroup
\settextpagecontent\scratchpagebox{#1}{#2}%
@@ -352,11 +364,15 @@
\box\scratchpagebox
\bgroup
\hskip\rechtermargeafstand
- \the\rightmargintextcontent
- \hskip\rechtermargebreedte
+ \ifdim\rechtermargebreedte>\zeropoint
+ \the\rightmargintextcontent
+ \hskip\rechtermargebreedte
+ \fi
\hskip\rechterrandafstand
- \the\rightedgetextcontent
- \hskip\rechterrandbreedte
+ \ifdim\rechterrandbreedte>\zeropoint
+ \the\rightedgetextcontent
+ \hskip\rechterrandbreedte
+ \fi
\egroup
\hss}}%
\smashbox\scratchpagebox
diff --git a/tex/context/base/regi-il1.tex b/tex/context/base/regi-il1.tex
index 457f391f0..43cdf80ef 100644
--- a/tex/context/base/regi-il1.tex
+++ b/tex/context/base/regi-il1.tex
@@ -181,7 +181,7 @@
\defineactivetoken 228 {\adiaeresis}
\defineactivetoken 229 {\aring}
\defineactivetoken 230 {\aeligature}
-\defineactivetoken 231 {\cdedille}
+\defineactivetoken 231 {\ccedilla}
\defineactivetoken 232 {\egrave}
\defineactivetoken 233 {\eacute}
\defineactivetoken 234 {\ecircumflex}
diff --git a/tex/context/base/regi-ini.tex b/tex/context/base/regi-ini.tex
index 6a9540b79..ce0fa3576 100644
--- a/tex/context/base/regi-ini.tex
+++ b/tex/context/base/regi-ini.tex
@@ -20,6 +20,6 @@
\protect
-\useregime[def,uni,ibm,win]
+\useregime[def,uni,ibm,win,il1]
\endinput
diff --git a/tex/context/base/regi-win.tex b/tex/context/base/regi-win.tex
index ae5d07b13..85d6c7615 100644
--- a/tex/context/base/regi-win.tex
+++ b/tex/context/base/regi-win.tex
@@ -84,7 +84,7 @@
\defineactivetoken 228 {\adiaeresis}
\defineactivetoken 229 {\aring}
\defineactivetoken 230 {\aeligature}
-\defineactivetoken 231 {\cdedille}
+\defineactivetoken 231 {\ccedilla}
\defineactivetoken 232 {\egrave}
\defineactivetoken 233 {\eacute}
\defineactivetoken 234 {\ecircumflex}
diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex
index 33ae62647..7d8e12ad5 100644
--- a/tex/context/base/s-abr-01.tex
+++ b/tex/context/base/s-abr-01.tex
@@ -51,6 +51,7 @@
\logo [EPS] {eps}
\logo [ETEX] {\eTeX}
\logo [EUROMATH] {EuroMath}
+\logo [EUROTEX] {Euro\TeX}
\logo [FAQ] {faq}
%logo [FGA] {fga}
\logo [FDF] {fdf}
@@ -126,12 +127,14 @@
\logo [TEXEDIT] {\TeX edit}
\logo [TEXEXEC] {\TeX exec}
\logo [TEXFORM] {\TeX form}
+\logo [TEXLIVE] {\TeX Live}
\logo [TEXMF] {texmf}
\logo [TEXNL] {TEX-NL}
\logo [TEXSHOW] {\TeX show}
\logo [TEXSPELL] {\TeX spell}
\logo [TEXUTIL] {\TeX util}
\logo [TEXWORK] {\TeX work}
+\logo [TEXFONT] {\TeX font}
\logo [TEX] {\TeX}
\logo [TFM] {tfm}
\logo [TIFFINFO] {tiffinfo}
diff --git a/tex/context/base/s-fnt-01.tex b/tex/context/base/s-fnt-01.tex
new file mode 100644
index 000000000..8fb40de15
--- /dev/null
+++ b/tex/context/base/s-fnt-01.tex
@@ -0,0 +1,60 @@
+%D \module
+%D [ file=s-tnf-01,
+%D version=2001.08.22,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Font Environment 1,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%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 file is used by the \type {texfont.pl} installation
+%D script.
+
+%D Modes: compact
+
+\dontcomplain
+
+\setupbodyfont
+ [10pt]
+
+\setuplayout
+ [backspace=30pt,
+ topspace=30pt,
+ footer=0pt,
+ header=36pt,
+ width=middle,
+ height=middle]
+
+\setupcolors
+ [state=start]
+
+\def\ShowFont
+ {\dotripleempty\doShowFont}
+
+\def\doShowFont[#1][#2][#3]%
+ {\bgroup
+ \ifthirdargument
+ \definefontsynonym[WhateverName][#2][encoding=#3]
+ \definefont[WhateverFont][WhateverName]
+ \setupheadertexts[\tttf#2\quad#1\quad#3]
+ \WhateverFont
+ \setupinterlinespace
+ \showfont[WhateverName]
+ \showligatures[WhateverName]
+ \doifnotmode{compact}{\showaccents\showcharacters}
+ \else
+ \definefontsynonym[WhateverName][#2]
+ \definefont[WhateverFont][WhateverName]
+ \setupheadertexts[\tttf#2\quad#1\quad(special font)]
+ \WhateverFont
+ \setupinterlinespace
+ \showfont[WhateverName]
+ \fi
+ \page
+ \egroup}
+
+\endinput
diff --git a/tex/context/base/s-pre-00.tex b/tex/context/base/s-pre-00.tex
index eb69190dd..502969801 100644
--- a/tex/context/base/s-pre-00.tex
+++ b/tex/context/base/s-pre-00.tex
@@ -1,5 +1,5 @@
%D \module
-%D [ file=s-pre-01,
+%D [ file=s-pre-00,
%D version=1997.07.22,
%D title=\CONTEXT\ Style File,
%D subtitle=Presentation Environment 0,
diff --git a/tex/context/base/s-pre-01.tex b/tex/context/base/s-pre-01.tex
index 60ab6765c..9243162f2 100644
--- a/tex/context/base/s-pre-01.tex
+++ b/tex/context/base/s-pre-01.tex
@@ -15,7 +15,7 @@
%D presentations. This module was first used at the 1997 \TUG\
%D meeting.
-\usemodule[pre-general] % mode=step
+\usemodule[pre-general]
%D \macros
%D {language}
@@ -33,11 +33,12 @@
%D a 14.4 point bodyfont for the main text, but switch back to
%D 12 points for ornaments.
-\setupbodyfont
- [lbr,14.4pt]
+\startmode[asintended] \setupbodyfont[lbr] \stopmode
+
+\setupbodyfont[14.4pt]
\setuplayout
- [style={\switchtobodyfont[12pt]}]
+ [style=smallbodyfont]
%D \macros
%D {setupcolors,definecolor}
@@ -49,8 +50,9 @@
\setupcolors
[state=start]
-\definecolor [backgroundcolor] [r=1, g=1, b=.7]
-\definecolor [interactioncolor] [r=.1, g=.5, b=.8]
+\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}
@@ -77,9 +79,7 @@
rightedge=96pt]
\setupinteractionscreen
- [option=max,
- width=600pt,
- height=450pt]
+ [option=max]
%D \macros
%D {setupbackgrounds}
@@ -92,7 +92,7 @@
\setupbackgrounds
[page]
[background=color,
- backgroundcolor=backgroundcolor,
+ backgroundcolor=BackgroundColor,
offset=3pt]
\setupbackgrounds
@@ -119,20 +119,17 @@
\setupinteraction
[page=yes,
+ color=InteractionColor,
+ contrastcolor=ContrastColor,
menu=on,
state=start]
%D \macros
-% %D {setupbottomtexts}
%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.
-%
-% \setupbottomtexts
-% [\InteractionBar]
-% [\InteractionButtons]
\setupinteractionmenu
[bottom]
@@ -283,7 +280,7 @@
\def\HeadLine#1#2%
{\midaligned
{\framed
- [framecolor=backgroundcolor,rulethickness=1pt,
+ [framecolor=BackgroundColor,rulethickness=1pt,
width=.8\hsize,align=middle,strut=no]
{#2}}}
@@ -347,24 +344,16 @@
width=\hsize,
offset=0pt,
criterium=all,
- align=left]
+ align=left,
+ style=\setsmallbodyfont\bfx]
\stopinteractionmenu
\def\Topics#1% temporary hack
{\Nopic{#1}
\placelist[Topic][criterium=all]}
-% %D \macros
-% %D {limitatetext}
-% %D
-% %D Because topic lines can be rather long, so we use \type
-% %D {\limitatetext} to limit their length to the width of the
-% %D right edge. When needed, some dots are added (\unknown).
-% %D This macro is part of the collection of low level support
-% %D macros.
-%
-% \def\TopicLine#1#2#3%
-% {\limitatetext{#2}{\rightedgewidth}{\unknown}\par}
+\def\Subjects%
+ {}
%D \macros
%D {setuptexttexts, button}
diff --git a/tex/context/base/s-pre-02.tex b/tex/context/base/s-pre-02.tex
index 2ec882b72..6e735c91d 100644
--- a/tex/context/base/s-pre-02.tex
+++ b/tex/context/base/s-pre-02.tex
@@ -14,9 +14,9 @@
%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.
+%D Association (now merged into a graphics association).
-\usemodule[pre-general] % mode=step
+\usemodule[pre-general]
%D \macros
%D {setupbodyfont, switchtobodyfont, setuplayout}
@@ -24,11 +24,12 @@
%D At \PRAGMA\ we prefer using the Lucida Bright fonts, but
%D one can of course load another typeface.
-\setupbodyfont
- [lbr,14.4pt]
+\startmode[asintended] \setupbodyfont[lbr] \stopmode
+
+\setupbodyfont[14.4pt]
\setuplayout
- [style={\switchtobodyfont[12pt]}]
+ [style=smallbodyfont]
%D \macros
%D {setuppapersize, setuplayout}
@@ -70,14 +71,8 @@
%D Of course we enable color. We define some logical colors,
%D of which most default to the same green shade.
-\definecolor [Backgrounds] [r= 0, g=.7, b=.4]
-\definecolor [Actions] [Backgrounds]
-\definecolor [Lines] [Actions]
-\definecolor [Page] [r=.8, g=.8, b=.8]
-
-%\definecolor [Actions] [r= 1, g=.9, b=.5]
-%\definecolor [Actions] [r= .1, g=.5, b=.9]
-%\definecolor [Actions] [r= 1, g=.3, b=.1]
+\definecolor [BackgroundColor] [r=.8, g=.8, b=.8]
+\definecolor [OrnamentColor] [r= 0, g=.7, b=.4]
\setupcolors
[state=start]
@@ -90,7 +85,8 @@
\setupinteraction
[state=start,
- color=Actions]
+ color=OrnamentColor,
+ contrastcolor=Ornamentcolor]
\setupinteractionscreen
[option=max,
@@ -103,195 +99,137 @@
%D And why not bring some color in itemizations too?
\setupitemize
- [color=Backgrounds]
+ [color=OrnamentColor]
%D \macros
%D {defineoverlay, setupbackgrounds}
%D
%D The navigational elements and the backgrounds are
-%D provided by \METAPOST. The next few macros are meant for the
-%D more experienced \CONTEXT\ user. When, as demonstrated
-%D here, we make the dimensions part of the name, we can be
-%D sure that new ones are generated when we change the page
-%D size in between.
+%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 tke care of graphic generation.
-
-\def\MPpagebackground#1#2#3%
- {\startreusableMPgraphic{pb:#1#2#3}
- delta := #3 ;
- fill unitsquare
- xscaled #1 yscaled #2
- withcolor \MPcolor{Page};
- draw unitsquare
- xscaled (#1-2delta) yscaled (#2-2delta)
- shifted (delta,delta)
- withpen pencircle scaled .5delta
- withcolor \MPcolor{Backgrounds} ;
- \stopreusableMPgraphic
- \reuseMPgraphic{pb:#1#2#3}}
+%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]
- [\MPpagebackground{\overlaywidth}{\overlayheight}{.25cm}]
+ [\uniqueMPgraphic{PageBackground}]
\setupbackgrounds
[page]
- [background=PageBackground]
+ [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 could also have use the overlay mechanism, but this
-%D takes more settings and requires to generate the backgounds
-%D each page.
-%D
-%D \starttypen
-%D \defineoverlay[BackgroundButton][\BackgroundButton]
-%D \setupbackgrounds[text][text][background=BackgroundButton]
-%D \setupbackgrounds[state=repeat]
-%D \stoptypen
-%D
-%D We go for the fast one.
-
-\def\MPtextbackground#1#2#3%
- {\startreusableMPgraphic{tx:#1#2#3}
- delta := #3 ;
- draw unitsquare
- xscaled #1 yscaled #2
- withpen pencircle scaled .5delta
- withcolor \MPcolor{Backgrounds} ;
- \stopreusableMPgraphic
- \reuseMPgraphic{tx:#1#2#3}}
+%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]
- [\MPtextbackground{\overlaywidth}{\overlayheight}{.125cm}]
+ [\uniqueMPgraphic{TextBackground}]
-\def\BackgroundButton%
- {\button
- [background=TextBackground,
- backgroundoffset=.25cm,
- frame=off,
- height=\vsize,
- width=\hsize]{}[nextpage]}
+\defineoverlay
+ [NextPage]
+ [\overlaybutton{nextpage}]
-\setuptexttexts
- [\BackgroundButton]
- []
+\setupbackgrounds
+ [text]
+ [background={TextBackground,NextPage},
+ backgroundcolor=BackgroundColor,
+ rulethickness=.0625cm,
+ framecolor=OrnamentColor]
%D \macros
-%D {setupbottomtexts}
+%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.
-% much too complicated, can be done in a few lines nowadays
-
-\def\MPright#1#2%
- {\startreusableMPgraphic{rt:#1#2}
- z1 = ( 0, 0) ;
- z2 = (#1, .5y3) ;
- z3 = ( 0, #2) ;
- path p ; p := z1--z2--z3--cycle;
- lw := #2/5 ; pickup pencircle scaled lw;
- filldraw p withcolor \MPcolor{Backgrounds} ;
- set_outer_boundingbox currentpicture;
- \stopreusableMPgraphic
- \reuseMPgraphic{rt:#1#2}}
-
-\def\MPleft#1#2%
- {\startreusableMPgraphic{lt:#1#2}
- z1 = (#1, 0) ;
- z2 = ( 0, .5y3) ;
- z3 = (#1, #2) ;
- path p ; p := z1--z2--z3--cycle;
- lw := #2/5 ; pickup pencircle scaled lw;
- filldraw p withcolor \MPcolor{Backgrounds} ;
- set_outer_boundingbox currentpicture;
- \stopreusableMPgraphic
- \reuseMPgraphic{lt:#1#2}}
-
-\def\MPcircle#1#2%
- {\startreusableMPgraphic{ci:#1#2}
- rx := #1; ry := #2;
- path p ; p := fullcircle xscaled rx yscaled ry;
- lw := #2/5 ; pickup pencircle scaled lw;
- filldraw p withcolor \MPcolor{Backgrounds} ;
- set_outer_boundingbox currentpicture;
- \stopreusableMPgraphic
- \reuseMPgraphic{ci:#1#2}}
-
-\def\MPwhat#1#2%
- {\startreusableMPgraphic{wh:#1#2} % could be rotated unitsquare
- z1 = ( 0, 0) ;
- z2 = ( #1, 0) ;
- z3 = (.5x2, #2) ;
- path p ; p := z1--z2--z3--cycle;
- lw := #2/5 ; pickup pencircle scaled lw;
- filldraw p withcolor \MPcolor{Backgrounds} ;
- set_outer_boundingbox currentpicture;
- \stopreusableMPgraphic
- \reuseMPgraphic{wh:#1#2}}
-
-\unexpanded\def\BackwardButton%
- {\gotobox{\MPleft{\the\bottomheight}{\the\bottomheight}}[previouspage]}
-
-\unexpanded\def\ForwardButton%
- {\gotobox{\MPright{\the\bottomheight}{\the\bottomheight}}[nextpage]}
-
-\unexpanded\def\ExitButton%
- {\gotobox{\MPcircle{\the\bottomheight}{\the\bottomheight}}[CloseDocument]}
-
-\unexpanded\def\WhateverButton%
- {\doifreferencefoundelse{Whatever}
- {\gotobox{\MPwhat{\the\bottomheight}{\the\bottomheight}}[Whatever]}
+\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} \\}
{}}
-\def\BottomButton%
- {\button
- [frame=off,
- height=\bottomheight,
- width=.3\textwidth]{}[Topics]}
-
-\setupbottomtexts
- [\BottomButton
- \hfill
- \WhateverButton
- \kern2\bottomheight
- \BackwardButton
- \kern.5\bottomheight
- \ExitButton
- \kern.5\bottomheight
- \ForwardButton
- \kern.5\bottomheight]
- [] % redundant
-
-% an alternative way:
-%
-% \setupinteractionmenu[bottom][state=start]
-%
-% \setupinteraction[menu=on]
-%
-% \startinteractionmenu[bottom]
-% \button[frame=off,height=\bottomheight,width=.3\textwidth]{}[Topics]
-% \hfill
-% \doifreferencefoundelse{Whatever}
-% {\gotobox{\MPwhat{\the\bottomheight}{\the\bottomheight}}[Whatever]}{}%
-% \kern2\bottomheight
-% \gotobox{\MPleft{\the\bottomheight}{\the\bottomheight}}[previouspage]%
-% \kern.5\bottomheight
-% \gotobox{\MPcircle{\the\bottomheight}{\the\bottomheight}}[CloseDocument]%
-% \kern.5\bottomheight
-% \gotobox{\MPright{\the\bottomheight}{\the\bottomheight}}[nextpage]%
-% \kern.5\bottomheight
-% \stopinteractionmenu
+\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}
@@ -382,8 +320,6 @@
continue=no,
style=\tfa]
-%D The next piece of code is new.
-
%D \macros
%D {setuplist}
%D
@@ -397,20 +333,26 @@
before=,
after=]
+\setuplist
+ [Topic]
+ [criterium=all]
+
\def\Topics#1%
{\determinelistcharacteristics[Topic]
- \ifcase\utilitylistlength\else
- \Nopic[Topics]{#1}
- \startcolumns
- \placelist[Topic][criterium=all]
- \stopcolumns
- \fi}
+ \doifmode{*list}
+ {\Nopic[Topics]{#1}
+ \startcolumns
+ \placelist[Topic]
+ \stopcolumns}}
+
+\setuplist
+ [Subject]
+ [criterium=Topic]
\def\Subjects%
- {\determinelistcharacteristics[Subject][criterium=Topic]
- \ifcase\utilitylistlength\else
- \placelist[Subject][criterium=Topic]
- \fi}
+ {\determinelistcharacteristics[Subject]
+ \doifmode{*list}
+ {\placelist[Subject]}}
\setuphead
[Topic]
diff --git a/tex/context/base/s-pre-03.tex b/tex/context/base/s-pre-03.tex
index 6eae357cb..440c1b931 100644
--- a/tex/context/base/s-pre-03.tex
+++ b/tex/context/base/s-pre-03.tex
@@ -17,7 +17,7 @@
%D use the same style three times. Therefore this is a rather
%D simple, silly style.
-\usemodule[pre-general] % mode=step
+\usemodule[pre-general]
%D \macros
%D {setupbodyfont}
@@ -26,14 +26,15 @@
%D background, this does not leave that much room for text, but
%D presentations should use much text anyway.
-\setupbodyfont
- [lbr,14.4pt]
+\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 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
@@ -50,102 +51,132 @@
\setupinteractionscreen
[option=max]
-%D \macros
+%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.
+%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
- [DarkRed][r=.5]
+\definecolor [PageColor] [black]
+\definecolor [BackgroundColor] [s=.85]
+\definecolor [OrnamentColor] [r=.75]
-%D \macros
+%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).
+%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=DarkRed,
- color=DarkRed]
+ contrastcolor=OrnamentColor,
+ color=OrnamentColor]
-%D \macros
+%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.
+%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}
- input mp-tool ;
- color fillcolor ; fillcolor := .85white ;
- color drawcolor ; drawcolor := .75red ;
- color backcolor ; backcolor := black ;
- color pagecolor ; pagecolor := .50red ;
- lin := 20pt ; off := .75lin ;
- wid := \overlaywidth ; hei := \overlayheight ;
- pos := \currentpage ; tot := \lastpage ;
- path bb; bb := unitsquare xscaled wid yscaled hei ;
- filldraw bb withcolor backcolor ;
- 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 fillcolor ;
- draw p withcolor drawcolor ;
- if (pos>0) and (tot>0):
- pair pa ; pa := point 5 of p ;
- pair pb ; pb := point 7 of p ;
- draw pa withcolor pagecolor ;
- draw pb withcolor pagecolor ;
- 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 pagecolor;
- fi ;
- setbounds currentpicture to bb ;
+ 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 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}]
+ [page]
+ [background={PageShape,PrevButton}]
\setupbackgrounds
- [text][text][background=NextButton]
-
-% \setupbackgrounds
-% [state=repeat]
+ [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 \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 \starttypen
+%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 \starttypen
%D \TitlePage{How nice}
-%D
+%D
%D \Topics{This is about ...}
-%D
+%D
%D \Topic{The first one}
-%D
+%D
%D \Topic{Another one}
%D \stoptypen
@@ -167,19 +198,25 @@
before=,
after=]
-%D The tables of contents is associated with \type
-%D {\Topics}.
+\def\Subject
+ {\Topic}
+
+%D The tables of contents is associated with \type
+%D {\Topics}.
\def\Topics#1%
{\Nopic[Topics]{#1}
\placelist[Topic][criterium=all]}
-%D Instead of \type {\TitlePage}, one can use the pair
+\def\Subjects
+ {}
+
+%D Instead of \type {\TitlePage}, one can use the pair
%D \type {\StartTitlePage} -- \type {\StopTitlePage}:
%D
-%D \starttypen
+%D \starttypen
%D \StartTitlePage
-%D A Self Made Title
+%D A Self Made Title
%D \StopTitlePage
%D \stoptypen
diff --git a/tex/context/base/s-pre-04.tex b/tex/context/base/s-pre-04.tex
index da4865e80..6d167e6b2 100644
--- a/tex/context/base/s-pre-04.tex
+++ b/tex/context/base/s-pre-04.tex
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\usemodule[pre-general] % mode=step
+\usemodule[pre-general]
%D \macros
%D {setupbodyfont}
@@ -20,8 +20,7 @@
%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]
+\setupbodyfont[ams,pos,14.4pt]
%D \macros
%D {setupcolors,definecolor}
@@ -151,13 +150,13 @@
\startinteractionmenu[right]
\setupinteraction[color=GotoColor]
- \but [previoussubpage] \MPup \framedwidth \interactioncolor \\
+ \but [previoussubpage] \Triangle {90}\framedwidth\interactioncolor \\
\vskip10pt
- \but [nextsubpage] \MPdown \framedwidth \interactioncolor \\
+ \but [nextsubpage] \Triangle{270}\framedwidth\interactioncolor \\
\vfill
- \but [PreviousJump] \MPleft \framedwidth {NoneColor} \\
+ \but [PreviousJump] \Triangle{180}\framedwidth{NoneColor} \\
\vskip-5pt
- \but [NextJump] \MPright \framedwidth {NoneColor} \\
+ \but [NextJump] \Triangle {0}\framedwidth{NoneColor} \\
\stopinteractionmenu
%D \macros
@@ -168,8 +167,8 @@
\setupinteractionbar
[alternative=f,
- width=540pt,
- height=10pt,
+ width=\textwidth,
+ height=\bottomheight,
distance=10pt,
color=NoneColor,
contrastcolor=StepColor]
@@ -187,7 +186,7 @@
\def\CloseButton
{\button
- [width=\hsize,height=10pt,offset=overlay,
+ [width=\rightedgewidth,height=\bottomheight,offset=overlay,
background=color,backgroundcolor=ExitColor,frame=off]
{}%
[CloseDocument]}
@@ -217,13 +216,8 @@
%D done, it makes sense to define and tune some structuring
%D commands. First we build the titlepage.
-\defineoverlay [TitleGraphic] [\TitleGraphic]
-\defineoverlay [NextPage] [\NextPageButton]
-
-\def\NextPageButton%
- {\button
- [width=\overlaywidth,height=\overlayheight,frame=off]
- {}[nextpage]}
+\defineoverlay [TitleGraphic] [\useMPgraphic{title}]
+\defineoverlay [NextPage] [\overlaybutton{nextpage}]
\def\StartTitlePage%
{\setupbackgrounds[page][background={color,TitleGraphic,NextPage}]
@@ -293,17 +287,21 @@
before=,
after=]
+\setuplist
+ [Topic]
+ [criterium=all]
+
\def\Topics#1%
{\determinelistcharacteristics[Topic]
\ifnum\utilitylistlength>0
\Nopic[Topics]{#1}
\ifnum\utilitylistlength>12
\startcolumns
- \placelist[Topic][criterium=all]
+ \placelist[Topic]
\stopcolumns
\else
- \placelist[Topic][criterium=all]
- \fi
+ \placelist[Topic]
+ \fi
\fi}
\def\Subjects%
@@ -313,64 +311,47 @@
%D linked into the macros.
\startMPinclusions
- input mp-tool ;
- def triangle (expr wid,rot)(text col) =
- x1 := x3 := y1 := 0 ;
- x2 := y3 := wid ;
- y2 := .5y3 ;
+ def triangle (expr wid, rot, col) =
+ x1 := x3 := y1 := 0 ; x2 := y3 := wid ; y2 := .5y3 ;
fill (z1--z2--z3--cycle) rotated rot withcolor col ;
- scale_currentpicture (wid,wid) ;
+ currentpicture := currentpicture xysized (wid,wid) ;
enddef ;
\stopMPinclusions
-\def\MPright#1#2%
- {\startreusableMPgraphic{r:#1:#2}
- triangle (#1, 0, \MPcolor{#2} ) ;
- \stopreusableMPgraphic
- \reuseMPgraphic{r:#1:#2}}
-
-\def\MPleft#1#2%
- {\startreusableMPgraphic{l:#1:#2}
- triangle (#1, 180, \MPcolor{#2} ) ;
- \stopreusableMPgraphic
- \reuseMPgraphic{l:#1:#2}}
-
-\def\MPup#1#2%
- {\startreusableMPgraphic{u:#1:#2}
- triangle (#1, 90, \MPcolor{#2} ) ;
- \stopreusableMPgraphic
- \reuseMPgraphic{u:#1:#2}}
-
-\def\MPdown#1#2%
- {\startreusableMPgraphic{d:#1:#2}
- triangle (#1, 270, \MPcolor{#2} ) ;
- \stopreusableMPgraphic
- \reuseMPgraphic{d:#1:#2}}
-
-\def\TitleGraphic%
- {\startuseMPgraphic{title}
- 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
- \useMPgraphic{title}}
+\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
\endinput
diff --git a/tex/context/base/s-pre-05.tex b/tex/context/base/s-pre-05.tex
index a25dd6040..88d69f6e2 100644
--- a/tex/context/base/s-pre-05.tex
+++ b/tex/context/base/s-pre-05.tex
@@ -11,23 +11,22 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\usemodule[pre-general] % mdode=step
+\usemodule[pre-general]
-%D Yet undocumented, mostly copied from s-pre-04; much can be
-%D moved to s-pre-00!
+%D As all styles sofar, this one has the same structuring
+%D commands.
-\setupbodyfont
- [lbr,14.4pt]
+\startmode[asintended] \setupbodyfont[lbr] \stopmode
+
+\setupbodyfont[14.4pt]
\setupcolors [state=start]
-\definecolor [FrameColor] [r=.6,g=.7,b=.8]
\definecolor [BackgroundColor] [s=.95]
-\definecolor [GotoColor] [FrameColor]
-\definecolor [NoneColor] [blank]
+\definecolor [OrnamentColor] [r=.6,g=.7,b=.8]
\setuppapersize
- [S6]
+ [S6][S6]
\setuplayout
[width=430pt,
@@ -41,9 +40,7 @@
rightedge=110pt]
\setupinteractionscreen
- [option=max,
- width=600pt, % fit
- height=450pt] % fit
+ [option=max]
\setupbackgrounds
[state=repeat]
@@ -59,40 +56,47 @@
\defineoverlay
[HashFrameA]
- [\HashFrame\overlaywidth\overlayheight{15pt}]
+ [\useMPgraphic{HashFrameA}]
\defineoverlay
[HashFrameB]
- [\HashFrame\overlaywidth\overlayheight{5pt}]
+ [\useMPgraphic{HashFrameB}]
\setupinteraction
[state=start,
menu=on,
- color=GotoColor,
- contrastcolor=NoneColor]
+ 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]
- \setupbuttons
- [background=HashFrameB,
- frame=off,
- offset=10pt,
- height=30pt,
- width=\rightedgewidth]
\placelist
[Topic]
[criterium=all,
- alternative=e,
- background=HashFrameB,
- frame=off,
- offset=10pt,
- style=smallbold,
- width=\rightedgewidth,
+ alternative=right,
maxwidth=.8\rightedgewidth,
interaction=all,
before=,
after=]
\vfill
- \button{Close}[CloseDocument]
+ \setupinteractionmenu
+ [right]
+ [height=30pt]
+ \but [CloseDocument] Close \\
\stopinteractionmenu
\setupwhitespace
@@ -108,13 +112,8 @@
%D done, it makes sense to define and tune some structuring
%D commands. First we build the titlepage.
-\defineoverlay [TitleGraphic] [\TitleGraphic\overlaywidth\overlayheight]
-\defineoverlay [NextPage] [\NextPageButton]
-
-\def\NextPageButton%
- {\button
- [width=\overlaywidth,height=\overlayheight,frame=off]
- {}[forward]}
+\defineoverlay [TitleGraphic] [\useMPgraphic{TitleGraphic}]
+\defineoverlay [NextPage] [\overlaybutton{forward}]
\def\StartTitlePage%
{\setupbackgrounds[page][background={color,TitleGraphic,NextPage}]
@@ -142,16 +141,19 @@
{\StartTitlePage#1\StopTitlePage}
%D \macros
-%D {Topics}
+%D {Topics,Subjects}
%D
-%D ...
+%D Since the lists are in the menu, we don't honor list
+%D placement macros.
\def\Topics#1{}
+\def\Subjects{}
%D \macros
%D {Topic, Nopic, Subject}
%D
-%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]
@@ -173,6 +175,9 @@
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 ) =
@@ -182,38 +187,34 @@
drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{BackgroundColor}) ;
fill z1--(x2,y1)--z2--(x1,y2)--cycle ;
- drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{FrameColor}) ;
+ 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
-\def\HashFrame#1#2#3%
- {\startuseMPgraphic{HashFrame}
- random_hash_frame(#1,#2,#3,2pt) ;
- \stopuseMPgraphic
- \useMPgraphic{HashFrame}}
-
-\def\TitleGraphic#1#2%
- {\startuseMPgraphic{title}
- picture savedpicture ;
- savedpicture := nullpicture ;
- def MakeOne =
- offset := uniformdeviate 10pt ;
- width := 2*offset + 30pt + uniformdeviate 30pt ;
- height := 2*offset + 10pt + uniformdeviate 10pt ;
- random_hash_frame(width,height,offset,1pt) ;
- addto savedpicture also (currentpicture shifted
- (uniformdeviate #1, uniformdeviate #2)) ;
- currentpicture := nullpicture ;
- enddef ;
- for i=1 upto 300 : MakeOne ; endfor ;
- currentpicture := savedpicture ;
- \stopuseMPgraphic
- \useMPgraphic{title}}
+\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
\endinput
diff --git a/tex/context/base/s-pre-06.tex b/tex/context/base/s-pre-06.tex
index 03817cc8d..32e24c27f 100644
--- a/tex/context/base/s-pre-06.tex
+++ b/tex/context/base/s-pre-06.tex
@@ -25,7 +25,7 @@
%D this style is only suited for simple presentations, using
%D itemizations.
-\usemodule[pre-general] % mode=step
+\usemodule[pre-general]
%D \macros
%D {setupbodyfont}
@@ -45,9 +45,9 @@
\setupcolors
[state=start]
+\definecolor [BackgroundColor] [s=.8]
+\definecolor [ContrastColor] [s=.9]
\definecolor [InteractionColor] [s=.6]
-\definecolor [PrimaryColor] [s=.8]
-\definecolor [SecondaryColor] [s=.9]
%D \macros
%D {setuppapersize}
@@ -103,7 +103,7 @@
\setupbackgrounds
[page]
[background={color,Joke,GoAround},
- backgroundcolor=PrimaryColor]
+ backgroundcolor=BackgroundColor]
%D \macros
%D {defineoverlay}
@@ -129,7 +129,7 @@
def do (expr r) =
addto currentpicture also p shifted - center p scaled r
xscaled (width/pwidth) yscaled (height/pheight)
- withcolor \MPcolor{SecondaryColor} ;
+ withcolor \MPcolor{ContrastColor} ;
enddef ;
do (0.9+uniformdeviate0.1) ;
do (1.4+uniformdeviate0.1) ;
@@ -145,6 +145,7 @@
\setupinteraction
[state=start,
color=InteractionColor,
+ contrastcolor=InteractionColor,
menu=on]
\setupinteractionscreen
diff --git a/tex/context/base/s-pre-07.tex b/tex/context/base/s-pre-07.tex
new file mode 100644
index 000000000..8afa22bef
--- /dev/null
+++ b/tex/context/base/s-pre-07.tex
@@ -0,0 +1,198 @@
+%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 / Hans Hagen \& Ton Otten}]
+%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 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 \starttypen
+%D \TitlePage{...\\...\\...}
+%D
+%D \Topics{...}
+%D
+%D \StartIdeas
+%D \Topic{...}
+%D \StartIdea ... \StopIdea
+%D \StartIdea ... \StopIdea
+%D \StopIdeas
+%D \stoptypen
+
+\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%
+ {}
+
+\endinput
diff --git a/tex/context/base/s-pre-08.tex b/tex/context/base/s-pre-08.tex
new file mode 100644
index 000000000..2b768beb3
--- /dev/null
+++ b/tex/context/base/s-pre-08.tex
@@ -0,0 +1,267 @@
+%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 / Hans Hagen \& Ton Otten}]
+%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 \starttypen
+%D \tracelayerstrue
+%D \stoptypen
+
+\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.
+
+\def\StartText%
+ {\setMPpositiongraphic
+ {TextText:\realfolio}{text}{other=SampText:\realfolio}
+ \setlayer
+ [main]
+ [x=\makeupwidth,y=\makeupheight,hoffset=-.75cm,voffset=-.75cm,location=lt]
+ \bgroup \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}}) ;
+\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/base/s-pre-09.tex b/tex/context/base/s-pre-09.tex
new file mode 100644
index 000000000..78e26ca95
--- /dev/null
+++ b/tex/context/base/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 / Hans Hagen \& Ton Otten}]
+%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 \starttypen
+%D \def\Topic#1%
+%D {\setlayer[topic]{\color[PageColor]{\bfb\setstrut#1}}}
+%D \stoptypen
+%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 \citeer {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/base/s-pre-10.tex b/tex/context/base/s-pre-10.tex
new file mode 100644
index 000000000..eca9e74d8
--- /dev/null
+++ b/tex/context/base/s-pre-10.tex
@@ -0,0 +1,306 @@
+%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 / Hans Hagen \& Ton Otten}]
+%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 van 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}]
+ \setbox\nextbox=\hbox
+ {\startSampleText[none]
+ \setups[#1]
+ \setups[always]
+ \getbuffer[#1]\par
+ \doif{#1}{text}
+ {\dorecurse{\TextN}{\getbuffer[text-\recurselevel]\par}}
+ \stopSampleText}
+ \xdef\SampleTextWidth{\the\wd\nextbox}
+ \setlayer[#2]{\box\nextbox}}
+
+%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/base/s-pre-13.tex b/tex/context/base/s-pre-13.tex
new file mode 100644
index 000000000..a7b68dd69
--- /dev/null
+++ b/tex/context/base/s-pre-13.tex
@@ -0,0 +1,282 @@
+%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 / Hans Hagen \& Ton Otten}]
+%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
+
+\endinput
diff --git a/tex/context/base/s-pre-14.tex b/tex/context/base/s-pre-14.tex
new file mode 100644
index 000000000..7a777c27e
--- /dev/null
+++ b/tex/context/base/s-pre-14.tex
@@ -0,0 +1,264 @@
+%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 / Hans Hagen \& Ton Otten}]
+%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/base/s-pre-15.tex b/tex/context/base/s-pre-15.tex
index 9dc4de2ab..49e13b3da 100644
--- a/tex/context/base/s-pre-15.tex
+++ b/tex/context/base/s-pre-15.tex
@@ -55,8 +55,9 @@
\setupinteractionscreen
[option=max]
-\setupbodyfont
- [lbr,14.4pt]
+\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.
@@ -146,14 +147,20 @@
\def\StopIdea%
{}
-\def\TitlePage#1%
+\def\StartTitlePage%
{\startstandardmakeup
- \setupalign[middle]
- \def\\{\vfil\bfb\setupinterlinespace}
- \bfd\setupinterlinespace
- \vfil#1\vfil\vfil
+ \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.
diff --git a/tex/context/base/s-pre-16.tex b/tex/context/base/s-pre-16.tex
new file mode 100644
index 000000000..935ba244f
--- /dev/null
+++ b/tex/context/base/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 / Hans Hagen \& Ton Otten}]
+%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}
+
+\endinput
+
+\starttext
+
+\Topics{...}
+
+\StartIdea
+ \Topic{...}
+ ...
+ \NextIdea
+ ...
+\StopIdea
+
+\stoptext
diff --git a/tex/context/base/s-pre-19.tex b/tex/context/base/s-pre-19.tex
index 440abebfe..e5477e1e6 100644
--- a/tex/context/base/s-pre-19.tex
+++ b/tex/context/base/s-pre-19.tex
@@ -41,12 +41,9 @@
%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.
+%D may be biased.
-\usetypescript [serif] [palatino] [ec]
-
-\setupbodyfont
- [ppl]
+\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
@@ -83,6 +80,12 @@
\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 \citeer {highlight a
%D hyperlink when it's clicked on} feature. We will use a
@@ -93,8 +96,8 @@
\setupinteraction
[state=start,
click=off,
- color=red,
- contrastcolor=gray,
+ color=InteractionColor,
+ contrastcolor=ContrastColor,
menu=on]
%D The menu itself is set up as follows. Because we will
@@ -155,17 +158,18 @@
p := Field[Text][Text] enlarged 36pt superellipsed .90 ;
- fill Page withcolor \MPcolor{yellow} ;
- fill p withcolor \MPcolor{white} ;
- draw p withcolor \MPcolor{red} ;
+ 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{white} ;
- draw q withcolor if rr=2 : \MPcolor{gray} else : \MPcolor{red} fi ;
+ fill q withcolor \MPcolor{TextColor} ;
+ draw q withcolor if rr=2 : \MPcolor{ContrastColor}
+ else : \MPcolor{InteractionColor} fi ;
fi ;
enddef ;
@@ -212,9 +216,9 @@
pickup pencircle scaled 3pt ;
- fill Page withcolor \MPcolor{yellow} ;
- fill p withcolor \MPcolor{white} ;
- draw p withcolor \MPcolor{red} ;
+ 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
@@ -231,8 +235,9 @@
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) ; % \MPw{menu:right:\realfolio}
- fill q withcolor \MPcolor{white} ;
- draw q withcolor if rr=2 : \MPcolor{gray} else : \MPcolor{red} fi ;
+ fill q withcolor \MPcolor{TextColor} ;
+ draw q withcolor if rr=2 : \MPcolor{ContrastColor}
+ else : \MPcolor{InteractionColor} fi ;
fi ;
enddef ;
@@ -299,14 +304,28 @@ enddef ;
%D want to keep the interface simple: a list of small
%D sentences, separated by \type {\\}.
-\def\TitlePage#1%
+\def\StartTitlePage%
{\startstandardmakeup
\switchtobodyfont[big]
\def\\{\vfill\bfb\let\\=\par}
\bfd\setupinterlinespace\gray
- \vskip.5cm#1\\\vskip.5cm % \\ is really needed -)
+ \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
@@ -325,5 +344,6 @@ enddef ;
\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/base/s-pre-22.tex b/tex/context/base/s-pre-22.tex
new file mode 100644
index 000000000..edd99ebde
--- /dev/null
+++ b/tex/context/base/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 / Hans Hagen \& Ton Otten}]
+%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 \citeer {problem} like this can be solved in several ways:
+%D
+%D \startopsomming
+%D \som writing a lot of semi||complex \TEX\ code as shown
+%D \som keeping track of positions and draw everything on the
+%D page layer
+%D \som defining an overlay for each summary and changing the
+%D order when flushing
+%D \som maintaining a so called field stack
+%D \stopopsomming
+%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/base/s-pre-23.tex b/tex/context/base/s-pre-23.tex
new file mode 100644
index 000000000..90ed18353
--- /dev/null
+++ b/tex/context/base/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 / Hans Hagen \& Ton Otten}]
+%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/base/setupb.tex b/tex/context/base/setupb.tex
index 53d0777cd..6cc744185 100644
--- a/tex/context/base/setupb.tex
+++ b/tex/context/base/setupb.tex
@@ -797,6 +797,10 @@
[\c!nummercommando]
[\c!oneargument!]
[]
+ \variable
+ [\c!splitsen]
+ [\v!soepel,\v!streng,\v!zeerstreng,\c!number!]
+ [\v!soepel]
\inheritvariables
[\y!framed]
[]
@@ -1483,6 +1487,10 @@
[\c!identifier!]
[]
\variable
+ [\c!achtergrondkleur]
+ [\c!identifier!]
+ []
+ \variable
[\c!hoogte]
[\c!dimension!,\v!max]
[.5\linewidth]
@@ -1492,8 +1500,12 @@
[.5\linewidth]
\variable
[\c!variant]
- [\v!a,\v!b,\v!c]
+ [\v!a,\v!b,\v!c,\v!d]
[\v!a]
+ \variable
+ [\c!lijndikte]
+ [\c!dimension!]
+ []
\stopsetup
\startsetup
@@ -5520,6 +5532,10 @@
[\c!onderstatus]
[\v!stop,\v!start]
[\v!stop]
+ \variable
+ [\c!kleur]
+ [\c!identifier!]
+ []
\stopsetup
\startsetup
@@ -5721,7 +5737,7 @@
[\c!vals!]
\value
[\v!horizontaal,\v!vertikaal,
- \v!rek,\v!zeerstreng,\v!streng,\v!soepel,\v!zeersoepel]
+ \v!rek,\v!spatie,\v!zeerstreng,\v!streng,\v!soepel,\v!zeersoepel]
[\v!zeerstreng]
\stopsetup
@@ -7009,7 +7025,7 @@
[]
\variable
[\c!plaats]
- [\v!lokaal,\v!globaal,\v!default]
+ [\v!lokaal,\v!globaal,\v!default,\v!geen]
[]
\variable
[\c!maxbreedte]
diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex
index 590c203bc..ee5e75c86 100644
--- a/tex/context/base/spec-fdf.tex
+++ b/tex/context/base/spec-fdf.tex
@@ -11,6 +11,16 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+%D Initialization of fields is tricky. If a field has no
+%D value, it is kind of not there. If ResetForm is used, the
+%D default is assigned, but pushbuttons are spoiled. Adding a
+%D \type {/MK} dictionary helps, but gives ugly down
+%D appearances (displaced with background). What a mess.
+%D Also, in order to get at least something, the \type {/AS}
+%D key should be provided.
+
+% to do : /IF << /SW /N >> == no scaling / clipping of widget
+
\unprotect
%D \macros
@@ -161,6 +171,10 @@
\ScaledPointsToWholeBigPoints{\number\!!heighta}\bottom
\ScaledPointsToWholeBigPoints{\number\!!widtha }\width
\ScaledPointsToWholeBigPoints{\number\!!heightb}\height
+% \ScaledPointsToBigPoints{#2}\left
+% \ScaledPointsToBigPoints{\number\!!heighta}\bottom
+% \ScaledPointsToBigPoints{\number\!!widtha }\width
+% \ScaledPointsToBigPoints{\number\!!heightb}\height
\xdef\currentPDFcropbox% \doPDFpagesattribute
{/CropBox [\left\space\bottom\space\width\space\height]}%
\xdef\currentPDFpagemode% \doPDFaddtocatalog
@@ -433,13 +447,15 @@
%D Running programs is possible, but rather non portable, and
%D therefore ill advized.
-\def\doPDFstartrunprogram#1#2#3%
+\def\doPDFstartrunprogram#1#2#3#4% new: #3 => #3#4
{\bgroup
- \edef\string{#3}%
- \@EA\beforesplitstring\string\at{ }\to\program
- \@EA\aftersplitstring \string\at{ }\to\parameters
+ %\edef\string{#3}%
+ %\@EA\beforesplitstring\string\at{ }\to\program
+ %\@EA\aftersplitstring \string\at{ }\to\parameters
+ %\edef\action%
+ % {/S /Launch /F (\program) /P (\parameters) /D (.)}%
\edef\action%
- {/S /Launch /F (\program) /P (\parameters) /D (.)}%
+ {/S /Launch /F (#3) /P (#4) /D (.)}%
\ifsecondaryreference
\savesecondaryPDFreference\action
\else
@@ -758,19 +774,40 @@
\let\FDFactions\empty
-\def\setFDFactions[#1,#2,#3,#4,#5,#6,#7,#8]%
+%\def\setFDFactions[#1,#2,#3,#4,#5,#6,#7,#8]%
+% {\global\let\FDFactions\empty
+% \setFDFaction D#1% mousedown
+% \setFDFaction U#2% mouseup
+% \setFDFaction E#3% enterregion
+% \setFDFaction X#4% exitregion
+% \setFDFaction K#5% afterkeystroke
+% \setFDFaction F#6% formatresult
+% \setFDFaction V#7% validateresult
+% \setFDFaction C#8% calculatewhatever
+% \ifx\FDFactions\empty\else
+% \xdef\FDFactions{/AA << \FDFactions >>}% since 1.3 no longer inherited
+% \fi}
+%% \setFDFaction A#2}% mouseup % changed for version 5
+
+\def\setFDFactions[#1,#2,#3,#4,#5,#6,#7,#8,%
{\global\let\FDFactions\empty
\setFDFaction D#1% mousedown
+% \setFDFaction U#2% mouseup
\setFDFaction E#3% enterregion
\setFDFaction X#4% exitregion
\setFDFaction K#5% afterkeystroke
\setFDFaction F#6% formatresult
\setFDFaction V#7% validateresult
\setFDFaction C#8% calculatewhatever
+ \setFDFactionsmore#2,}
+
+\def\setFDFactionsmore#1,#2,#3]%
+ {\setFDFaction{Fo}#2% focusin
+ \setFDFaction{Bi}#3% focusout
\ifx\FDFactions\empty\else
\xdef\FDFactions{/AA << \FDFactions >>}% since 1.3 no longer inherited
\fi
- \setFDFaction A#2}% mouseup % becomes U !
+ \setFDFaction A#1}% mouseup
%D The event handler becomes something:
%D
@@ -779,24 +816,33 @@
%D /A << /S /JavaScript /JS (...) >>
%D \stoptypen
+% \def\setFDFaction#1#2%
+% {\bgroup
+% \global\let\sanitizedJScode\empty
+% \def\setFDFaction##1%
+% {\doifreferencefoundelse{##1}
+% {\doifelse{\currentreferencespecial}{JS} % filter non-js
+% {\presetJScode
+% \currentreferenceoperation
+% \currentreferencearguments
+% \doPSsanitizeJScode\JScode\to\JScode
+% \xdef\sanitizedJScode{\sanitizedJScode\space\JScode}}
+% {\illegalreference{##1}}}
+% {\unknownreference{##1}}}%
+% \@EA\processcommalist\@EA[#2]\setFDFaction % one level expansion
+% \ifx\sanitizedJScode\empty \else
+% \xdef\FDFactions%
+% {\FDFactions /#1 << /S /JavaScript /JS (\sanitizedJScode) >> }%
+% \fi
+% \egroup}
+%
+% acrobat 5 supports other that JS actions too
+
\def\setFDFaction#1#2%
{\bgroup
- \global\let\sanitizedJScode\empty
- \def\setFDFaction##1%
- {\doifreferencefoundelse{##1}
- {\doifelse{\currentreferencespecial}{JS} % filter non-js
- {\presetJScode
- \currentreferenceoperation
- \currentreferencearguments
- \doPSsanitizeJScode\JScode\to\JScode
- \xdef\sanitizedJScode{\sanitizedJScode\space\JScode}}
- {\illegalreference{##1}}}
- {\unknownreference{##1}}}%
- \@EA\processcommalist\@EA[#2]\setFDFaction % one level expansion
- \ifx\sanitizedJScode\empty \else
- \xdef\FDFactions%
- {\FDFactions /#1 << /S /JavaScript /JS (\sanitizedJScode) >> }%
- \fi
+ \def\docommando%
+ {\xdef\FDFactions{\FDFactions /#1 << \lastPDFaction >> }}%
+ \@EA\handlereferenceactions\@EA{#2}\docommando % one level expansion
\egroup}
%D \macros
@@ -1036,7 +1082,7 @@
\doPDFannotationobject class FDF name #1 width #2 height #3 data
{/Subtype /Widget /T (#1) /FT /Tx
/MaxLen \ifcase0#5 1000 \else#5 \fi
- /DV (#4) /V () % (#4) % value added
+ /DV (#4) /V (#4) % value added
/Ff \FDFflag\space
/F \FDFplus\space
/DA (\FDFattributes)
@@ -1050,7 +1096,7 @@
{/T (#1) /FT /Tx
/MaxLen \ifcase0#5 1000 \else#5 \fi
/Kids [\FDFkids]
- /DV (#4) /V () % (#4) % value added
+ /DV (#4) /V (#4) % value added
/Ff \FDFflag\space
/F \FDFplus\space
/DA (\FDFattributes)
@@ -1093,7 +1139,7 @@
\doPDFannotationobject class FDF name #1 width #2 height #3 data
{/Subtype /Widget
/T (#1) /FT /Ch
- /DV (#4) /V ()
+ /DV (#4) /V (#4)
/Ff \FDFflag\space
/F \FDFplus\space
/DA (\FDFattributes)
@@ -1106,7 +1152,7 @@
\doPDFdictionaryobject class FDF name #1 data
{/T (#1) /FT /Ch
/Kids [\FDFkids]
- /DV (#4) /V ()
+ /DV (#4) /V (#4)
/Ff \FDFflag\space
/F \FDFplus\space
/DA (\FDFattributes)
@@ -1153,7 +1199,11 @@
\doFDFdefault{#6}{#4}%
\doPDFannotationobject class FDF name #1 width #2 height #3 data
{/Subtype /Widget /T (#1) /FT /Btn
- \ifFDFvalues /DV /\FDFdefault\space /V ()\fi
+ \ifFDFvalues
+ /DV /\FDFdefault\space
+ /V /\FDFdefault\space
+ /AS /\FDFdefault\space
+ \fi
/Ff \FDFflag\space
/F \FDFplus\space
\FDFappearance\space
@@ -1165,7 +1215,11 @@
\doPDFdictionaryobject class FDF name #1 data
{/T (#1) /FT /Btn
/Kids [\FDFkids]
- \ifFDFvalues /DV /\FDFdefault\space /V ()\fi
+ \ifFDFvalues
+ /DV /\FDFdefault\space
+ /V /\FDFdefault\space
+ /AS /\FDFdefault\space
+ \fi
/Ff \FDFflag\space
/F \FDFplus\space
\FDFactions}%
@@ -1254,7 +1308,7 @@
\setFDFactions[#5]%
\doPDFdictionaryobject class FDF name #1 data
{/Subtype /Widget /FT /Btn /T (#1) /Rect [0 0 0 0]
- /DV /#2 % /V ()
+ /DV /#2 /V /#2
/H /N
/Ff \FDFflag\space /F \FDFplus\space /Kids [\FDFkids]
\FDFactions}%
@@ -1280,7 +1334,7 @@
\ifx\commalistelement\empty\else
\doPDFgetobjectreference{SYM}\commalistelement\PDFobjectreference
\edef\D{\ifFDFvalues\D /#1 \fi\PDFobjectreference\space}%
- \def\FDFappearance{/H /P}%
+ \def\FDFappearance{/H /P }%
\fi
\fi}
@@ -1288,7 +1342,7 @@
{\ifx#1\empty\else
\dogetcommacommandelement3\from#1\to\commalistelement
\ifx\commalistelement\empty\else
- \def\FDFappearance{/H /P}%
+ \def\FDFappearance{/H /P }%
\fi
\fi}
diff --git a/tex/context/base/spec-ini.tex b/tex/context/base/spec-ini.tex
index 77c5e0d0c..8d6dbc70d 100644
--- a/tex/context/base/spec-ini.tex
+++ b/tex/context/base/spec-ini.tex
@@ -1235,7 +1235,7 @@
%D
%D {\em --- still undocumented ---}
-\installspecial [\dostartrunprogram] [and] [3]
+\installspecial [\dostartrunprogram] [and] [4]
\installspecial [\dostoprunprogram] [and] [0]
\installspecial [\dostartgotoprofile] [and] [3]
\installspecial [\dostopgotoprofile] [and] [0]
diff --git a/tex/context/base/spec-win.tex b/tex/context/base/spec-win.tex
index caa9df149..1633fcc65 100644
--- a/tex/context/base/spec-win.tex
+++ b/tex/context/base/spec-win.tex
@@ -83,8 +83,8 @@
\definespecial\dostartthisisrealpage#1%
{}
-\definespecial\dostartrunprogram#1#2#3%
- {\special{button: #1 #2 launch: #3}}
+\definespecial\dostartrunprogram#1#2#3#4%
+ {\special{button: #1 #2 launch: #3 #4}}
\let\doyandyinsertmov = \docommoninsertmov
\let\dotrinsertmov = \docommoninsertmov
diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex
index c31c2f0ec..9ee5cfa91 100644
--- a/tex/context/base/supp-box.tex
+++ b/tex/context/base/supp-box.tex
@@ -2338,6 +2338,12 @@
\box\nextbox}
\hbox}
+
+% new
+
+\def\setdimentoatleast#1#2%
+ {\ifdim#1>\zeropoint\else#1=#2\fi}
+
\protect
\endinput
diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex
index eba8e7735..5163f4636 100644
--- a/tex/context/base/supp-lan.tex
+++ b/tex/context/base/supp-lan.tex
@@ -787,6 +787,15 @@
{\prewordbreak\discretionary{\hbox{$|$}}{}{\hbox{$|$}}%
\allowbreak\postwordbreak}
+\definetextmodediscretionary :
+ {\prewordbreak\kern.25em:\space\ignorespaces}
+
+\definetextmodediscretionary ;
+ {\prewordbreak\kern.25em;\space\ignorespaces}
+
+\definetextmodediscretionary *
+ {\prewordbreak\discretionary{-}{}{\kern.05em}\postwordbreak}
+
%D Since we don't have to bother about active characters any
%D longer, we end up with a pretty simple activating macro:
diff --git a/tex/context/base/supp-mpe.tex b/tex/context/base/supp-mpe.tex
index 22786cda8..0becad3fc 100644
--- a/tex/context/base/supp-mpe.tex
+++ b/tex/context/base/supp-mpe.tex
@@ -330,20 +330,47 @@
\newtoks \invokeMPspecials
+% \def\processMPpath%
+% {\let\extraMPpathcode\empty
+% \ifcase\MPspecialversion\else
+% \ifnum\MPrgbnumber\lastMPrvalue=\MPspecialsignal
+% \scratchcounter=\MPrgbnumber\lastMPbvalue
+% \edef\currentMPspecial{\the\scratchcounter}%
+% \ifnum\finiMPpath=2 % to outer level
+% \the\invokeMPspecials
+% \fi
+% \fi
+% \fi
+% \flushMPpath
+% \closeMPpath
+% \PDFcode{\ifcase\finiMPpath W n\or S\or f\or B\else W n\fi \extraMPpathcode}%
+% \let\handleMPsequence=\dohandleMPsequence
+% \resetMPstack
+% \nofMPsegments=0
+% \handleMPsequence}
+
+\def\finishMPpath%
+ {\PDFcode
+ {\ifcase\finiMPpath W n\or S\or f\or B\else W n\fi
+ \extraMPpathcode}}
+
\def\processMPpath%
- {\let\extraMPpathcode\empty
- \ifcase\MPspecialversion\else
- \ifnum\MPrgbnumber\lastMPrvalue=\MPspecialsignal
- \scratchcounter=\MPrgbnumber\lastMPbvalue
- \edef\currentMPspecial{\the\scratchcounter}%
- \ifnum\finiMPpath=2 % to outer level
- \the\invokeMPspecials
+ {\checkMPpath % !
+ \ifcase\nofMPsegments\else
+ \let\extraMPpathcode\empty
+ \ifcase\MPspecialversion\else
+ \ifnum\MPrgbnumber\lastMPrvalue=\MPspecialsignal
+ \scratchcounter=\MPrgbnumber\lastMPbvalue
+ \edef\currentMPspecial{\the\scratchcounter}%
+ \ifnum\finiMPpath=2 % to outer level
+ \the\invokeMPspecials
+ \fi
\fi
\fi
- \fi
- \flushMPpath
- \closeMPpath
- \PDFcode{\ifcase\finiMPpath W n\or S\or f\or B\else W n\fi \extraMPpathcode}%
+ \flushMPpath
+ \closeMPpath
+ \finishMPpath
+ \fi
\let\handleMPsequence=\dohandleMPsequence
\resetMPstack
\nofMPsegments=0
diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex
index 3716caa5b..387c208da 100644
--- a/tex/context/base/supp-pdf.tex
+++ b/tex/context/base/supp-pdf.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=supp-pdf,
-%D version=2000.10.14,
+%D version=2001.07.27,
%D title=\CONTEXT\ Support Macros,
%D subtitle=\METAPOST\ to \PDF\ conversion,
%D author=Hans Hagen,
@@ -1146,7 +1146,8 @@
\multiply \dimen20 \dimen10
\advance \dimen12 -\dimen20
%
- \ifdim\dimen16>1pt
+% \ifdim\dimen16>1pt % oeps, can be < 1pt too
+ \ifdim\dimen16=1pt \else
\ifdim\dimen16>256pt
\doMPreducedimen16
\divide \dimen18 \dimen16 \doMPexpanddimen18
@@ -1397,14 +1398,37 @@
{\PDFcode{\ifcase\finiMPpath W n\or S\or f\or B\fi}}
\def\processMPpath%
- {\flushMPpath
- \closeMPpath
- \finishMPpath
+ {\checkMPpath
+ \ifcase\nofMPsegments\else
+ \flushMPpath
+ \closeMPpath
+ \finishMPpath
+ \fi
\let\handleMPsequence=\dohandleMPsequence
\resetMPstack
\nofMPsegments=0
\handleMPsequence}
+%D The following \METAPOST\ code is quite valid but, when
+%D processed and converted to \PDF, will make a file
+%D unprintable on a Hewlett Packard printer (from Acrobat
+%D $v<=5$). Who is to blame, the driver of the OS layer in
+%D between, is hard to determine, so we add an additional
+%D check.
+%D
+%D \starttypen
+%D clip currentpicture to origin -- cycle ;
+%D setbounds currentpicture to fullsquare scaled 5cm ;
+%D \stoptypen
+
+\def\checkMPpath
+ {\ifcase\finiMPpath
+ \ifnum\nofMPsegments<3 % n is one ahead
+ \message{omitting zero clip path}%
+ \nofMPsegments=0
+ \fi
+ \fi}
+
%D In \PDF\ the \type{cm} operator must precede the path
%D specification. We therefore can output the \type{cm} at
%D the moment we encounter it.
@@ -1436,6 +1460,7 @@
\else\ifx\somestring\PSmoveto
\setMPkeyword3
\else\ifx\somestring\PSclip
+ % \chardef\finiMPpath=0 % already
\let\handleMPsequence=\processMPpath
\else\ifx\somestring\PSgsave
\chardef\finiMPpath=3
@@ -1580,7 +1605,10 @@
% \lower\MPshift\box\scratchbox
% \PDFcode{Q}}}%
-\let\PDFMPformoffset\!!zeropoint
+% \let\PDFMPformoffset\!!zeropoint
+
+\def\PDFMPformoffset
+ {\ifx\objectoffset\undefined\!!zeropoint\else\objectoffset\fi}
\def\finishMPgraphic%
{\stopMPresources
diff --git a/tex/context/base/supp-ran.tex b/tex/context/base/supp-ran.tex
index f830b11c8..20892c056 100644
--- a/tex/context/base/supp-ran.tex
+++ b/tex/context/base/supp-ran.tex
@@ -16,7 +16,7 @@
%D \macros
%D {getrandomcount, getrandomdimen,
%D getrandomfloat, getrandomnumber,
-%D setrandomseed}
+%D setrandomseed, getrandomseed}
%D
%D This module load Donald Arseneau's generic file
%D \type{random.tex}. A small shell is needed because we
@@ -39,6 +39,12 @@
%D \starttypen
%d \setrandomseed{number>0}
%D \stoptypen
+%D
+%D and get by:
+%D
+%D \starttypen
+%D \getrandomseed\randomseed
+%D \stoptypen
\ifx\nextrandom\undefined
@@ -105,7 +111,10 @@
{\getrandomdimen{\scratchdimen}{#2pt}{#3pt}%
\edef#1{\withoutpt\the\scratchdimen}}
-\def\setrandomseed#1%
+\unexpanded \def\setrandomseed#1%
{\randomi=#1\relax}
+\unexpanded \def\getrandomseed#1%
+ {\edef#1{\number\randomi}}
+
\endinput
diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex
index 9b64e25ae..afda909c2 100644
--- a/tex/context/base/syst-ext.tex
+++ b/tex/context/base/syst-ext.tex
@@ -1862,7 +1862,8 @@
\next}
%D \macros
-%D {appendtocommalist,addtocommalist,removefromcommalist}
+%D {appendtocommalist,prependtocommalist,
+%D addtocommalist,removefromcommalist}
%D
%D When working with comma separated lists, one sooner or
%D later want the tools to append or remove items from such a
@@ -1894,7 +1895,8 @@
%D also provided:
%D
%D \starttypen
-%D \appendtocommalist {something} \name
+%D \appendtocommalist {something} \name
+%D \prependtocommalist {something} \name
%D \stoptypen
\def\appendtocommalist#1#2%
@@ -1904,14 +1906,34 @@
\dodoglobal\edef#2{#2,#1}%
\fi}
+\def\prependtocommalist#1#2%
+ {\ifx#2\empty
+ \dodoglobal\edef#2{#1}%
+ \else % no test on empty
+ \dodoglobal\edef#2{#1,#2}%
+ \fi}
+
\def\addtocommalist#1#2%
- {\doifelse{#2}{}
- {\dodoglobal\edef#2{#1}}
- {\edef\!!stringa{#2,,}%
- \beforesplitstring#2\at,,\to#2\relax
- \ExpandBothAfter\doifinsetelse{#1}{#2}
- {\resetglobal}
- {\dodoglobal\edef#2{#2,#1}}}}
+ {\ifx#2\empty
+ \dodoglobal\edef#2{#1}%
+ \else
+ \edef\!!stringa{#2,,}%
+ \beforesplitstring#2\at,,\to#2\relax
+ \ExpandBothAfter\doifinsetelse{#1}{#2}
+ {\resetglobal}
+ {\dodoglobal\edef#2{#2,#1}}%
+ \fi}
+
+\def\pretocommalist#1#2%
+ {\ifx#2\empty
+ \dodoglobal\edef#2{#1}%
+ \else
+ \edef\!!stringa{#2,,}%
+ \beforesplitstring#2\at,,\to#2\relax
+ \ExpandBothAfter\doifinsetelse{#1}{#2}
+ {\resetglobal}
+ {\dodoglobal\edef#2{#1,#2}}%
+ \fi}
\def\doremovefromcommalist#1#2#3% nog \doglobal
{\edef\!!stringa{,,#3,,}%
diff --git a/tex/context/base/syst-new.tex b/tex/context/base/syst-new.tex
index 9671d34d9..3d3bee72f 100644
--- a/tex/context/base/syst-new.tex
+++ b/tex/context/base/syst-new.tex
@@ -13,6 +13,24 @@
\unprotect
+\def\unspaced#1%
+ {\dounspaced#1\end}
+
+\def\dounspaced#1%
+ {\ifx#1\end
+ \else\ifx#1\blankspace
+ \@EA\@EA\@EA\dounspaced
+ \else
+ #1\@EA\@EA\@EA\dounspaced
+ \fi\fi}
+
+\def\unspaceargument#1\to#2%
+ {\convertargument#1\to#2%
+ \@EA\edef\@EA#2\@EA{\@EA\unspaced\@EA{#2}}}
+
+\def\unspaceafter#1#2%
+ {\edef\ascii{\dounspaced#2\end}\@EA#1\@EA{\ascii}}
+
\def\inheritparameter[#1]#2[#3]#4[#5]% tag tokey fromkey % [bypasses k!prefix]
{\@EA\@EA\@EA\def\@EA\csname\@EA#1\@EA#3\@EA
\endcsname\@EA{\csname#1#5\endcsname}}
diff --git a/tex/context/base/type-buy.tex b/tex/context/base/type-buy.tex
new file mode 100644
index 000000000..a986aef92
--- /dev/null
+++ b/tex/context/base/type-buy.tex
@@ -0,0 +1,225 @@
+% fallback
+
+\starttypescript [serif] [fallback]
+
+ \definefontsynonym [SerifBold] [Serif]
+ \definefontsynonym [SerifItalic] [Serif]
+ \definefontsynonym [SerifSlanted] [SerifItalic]
+ \definefontsynonym [SerifBoldItalic] [SerifBold]
+ \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic]
+
+\stoptypescript
+
+\starttypescript [sans] [fallback]
+
+ \definefontsynonym [SansBold] [Sans]
+ \definefontsynonym [SansItalic] [Sans]
+ \definefontsynonym [SansSlanted] [SansItalic]
+ \definefontsynonym [SansBoldItalic] [SansBold]
+ \definefontsynonym [SansBoldSlanted] [SansBoldItalic]
+
+\stoptypescript
+
+\starttypescript [mono] [fallback]
+
+ \definefontsynonym [MonoBold] [Mono]
+ \definefontsynonym [MonoItalic] [Mono]
+ \definefontsynonym [MonoSlanted] [MonoItalic]
+ \definefontsynonym [MonoBoldItalic] [MonoBold]
+ \definefontsynonym [MonoBoldSlanted] [MonoBoldItalic]
+
+\stoptypescript
+
+% ITC Officina
+
+\starttypescript [map] [ec,8r,texnansi]
+ \loadmapfile [\typescriptencoding-itc-officina]
+\stoptypescript
+
+\starttypescript [serif] [officina] [name]
+
+ \definefontsynonym [Serif] [OfficinaSerif-Book]
+ \definefontsynonym [SerifItalic] [OfficinaSerif-BookItalic]
+ \definefontsynonym [SerifSlanted] [OfficinaSerif-BookSlanted]
+ \definefontsynonym [SerifBold] [OfficinaSerif-Bold]
+ \definefontsynonym [SerifBoldItalic] [OfficinaSerif-BoldItalic]
+ \definefontsynonym [SerifBoldSlanted][OfficinaSerif-BoldSlanted]
+ \definefontsynonym [SerifCaps] [OfficinaSerif-Caps]
+
+\stoptypescript
+
+\starttypescript [sans] [officina] [name]
+
+ \definefontsynonym [Sans] [OfficinaSans-Book]
+ \definefontsynonym [SansItalic] [OfficinaSans-BookItalic]
+ \definefontsynonym [SansSlanted] [OfficinaSans-BookSlanted]
+ \definefontsynonym [SansBold] [OfficinaSans-Bold]
+ \definefontsynonym [SansBoldItalic] [OfficinaSans-BoldItalic]
+ \definefontsynonym [SansBoldSlanted][OfficinaSans-BoldSlanted]
+ \definefontsynonym [SansCaps] [OfficinaSans-Caps]
+
+\stoptypescript
+
+\starttypescript [serif] [officina] [texnansi,ec,8r]
+
+ \definefontsynonym [OfficinaSerif-Book] [\typescriptencoding-ovbk] [encoding=\typescriptencoding]
+ \definefontsynonym [OfficinaSerif-BookItalic] [\typescriptencoding-ovwi] [encoding=\typescriptencoding]
+ \definefontsynonym [OfficinaSerif-Bold] [\typescriptencoding-ovb] [encoding=\typescriptencoding]
+ \definefontsynonym [OfficinaSerif-BoldItalic] [\typescriptencoding-ovbi] [encoding=\typescriptencoding]
+
+ \definefontsynonym [OfficinaSerif-BookSlanted][\typescriptencoding-ovbk-slanted-167] [encoding=\typescriptencoding]
+ \definefontsynonym [OfficinaSerif-BoldSlanted][\typescriptencoding-ovb-slanted-167] [encoding=\typescriptencoding]
+ \definefontsynonym [OfficinaSerif-Caps] [\typescriptencoding-ovbk-capitalized-800] [encoding=\typescriptencoding]
+
+\stoptypescript
+
+\starttypescript [sans] [officina] [texnansi,ec,8r]
+
+ \definefontsynonym [OfficinaSans-Book] [\typescriptencoding-owbk] [encoding=\typescriptencoding]
+ \definefontsynonym [OfficinaSans-BookItalic] [\typescriptencoding-owwi] [encoding=\typescriptencoding]
+ \definefontsynonym [OfficinaSans-Bold] [\typescriptencoding-owb] [encoding=\typescriptencoding]
+ \definefontsynonym [OfficinaSans-BoldItalic] [\typescriptencoding-owbi] [encoding=\typescriptencoding]
+
+ \definefontsynonym [OfficinaSans-BookSlanted][\typescriptencoding-owbk-slanted-167] [encoding=\typescriptencoding]
+ \definefontsynonym [OfficinaSans-BoldSlanted][\typescriptencoding-owb-slanted-167] [encoding=\typescriptencoding]
+ \definefontsynonym [OfficinaSans-Caps] [\typescriptencoding-owbk-capitalized-800] [encoding=\typescriptencoding]
+
+\stoptypescript
+
+% FontFont Meta
+
+\starttypescript [map] [ec,8r,texnansi]
+ \loadmapfile [\typescriptencoding-ff-meta]
+\stoptypescript
+
+\starttypescript [sans] [meta] [name]
+
+ \definefontsynonym [Sans] [MetaBook-Roman]
+ \definefontsynonym [SansItalic] [MetaBook-Italic]
+ \definefontsynonym [SansSlanted] [MetaBook-Slanted]
+ \definefontsynonym [SansBold] [MetaBold-Roman]
+ \definefontsynonym [SansBoldItalic] [MetaBold-Italic]
+ \definefontsynonym [SansBoldSlanted][MetaBold-Slanted]
+ \definefontsynonym [SansCaps] [MetaBook-Caps]
+
+\stoptypescript
+
+\starttypescript [sans] [meta-lf] [name]
+
+ \definefontsynonym [Sans] [MetaBookLF-Roman]
+ \definefontsynonym [SansBold] [MetaBoldLF-Roman]
+ \definefontsynonym [SansItalic] [MetaBookLF-Italic]
+ \definefontsynonym [SansBoldItalic] [MetaBoldLF-Italic]
+ \definefontsynonym [SansCaps] [MetaBookLF-Caps]
+
+\stoptypescript
+
+\starttypescript [sans] [meta,meta-book] [texnansi,ec,8r]
+
+ \definefontsynonym [MetaBook-Roman] [\typescriptencoding-mtbk] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBook-Italic] [\typescriptencoding-mtbki] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBook-Caps] [\typescriptencoding-mtbkc] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBook-ItalicCaps] [\typescriptencoding-mtbkic] [encoding=\typescriptencoding]
+
+\stoptypescript
+
+\starttypescript [sans] [meta-lf,meta-book-lf] [texnansi,ec,8r]
+
+ \definefontsynonym [MetaBookLF-Roman] [\typescriptencoding-mtbkf] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBookLF-Italic] [\typescriptencoding-mtbkfi] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBookLF-Caps] [\typescriptencoding-mtbkfc] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBookLF-ItalicCaps] [\typescriptencoding-mtbkfic] [encoding=\typescriptencoding]
+
+\stoptypescript
+
+\starttypescript [sans] [meta,meta-bold] [texnansi,ec,8r]
+
+ \definefontsynonym [MetaBold-Roman] [\typescriptencoding-mtbd] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBold-Italic] [\typescriptencoding-mtbdi] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBold-Caps] [\typescriptencoding-mtbdc] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBold-ItalicCaps] [\typescriptencoding-mtbdic] [encoding=\typescriptencoding]
+
+\stoptypescript
+
+\starttypescript [sans] [meta-lf,meta-bold-lf] [texnansi,ec,8r]
+
+ \definefontsynonym [MetaBoldLF-Roman] [\typescriptencoding-mtbdf] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBoldLF-Italic] [\typescriptencoding-mtbdfi] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBoldLF-Caps] [\typescriptencoding-mtbdfc] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBoldLF-ItalicCaps] [\typescriptencoding-mtbdfic] [encoding=\typescriptencoding]
+
+\stoptypescript
+
+\starttypescript [sans] [meta-normal] [texnansi,ec,8r]
+
+ \definefontsynonym [MetaNormal-Roman] [\typescriptencoding-mtn] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaNormal-Italic] [\typescriptencoding-mtni] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaNormal-Caps] [\typescriptencoding-mtnc] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaNormal-ItalicCaps] [\typescriptencoding-mtnic] [encoding=\typescriptencoding]
+
+\stoptypescript
+
+\starttypescript [sans] [meta-normal-lf] [texnansi,ec,8r]
+
+ \definefontsynonym [MetaNormalLF-Roman] [\typescriptencoding-mtnf] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaNormalLF-Italic] [\typescriptencoding-mtnfi] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaNormalLF-Caps] [\typescriptencoding-mtnfc] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaNormalLF-ItalicCaps] [\typescriptencoding-mtnfic] [encoding=\typescriptencoding]
+
+\stoptypescript
+
+\starttypescript [sans] [meta-medium] [texnansi,ec,8r]
+
+ \definefontsynonym [MetaMedium-Roman] [\typescriptencoding-mtm] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaMedium-Italic] [\typescriptencoding-mtmi] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaMedium-Caps] [\typescriptencoding-mtmc] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaMedium-ItalicCaps] [\typescriptencoding-mtmic] [encoding=\typescriptencoding]
+
+\stoptypescript
+
+\starttypescript [sans] [meta-medium-lf] [texnansi,ec,8r]
+
+ \definefontsynonym [MetaMediumLF-Roman] [\typescriptencoding-mtmf] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaMediumLF-Italic] [\typescriptencoding-mtmfi] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaMediumLF-Caps] [\typescriptencoding-mtmfc] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaMediumLF-ItalicCaps] [\typescriptencoding-mtmfic] [encoding=\typescriptencoding]
+
+\stoptypescript
+
+
+\starttypescript [sans] [meta-black] [texnansi,ec,8r]
+
+ \definefontsynonym [MetaBlack-Roman] [\typescriptencoding-mtbl] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBlack-Italic] [\typescriptencoding-mtbli] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBlack-Caps] [\typescriptencoding-mtblc] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBlack-ItalicCaps] [\typescriptencoding-mtblic] [encoding=\typescriptencoding]
+
+\stoptypescript
+
+\starttypescript [sans] [meta-black-lf] [texnansi,ec,8r]
+
+ \definefontsynonym [MetaBlackLF-Roman] [\typescriptencoding-mtblf] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBlackLF-Italic] [\typescriptencoding-mtblfi] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBlackLF-Caps] [\typescriptencoding-mtblfc] [encoding=\typescriptencoding]
+ \definefontsynonym [MetaBlackLF-ItalicCaps] [\typescriptencoding-mtblfic] [encoding=\typescriptencoding]
+
+\stoptypescript
+
+% Lucas Sun, sans
+
+ontsynonym[TheAntiqua-B3Light][texnansi-tantb3][encoding=texnansi]
+ontsynonym[TheAntiqua-B3cLightCaps][texnansi-tantb3c][encoding=texnansi]
+ontsynonym[TheAntiqua-B3iLightItalic][texnansi-tantb3i][encoding=texnansi]
+ontsynonym[TheAntiqua-B4SemiLight][texnansi-tantb4][encoding=texnansi]
+ontsynonym[TheAntiqua-B4cSemiLightCaps][texnansi-tantb4c][encoding=texnansi]
+ontsynonym[TheAntiqua-B4iSemiLightItalic][texnansi-tantb4i][encoding=texnansi
+]
+ontsynonym[TheAntiqua-B5][texnansi-tantb5][encoding=texnansi]
+ontsynonym[TheAntiqua-B5cCaps][texnansi-tantb5c][encoding=texnansi]
+ontsynonym[TheAntiqua-B5iItalic][texnansi-tantb5i][encoding=texnansi]
+ontsynonym[TheAntiqua-B6SemiBold][texnansi-tantb6][encoding=texnansi]
+ontsynonym[TheAntiqua-B6cSemiBoldCaps][texnansi-tantb6c][encoding=texnansi]
+ontsynonym[TheAntiqua-B6iSemiBoldItalic][texnansi-tantb6i][encoding=texnansi]
+ontsynonym[TheAntiqua-B7Bold][texnansi-tantb7][encoding=texnansi]
+ontsynonym[TheAntiqua-B7cBoldCaps][texnansi-tantb7c][encoding=texnansi]
+ontsynonym[TheAntiqua-B7iBoldItalic][texnansi-tantb7i][encoding=texnansi]
diff --git a/tex/context/base/type-enc.tex b/tex/context/base/type-enc.tex
index cb9e14fcc..f70ac000c 100644
--- a/tex/context/base/type-enc.tex
+++ b/tex/context/base/type-enc.tex
@@ -11,7 +11,14 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% Computer Modern Roman
+% texfont --ven=public --col=antt --enc=ec --sou=auto
+% texfont --ven=public --col=antp --enc=ec --sou=auto
+% texfont --ven=urw --col=palatino --enc=ec --sou=auto
+% texfont --ven-lucas --col=sun --enc=ec --sou=.
+
+% Free fonts.
+
+% Computer Modern Roman (AMS)
\starttypescript [all] [computer-modern] [ec]
\definefontsynonym [cmb10] [aeb10] [encoding=ec]
@@ -202,11 +209,68 @@
\definefontsynonym [cmvtt10] [plvtt10] [encoding=pl0]
\stoptypescript
+\starttypescript [all] [computer-modern] [cyr]
+ \definefontsynonym [cmb10] [wcmb10] [encoding=t2a]
+ \definefontsynonym [cmbsy10] [wcmbsy10] [encoding=t2a]
+ \definefontsynonym [cmbx10] [wcmbx10] [encoding=t2a]
+ \definefontsynonym [cmbx12] [wcmbx12] [encoding=t2a]
+ \definefontsynonym [cmbx5] [wcmbx5] [encoding=t2a]
+ \definefontsynonym [cmbx6] [wcmbx6] [encoding=t2a]
+ \definefontsynonym [cmbx7] [wcmbx7] [encoding=t2a]
+ \definefontsynonym [cmbx8] [wcmbx8] [encoding=t2a]
+ \definefontsynonym [cmbx9] [wcmbx9] [encoding=t2a]
+ \definefontsynonym [cmbxsl10] [wcmbxsl10] [encoding=t2a]
+ \definefontsynonym [cmbxti10] [wcmbxti10] [encoding=t2a]
+ \definefontsynonym [cmcsc10] [wcmcsc10] [encoding=t2a]
+ %definefontsynonym [cmdunh10] [wcmdunh10] [encoding=t2a]
+ \definefontsynonym [cminch] [wcminch] [encoding=t2a]
+ \definefontsynonym [cmitt10] [wcmitt10] [encoding=t2a]
+ \definefontsynonym [cmr10] [wcmr10] [encoding=t2a]
+ \definefontsynonym [cmr12] [wcmr12] [encoding=t2a]
+ \definefontsynonym [cmr17] [wcmr17] [encoding=t2a]
+ \definefontsynonym [cmr5] [wcmr5] [encoding=t2a]
+ \definefontsynonym [cmr6] [wcmr6] [encoding=t2a]
+ \definefontsynonym [cmr7] [wcmr7] [encoding=t2a]
+ \definefontsynonym [cmr8] [wcmr8] [encoding=t2a]
+ \definefontsynonym [cmr9] [wcmr9] [encoding=t2a]
+ \definefontsynonym [cmsl10] [wcmsl10] [encoding=t2a]
+ \definefontsynonym [cmsl12] [wcmsl12] [encoding=t2a]
+ \definefontsynonym [cmsl8] [wcmsl8] [encoding=t2a]
+ \definefontsynonym [cmsl9] [wcmsl9] [encoding=t2a]
+ \definefontsynonym [cmsltt10] [wcmsltt10] [encoding=t2a]
+ \definefontsynonym [cmss10] [wcmss10] [encoding=t2a]
+ \definefontsynonym [cmss12] [wcmss12] [encoding=t2a]
+ \definefontsynonym [cmss17] [wcmss17] [encoding=t2a]
+ \definefontsynonym [cmss8] [wcmss8] [encoding=t2a]
+ \definefontsynonym [cmss9] [wcmss9] [encoding=t2a]
+ %definefontsynonym [cmssbi10] [wcmssbi10] [encoding=t2a]
+ \definefontsynonym [cmssbx10] [wcmssbx10] [encoding=t2a]
+ \definefontsynonym [cmssdc10] [wcmssdc10] [encoding=t2a]
+ \definefontsynonym [cmssi10] [wcmssi10] [encoding=t2a]
+ \definefontsynonym [cmssi12] [wcmssi12] [encoding=t2a]
+ \definefontsynonym [cmssi17] [wcmssi17] [encoding=t2a]
+ \definefontsynonym [cmssi8] [wcmssi8] [encoding=t2a]
+ \definefontsynonym [cmssi9] [wcmssi9] [encoding=t2a]
+ \definefontsynonym [cmssq8] [wcmssq8] [encoding=t2a]
+ \definefontsynonym [cmssqi8] [wcmssqi8] [encoding=t2a]
+ \definefontsynonym [cmti10] [wcmti10] [encoding=t2a]
+ \definefontsynonym [cmti12] [wcmti12] [encoding=t2a]
+ \definefontsynonym [cmti7] [wcmti7] [encoding=t2a]
+ \definefontsynonym [cmti8] [wcmti8] [encoding=t2a]
+ \definefontsynonym [cmti9] [wcmti9] [encoding=t2a]
+ \definefontsynonym [cmtt10] [wcmtt10] [encoding=t2a]
+ \definefontsynonym [cmtt12] [wcmtt12] [encoding=t2a]
+ \definefontsynonym [cmtt8] [wcmtt8] [encoding=t2a]
+ \definefontsynonym [cmtt9] [wcmtt9] [encoding=t2a]
+ \definefontsynonym [cmu10] [wcmu10] [encoding=t2a]
+ %definefontsynonym [cmvtt10] [wcmvtt10] [encoding=t2a]
+\stoptypescript
+
\starttypescript [serif] [computer-modern] [default]
\definefontsynonym [ComputerModern] [cmr10]
- \definefontsynonym [ComputerModern-Bold] [cmbx10]
\definefontsynonym [ComputerModern-Italic] [cmti10]
\definefontsynonym [ComputerModern-Slanted] [cmsl10]
+ \definefontsynonym [ComputerModern-Bold] [cmbx10]
\definefontsynonym [ComputerModern-BoldItalic] [cmbxti10]
\definefontsynonym [ComputerModern-BoldSlanted] [cmbxsl10]
\definefontsynonym [ComputerModern-Caps] [cmr10]
@@ -214,9 +278,9 @@
\starttypescript [sans] [computer-modern] [default]
\definefontsynonym [ComputerModernSans] [cmss10]
- \definefontsynonym [ComputerModernSans-Bold] [cmssbx10]
\definefontsynonym [ComputerModernSans-Italic] [cmssi10]
\definefontsynonym [ComputerModernSans-Slanted] [cmssi10]
+ \definefontsynonym [ComputerModernSans-Bold] [cmssbx10]
\definefontsynonym [ComputerModernSans-BoldItalic] [cmssbx10]
\definefontsynonym [ComputerModernSans-BoldSlanted] [cmssbx10]
\definefontsynonym [ComputerModernSans-Caps] [cmss10]
@@ -224,9 +288,9 @@
\starttypescript [mono] [computer-modern] [default]
\definefontsynonym [ComputerModernMono] [cmtt10]
- \definefontsynonym [ComputerModernMono-Bold] [cmtt10]
\definefontsynonym [ComputerModernMono-Italic] [cmitt10]
\definefontsynonym [ComputerModernMono-Slanted] [cmsltt10]
+ \definefontsynonym [ComputerModernMono-Bold] [cmtt10]
\definefontsynonym [ComputerModernMono-BoldItalic] [cmtt10]
\definefontsynonym [ComputerModernMono-BoldSlanted] [cmtt10]
\definefontsynonym [ComputerModernMono-Caps] [cmtt10]
@@ -239,19 +303,19 @@
\definefontsynonym [ComputerModernMath-Symbol] [cmsy10]
\stoptypescript
-% Computer Concrete
+% Computer Concrete (AMS)
\starttypescript [serif] [concrete] [default]
- \definefontsynonym [ComputerConcrete] [ccr10]
- \definefontsynonym [ComputerConcrete] [ccr10]
- \definefontsynonym [ComputerConcrete-Italic] [ccti10]
- \definefontsynonym [ComputerConcrete-Slanted] [ccsl10]
- \definefontsynonym [ComputerConcrete-Italic] [ccti10]
- \definefontsynonym [ComputerConcrete-Slanted] [ccsl10]
- \definefontsynonym [ComputerConcrete-Caps] [cccsc10]
+ \definefontsynonym [ComputerConcrete] [ccr10]
+ \definefontsynonym [ComputerConcrete-Italic] [ccti10]
+ \definefontsynonym [ComputerConcrete-Slanted] [ccsl10]
+ \definefontsynonym [ComputerConcrete-Bold] [ComputerConcrete]
+ \definefontsynonym [ComputerConcrete-BoldItalic] [ComputerConcrete-Italic]
+ \definefontsynonym [ComputerConcrete-BoldSlanted] [ComputerConcrete-Slanted]
+ \definefontsynonym [ComputerConcrete-Caps] [cccsc10]
\stoptypescript
-% Euler
+% Euler (AMS)
\starttypescript [math] [euler] [default]
\definefontsynonym [Euler-Extension] [euex10]
@@ -261,78 +325,50 @@
\definefontsynonym [Euler-SymbolC] [eufm10]
\stoptypescript
-% AMS
+% AMS (AMS)
\starttypescript [math] [ams] [default]
\definefontsynonym [AMS-SymbolA] [msam10]
\definefontsynonym [AMS-SymbolB] [msbm10]
\stoptypescript
-% Courier
+% Courier (URW)
-\starttypescript [mono] [courier] [texnansi]
- \definefontsynonym [Courier] [com] [encoding=texnansi]
- \definefontsynonym [Courier-Oblique] [coo] [encoding=texnansi]
- \definefontsynonym [Courier-Bold] [cob] [encoding=texnansi]
- \definefontsynonym [Courier-BoldOblique] [cobo] [encoding=texnansi]
+\starttypescript [mono] [courier] [texnansi,ec,8r]
+ \definefontsynonym [Courier] [\typefaceencoding-ucrr8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Courier-Bold] [\typefaceencoding-ucrb8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Courier-Oblique] [\typefaceencoding-ucrro8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Courier-BoldOblique] [\typefaceencoding-ucrbo8a] [encoding=\typefaceencoding]
\stoptypescript
-\starttypescript [mono] [courier] [ec]
- \definefontsynonym [Courier] [pcrr8t] [encoding=ec]
- \definefontsynonym [Courier-Bold] [pcrb8t] [encoding=ec]
- \definefontsynonym [Courier-Oblique] [pcrro8t] [encoding=ec]
- \definefontsynonym [Courier-BoldOblique] [pcrbo8t] [encoding=ec]
-\stoptypescript
-
-% Helvetica
+% Helvetica (URW)
-\starttypescript [sans] [helvetica] [texnansi]
- \definefontsynonym [Helvetica] [hv] [encoding=texnansi]
- \definefontsynonym [Helvetica-Oblique] [hvo] [encoding=texnansi]
- \definefontsynonym [Helvetica-Bold] [hvb] [encoding=texnansi]
- \definefontsynonym [Helvetica-BoldOblique] [hvbo] [encoding=texnansi]
+\starttypescript [sans] [helvetica] [texnansi,ec,8r]
+ \definefontsynonym [Helvetica] [\typefaceencoding-uhvr8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Helvetica-Italic] [\typefaceencoding-uhvri8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Helvetica-Oblique] [\typefaceencoding-uhvro8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Helvetica-Bold] [\typefaceencoding-uhvb8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Helvetica-BoldItalic] [\typefaceencoding-uhvbi8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Helvetica-BoldOblique] [\typefaceencoding-uhvbo8a] [encoding=\typefaceencoding]
\stoptypescript
-\starttypescript [sans] [helvetica] [ec]
- \definefontsynonym [Helvetica] [phvr8t] [encoding=ec]
- \definefontsynonym [Helvetica-Oblique] [phvro8t] [encoding=ec]
- \definefontsynonym [Helvetica-Bold] [phvb8t] [encoding=ec]
- \definefontsynonym [Helvetica-BoldOblique] [phvbo8t] [encoding=ec]
-\stoptypescript
+% Times Roman (URW)
-\starttypescript [math] [helvetica] [default]
- \definefontsynonym [Helvetica-MathRoman] [hvrm10t1]
- \definefontsynonym [Helvetica-MathExtendedSymbols] [hvex10]
- \definefontsynonym [Helvetica-MathItalics] [hvmi10]
- \definefontsynonym [Helvetica-MathSymbols] [hvsy10]
-\stoptypescript
+\starttypescript [serif] [times] [texnansi,ec,8r]
+ \definefontsynonym [Times-Roman] [\typefaceencoding-utmr8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Times-Italic] [\typefaceencoding-utmri8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Times-Bold] [\typefaceencoding-utmb8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Times-BoldItalic] [\typefaceencoding-utmbi8a] [encoding=\typefaceencoding]
-% Times Roman
+ \definefontsynonym [Times-Slanted] [\typefaceencoding-utmr8a-slanted-167] [encoding=\typefaceencoding]
+ \definefontsynonym [Times-BoldSlanted] [\typefaceencoding-utmb8a-slanted-167] [encoding=\typefaceencoding]
-\starttypescript [serif] [times] [texnansi]
- \definefontsynonym [Times-Roman] [tir] [encoding=texnansi]
- \definefontsynonym [Times-Italic] [tii] [encoding=texnansi]
- \definefontsynonym [Times-Bold] [tib] [encoding=texnansi]
- \definefontsynonym [Times-BoldItalic] [tibi] [encoding=texnansi]
+ \definefontsynonym [Times] [Times-Roman]
\stoptypescript
-\starttypescript [serif] [times] [ec]
- \definefontsynonym [Times-Roman] [ptmr8t] [encoding=ec]
- \definefontsynonym [Times-Italic] [ptmri8t] [encoding=ec]
- \definefontsynonym [Times-Bold] [ptmb8t] [encoding=ec]
- \definefontsynonym [Times-BoldItalic] [ptmbi8t] [encoding=ec]
-\stoptypescript
+% Math Times (tx)
-% Math Times
-
-\starttypescript [math] [times] [texnansi]
- \definefontsynonym [Times-MathRoman] [tir] [encoding=texnansi]
- \definefontsynonym [Times-MathExtension] [mtex]
- \definefontsynonym [Times-MathItalic] [mtmi] [skewcharmi='177]
- \definefontsynonym [Times-MathSymbol] [mtsy] [skewcharmi='60]
-\stoptypescript
-
-\starttypescript [math] [tx] [ec]
+\starttypescript [math] [times] [ec]
\definefontsynonym [Times-Roman-Upright] [t1xr] [encoding=ec]
\definefontsynonym [Times-Roman-Italic] [t1xi] [encoding=ec]
\definefontsynonym [Times-Roman-Slanted] [t1xsl] [encoding=ec]
@@ -345,12 +381,135 @@
\definefontsynonym [Times-Math-Extension] [txex]
\definefontsynonym [Times-Math-SymbolsA] [txsya]
\definefontsynonym [Times-Math-SymbolsB] [txsyb]
- \definefontsynonym [Times-Math-SymbolsC] [txsyc]
+ \definefontsynonym [Times-Math-SymbolsC] [txsyc]
\definefontsynonym [Times-Math-Italic-A] [txmia]
\definefontsynonym [Times-Math-Extension-A] [txexa]
\stoptypescript
-% Lucida Bright
+% Antykwa Torunska (GUST)
+
+\starttypescript [serif] [antykwa-torunska] [texnansi,ec,8r]
+ \definefontsynonym [AntykwaTorunska-Regular] [\typefaceencoding-anttr] [encoding=\typefaceencoding]
+ \definefontsynonym [AntykwaTorunska-Bold] [\typefaceencoding-anttb] [encoding=\typefaceencoding]
+ \definefontsynonym [AntykwaTorunska-Italic] [\typefaceencoding-anttri] [encoding=\typefaceencoding]
+\stoptypescript
+
+% Antykwa Polstawskiego (GUST)
+
+\starttypescript [serif] [antykwa-poltawskiego] [texnansi,ec,8r]
+ \definefontsynonym [AntykwaPoltawskiego-Regular] [\typefaceencoding-antpr] [encoding=\typefaceencoding]
+ \definefontsynonym [AntykwaPoltawskiego-Bold] [\typefaceencoding-antpb] [encoding=\typefaceencoding]
+ \definefontsynonym [AntykwaPoltawskiego-Italic] [\typefaceencoding-antpri] [encoding=\typefaceencoding]
+ \definefontsynonym [AntykwaPoltawskiego-BoldItalic] [\typefaceencoding-antpbi] [encoding=\typefaceencoding]
+\stoptypescript
+
+% Palatino (URW)
+
+\starttypescript [serif] [palatino] [texnansi,ec,8r]
+ \definefontsynonym [Palatino] [\typefaceencoding-uplr8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Palatino-Italic] [\typefaceencoding-uplri8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Palatino-Bold] [\typefaceencoding-uplb8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Palatino-BoldItalic] [\typefaceencoding-uplbi8a] [encoding=\typefaceencoding]
+
+ \definefontsynonym [Palatino-Slanted] [\typefaceencoding-uplr8a-slanted-167] [encoding=\typefaceencoding]
+ \definefontsynonym [Palatino-BoldSlanted] [\typefaceencoding-uplb8a-slanted-167] [encoding=\typefaceencoding]
+ \definefontsynonym [Palatino-Caps] [\typefaceencoding-uplr8a-capitalized-800] [encoding=\typefaceencoding]
+\stoptypescript
+
+% Palatino Math (PX)
+
+\starttypescript [math] [palatino] [ec]
+ \definefontsynonym [Palatino-Roman-Upright] [p1xr] [encoding=ec]
+ \definefontsynonym [Palatino-Roman-Italic] [p1xi] [encoding=ec]
+ \definefontsynonym [Palatino-Roman-Slanted] [p1xsl] [encoding=ec]
+ \definefontsynonym [Palatino-Roman-Caps] [p1xsc] [encoding=ec]
+ \definefontsynonym [Palatino-Companion-Upright] [pcxr]
+ \definefontsynonym [Palatino-Companion-Italic] [pcxi]
+ \definefontsynonym [Palatino-Companion-Slanted] [pcxsl]
+ \definefontsynonym [Palatino-Math-Italic] [pxmi]
+ \definefontsynonym [Palatino-Math-Symbols] [pxsy]
+ \definefontsynonym [Palatino-Math-Extension] [pxex]
+ \definefontsynonym [Palatino-Math-SymbolsA] [pxsya]
+ \definefontsynonym [Palatino-Math-SymbolsB] [pxsyb]
+ \definefontsynonym [Palatino-Math-SymbolsC] [pxsyc]
+ \definefontsynonym [Palatino-Math-Italic-A] [pxmia]
+ \definefontsynonym [Palatino-Math-Extension-A] [pxexa]
+\stoptypescript
+
+% Bookman (URW)
+
+\starttypescript [serif] [bookman] [ec,texnansi,8r]
+ \definefontsynonym [Bookman-Light] [\typefaceencoding-ubkl8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Bookman-LightItalic] [\typefaceencoding-ubkli8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Bookman-DemiBold] [\typefaceencoding-ubkd8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Bookman-DemiBoldItalic] [\typefaceencoding-ubkdi8a] [encoding=\typefaceencoding]
+
+ \definefontsynonym [Bookman-LightSlanted] [\typefaceencoding-ubkl8a-slanted-167] [encoding=\typefaceencoding]
+ \definefontsynonym [Bookman-DemiBoldSlanted] [\typefaceencoding-ubkd8a-slanted-167] [encoding=\typefaceencoding]
+ \definefontsynonym [Bookman-Light-Caps] [\typefaceencoding-ubkl8a-capitalized-800] [encoding=\typefaceencoding]
+\stoptypescript
+
+% Chancery (URW)
+
+\starttypescript [calligraphy] [chancery] [ec,texnansi,8r]
+ \definefontsynonym [Chancery] [\typefaceencoding-uzcmi8a] [encoding=\typefaceencoding]
+\stoptypescript
+
+% Utopia (Adobe)
+
+\starttypescript [serif] [utopia] [ec,texnansi]
+ \definefontsynonym [Utopia-Regular] [\typefaceencoding-putr8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Utopia-Italic] [\typefaceencoding-putri8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Utopia-Bold] [\typefaceencoding-putb8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Utopia-BoldItalic] [\typefaceencoding-putbi8a] [encoding=\typefaceencoding]
+
+ \definefontsynonym [Utopia-Slanted] [\typefaceencoding-putr8a-slanted-167] [encoding=\typefaceencoding]
+ \definefontsynonym [Utopia-BoldSlanted] [\typefaceencoding-putb8a-slanted-167] [encoding=\typefaceencoding]
+ \definefontsynonym [Utopia-Regular-Caps][\typefaceencoding-putr8a-capitalized-800] [encoding=\typefaceencoding]
+\stoptypescript
+
+% Charter (Bitstream)
+
+\starttypescript [serif] [charter] [ec,texnansi,8r]
+ \definefontsynonym [Charter-Roman] [\typefaceencoding-bchr8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Charter-Italic] [\typefaceencoding-bchri8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Charter-Bold] [\typefaceencoding-bchb8a] [encoding=\typefaceencoding]
+ \definefontsynonym [Charter-BoldItalic] [\typefaceencoding-bchbi8a] [encoding=\typefaceencoding]
+
+ \definefontsynonym [Charter-Slanted] [\typefaceencoding-bchr8a-slanted-167] [encoding=\typefaceencoding]
+ \definefontsynonym [Charter-BoldSlanted][\typefaceencoding-bchb8a-slanted-167] [encoding=\typefaceencoding]
+ \definefontsynonym [Charter-Roman-Caps] [\typefaceencoding-bchr8a-capitalized-800] [encoding=\typefaceencoding]
+\stoptypescript
+
+% Whatever else we need:
+
+\starttypescript
+ \definefontsynonym [ZapfDingbats] [uzdr]
+ \definefontsynonym [RalfSmithFormalScript] [rsfs10]
+ \definefontsynonym [MartinVogel] [fmvr8x]
+\stoptypescript
+
+% Commercial fonts / still to be sorted out
+
+% Informal (VTEX)
+
+\starttypescript [casual] [informal] [default]
+ \definefontsynonym [Informal-Regular] [ifrm10cm]
+ \definefontsynonym [Informal-Bold] [ifrb10cm]
+ \definefontsynonym [Informal-Oblique] [ifro10cm]
+ \definefontsynonym [Informal-BoldOblique] [ifbo10cm]
+\stoptypescript
+
+% Informal Math (VTEX)
+
+\starttypescript [math] [informal] [default]
+ \definefontsynonym [Informal-Regular] [ifrm10cm]
+ \definefontsynonym [Informal-MathExtendedSymbols] [ifex10]
+ \definefontsynonym [Informal-MathItalics] [ifmi10]
+ \definefontsynonym [Informal-MathSymbols] [ifsy10]
+\stoptypescript
+
+% Lucida Bright (BH)
\starttypescript [serif] [lucida] [texnansi]
\definefontsynonym [LucidaBright] [lbr] [encoding=texnansi]
@@ -362,15 +521,6 @@
\definefontsynonym [LucidaBright-Oblique] [lbsl] [encoding=texnansi]
\stoptypescript
-\starttypescript [serif] [lucida] [ec]
- \definefontsynonym [LucidaBright] [hlhr8t] [encoding=ec]
- \definefontsynonym [LucidaBright-Demi] [hlhb8t] [encoding=ec]
- \definefontsynonym [LucidaBright-Italic] [hlhri8t] [encoding=ec]
- \definefontsynonym [LucidaBright-Oblique] [hlhro8t] [encoding=ec]
- \definefontsynonym [LucidaBright-DemiItalic] [hlhbi8t] [encoding=ec]
- \definefontsynonym [LucidaBrightSmallcaps] [hlhrc8t] [encoding=ec]
-\stoptypescript
-
\starttypescript [sans] [lucida] [texnansi]
\definefontsynonym [LucidaSans] [lsr] [encoding=texnansi]
\definefontsynonym [LucidaSans-Demi] [lsd] [encoding=texnansi]
@@ -380,13 +530,6 @@
\definefontsynonym [LucidaSans-BoldItalic] [lsbi] [encoding=texnansi]
\stoptypescript
-\starttypescript [sans] [lucida] [ec]
- \definefontsynonym [LucidaSans] [hlsr8t] [encoding=ec]
- \definefontsynonym [LucidaSans-Demi] [hlsb8t] [encoding=ec]
- \definefontsynonym [LucidaSans-Italic] [hlsri8t] [encoding=ec]
- \definefontsynonym [LucidaSans-DemiItalic] [hlsbi8t] [encoding=ec]
-\stoptypescript
-
\starttypescript [mono] [lucida] [texnansi]
\definefontsynonym [LucidaSans-Typewriter] [lstr] [encoding=texnansi]
\definefontsynonym [LucidaSans-TypewriterBold] [lstb] [encoding=texnansi]
@@ -394,14 +537,8 @@
\definefontsynonym [LucidaSans-TypewriterOblique] [lsto] [encoding=texnansi]
\stoptypescript
-\starttypescript [mono] [lucida] [ec]
- \definefontsynonym [LucidaSans-Typewriter] [hlsrt8t] [encoding=ec]
- \definefontsynonym [LucidaSans-TypewriterBold] [hlsbt8t] [encoding=ec]
- \definefontsynonym [LucidaSans-TypewriterOblique] [hlsrot8t] [encoding=ec]
- \definefontsynonym [LucidaSans-TypewriterBoldOblique] [hlsbot8t] [encoding=ec]
-\stoptypescript
-
\starttypescript [math] [lucida] [texnansi]
+ \definefontsynonym [LucidaBright] [lbr] [encoding=texnansi]
\definefontsynonym [LucidaNewMath-AltItalic] [lbmo]
\definefontsynonym [LucidaNewMath-Arrows] [lbma]
\definefontsynonym [LucidaNewMath-Extension] [lbme]
@@ -420,32 +557,10 @@
\definefontsynonym [LucidaNewMath-Symbol-Demi] [lbmsd]
\stoptypescript
-\starttypescript [math] [lucida] [ec]
- \definefontsynonym [LucidaNewMath-AltItalic] [hlcrima]
- \definefontsynonym [LucidaNewMath-Arrows] [hlcra]
- \definefontsynonym [LucidaNewMath-Extension] [hlcrv]
- \definefontsynonym [LucidaNewMath-Roman] [hlcrm]
- \definefontsynonym [LucidaNewMath-Italic] [hlcrim]
- \definefontsynonym [LucidaNewMath-Symbol] [hlcry]
-\stoptypescript
-
-\starttypescript [boldmath] [lucida] [ec]
- \definefontsynonym [LucidaNewMath-AltDemiItalic] [hlcdima]
- \definefontsynonym [LucidaNewMath-Arrows-Demi] [hlcda]
- \definefontsynonym [LucidaNewMath-Extension] [hlcrv]
- \definefontsynonym [LucidaNewMath-Demibold] [hlcdm]
- \definefontsynonym [LucidaNewMath-DemiItalic] [hlcdim]
- \definefontsynonym [LucidaNewMath-Symbol-Demi] [hlcdy]
-\stoptypescript
-
\starttypescript [calligraphy] [lucida] [texnansi]
\definefontsynonym [LucidaCalligraphy-Italic] [lbc] [encoding=texnansi]
\stoptypescript
-\starttypescript [calligraphy] [lucida] [ec]
- \definefontsynonym [LucidaCalligraphy-Italic] [hlcrie8t] [encoding=ec]
-\stoptypescript
-
\starttypescript [casual] [lucida] [texnansi]
\definefontsynonym [LucidaCasual] [lbkr] [encoding=texnansi]
\definefontsynonym [LucidaCasual-Italic] [lbki] [encoding=texnansi]
@@ -455,10 +570,6 @@
\definefontsynonym [LucidaHandwriting-Italic] [lbh] [encoding=texnansi]
\stoptypescript
-\starttypescript [handwriting] [lucida] [ec]
- \definefontsynonym [LucidaHandwriting-Italic] [hlcriw8t] [encoding=ec]
-\stoptypescript
-
\starttypescript [fax] [lucida] [texnansi]
\definefontsynonym [LucidaFax] [lfr] [encoding=texnansi]
\definefontsynonym [LucidaFax-Demi] [lfd] [encoding=texnansi]
@@ -466,92 +577,179 @@
\definefontsynonym [LucidaFax-Italic] [lfi] [encoding=texnansi]
\stoptypescript
-% Informal
-
-\starttypescript [casual] [informal] [default]
- \definefontsynonym [Informal-Regular] [ifrm10cm]
- \definefontsynonym [Informal-Bold] [ifrb10cm]
- \definefontsynonym [Informal-Oblique] [ifro10cm]
- \definefontsynonym [Informal-BoldOblique] [ifbo10cm]
-\stoptypescript
-
-% Informal Math
-
-\starttypescript [math] [informal] [default]
- \definefontsynonym [Informal-Regular] [ifrm10cm]
- \definefontsynonym [Informal-MathExtendedSymbols] [ifex10]
- \definefontsynonym [Informal-MathItalics] [ifmi10]
- \definefontsynonym [Informal-MathSymbols] [ifsy10]
-\stoptypescript
-
-% Antikwa Torunska
-
-\starttypescript [serif] [antykwa-torunska] [texnansi]
- \definefontsynonym [AntykwaTorunska-Bold] [anttb] [encoding=texnansi]
- \definefontsynonym [AntykwaTorunska-Regular] [anttr] [encoding=texnansi]
- \definefontsynonym [AntykwaTorunska-Italic] [anttri] [encoding=texnansi]
-\stoptypescript
-
-\starttypescript [serif] [antykwa-torunska] [ec]
- \definefontsynonym [AntykwaTorunska-Regular] [zatr8t] [encoding=ec]
- \definefontsynonym [AntykwaTorunska-Italic] [zatri8t] [encoding=ec]
- \definefontsynonym [AntykwaTorunska-Bold] [zatb8t] [encoding=ec]
-\stoptypescript
-
-% Baskerville
-
-\starttypescript [serif] [baskerville] [ec]
- \definefontsynonym [Baskerville] [mbvr8t] [encoding=ec]
- \definefontsynonym [Baskerville-Italic] [mbvri8t] [encoding=ec]
- \definefontsynonym [Baskerville-Bold] [mbvb8t] [encoding=ec]
- \definefontsynonym [Baskerville-BoldItalic] [mbvbi8t] [encoding=ec]
- \definefontsynonym [Baskerville-SemiBold] [mbvs8t] [encoding=ec]
- \definefontsynonym [Baskerville-SemiBoldItalic] [mbvsi8t] [encoding=ec]
-\stoptypescript
+% \starttypescript [serif] [lucida] [ec]
+% \definefontsynonym [LucidaBright] [hlhr8t] [encoding=ec]
+% \definefontsynonym [LucidaBright-Demi] [hlhb8t] [encoding=ec]
+% \definefontsynonym [LucidaBright-Italic] [hlhri8t] [encoding=ec]
+% \definefontsynonym [LucidaBright-Oblique] [hlhro8t] [encoding=ec]
+% \definefontsynonym [LucidaBright-DemiItalic] [hlhbi8t] [encoding=ec]
+% \definefontsynonym [LucidaBrightSmallcaps] [hlhrc8t] [encoding=ec]
+% \stoptypescript
+%
+% \starttypescript [sans] [lucida] [ec]
+% \definefontsynonym [LucidaSans] [hlsr8t] [encoding=ec]
+% \definefontsynonym [LucidaSans-Demi] [hlsb8t] [encoding=ec]
+% \definefontsynonym [LucidaSans-Italic] [hlsri8t] [encoding=ec]
+% \definefontsynonym [LucidaSans-DemiItalic] [hlsbi8t] [encoding=ec]
+% \stoptypescript
+%
+% \starttypescript [mono] [lucida] [ec]
+% \definefontsynonym [LucidaSans-Typewriter] [hlsrt8t] [encoding=ec]
+% \definefontsynonym [LucidaSans-TypewriterBold] [hlsbt8t] [encoding=ec]
+% \definefontsynonym [LucidaSans-TypewriterOblique] [hlsrot8t] [encoding=ec]
+% \definefontsynonym [LucidaSans-TypewriterBoldOblique] [hlsbot8t] [encoding=ec]
+% \stoptypescript
+%
+% \starttypescript [math] [lucida] [ec]
+% \definefontsynonym [LucidaBright] [hlhr8t] [encoding=ec]
+% \definefontsynonym [LucidaNewMath-AltItalic] [hlcrima]
+% \definefontsynonym [LucidaNewMath-Arrows] [hlcra]
+% \definefontsynonym [LucidaNewMath-Extension] [hlcrv]
+% \definefontsynonym [LucidaNewMath-Roman] [hlcrm]
+% \definefontsynonym [LucidaNewMath-Italic] [hlcrim]
+% \definefontsynonym [LucidaNewMath-Symbol] [hlcry]
+% \stoptypescript
+%
+% \starttypescript [boldmath] [lucida] [ec]
+% \definefontsynonym [LucidaNewMath-AltDemiItalic] [hlcdima]
+% \definefontsynonym [LucidaNewMath-Arrows-Demi] [hlcda]
+% \definefontsynonym [LucidaNewMath-Extension] [hlcrv]
+% \definefontsynonym [LucidaNewMath-Demibold] [hlcdm]
+% \definefontsynonym [LucidaNewMath-DemiItalic] [hlcdim]
+% \definefontsynonym [LucidaNewMath-Symbol-Demi] [hlcdy]
+% \stoptypescript
+%
+% \starttypescript [calligraphy] [lucida] [ec]
+% \definefontsynonym [LucidaCalligraphy-Italic] [hlcrie8t] [encoding=ec]
+% \stoptypescript
+%
+% \starttypescript [handwriting] [lucida] [ec]
+% \definefontsynonym [LucidaHandwriting-Italic] [hlcriw8t] [encoding=ec]
+% \stoptypescript
+
+% \definefontsynonym [Helvetica-MathRoman] [hvrm10t1]
+% \definefontsynonym [Helvetica-MathExtendedSymbols] [hvex10]
+% \definefontsynonym [Helvetica-MathItalics] [hvmi10]
+% \definefontsynonym [Helvetica-MathSymbols] [hvsy10]
+
+% \definefontsynonym [Times-MathRoman] [tir] [encoding=texnansi]
+% \definefontsynonym [Times-MathExtension] [mtex]
+% \definefontsynonym [Times-MathItalic] [mtmi] [skewcharmi='177]
+% \definefontsynonym [Times-MathSymbol] [mtsy] [skewcharmi='60]
+
+%D For those who want to use the existing tfm and vf files we
+%D provide:
+
+\starttypescript [berry] [8r]
+
+\definefontsynonym [8r-utmr8a] [ptmr8r]
+\definefontsynonym [8r-utmri8a] [ptmri8r]
+\definefontsynonym [8r-utmb8a] [ptmb8r]
+\definefontsynonym [8r-utmbi8a] [ptmbi8r]
+
+\definefontsynonym [8r-utmr8a-slanted-167] [ptmro8r]
+\definefontsynonym [8r-utmb8a-slanted-167] [ptmbo8r]
+
+\definefontsynonym [8r-uhvr8a] [phvr8r]
+\definefontsynonym [8r-uhvo8a] [phvro8r]
+\definefontsynonym [8r-uhvb8a] [phvb8r]
+\definefontsynonym [8r-uhvbo8a] [phvbo8r]
+
+\definefontsynonym [8r-ucrr8a] [pcrr8r]
+\definefontsynonym [8r-ucrb8a] [pcrb8r]
+\definefontsynonym [8r-ucrro8a] [pcrro8r]
+\definefontsynonym [8r-ucrbo8a] [pcrbo8r]
+
+\definefontsynonym [8r-uplr8a] [uplr8r]
+\definefontsynonym [8r-uplri8a] [uplri8r]
+\definefontsynonym [8r-uplb8a] [uplb8r]
+\definefontsynonym [8r-uplbi8a] [uplbi8r]
+\definefontsynonym [8r-uplr8a-slanted-167] [uplro8r]
+\definefontsynonym [8r-uplb8a-slanted-167] [uplbo8r]
+\definefontsynonym [8r-uplr8a-capitalized-800] [uplr8r]
+
+\definefontsynonym [8r-ubkl8a] [ubkl8r]
+\definefontsynonym [8r-ubkli8a] [ubkli8r]
+\definefontsynonym [8r-ubkd8a] [ubkd8r]
+\definefontsynonym [8r-ubkdi8a] [ubkdi8r]
+\definefontsynonym [8r-ubkl8a-slanted-167] [ubklo8r]
+\definefontsynonym [8r-ubkd8a-slanted-167] [ubkdo8r]
+\definefontsynonym [8r-ubkl8a-capitalized-800] [ubkl8r]
+
+\definefontsynonym [8r-uzcmi8a] [uzcmi8r]
+
+\definefontsynonym [8r-putr8a] [putr8r]
+\definefontsynonym [8r-putri8a] [putri8r]
+\definefontsynonym [8r-putb8a] [putr8r]
+\definefontsynonym [8r-putbi8a] [putbi8r]
+\definefontsynonym [8r-putr8a-slanted-167] [putro8r]
+\definefontsynonym [8r-putb8a-slanted-167] [putbo8r]
+\definefontsynonym [8r-putr8a-capitalized-800] [putr8r]
+
+\definefontsynonym [8r-bchr8a] [bchr8r]
+\definefontsynonym [8r-bchri8a] [bchri8r]
+\definefontsynonym [8r-bchb8a] [bchb8r]
+\definefontsynonym [8r-bchbi8a] [bchbi8r]
+\definefontsynonym [8r-bchr8a-slanted-167] [bchro8r]
+\definefontsynonym [8r-bchb8a-slanted-167] [bchbo8r]
+\definefontsynonym [8r-bchr8a-capitalized-800] [bchr8r]
+
+\stoptypescript
+
+\starttypescript [berry] [ec]
+
+\definefontsynonym [ec-utmr8a] [ptmr8t]
+\definefontsynonym [ec-utmri8a] [ptmri8t]
+\definefontsynonym [ec-utmb8a] [ptmb8t]
+\definefontsynonym [ec-utmbi8a] [ptmbi8t]
+
+\definefontsynonym [ec-utmr8a-slanted-167] [ptmro8t]
+\definefontsynonym [ec-utmb8a-slanted-167] [ptmbo8t]
+
+\definefontsynonym [ec-uhvr8a] [phvr8t]
+\definefontsynonym [ec-uhvo8a] [phvro8t]
+\definefontsynonym [ec-uhvb8a] [phvb8t]
+\definefontsynonym [ec-uhvbo8a] [phvbo8t]
+
+\definefontsynonym [ec-ucrr8a] [pcrr8t]
+\definefontsynonym [ec-ucrb8a] [pcrb8t]
+\definefontsynonym [ec-ucrro8a] [pcrro8t]
+\definefontsynonym [ec-ucrbo8a] [pcrbo8t]
+
+\definefontsynonym [ec-uplr8a] [uplr8t]
+\definefontsynonym [ec-uplri8a] [uplri8t]
+\definefontsynonym [ec-uplb8a] [uplb8t]
+\definefontsynonym [ec-uplbi8a] [uplbi8t]
+\definefontsynonym [ec-uplr8a-slanted-167] [uplro8t]
+\definefontsynonym [ec-uplb8a-slanted-167] [uplbo8t]
+\definefontsynonym [ec-uplr8a-capitalized-800] [uplr8t]
+
+\definefontsynonym [ec-ubkl8a] [ubkl8t]
+\definefontsynonym [ec-ubkli8a] [ubkli8t]
+\definefontsynonym [ec-ubkd8a] [ubkd8t]
+\definefontsynonym [ec-ubkdi8a] [ubkdi8t]
+\definefontsynonym [ec-ubkl8a-slanted-167] [ubklo8t]
+\definefontsynonym [ec-ubkd8a-slanted-167] [ubkdo8t]
+\definefontsynonym [ec-ubkl8a-capitalized-800] [ubkl8t]
+
+\definefontsynonym [ec-uzcmi8a] [uzcmi8t]
+
+\definefontsynonym [ec-putr8a] [putr8t]
+\definefontsynonym [ec-putri8a] [putri8t]
+\definefontsynonym [ec-putb8a] [putr8t]
+\definefontsynonym [ec-putbi8a] [putbi8t]
+\definefontsynonym [ec-putr8a-slanted-167] [putro8t]
+\definefontsynonym [ec-putb8a-slanted-167] [putbo8t]
+\definefontsynonym [ec-putr8a-capitalized-800] [putr8t]
+
+\definefontsynonym [ec-bchr8a] [bchr8t]
+\definefontsynonym [ec-bchri8a] [bchri8t]
+\definefontsynonym [ec-bchb8a] [bchb8t]
+\definefontsynonym [ec-bchbi8a] [bchbi8t]
+\definefontsynonym [ec-bchr8a-slanted-167] [bchro8t]
+\definefontsynonym [ec-bchb8a-slanted-167] [bchbo8t]
+\definefontsynonym [ec-bchr8a-capitalized-800] [bchr8t]
-% Palatino
-
-\starttypescript [serif] [palatino] [texnansi]
- \definefontsynonym [Palatino] [p052003l] [encoding=texnansi]
- \definefontsynonym [Palatino-Italic] [p052023l] [encoding=texnansi]
- \definefontsynonym [Palatino-Slanted] [p052003l] [encoding=texnansi]
- \definefontsynonym [Palatino-Bold] [p052004l] [encoding=texnansi]
- \definefontsynonym [Palatino-BoldItalic] [p052024l] [encoding=texnansi]
- \definefontsynonym [Palatino-BoldSlanted] [p052024l] [encoding=texnansi]
-\stoptypescript
-
-\starttypescript [serif] [palatino] [ec]
- \definefontsynonym [Palatino] [uplr8t] [encoding=ec]
- \definefontsynonym [Palatino-Italic] [uplri8t] [encoding=ec]
- \definefontsynonym [Palatino-Slanted] [uplro8t] [encoding=ec]
- \definefontsynonym [Palatino-Bold] [uplb8t] [encoding=ec]
- \definefontsynonym [Palatino-BoldItalic] [uplbi8t] [encoding=ec]
- \definefontsynonym [Palatino-BoldSlanted] [uplbo8t] [encoding=ec]
-\stoptypescript
-
-\starttypescript [math] [px,palatino] [ec] % px now, palatino obsolete !
- \definefontsynonym [Palatino-Roman-Upright] [p1xr] [encoding=ec]
- \definefontsynonym [Palatino-Roman-Italic] [p1xi] [encoding=ec]
- \definefontsynonym [Palatino-Roman-Slanted] [p1xsl] [encoding=ec]
- \definefontsynonym [Palatino-Roman-Caps] [p1xsc] [encoding=ec]
- \definefontsynonym [Palatino-Companion-Upright] [pcxr]
- \definefontsynonym [Palatino-Companion-Italic] [pcxi]
- \definefontsynonym [Palatino-Companion-Slanted] [pcxsl]
- \definefontsynonym [Palatino-Math-Italic] [pxmi]
- \definefontsynonym [Palatino-Math-Symbols] [pxsy]
- \definefontsynonym [Palatino-Math-Extension] [pxex]
- \definefontsynonym [Palatino-Math-SymbolsA] [pxsya]
- \definefontsynonym [Palatino-Math-SymbolsB] [pxsyb]
- \definefontsynonym [Palatino-Math-SymbolsC] [pxsyc]
- \definefontsynonym [Palatino-Math-Italic-A] [pxmia]
- \definefontsynonym [Palatino-Math-Extension-A] [pxexa]
-\stoptypescript
-
-% Whatever
-
-\starttypescript % once and for all
- \definefontsynonym [RalfSmithFormalScript] [rsfs10]
- \definefontsynonym [ZapfDingbats] [pzd] % TODO
\stoptypescript
\endinput
diff --git a/tex/context/base/type-exa.tex b/tex/context/base/type-exa.tex
index 6ff33d08d..c88de4481 100644
--- a/tex/context/base/type-exa.tex
+++ b/tex/context/base/type-exa.tex
@@ -13,33 +13,6 @@
%D A couple of goodies:
-% \starttypescript [modern] [ec]
-%
-% \definetypeface [modern] [rm] [serif] [computer-modern] [computer-modern] [encoding=ec]
-% \definetypeface [modern] [ss] [sans] [computer-modern] [computer-modern] [encoding=ec]
-% \definetypeface [modern] [tt] [mono] [computer-modern] [computer-modern] [encoding=ec]
-% \definetypeface [modern] [mm] [math] [computer-modern] [computer-modern] [encoding=ec]
-%
-% \stoptypescript
-%
-% \starttypescript [modern] [il2]
-%
-% \definetypeface [modern] [rm] [serif] [computer-modern] [computer-modern] [encoding=il2]
-% \definetypeface [modern] [ss] [sans] [computer-modern] [computer-modern] [encoding=il2]
-% \definetypeface [modern] [tt] [mono] [computer-modern] [computer-modern] [encoding=il2]
-% \definetypeface [modern] [mm] [math] [computer-modern] [computer-modern] [encoding=il2]
-%
-% \stoptypescript
-%
-% \starttypescript [modern] [pl0]
-%
-% \definetypeface [modern] [rm] [serif] [computer-modern] [computer-modern] [encoding=pl0]
-% \definetypeface [modern] [ss] [sans] [computer-modern] [computer-modern] [encoding=pl0]
-% \definetypeface [modern] [tt] [mono] [computer-modern] [computer-modern] [encoding=pl0]
-% \definetypeface [modern] [mm] [math] [computer-modern] [computer-modern] [encoding=pl0]
-%
-% \stoptypescript
-
\starttypescript [modern] [ec,il2,pl0,default]
\definetypeface [modern] [rm] [serif] [computer-modern] [computer-modern] [encoding=\typescripttwo]
@@ -49,7 +22,7 @@
\stoptypescript
-\starttypescript [postscript] [texnansi,ec]
+\starttypescript [postscript] [texnansi,ec,8r]
\definetypeface [postscript] [rm] [serif] [times] [default] [encoding=\typescripttwo]
\definetypeface [postscript] [ss] [sans] [helvetica] [default] [rscale=.9,encoding=\typescripttwo]
@@ -57,12 +30,31 @@
\stoptypescript
-\starttypescript [mathtimes] [texnansi,ec]
+\starttypescript [times] [ec]
+
+\definetypeface [times] [rm] [serif] [times] [default] [encoding=\typescripttwo]
+\definetypeface [times] [ss] [sans] [helvetica] [default] [rscale=.9,encoding=\typescripttwo]
+\definetypeface [times] [tt] [mono] [computer-modern] [default] [rscale=1.1,encoding=\typescripttwo]
+\definetypeface [times] [mm] [math] [times] [default] [encoding=\typescripttwo]
+
+\stoptypescript
+
+\starttypescript [palatino] [ec]
+
+\definetypeface [palatino] [rm] [serif] [palatino] [default] [encoding=\typescripttwo]
+\definetypeface [palatino] [mm] [math] [palatino] [default] [encoding=\typescripttwo]
+\definetypeface [palatino] [tt] [mono] [computer-modern] [default] [rscale=1.075,encoding=\typescripttwo]
+
+% to do (rscaled): tt->computer-modern ss->??
+
+\stoptypescript
+
+\starttypescript [lucida] [texnansi]
-\definetypeface [mathtimes] [rm] [serif] [times] [default] [encoding=\typescripttwo]
-\definetypeface [mathtimes] [ss] [sans] [helvetica] [default] [rscale=.9,encoding=\typescripttwo]
-\definetypeface [mathtimes] [tt] [mono] [computer-modern] [default] [rscale=1.1,encoding=\typescripttwo]
-\definetypeface [mathtimes] [mm] [math] [times] [default] [encoding=\typescripttwo]
+\definetypeface [lucida] [rm] [serif] [lucida] [default] [encoding=\typescripttwo]
+\definetypeface [lucida] [ss] [sans] [lucida] [default] [encoding=\typescripttwo]
+\definetypeface [lucida] [tt] [mono] [lucida] [default] [encoding=\typescripttwo]
+\definetypeface [lucida] [mm] [math] [lucida] [default] [encoding=\typescripttwo]
\stoptypescript
@@ -79,23 +71,23 @@
\starttypescript [sans] [hanging] [pure]
-\setupfontsynonym [Sans] [handling=pure]
-\setupfontsynonym [SansBold] [handling=pure]
-\setupfontsynonym [SansSlanted] [handling=pure]
-\setupfontsynonym [SansItalic] [handling=pure]
-\setupfontsynonym [SansBoldSlanted] [handling=pure]
-\setupfontsynonym [SansBoldItalic] [handling=pure]
+\setupfontsynonym [Sans] [handling=pure]
+\setupfontsynonym [SansBold] [handling=pure]
+\setupfontsynonym [SansSlanted] [handling=pure]
+\setupfontsynonym [SansItalic] [handling=pure]
+\setupfontsynonym [SansBoldSlanted] [handling=pure]
+\setupfontsynonym [SansBoldItalic] [handling=pure]
\stoptypescript
\starttypescript [mono] [hanging] [pure]
-\setupfontsynonym [Mono] [handling=pure]
-\setupfontsynonym [MonoBold] [handling=pure]
-\setupfontsynonym [MonoSlanted] [handling=pure]
-\setupfontsynonym [MonoItalic] [handling=pure]
-\setupfontsynonym [MonoBoldSlanted] [handling=pure]
-\setupfontsynonym [MonoBoldItalic] [handling=pure]
+\setupfontsynonym [Mono] [handling=pure]
+\setupfontsynonym [MonoBold] [handling=pure]
+\setupfontsynonym [MonoSlanted] [handling=pure]
+\setupfontsynonym [MonoItalic] [handling=pure]
+\setupfontsynonym [MonoBoldSlanted] [handling=pure]
+\setupfontsynonym [MonoBoldItalic] [handling=pure]
\stoptypescript
@@ -112,23 +104,23 @@
\starttypescript [sans] [hanging] [thanh]
-\setupfontsynonym [Sans] [handling=normal]
-\setupfontsynonym [SansBold] [handling=bold]
-\setupfontsynonym [SansSlanted] [handling=slanted]
-\setupfontsynonym [SansItalic] [handling=italic]
-\setupfontsynonym [SansBoldSlanted] [handling=boldslanted]
-\setupfontsynonym [SansBoldItalic] [handling=bolditalic]
+\setupfontsynonym [Sans] [handling=normal]
+\setupfontsynonym [SansBold] [handling=bold]
+\setupfontsynonym [SansSlanted] [handling=slanted]
+\setupfontsynonym [SansItalic] [handling=italic]
+\setupfontsynonym [SansBoldSlanted] [handling=boldslanted]
+\setupfontsynonym [SansBoldItalic] [handling=bolditalic]
\stoptypescript
\starttypescript [mono] [hanging] [thanh]
-\setupfontsynonym [Mono] [handling=normal]
-\setupfontsynonym [MonoBold] [handling=bold]
-\setupfontsynonym [MonoSlanted] [handling=slanted]
-\setupfontsynonym [MonoItalic] [handling=italic]
-\setupfontsynonym [MonoBoldSlanted] [handling=boldslanted]
-\setupfontsynonym [MonoBoldItalic] [handling=bolditalic]
+\setupfontsynonym [Mono] [handling=normal]
+\setupfontsynonym [MonoBold] [handling=bold]
+\setupfontsynonym [MonoSlanted] [handling=slanted]
+\setupfontsynonym [MonoItalic] [handling=italic]
+\setupfontsynonym [MonoBoldSlanted] [handling=boldslanted]
+\setupfontsynonym [MonoBoldItalic] [handling=bolditalic]
\stoptypescript
diff --git a/tex/context/base/type-ini.tex b/tex/context/base/type-ini.tex
index 02a49bb8e..05680dd21 100644
--- a/tex/context/base/type-ini.tex
+++ b/tex/context/base/type-ini.tex
@@ -1,5 +1,5 @@
-% wat te doen met casual, evt `cs', danwel een manier om te
-% mappen (zie showcase)
+% wat te doen met casual, evt `cs', danwel een manier om te
+% mappen (zie showcase)
%D \module
%D [ file=type-ini,
@@ -23,42 +23,51 @@
\def\usetypescriptfile[#1]%
{\addtocommalist{#1}\typescriptfiles}
-\usetypescriptfile[\f!typeprefix syn] % font file synonyms
-\usetypescriptfile[\f!typeprefix enc] % files and encodings
-\usetypescriptfile[\f!typeprefix siz] % specific font sizes
-\usetypescriptfile[\f!typeprefix map] % pdftex mapping
-\usetypescriptfile[\f!typeprefix spe] % special macros
-\usetypescriptfile[\f!typeprefix exa] % some examples
-\usetypescriptfile[\f!typeprefix loc] % local scripts
+\usetypescriptfile[\f!typeprefix syn] % font file synonyms
+\usetypescriptfile[\f!typeprefix enc] % files and encodings
+\usetypescriptfile[\f!typeprefix siz] % specific font sizes
+\usetypescriptfile[\f!typeprefix map] % pdftex mapping
+\usetypescriptfile[\f!typeprefix spe] % special macros
+\usetypescriptfile[\f!typeprefix exa] % some examples
+\usetypescriptfile[\f!typeprefix loc] % local scripts
%usetypescriptfile[\f!typeprefix pre] % predefined scripts (compatible)
-%usetypescriptfile[typeface] % project scripts
+%usetypescriptfile[typeface] % project scripts
\let\currenttypescripts\empty
\newif\iftypescriptfound
+\let\@@typescriptone \empty \let\typescriptone \empty
+\let\@@typescripttwo \empty \let\typescripttwo \empty
+\let\@@typescriptthree\empty \let\typescriptthree\empty
+
\def\usetypescript%
{\dotripleempty\dousetypescript}
-\let\typescriptone \empty
-\let\typescripttwo \empty
-\let\typescriptthree\empty
+\def\dousetypescript[#1][#2][#3]%
+ {\expanded{\dodousetypescript[#1][#2][#3]}}
-\def\dousetypescript[#1][#2][#3]% also loads type-loc, a user file
- {\pushmacro\typescriptone \edef\typescriptone {\truetypescript{#1}}%
- \pushmacro\typescripttwo \edef\typescripttwo {\truetypescript{#2}}%
- \pushmacro\typescriptthree\edef\typescriptthree{\truetypescript{#3}}%
+\def\dodousetypescript[#1][#2][#3]% also loads type-loc, a user file
+ {\pushmacro\@@typescriptone \edef\@@typescriptone {\truetypescript{#1}}%
+ \pushmacro\@@typescripttwo \edef\@@typescripttwo {\truetypescript{#2}}%
+ \pushmacro\@@typescriptthree\edef\@@typescriptthree{\truetypescript{#3}}%
+ \pushmacro\typescriptone
+ \pushmacro\typescripttwo
+ \pushmacro\typescriptthree
\typescriptfoundfalse
\writestatus
{typescript}
- {[\typescriptone] [\typescripttwo] [\typescriptthree]}%
- \processcommacommand[\typescriptfiles]\dodousetypescript
- \firsttypescriptpassfalse % testen
+ {[\@@typescriptone] [\@@typescripttwo] [\@@typescriptthree]}%
+ \processcommacommand[\typescriptfiles]\dododousetypescript
+ \firsttypescriptpassfalse % testen
\popmacro\typescriptthree
\popmacro\typescripttwo
- \popmacro\typescriptone}
+ \popmacro\typescriptone
+ \popmacro\@@typescriptthree
+ \popmacro\@@typescripttwo
+ \popmacro\@@typescriptone}
-\def\dodousetypescript#1%
+\def\dododousetypescript#1%
{\startreadingfile
\pushmacro\currenttypefile
\def\currenttypefile{#1}%
@@ -96,80 +105,117 @@
\endETEX
-% script [serif] [default] [size]
-% script [serif] [computer-modern] [size]
+% script [serif] [default] [size]
+% script [serif] [computer-modern] [size]
% script [serif] [computer-modern] [ec]
% script [serif] [computer-modern] [name]
% script [serif] [computer-modern] [special]
-
-\def\dochecktypescript#1#2% script use
+
+\def\dochecktypescript#1#2#3% script use value
{\donefalse
\doifelsenothing{#1}\donetrue
{\doifelse{#2}{all}\donetrue
{\doifelse{#1}{all}\donetrue
- {\ExpandBothAfter\doifcommonelse{#1}{#2}\donetrue\donefalse}}}}
+ {\expanded{\doifcommonelse{#1}{#2}}\donetrue\donefalse
+ \ifdone\let#3\commalistelement\fi}}}}
\def\starttypescript%
{\dotripleempty\dostarttypescript}
-\newif\iffirsttypescriptpass \firsttypescriptpasstrue
+\newif\iffirsttypescriptpass \firsttypescriptpasstrue
-\prependtoks\firsttypescriptpasstrue\to\everyjob
+\prependtoks\firsttypescriptpasstrue\to\everyjob
\long\def\dostarttypescript[#1][#2][#3]#4\stoptypescript
{\iffirstargument
- \dochecktypescript{#1}{\typescriptone }\ifdone
- \dochecktypescript{#2}{\typescripttwo }\ifdone
- \dochecktypescript{#3}{\typescriptthree}\ifdone
- %\writestatus
+ \let\typescriptone \@@typescriptone
+ \let\typescripttwo \@@typescripttwo
+ \let\typescriptthree\@@typescriptthree
+ \dochecktypescript{#1}\@@typescriptone \typescriptone \ifdone
+ \dochecktypescript{#2}\@@typescripttwo \typescripttwo \ifdone
+ \dochecktypescript{#3}\@@typescriptthree\typescriptthree \ifdone
+ %\writestatus
\debuggerinfo
{typescript}
- {\currenttypefile: pat=scr
- [\typescriptone =#1]
- [\typescripttwo =#2]
- [\typescriptthree=#3]}%
+ {\currenttypefile: use=scr (val)
+ [\@@typescriptone =#1 (\typescriptone)]
+ [\@@typescripttwo =#2 (\typescripttwo)]
+ [\@@typescriptthree=#3 (\typescriptthree)]}%
#4\typescriptfoundtrue
- \fi\fi\fi
+ \fi\fi\fi
\else\iffirsttypescriptpass
\pushmacro\fontclass
#4%
\popmacro\fontclass
\else
- % skip this since it may do unwanted resets, like
- % setting symbolic font names to unknown, especially
- % in run time user type scripts
+ % skip this since it may do unwanted resets, like
+ % setting symbolic font names to unknown, especially
+ % in run time user type scripts
\fi\fi}
-\let\allfontmapsfiles\empty \newif\ifautoloadmapfiles
+\newif\ifautoloadmapfiles
+
+\def\forgetmapfiles
+ {\global\let\allfontmapsfiles\empty}
+
+\forgetmapfiles
+
+% status
+%
+% 1 loaded
+% 2 reported
+% 3 preloaded
-\def\loadmapfile[#1]%
+\def\preloadmapfile[#1]%
{\def\docommando##1%
- {\doifinstringelse{.}{#1}
- {\doglobal\addtocommalist{#1}\allfontmapsfiles}
- {\expanded{\docommando{#1.\f!fontmapmapextension}}}}%
- \processcommalist[#1]\docommando}
-
-\def\doloadfontmapfile#1% will be special
- {\ifcase\realpageno
- % can't happen
- \or
- \writestatus{pdftex}{using map file: #1}%
- \pdfmapfile{+#1}%
- \else
- \writestatus{pdftex}{skipping map file: #1}%
+ {\doifinstringelse{.}{##1}
+ {\writestatus{pdftex}{compensate map file: ##1}%
+ \setxvalue{##1 \c!status}{3}%
+ \doglobal\removefromcommalist{##1}\allfontmapsfiles}
+ {\expanded{\docommando{##1.\f!fontmapextension}}}}%
+ \expanded{\processcommalist[#1]\noexpand\docommando}}
+
+\def\loadmapfile[#1]% last add first
+ {\def\docommando##1%
+ {\doifinstringelse{.}{##1}
+ {\doglobal\pretocommalist{##1}\allfontmapsfiles}
+ {\expanded{\docommando{##1.\f!fontmapextension}}}}%
+ \expanded{\processcommalist[#1]\noexpand\docommando}%
+ \ifproductionrun \loadallfontmapfiles \fi}
+
+\def\doloadfontmapfile#1% will be special
+ {\doifundefined{#1 \c!status}
+ {\ifnum\realpageno>1
+ \writestatus{pdftex}{too late for map file: #1}%
+ \else
+ \writestatus{pdftex}{using map file: #1}%
+ \fi
+ \pdfmapfile{+#1}%
+ \setxvalue{#1 \c!status}{1}}}
+
+\def\doreportfontmapfile#1%
+ {\doifundefined{#1 \c!status}
+ {\writestatus{pdftex}{needs map file: #1}%
+ \setxvalue{#1 \c!status}{2}}}
+
+\def\loadallfontmapfiles
+ {\ifx\allfontmapsfiles\empty \else
+ \ifautoloadmapfiles
+ \ifcase\pdfoutput \else \ifx\pdfmapfile\undefined \else
+ \processcommacommand[\allfontmapsfiles]\doloadfontmapfile
+ \forgetmapfiles
+ \fi \fi
+ \else
+ \processcommacommand[\allfontmapsfiles]\doreportfontmapfile
+ \forgetmapfiles
+ \fi
\fi}
-\def\loadallfontmapfiles
- {\ifautoloadmapfiles \ifx\allfontmapsfiles\empty \else
- \ifcase\pdfoutput\else \ifx\pdfmapfile\undefined \else
- \processcommacommand[\allfontmapsfiles]\doloadfontmapfile
- \global\let\allfontmapsfiles\empty
- \fi \fi
- \fi \fi}
+\appendtoks \loadallfontmapfiles \to \everyjob
+\appendtoks \loadallfontmapfiles \to \everystarttext
+\appendtoks \loadallfontmapfiles \to \everypagebody
-\appendtoks \loadallfontmapfiles \to \everybeforeshipout
-
-% \definetypeface [#1:joke] [#2:rm]
+% \definetypeface [#1:joke] [#2:rm]
% \definetypeface [#1:joke] [#2:rm] [#3:...]
% \definetypeface [#1:joke] [#2:rm] [#3:serif] [#4:lucida] [#5:size] [#6:...]
@@ -183,37 +229,39 @@
\csname\??ts#1\endcsname
\fi}
-\let\@@tslabel \empty
-\let\@@tsstyle \empty
-\let\@@tsfont \empty
-\let\@@tssize \empty
-\let\@@tsencoding \empty
+% #1=main #2=rm #3=serif #4=fontname #5=size #6=settings
+
+\def\typefaceencoding{\defaultencoding}
-\def\dodefinetypeface[#1][#2][#3][#4][#5][#6]%
+\def\dodefinetypeface[#1][#2][#3][#4][#5][#6]%
{\dododefinetypeface[#1][#2]
- \iffifthargument % sixth is optional
- \getparameters[\??ts][rscale=1,\s!encoding=\s!default,#6]
+ \iffifthargument % sixth is optional
+ % \getparameters[\??ts][rscale=1,\s!encoding=\defaultencoding,#6]
+ % we need to expand since iin #6 there can be a \typescripttwo
+ \expanded{\getparameters[\??ts][rscale=1,\s!encoding=\defaultencoding,#6]}%
+ \pushmacro\relativefontsize
+ \pushmacro\typefaceencoding
+ \pushmacro\fontclass
\let\relativefontsize\@@tsrscale
- \let\savedfontclass\fontclass
+ \let\typefaceencoding\@@tsencoding
\setcurrentfontclass{#1}
- \def\@@tslabel{#1}
- \def\@@tsstyle{#2}
- \def\@@tsfont {#3}
- \def\@@tssize {#4}
- \writestatus
- {typeface}
- {[#1] [#2] [#3] [#4]}%
- \expanded{\usetypescript[#3][#4][name,default,\@@tsencoding,special]}
- \expanded{\usetypescript[#3][#5][size]}
- \let\@@tslabel\empty
- \let\@@tsstyle\empty
- \let\@@tsfont \empty
- \let\@@tssize \empty
- \setcurrentfontclass\savedfontclass
- \def\relativefontsize{1}
+ \writestatus{typeface}{[#1] [#2] [#3] [#4]}
+ \usetypescript[map][\typefaceencoding]
+ % \usetypescript[#3][#4][name]
+ % \usetypescript[#3][#4][default]
+ % \usetypescript[#3][#4][\typefaceencoding]
+ % \usetypescript[#3][#4][special]
+ % save some file loading and run time
+ \usetypescript[#3][#4][name,default,\typefaceencoding,special]
+ \usetypescript[#3][#5][size]
+ \popmacro\fontclass
+ \popmacro\typefaceencoding
+ \popmacro\relativefontsize
+ \else\iffourthargument
+ \definetypeface[#1][#2][#3][#4][\s!default]%
\else\ifthirdargument
\getparameters[\??tf#1#2][#3]
- \fi\fi}
+ \fi\fi\fi}
\def\dododefinetypeface[#1][#2]% saveguard against redefinition
{\doifundefined{\??tf#1\s!default}{\setgvalue{\??tf#1\s!default}{#2}}%
@@ -225,7 +273,7 @@
\def\switchtotypeface% [class] [settings]
{\doquadrupleempty\doswitchtotypeface[\switchtobodyfont][\globalfontclass]}
-\def\doswitchtotypeface[#1][#2][#3][#4]%
+\def\doswitchtotypeface[#1][#2][#3][#4]%
{%\doifinsetelse{\s!default,\v!reset}{#3}
% {\setcurrentfontclass\empty}
% {\setcurrentfontclass{#3}}%
@@ -233,22 +281,20 @@
\let\globalfontclass#2%
\iffourthargument
#1[#4]%
+ \else\ifx\fontclass\empty
+ #1[\c!rm]%
\else
- \ifx\fontclass\empty
- #1[\c!rm]%
- \else
- \doifdefinedelse{\??tf\fontclass\s!default}
- {#1[\getvalue{\??tf\fontclass\s!default}]}
- {#1[\c!rm]}%
- \fi
- \fi
+ \doifdefinedelse{\??tf\fontclass\s!default}
+ {#1[\getvalue{\??tf\fontclass\s!default}]}
+ {#1[\c!rm]}%
+ \fi \fi
\tf}
-\def\usetypefile[#1]%
+\def\usetypefile[#1]% recurses on path !
{\readfile{\f!typeprefix#1}{}{}}% \relax\relax}
-%D For backward compatibility we reimplement the font file
-%D loading macro.
+%D For backward compatibility we reimplement the font file
+%D loading macro.
\ifx\normaldoreadfontdefinitionfile\undefined
\let\normaldoreadfontdefinitionfile\doreadfontdefinitionfile
@@ -256,19 +302,21 @@
\def\doreadfontdefinitionfile#1#2% #1 = set/switch state
{\ifundefined{\??tf#2\c!default}%
+ \pushmacro\fontclass
\setcurrentfontclass\empty
- \pushmacro\typescriptone \edef\typescriptone {\truetypescript{#2}}
- \pushmacro\typescripttwo \let\typescripttwo \empty
- \pushmacro\typescriptthree\let\typescriptthree\empty
+ \pushmacro\@@typescriptone \edef\@@typescriptone {\truetypescript{#2}}
+ \pushmacro\@@typescripttwo \let\@@typescripttwo \empty
+ \pushmacro\@@typescriptthree\let\@@typescriptthree\empty
\typescriptfoundfalse
- \dodousetypescript{\f!typeprefix pre}
- \popmacro\typescriptthree
- \popmacro\typescripttwo
- \popmacro\typescriptone
+ \dododousetypescript{\f!typeprefix pre}
+ \popmacro\@@typescriptthree
+ \popmacro\@@typescripttwo
+ \popmacro\@@typescriptone
\iftypescriptfound \else
\normaldoreadfontdefinitionfile{#1}{#2}
\fi
\setcurrentfontclass\empty
+ \popmacro\fontclass
\else\ifcase#1\relax
\switchtotypeface[#2]%
\else
@@ -277,6 +325,6 @@
\fetchruntimecommand \typetypescript {\f!typeprefix\s!run}
-\setupbodyfont[fil] % default filenames
+% \setupbodyfont[fil] % default filenames
\protect \endinput
diff --git a/tex/context/base/type-map.tex b/tex/context/base/type-map.tex
index 455ca7abc..5303385db 100644
--- a/tex/context/base/type-map.tex
+++ b/tex/context/base/type-map.tex
@@ -11,55 +11,86 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\starttypescript
+%D We cannot be too clever here since loading the mapfile is
+%D a time sensitive operation. Better to load a couple more
+%D then to run into problems.
+
+\starttypescript [map] [all]
\loadmapfile[original-ams-cmr.map]
\loadmapfile[original-ams-euler.map]
\stoptypescript
-\starttypescript [all] [computer-modern,euler,ams] [il2]
+\starttypescript [map] [il2]
\loadmapfile[il2-ams-cmr.map]
\stoptypescript
-\starttypescript [all] [computer-modern,euler,ams] [pl0]
+\starttypescript [map] [pl0]
\loadmapfile[pl0-ams-cmr.map]
\stoptypescript
-\starttypescript [all] [lucida] [texnansi]
- \loadmapfile[texnansi-bh-lucida.map]
-\stoptypescript
+% beware, this one will not handle \usetypescript [map] [x,y]
+%
+% \starttypescript [map] [ec,texnansi,8r]
+% \loadmapfile[\typescripttwo-urw-times.map]
+% \loadmapfile[\typescripttwo-urw-helvetica.map]
+% \stoptypescript
-\starttypescript [all] [times,helvetica,courier] [texnansi]
- \loadmapfile[texnansi-adobe-standard.map]
+\starttypescript [map] [8r]
+ \loadmapfile[8r-adobe-utopia.map]
+ \loadmapfile[8r-bit-charter.map]
+ \loadmapfile[8r-public-antp.map]
+ \loadmapfile[8r-public-antt.map]
+ \loadmapfile[8r-urw-bookman.map]
+ \loadmapfile[8r-urw-courier.map]
+ \loadmapfile[8r-urw-helvetica.map]
+ \loadmapfile[8r-urw-palatino.map]
+ \loadmapfile[8r-urw-times.map]
+ \loadmapfile[8r-urw-zapfchan.map]
\stoptypescript
-\starttypescript [all] [px] [ec]
- \loadmapfile[ec-youngryu-px.map]
+\starttypescript [map] [ec]
+ \loadmapfile[ec-adobe-utopia.map]
+ \loadmapfile[ec-bit-charter.map]
+ \loadmapfile[ec-public-antp.map]
+ \loadmapfile[ec-public-antt.map]
+ \loadmapfile[ec-urw-bookman.map]
+ \loadmapfile[ec-urw-courier.map]
+ \loadmapfile[ec-urw-helvetica.map]
+ \loadmapfile[ec-urw-palatino.map]
+ \loadmapfile[ec-urw-times.map]
+ \loadmapfile[ec-urw-zapfchan.map]
\stoptypescript
-\starttypescript [all] [tx] [ec]
- \loadmapfile[ec-youngryu-tx.map]
-\stoptypescript
-
-\starttypescript [all] [antykwa-torunska] [texnansi]
- \loadmapfile[texnansi-gust-antyktor.map]
-\stoptypescript
+\starttypescript [map] [texnansi]
+ \loadmapfile[texnansi-adobe-utopia.map]
+ \loadmapfile[texnansi-bit-charter.map]
+ \loadmapfile[texnansi-public-antp.map]
+ \loadmapfile[texnansi-public-antt.map]
+ \loadmapfile[texnansi-urw-bookman.map]
+ \loadmapfile[texnansi-urw-courier.map]
+ \loadmapfile[texnansi-urw-helvetica.map]
+ \loadmapfile[texnansi-urw-palatino.map]
+ \loadmapfile[texnansi-urw-times.map]
+ \loadmapfile[texnansi-urw-zapfchan.map]
+\stoptypescript
-\starttypescript [all] [antykwa-poltawskiego] [texnansi]
- \loadmapfile[texnansi-gust-antykpol.map]
+\starttypescript [map] [ec]
+ \loadmapfile[ec-youngryu-px.map]
+ \loadmapfile[ec-youngryu-tx.map]
\stoptypescript
-\starttypescript [all] [palatino] [texnansi]
- \loadmapfile[texnansi-urw-palatino.map]
+\starttypescript [map] [default]
+ \loadmapfile[original-micropress-informal.map]
\stoptypescript
% to do
-\starttypescript [math] [helvetica] [all]
- \loadmapfile[original-micropress-helvetica.map]
+\starttypescript [map] [texnansi]
+ \loadmapfile[original-bh-lucida.map]
\stoptypescript
-\starttypescript [serif,math] [informal] [all]
- \loadmapfile[original-micropress-informal.map]
-\stoptypescript
+%\starttypescript [math] [helvetica] [all]
+% \loadmapfile[original-micropress-helvetica.map]
+%\stoptypescript
\endinput
diff --git a/tex/context/base/type-pre.tex b/tex/context/base/type-pre.tex
index 146a1151b..cb56b77f5 100644
--- a/tex/context/base/type-pre.tex
+++ b/tex/context/base/type-pre.tex
@@ -56,6 +56,18 @@
\stoptypescript
+%D Cyrillic alternatives are available under the symbolic
+%D name \type {cyr}.
+
+\starttypescript [cyr]
+
+\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,cyr]
+
+\usemathcollection[default]
+
+\stoptypescript
+
+
%D Here we implement the symbol fonts as provided by the
%D American Mathematical Society. The names of these symbols
%D can be found in The Joy of \TeX\ by M.~Spivak.
@@ -97,7 +109,7 @@
\starttypescript [lbr]
-\usetypescript [serif,sans,mono,math,handwriting] [lucida] [name,special]
+\usetypescript [serif,sans,mono,math,handwriting] [lucida] [name,special,\defaultencoding]
\usetypescript [serif,sans,mono,math,handwriting] [default] [size]
\usemathcollection[lbr]
@@ -122,7 +134,7 @@
\starttypescript [ant]
-\usetypescript [serif] [antykwa-torunska] [name]
+\usetypescript [serif] [antykwa-torunska] [name,\defaultencoding]
\usetypescript [serif] [default] [size]
\stoptypescript
@@ -131,7 +143,7 @@
\starttypescript [pcr]
-\usetypescript [mono] [courier] [name]
+\usetypescript [mono] [courier] [name,\defaultencoding]
\usetypescript [mono] [default] [size]
\stoptypescript
@@ -140,8 +152,8 @@
\starttypescript [phv]
-\usetypescript [sans] [helvetica] [name]
-\usetypescript [mono] [default] [size]
+\usetypescript [sans] [helvetica] [name,\defaultencoding]
+\usetypescript [sans] [default] [size]
\stoptypescript
@@ -149,7 +161,7 @@
\starttypescript [ptm]
-\usetypescript [serif] [times] [name]
+\usetypescript [serif] [times] [name,\defaultencoding]
\usetypescript [serif] [default] [size]
\stoptypescript
@@ -159,9 +171,9 @@
\starttypescript [pos]
-\usetypescript [serif] [times] [name]
-\usetypescript [sans] [helvetica] [name]
-\usetypescript [mono] [courier] [name]
+\usetypescript [serif] [times] [name,\defaultencoding]
+\usetypescript [sans] [helvetica] [name,\defaultencoding]
+\usetypescript [mono] [courier] [name,\defaultencoding]
\usetypescript [serif,sans,mono] [default] [size]
@@ -171,40 +183,26 @@
\starttypescript [ppl]
-\usetypescript [serif] [palatino] [name]
+\usetypescript [serif] [palatino] [name,\defaultencoding]
\usetypescript [serif] [default] [size]
\stoptypescript
%D The following scripts fake the old \type {font-ber} and
-%D alike files.
-
-\starttypescript[ber]
-
-\usetypescript
- [all]
- [computer-modern,concrete,euler]
- [default]
-
-\usetypescript
- [all]
- [courier,helvetica,times,lucida,antykwa-torunska,baskerville,palatino]
- [ec]
-
-\stoptypescript
+%D alike files.
\starttypescript[fil]
+ % fake to prevent loading font-fil.tex and signal 'done'
+\stoptypescript
-\usetypescript
- [all]
- [computer-modern,concrete,euler]
- [default]
+\starttypescript[ber]
+ % fake to prevent loading font-fil.tex and signal 'done'
+\stoptypescript
-\usetypescript
- [all]
- [courier,helvetica,times,lucida,antykwa-torunska,baskerville,palatino]
- [texnansi]
+%D But for old time sake we provide:
+\starttypescript[ber]
+ \usetypescript [berry] [ec]
\stoptypescript
\endinput
diff --git a/tex/context/base/type-siz.tex b/tex/context/base/type-siz.tex
index 174c4a4f3..aa30ce30f 100644
--- a/tex/context/base/type-siz.tex
+++ b/tex/context/base/type-siz.tex
@@ -15,50 +15,49 @@
\starttypescript [serif] [default] [size]
\definebodyfont
- [17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
[rm] [default]
\stoptypescript
\starttypescript [sans] [default] [size]
\definebodyfont
- [17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
[ss] [default]
\stoptypescript
\starttypescript [mono] [default] [size]
\definebodyfont
- [17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
[tt] [default]
\stoptypescript
\starttypescript [math] [default] [size]
\definebodyfont
-% [17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
[4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
[mm] [default]
\stoptypescript
\starttypescript [boldmath] [default] [size]
\definebodyfont
- [17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
[mm] [boldmath]
\stoptypescript
\starttypescript [handwriting] [default] [size]
\definebodyfont
- [17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
[hw] [default]
\stoptypescript
\starttypescript [calligraphy] [default] [size]
\definebodyfont
- [17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
[cg] [default]
\stoptypescript
\starttypescript [casual] [default] [size] % maps onto rm !
\definebodyfont
- [17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
[rm] [default]
\stoptypescript
@@ -252,13 +251,13 @@
sc=cmr10 at 4pt]
\definebodyfont [14.4pt,17.3pt,20.7pt] [rm]
- [tf=cmr12 sa 1,
- bf=cmbx12 sa 1,
- it=cmti12 sa 1,
- sl=cmsl12 sa 1,
+ [tf=cmr12 sa 1,
+ bf=cmbx12 sa 1,
+ it=cmti12 sa 1,
+ sl=cmsl12 sa 1,
bi=cmbxti10 sa 1,
bs=cmbxsl10 sa 1,
- sc=cmcsc10 sa 1]
+ sc=cmcsc10 sa 1]
\stoptypescript
@@ -346,13 +345,13 @@
sc=cmss10 at 4pt]
\definebodyfont [14.4pt,17.3pt,20.7pt] [ss]
- [tf=cmss12 sa 1,
+ [tf=cmss12 sa 1,
bf=cmssbx10 sa 1,
- it=cmssi12 sa 1,
- sl=cmssi12 sa 1,
+ it=cmssi12 sa 1,
+ sl=cmssi12 sa 1,
bi=cmssbx10 sa 1,
bs=cmssbx10 sa 1,
- sc=cmss12 sa 1]
+ sc=cmss12 sa 1]
\stoptypescript
@@ -471,7 +470,7 @@
sy=cmsy5]
\definebodyfont [4pt] [mm]
- [mr=xcmr5 at 4pt,
+ [mr=xcmr5 at 4pt,
ex=cmex10 at 4pt,
mi=cmmi5 at 4pt,
sy=cmsy5 at 4pt]
diff --git a/tex/context/base/type-syn.tex b/tex/context/base/type-syn.tex
index b6e22521a..00517d723 100644
--- a/tex/context/base/type-syn.tex
+++ b/tex/context/base/type-syn.tex
@@ -1,8 +1,8 @@
%D \module
%D [ file=type-syn,
-%D version=2001.04.12,
+%D version=2001.04.12,
%D title=\CONTEXT\ Typescript Macros,
-%D subtitle=Filename scripts,
+%D subtitle=Filename scripts,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
@@ -11,7 +11,19 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% Computer Modern Roman : Donald Knuth
+% Simple Minded Fonts
+
+\starttypescript [serif] [simple] [name]
+ \definefontsynonym [Serif] [Simple]
+ \definefontsynonym [SerifBold] [Serif]
+ \definefontsynonym [SerifItalic] [Serif]
+ \definefontsynonym [SerifSlanted] [Serif]
+ \definefontsynonym [SerifBoldItalic] [Serif]
+ \definefontsynonym [SerifBoldSlanted] [Serif]
+ \definefontsynonym [SerifCaps] [Serif]
+\stoptypescript
+
+% Computer Modern Roman : Donald Knuth
\starttypescript [serif] [computer-modern] [name]
\definefontsynonym [Serif] [ComputerModern]
@@ -50,16 +62,16 @@
\definefontsynonym [MathSymbol] [ComputerModernMath-Symbol]
\stoptypescript
-% This will change some day.
+% This will change some day.
\starttypescript [math] [computer-modern] [name]
- \definefontsynonym [OldStyle] [MathItalic]
+ \definefontsynonym [OldStyle] [MathItalic]
\definefontsynonym [Fraktur] [eufm10]
\definefontsynonym [Gothic] [eufm10]
\definefontsynonym [Calligraphic] [cmsy10]
\stoptypescript
-% Concrete Modern Roman : Donald Knuth
+% Concrete Modern Roman : Donald Knuth
\starttypescript [serif] [concrete] [name]
\definefontsynonym [Serif] [ComputerConcrete]
@@ -81,7 +93,7 @@
\definefontsynonym [MathGamma] [Euler-SymbolC]
\stoptypescript
-% American Math Society : Michael Spivak
+% American Math Society : Michael Spivak
\starttypescript [math] [ams] [name]
\definefontsynonym [MathAlpha] [AMS-SymbolA]
@@ -121,7 +133,7 @@
\definefontsynonym [MonoCaps] [LucidaSans-Typewriter]
\stoptypescript
-\starttypescript [math] [lucida] [name]
+\starttypescript [math] [lucida] [name]
\definefontsynonym [MathRoman] [LucidaBright]
\definefontsynonym [MathExtension] [LucidaNewMath-Extension]
\definefontsynonym [MathItalic] [LucidaNewMath-AltItalic]
@@ -129,7 +141,7 @@
\definefontsynonym [MathAlpha] [LucidaNewMath-Arrows]
\stoptypescript
-\starttypescript [boldmath] [lucida] [name]
+\starttypescript [boldmath] [lucida] [name]
\definefontsynonym [MathRomanBold] [LucidaBright-Demi]
\definefontsynonym [MathExtensionBold] [LucidaNewMath-Extension]
\definefontsynonym [MathItalicBold] [LucidaNewMath-AltDemiItalic]
@@ -145,7 +157,7 @@
\definefontsynonym [Calligraphy] [LucidaCalligraphy-Italic]
\stoptypescript
-% Informal
+% Informal : Vulis
\starttypescript [casual] [informal] [name]
\definefontsynonym [Serif] [Informal-Regular]
@@ -187,27 +199,69 @@
\stoptypescript
% Baskerville :
+%
+% \starttypescript [serif] [baskerville] [name]
+% \definefontsynonym [Serif] [Baskerville]
+% \definefontsynonym [SerifBold] [Baskerville-Bold]
+% \definefontsynonym [SerifItalic] [Baskerville-Italic]
+% \definefontsynonym [SerifSlanted] [Baskerville-Italic]
+% \definefontsynonym [SerifBoldItalic] [Baskerville-BoldItalic]
+% \definefontsynonym [SerifBoldSlanted] [Baskerville-BoldItalic]
+% \definefontsynonym [SerifCaps] [Baskerville]
+% \stoptypescript
+%
+% % Garamond :
+%
+% \starttypescript [serif] [garamond] [name]
+% \definefontsynonym [Serif] [Garamond-Normal]
+% \definefontsynonym [SerifBold] [Garamond]
+% \definefontsynonym [SerifItalic] [Garamond-Medium-Italic]
+% \definefontsynonym [SerifSlanted] [Garamond-Medium-Italic]
+% \definefontsynonym [SerifBoldItalic] [Garamond-Medium-Italic]
+% \definefontsynonym [SerifBoldSlanted] [Garamond-Medium-Italic]
+% \definefontsynonym [SerifCaps] [Garamond]
+% \stoptypescript
+
+% Bookman :
+
+\starttypescript [serif] [bookman] [name]
+ \definefontsynonym [Serif] [Bookman-Light]
+ \definefontsynonym [SerifItalic] [Bookman-LightItalic]
+ \definefontsynonym [SerifBold] [Bookman-DemiBold]
+ \definefontsynonym [SerifBoldItalic] [Bookman-DemiBoldItalic]
+ \definefontsynonym [SerifSlanted] [Bookman-LightSlanted]
+ \definefontsynonym [SerifBoldSlanted] [Bookman-DemiBoldSlanted]
+ \definefontsynonym [SerifCaps] [Bookman-Light-Caps]
+\stoptypescript
+
+% Chancery : Zapf
-\starttypescript [serif] [baskerville] [name]
- \definefontsynonym [Serif] [Baskerville]
- \definefontsynonym [SerifBold] [Baskerville-Bold]
- \definefontsynonym [SerifItalic] [Baskerville-Italic]
- \definefontsynonym [SerifSlanted] [Baskerville-Italic]
- \definefontsynonym [SerifBoldItalic] [Baskerville-BoldItalic]
- \definefontsynonym [SerifBoldSlanted] [Baskerville-BoldItalic]
- \definefontsynonym [SerifCaps] [Baskerville]
+\starttypescript [calligraphy] [chancery] [name]
+ \definefontsynonym [Calligraphy] [Chancery]
\stoptypescript
-% Garamond :
+% Utopia : Adobe
-\starttypescript [serif] [garamond] [name]
- \definefontsynonym [Serif] [Garamond-Normal]
- \definefontsynonym [SerifBold] [Garamond]
- \definefontsynonym [SerifItalic] [Garamond-Medium-Italic]
- \definefontsynonym [SerifSlanted] [Garamond-Medium-Italic]
- \definefontsynonym [SerifBoldItalic] [Garamond-Medium-Italic]
- \definefontsynonym [SerifBoldSlanted] [Garamond-Medium-Italic]
- \definefontsynonym [SerifCaps] [Garamond]
+\starttypescript [serif] [utopia] [name]
+ \definefontsynonym [Serif] [Utopia-Regular]
+ \definefontsynonym [SerifItalic] [Utopia-Italic]
+ \definefontsynonym [SerifBold] [Utopia-Bold]
+ \definefontsynonym [SerifBoldItalic] [Utopia-BoldItalic]
+ \definefontsynonym [SerifSlanted] [Utopia-Slanted]
+ \definefontsynonym [SerifBoldSlanted] [Utopia-BoldSlanted]
+ \definefontsynonym [SerifCaps] [Utopia-Regular-Caps]
+\stoptypescript
+
+% Charter :
+
+\starttypescript [serif] [charter] [name]
+ \definefontsynonym [Serif] [Charter-Roman]
+ \definefontsynonym [SerifItalic] [Charter-Italic]
+ \definefontsynonym [SerifBold] [Charter-Bold]
+ \definefontsynonym [SerifBoldItalic] [Charter-BoldItalic]
+ \definefontsynonym [SerifSlanted] [Charter-Slanted]
+ \definefontsynonym [SerifBoldSlanted] [Charter-BoldSlanted]
+ \definefontsynonym [SerifCaps] [Charter-Roman-Caps]
\stoptypescript
% Times :
@@ -222,20 +276,20 @@
\definefontsynonym [SerifCaps] [Times-Roman]
\stoptypescript
-\starttypescript [math] [times] [name]
- \definefontsynonym [MathRoman] [Times-MathRoman]
- \definefontsynonym [MathExtension] [Times-MathExtension]
- \definefontsynonym [MathItalic] [Times-MathItalic]
- \definefontsynonym [MathSymbol] [Times-MathSymbol]
-\stoptypescript
+% \starttypescript [math] [times] [name]
+% \definefontsynonym [MathRoman] [Times-MathRoman]
+% \definefontsynonym [MathExtension] [Times-MathExtension]
+% \definefontsynonym [MathItalic] [Times-MathItalic]
+% \definefontsynonym [MathSymbol] [Times-MathSymbol]
+% \stoptypescript
-\starttypescript [math] [tx] [name]
- \definefontsynonym [MathRoman] [Times-Roman-Upright]
- \definefontsynonym [MathExtension] [Times-Math-Extension]
- \definefontsynonym [MathItalic] [Times-Math-Italic]
- \definefontsynonym [MathSymbol] [Times-Math-Symbols]
- \definefontsynonym [MathAlpha] [Times-Math-SymbolsA]
- \definefontsynonym [MathBeta] [Times-Math-SymbolsB]
+\starttypescript [math] [times] [name]
+ \definefontsynonym [MathRoman] [Times-Roman-Upright]
+ \definefontsynonym [MathExtension] [Times-Math-Extension]
+ \definefontsynonym [MathItalic] [Times-Math-Italic]
+ \definefontsynonym [MathSymbol] [Times-Math-Symbols]
+ \definefontsynonym [MathAlpha] [Times-Math-SymbolsA]
+ \definefontsynonym [MathBeta] [Times-Math-SymbolsB]
\stoptypescript
% Helvetica :
@@ -269,25 +323,25 @@
\definefontsynonym [MonoCaps] [Courier]
\stoptypescript
-% Palatino : Hermann Zapf / UWR
+% Palatino : Hermann Zapf / UWR
\starttypescript [serif] [palatino] [name]
- \definefontsynonym [Serif] [Palatino]
+ \definefontsynonym [Serif] [Palatino]
\definefontsynonym [SerifBold] [Palatino-Bold]
\definefontsynonym [SerifItalic] [Palatino-Italic]
\definefontsynonym [SerifSlanted] [Palatino-Slanted]
\definefontsynonym [SerifBoldItalic] [Palatino-BoldItalic]
\definefontsynonym [SerifBoldSlanted] [Palatino-BoldSlanted]
- \definefontsynonym [SerifCaps] [Palatino] % -Caps
+ \definefontsynonym [SerifCaps] [Palatino-Caps]
\stoptypescript
\starttypescript [math] [palatino] [name]
- \definefontsynonym [MathRoman] [Palatino-Roman-Upright]
- \definefontsynonym [MathExtension] [Palatino-Math-Extension]
- \definefontsynonym [MathItalic] [Palatino-Math-Italic]
- \definefontsynonym [MathSymbol] [Palatino-Math-Symbols]
- \definefontsynonym [MathAlpha] [Palatino-Math-SymbolsA]
- \definefontsynonym [MathBeta] [Palatino-Math-SymbolsB]
+ \definefontsynonym [MathRoman] [Palatino-Roman-Upright]
+ \definefontsynonym [MathExtension] [Palatino-Math-Extension]
+ \definefontsynonym [MathItalic] [Palatino-Math-Italic]
+ \definefontsynonym [MathSymbol] [Palatino-Math-Symbols]
+ \definefontsynonym [MathAlpha] [Palatino-Math-SymbolsA]
+ \definefontsynonym [MathBeta] [Palatino-Math-SymbolsB]
\stoptypescript
\endinput
diff --git a/tex/context/base/verb-ini.tex b/tex/context/base/verb-ini.tex
index 2c7ad75e9..3390af3d4 100644
--- a/tex/context/base/verb-ini.tex
+++ b/tex/context/base/verb-ini.tex
@@ -1080,17 +1080,17 @@
%D We'll show some more examples:
%D
%D \startbuffer[pretty]
-%D \installnewpretty R \red
-%D \installnewpretty G \green
-%D \installnewpretty B \blue
+%D \installnewpretty r \red
+%D \installnewpretty g \green
+%D \installnewpretty b \blue
%D \stopbuffer
%D
%D \haalbuffer[pretty]
%D
%D \startbuffer
-%D %%\ R{Red
-%D %%\ G\Green
-%D %%\ B[Blue
+%D %%\ r{Red
+%D %%\ g\Green
+%D %%\ b[Blue
%D \stopbuffer
%D
%D {\newprettytrue\typebuffer}
diff --git a/tex/context/base/x-fig-00.tex b/tex/context/base/x-fig-00.tex
index 38e0edbfa..657cb56fa 100644
--- a/tex/context/base/x-fig-00.tex
+++ b/tex/context/base/x-fig-00.tex
@@ -55,7 +55,7 @@
%D \TEXEXEC\ and another module in this suite.
%D
%D \starttypen
-%D texexec --pdf --use=fig-01 yourfile.xml
+%D texexec --pdf --use=fig-make yourfile.xml
%D \stoptypen
%D
%D You can now select a graphic from this file using the
@@ -68,6 +68,7 @@
%D it first searched in the list of databases.
%D
%D \starttypen
+%D \usemodule [fig-base]
%D \usefigurebases[yourfile]
%D \stoptypen
%D
diff --git a/tex/context/base/x-fig-01.tex b/tex/context/base/x-fig-01.tex
index 72a808504..ece20f7b1 100644
--- a/tex/context/base/x-fig-01.tex
+++ b/tex/context/base/x-fig-01.tex
@@ -18,7 +18,7 @@
%D saying:
%D
%D \starttypen
-%D texexec --pdf --use=fig-01 yourfile.xml
+%D texexec --pdf --use=fig-make yourfile.xml
%D \stoptypen
%D
%D The following modes are supported:
diff --git a/tex/context/base/x-fig-02.tex b/tex/context/base/x-fig-02.tex
new file mode 100644
index 000000000..13e601819
--- /dev/null
+++ b/tex/context/base/x-fig-02.tex
@@ -0,0 +1,76 @@
+%D \module
+%D [ file=x-fig-02,
+%D version=2001.03.21,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Figure Base Inclusion (I),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%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 enables non||\ConTeXt\ users to access the
+%D database. For this, you need to run
+%D
+%D \starttypen
+%D texexec --pdf --use=fig-fake yourfile.xml
+%D \stoptypen
+%D
+%D The resulting file, \type {yourfile.fig}, can be loaded
+%D in the normal way. The figures can be accessed with:
+%D
+%D \starttypen
+%D \getfigurefile{label}
+%D \getfigurepage{label}
+%D \stoptypen
+%D
+%D A a bonus, the following macro is defined:
+%D
+%D \starttypen
+%D \includefigurefile width 10cm {label}
+%D \stoptypen
+
+\usemodule[fig-00]
+
+\doifnothing {\inputfilename} {\end}
+\doiffileelse {\inputfilename.xml} {} {\end}
+
+\defineXMLenvironment [figurelibrary] \StartLibrary \StopLibrary
+\defineXMLignore [description]
+\defineXMLenvironment [figure] \StartFigure \StopFigure
+
+\def\StartLibrary
+ {\immediate\openout \scratchwrite=\inputfilename.fig
+ \immediate\write\scratchwrite{\string\input\space x-fig-03.tex \string\relax}
+ \immediate\write\scratchwrite{}}
+
+\def\StopLibrary
+ {\immediate\write\scratchwrite{}
+ \immediate\write\scratchwrite{\string\endinput}
+ \immediate\closeout\scratchwrite}
+
+\def\StartFigure
+ {\defineXMLpush[file]
+ \defineXMLpush[dummy]
+ \defineXMLpush[label]
+ \defineXMLpush[copyright]
+ \defineXMLpush[comment]
+ \defineXMLpush[status]}
+
+\def\StopFigure
+ {\doglobal\increment\CurrentPage
+ \immediate\write\scratchwrite
+ {\string\setfiguredata\space
+ {\XMLpop{label}}
+ {\inputfilename}
+ {\CurrentPage}}}
+
+\doglobal\newcounter\CurrentPage
+
+\starttext
+
+\processXMLfilegrouped{\inputfilename.xml}
+
+\stoptext
diff --git a/tex/context/base/x-fig-03.tex b/tex/context/base/x-fig-03.tex
new file mode 100644
index 000000000..80e4a3ef9
--- /dev/null
+++ b/tex/context/base/x-fig-03.tex
@@ -0,0 +1,46 @@
+%D \module
+%D [ file=x-fig-03,
+%D version=2001.03.21,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Figure Base Inclusion (II),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%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 file is the companion of \type {x-fig-02.tex}.
+
+\ifx \undefined \convertMPtoPDF \input supp-pdf.tex \fi
+\ifx \undefined \includefigurefile \else \expandafter \endinput \fi
+
+\gdef\getfigurefile#1%
+ {\expandafter\ifx\csname x-fig-f-#1\endcsname\relax
+ \currentfigurefile
+ \else
+ \csname x-fig-f-#1\endcsname
+ \fi}
+
+\gdef\getfigurepage#1%
+ {\expandafter\ifx\csname x-fig-p-#1\endcsname\relax
+ 1%
+ \else
+ \csname x-fig-p-#1\endcsname
+ \fi}
+
+\gdef\setfiguredata#1#2#3%
+ {\gdef\currentfigurefile{#2}%
+ \expandafter\gdef\csname x-fig-f-#1\endcsname{#2}%
+ \expandafter\gdef\csname x-fig-p-#1\endcsname{#3}}
+
+\def\includefigurefile#1#%
+ {\doincludefigurefile{#1}}
+
+\def\doincludefigurefile#1#2%
+ {\edef\next{\noexpand\pdfimage
+ #1 page \getfigurepage{#2} {\getfigurefile{#2}.pdf}}%
+ \next}
+
+\endinput
diff --git a/tex/context/base/xtag-ini.tex b/tex/context/base/xtag-ini.tex
index fa61cca94..970f065df 100644
--- a/tex/context/base/xtag-ini.tex
+++ b/tex/context/base/xtag-ini.tex
@@ -11,34 +11,27 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% etex optimized
+\beginTEX
+ \writestatus{XML}{sorry, XML is only supported in (pdf)etex}
+ \def\startXMLdefinitions{\gobbleuntil\stopXMLdefinitions}
+ \endinput
+\endTEX
-\unprotect
+\beginETEX XML
-\def\unspaced#1%
- {\dounspaced#1\end}
+ \bgroup \obeylines
-\def\dounspaced#1%
- {\ifx#1\end
- \else\ifx#1\blankspace
- \@EA\@EA\@EA\dounspaced
- \else
- #1\@EA\@EA\@EA\dounspaced
- \fi\fi}
+ \gdef\startXMLdefinitions%
+ {\bgroup\obeylines\dostartXMLdefinitions}
-\def\unspaceargument#1\to#2%
- {\convertargument#1\to#2%
- \@EA\edef\@EA#2\@EA{\@EA\unspaced\@EA{#2}}}
+ \gdef\dostartXMLdefinitions #1
+ {\egroup\doifsomething{#1}{\writestatus{XML}{loading #1 support}}}
-\def\unspaceafter#1#2%
- {\edef\ascii{\dounspaced#2\end}\@EA#1\@EA{\ascii}}
+ \global\let\stopXMLdefinitions\relax
-\protect
+ \egroup
-\beginTEX
- \writestatus{xml}{sorry, xml is only supported in (pdf)etex}
- \endinput
-\endTEX
+\endETEX
\writestatus{loading}{Context XML Macros (ini)}
@@ -186,7 +179,6 @@
.gdef.enableXML*
B.catcode`.!=.@@other*
- .catcode`."=.@@other*
.catcode`.?=.@@other*
.catcode`.&=.@@active .let&=.doXMLentity*
.catcode`.<=.@@active .unexpanded.def<B.doXMLelementE*
@@ -351,9 +343,11 @@
\defineXMLprocessor[context-command]{\contextXMLcommand}
\def\contextXMLcommand#1%
- {\def\disableXML{\global\let\afterXMLprocessor\empty}%
+ {\pushmacro\disableXML
+ \def\disableXML{\global\let\afterXMLprocessor\empty}%
\global\let\afterXMLprocessor\enableXML
- \setnormalcatcodes\scantokens{#1}\afterXMLprocessor}
+ \setnormalcatcodes\scantokens{#1}\afterXMLprocessor
+ \popmacro\disableXML}
\defineXMLprocessor[context-directive]{\contextXMLdirective}
@@ -377,6 +371,8 @@
%\catcode`\|=\@@active \catcode`\~=\@@active
\catcode`\{=\@@begingroup \catcode`\}=\@@endgroup}
+\let\disableXML\setnormalcatcodes
+
%D Given the previous definition, and given that \ETEX\ is
%D used, we can now say:
%D
diff --git a/tex/context/base/xtag-ini.tex~ b/tex/context/base/xtag-ini.tex~
deleted file mode 100644
index fed3e7c2b..000000000
--- a/tex/context/base/xtag-ini.tex~
+++ /dev/null
@@ -1,1161 +0,0 @@
-%D \module
-%D [ file=xtag-ini,
-%D version=2000.12.20,
-%D title=\CONTEXT\ XML Support,
-%D subtitle=Initialization,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% etex optimized
-
-\unprotect
-
-\def\unspaced#1%
- {\dounspaced#1\end}
-
-\def\dounspaced#1%
- {\ifx#1\end
- \else\ifx#1\blankspace
- \@EA\@EA\@EA\dounspaced
- \else
- #1\@EA\@EA\@EA\dounspaced
- \fi\fi}
-
-\def\unspaceargument#1\to#2%
- {\convertargument#1\to#2%
- \@EA\edef\@EA#2\@EA{\@EA\unspaced\@EA{#2}}}
-
-\def\unspaceafter#1#2%
- {\edef\ascii{\dounspaced#2\end}\@EA#1\@EA{\ascii}}
-
-\protect
-
-\beginTEX
- \writestatus{xml}{sorry, xml is only supported in (pdf)etex}
- \endinput
-\endTEX
-
-\writestatus{loading}{Context XML Macros (ini)}
-
-%D Remark: some hard coded character things will be replaced
-%D by named glyphs as soon as the upgraded encoding modules
-%D are released. At that moment, unicode support will be
-%D provided in accordance with the normal support in \CONTEXT.
-
-%D Like it or not, this module deals with angle bracketed
-%D input. Processing \XML\ alike input in \CONTEXT\ has been
-%D possible since 1994, but several methods ran in parallel
-%D and were implemented in modules like \type {m-sgml}.
-%D
-%D There is no one optimal solution for processing \XML\ data.
-%D The oldest method was based on a very simple preprocessor
-%D written in \PERL: \type {<command>} was converted into
-%D \type {\begSGML[command]} and optional parameters were
-%D passed.
-%D
-%D A second method is to use a \PERL\ or \XSL\ transformation
-%D script that produces \CONTEXT\ commands. This method is
-%D much slower, mainly because the whole document is read into
-%D memory and a document tree is to be build. The advantage is
-%D that processing of the resulting document is fast.
-%D
-%D The third method uses a basic parser written in the \TEX\
-%D language, and apart from a few pitfalls, this method is
-%D clean and efficient, but not always robust. Because errors
-%D in the input are not catched on forhand, processing in
-%D \TEX\ may fail due to errors. But, given that a document
-%D can be validated on forehand, this is no big problem.
-%D
-%D Each method has it's advantage, but especially the third
-%D method puts some demands on \CONTEXT, since no interference
-%D between the parser and the core commands may occur. What
-%D method is used, depends on the situation.
-%D
-%D All three methods introduce some problems in interfacing to
-%D core \CONTEXT\ functionality. This is due to the fact that
-%D sometimes we want to typeset content directly, while on
-%D other cases we just want to pick up data for later usage,
-%D either or not using delimited arguments. And, when moving
-%D data around, there is always the expansion problem to deal
-%D with.
-%D
-%D In order to be able to incorporate \XML\ style definitions
-%D into basic \TEX\ styles, we will provide some basic
-%D functionality in the core itself.
-
-%D We will be dealing with elements, which means that we have
-%D to take care of \type {<this>} and \type {</that>}, but
-%D also with \type {<such/>} and \type {<so />}. In due time
-%D this module will deal with all these animals in a
-%D convenient way. In some cases the upper and lowercase
-%D alternatives need to be dealt with, although this is not
-%D realy needed since XML is case sensitive.
-%D
-%D We also have to handle entities, like \type {&you;} and
-%D \type {&me;}. These are quite easy to deal with and need to
-%D be hooked into the encoding and abbreviation mechanisms.
-%D
-%D And then there are the parameters to be taken care of. Here
-%D we meet \type {key="value"} but also \type {key='eulav'}
-%D and even the spacy \typ {key = "value"}.
-%D
-%D Since we have to handlers for each element and entity, we
-%D will create a few namespaces. Special care has to be
-%D given to preformated code.
-
-\unprotect
-
-\def\@@XML {XML:}
-\def\@@XMLentity {\@@XML ent}
-\def\@@XMLelement {\@@XML ele}
-\def\@@XMLvariable {\@@XML var}
-\def\@@XMLvalue {\@@XML val}
-\def\@@XMLpars {\@@XML par}
-\def\@@XMLdata {\@@XML dat}
-\def\@@XMLcode {\@@XML cod}
-\def\@@XMLinstruction {\@@XML ins}
-\def\@@XMLmap {\@@XML map}
-\def\@@XMLlist {\@@XML lst}
-
-\newtoks\XMLtoks
-\newtoks\XMLresetlist
-
-\chardef\XMLargumentmode=0
-
-\newif\ifignoreXMLcase
-\newif\ifignoreXMLspaces
-\newif\iffixedXMLfont
-
-%D \macros
-%D {compound}
-%D
-%D We will overload the already active \type {|} so we have
-%D to save its meaning in order to be able to use this handy
-%D macro.
-%D
-%D \starttypen
-%D so test\compound{}test can be used instead of test||test
-%D \stoptypen
-
-\let\docompound=| \def\compound#1{\docompound#1|}
-
-%D We will implement the parser by making a few characters
-%D active. For that reason we also have to save their
-%D original meaning. The core handlers are \type
-%D {\doXMLentity} and \type {\doXMLelement}.
-
-%D \macros
-%D {enableXML}
-%D
-%D The macro \type {\enableXML} will be used to turn on the
-%D parser. This means that after that, \TEX\ commands starting
-%D with a backslash will not longer be read as such. There is
-%D a way around this, but for convenience \TEXEXEC\ will take
-%D care of processing raw \XML\ files in a transparant way.
-
-\bgroup
-\catcode`\*=\@@comment
-\catcode`\.=\@@escape
-.catcode`.B=.@@begingroup
-.catcode`.E=.@@endgroup
-
-.catcode`.&=.@@active .gdef.letterampersand B.string&E
-.catcode`.<=.@@active .gdef.letterless B.string<E
-
-.catcode`.#=.@@active .gdef.letterhash B.string#E
-.catcode`.$=.@@active .gdef.letterdollar B.string$E
-.catcode`.%=.@@active
-.catcode`.\=.@@active .gdef.letterbackslash B.string\E
-.catcode`.^=.@@active .gdef.letterhat B.string^E
-.catcode`._=.@@active .gdef.letterunderscore B.string_E
-.catcode`.{=.@@active .gdef.letterbgroup B.string{E
-.catcode`.}=.@@active .gdef.letteregroup B.string}E
-.catcode`.|=.@@active .gdef.letterbar B.string|E
-.catcode`.~=.@@active .gdef.lettertilde B.string~E
-
-.gdef.enableXMLexpansion
- B.def<B.doXMLelementE.let&=.doXMLentityE
-
-.gdef.disableXMLexpansion
- B.unexpanded.def<B.doXMLelementE.let&=.doXMLentityE
-
-.gdef.enableXML*
- B.catcode`.!=.@@other*
- .catcode`.?=.@@other*
- .catcode`.&=.@@active .let&=.doXMLentity*
- .catcode`.<=.@@active .unexpanded.def<B.doXMLelementE*
- .catcode`.>=.@@other*
- .catcode`.#=.@@active .def#B&tex-hash;E*
- .catcode`.$=.@@active .def$B&tex-dollar;E*
- .catcode`.%=.@@active .def%B&tex-percent;E*
- .catcode`.\=.@@active .def\B&tex-backslash;E*
- .catcode`.^=.@@active .def^B&tex-hat;E*
- .catcode`._=.@@active .def_B&tex-underscore;E*
- .catcode`.{=.@@active .def{B&tex-leftbrace;E*
- .catcode`.}=.@@active .def}B&tex-rightbrace;E*
- .catcode`.|=.@@active .def|B&tex-bar;E*
- .catcode`.~=.@@other* active .def~B&tex-tilde;E*
- .relax* needed for successive .if's
- E
-
-.gdef.enableXMLelements*
- B.catcode`.<=.@@active .unexpanded.def<B.doXMLelementE*
- .catcode`.>=.@@other*
- .relax* needed for successive .if's
- E
-
-.egroup
-
-%D An element can be singular or paired. A singular element is
-%D called an empty element. The following definitions are
-%D equivalent:
-%D
-%D \starttypen
-%D <eerste></eerste> <eerste/> <eerste />
-%D \stoptypen
-%D
-%D Empty elements can have arguments too. Conforming the
-%D standard, each key must have a value. These are separated
-%D by an \type {=} sign and the value is delimited by either
-%D \type {"} or \type {'}. There may be spaces around the
-%D equal sign.
-%D
-%D \starttypen
-%D <eerste a= "b" c ="d" /> <eerste a = "b" c="d"/>
-%D \stoptypen
-%D
-%D Officially the following definition is not valid:
-%D
-%D \starttypen
-%D <eerste>some text</eerste> <eerste/> <eerste />
-%D \stoptypen
-%D
-%D Although we can handle both cases independently, this is
-%D seldom needed.
-%D
-%D Processing instructions are identified by a~\type {?} and are
-%D like empty elements.
-%D
-%D \starttypen
-%D <?doel a="b" c="d"?> <?doel a="b" c="d" ?>
-%D \stoptypen
-%D
-%D Comment is formatted as follows.
-%D
-%D \starttypen
-%D <!-- comment -->
-%D \stoptypen
-%D
-%D Verbatim code inits purest form is called \type {CDATA} and
-%D is embedded in the following ugly and therefore recognizable
-%D way:
-%D
-%D \starttypen
-%D <![CDATA[
-%D Dit is nogal verbatim !
-%D Dit is nogal verbatim !
-%D Dit is nogal verbatim !
-%D ]]>
-%D \stoptypen
-
-%D The parser is implemented as a multi||step macro. Because
-%D \type {!} and \type {?} should be picked up correctly, we
-%D need to define a few macros in unprotected mode!
-%D
-%D Because \XML\ is defined with some restrictions in mind,
-%D parsing the elements is not that complicated. First we have
-%D to determine if we're dealing with a comment or processing
-%D instruction. We need a bit of grouping because we have to
-%D mess up with catcodes. We probably have to treat a few
-%D more catcode and first character cases. We need to use
-%D \type {\begingroup} here, otherwise we get funny spaces in
-%D math.
-
-\protect
-
-\long\def\doXMLelement#1%
- {\begingroup % maybe tab and space needs some treatment too: \catcode`\ =10 % \@@space
- \catcode`\^^M=10
- \if#1!\let\next \xdoXMLelement \else
- \if#1?\let\next \ydoXMLelement \else
- \let\next \zdoXMLelement \fi\fi
- \next#1}
-
-%D By using a few {\expandafter}'s we can us a \type {\next}
-%D construction. We could speed the first char test up a bit
-%D by using an installer and something \typ {\getvalue
-%D {#1doXMLelement}} (todo).
-
-\long\def\doXMLelement#1%
- {\begingroup % maybe tab and space needs some treatment too: \catcode`\ =10 % \@@space
- \catcode`\^^M=10\relax
- \if#1!\expandafter \xdoXMLelement \else
- \if#1?\expandafter\expandafter\expandafter \ydoXMLelement \else
- \expandafter\expandafter\expandafter \zdoXMLelement \fi\fi
- #1}
-
-%D The (yet experimental) \type {CDATA} parser is implemented
-%D on top of the verbatim environment.
-
-\long\def\xdoXMLelement !#1 % !-- --> or !xyz >
- {\endgroup
- \doifelse{#1}{--}
- {\long\def\nextelement{\gobbleuntil{-->}}}
- {\doifelse{#1}{[CDATA[}
- {\long\def\nextelement{\skipfirstverbatimlinefalse
- \processtaggeddisplayverbatim{]]>}}}
- {\long\def\nextelement{\gobbleuntil{>}}}}%
- \nextelement}
-
-%D In our case, processing instructions are only needed if
-%D we want specific \CONTEXT\ support. This may be useful in
-%D applications where the data is generated by an
-%D application. We will implement a \CONTEXT\ code handler
-%D later.
-
-\long\def\ydoXMLelement#1 #2?>% ?target ?>
- {\endgroup\dodoXMLprocessor{#1}{#2}}
-
-%D The normal elements are handled by \type {\dodoXMLelement}.
-
-\long\def\zdoXMLelement#1>%
- {\endgroup\dodoXMLelement#1 >}
-
-%D Now we switch to unprotected mode again.
-
-\unprotect
-
-%D The processing instructions handler is implemented as
-%D follows.
-
-\long\def\dodoXMLprocessor#1%
- {\ifundefined{\@@XMLinstruction:#1}%
- \let\next\gobbleoneargument
- \else
- \def\next{\getvalue{\@@XMLinstruction:#1}}%
- \fi
- \next}
-
-\long\def\defineXMLprocessor[#1]#2% watch the ?
- {\long\setvalue{\@@XMLinstruction:?#1}{#2}}
-
-%D As an example, we implement a \CONTEXT\ code handler:
-
-\defineXMLprocessor[context] {\contextXMLcommand}
-\defineXMLprocessor[context-command]{\contextXMLcommand}
-
-\def\contextXMLcommand#1%
- {\def\disableXML{\global\let\afterXMLprocessor\empty}%
- \global\let\afterXMLprocessor\enableXML
- \setnormalcatcodes\scantokens{#1}\afterXMLprocessor}
-
-\defineXMLprocessor[context-directive]{\contextXMLdirective}
-
-\def\contextXMLdirective#1%
- {\docontextXMLdirective#1 dummy dummy dummy\end}
-
-\def\docontextXMLdirective#1 #2 #3 #4\end% class var value
- {\setvalue{\@@XMLvariable:#1:#2}{#3}}
-
-\defineXMLprocessor[context-message]{\contextXMLmessage}
-
-\def\contextXMLmessage#1%
- {\writestatus{xml}{#1}}
-
-\def\setnormalcatcodes%
- {\catcode`\!=\@@other \catcode`\?=\@@other
- \catcode`\&=\@@alignment \catcode`\<=\@@other
- \catcode`\#=\@@parameter \catcode`\$=\@@mathshift
- \catcode`\%=\@@comment \catcode`\\=\@@escape
- \catcode`\^=\@@superscript \catcode`\_=\@@subscript
- %\catcode`\|=\@@active \catcode`\~=\@@active
- \catcode`\{=\@@begingroup \catcode`\}=\@@endgroup}
-
-%D Given the previous definition, and given that \ETEX\ is
-%D used, we can now say:
-%D
-%D \starttypen
-%D <?context {\bf Start Of Some \TeX\ Text} ?>
-%D \stoptypen
-%D
-%D A non||\ETEX\ solution is also possible, using buffers,
-%D but for the moment we assume that \ETEX\ is used.
-
-%D Next we will implement the normal element handler.
-
-\let\currentXMLarguments\empty
-\let\currentXMLelement \empty
-
-\newtoks\everyXMLelement
-
-\long\def\dodoXMLelement#1 #2>%
- {\def\!!stringa{#2}%
- \def\!!stringb{/ }%
- \ifx\!!stringa\empty
- \let\currentXMLarguments\empty
- \def\currentXMLelement{#1}%
- \the\everyXMLelement
- \else\ifx\!!stringa\!!stringb
- \let\currentXMLarguments\empty
- \def\currentXMLelement{#1/}%
- \the\everyXMLelement
- \else
- \def\currentXMLelement{#1}%
- \def\currentXMLarguments{#2}%
- \the\everyXMLelement
- %\getXMLarguments\currentXMLelement{#2}%
- \dogetXMLarguments\currentXMLelement#2>%
- \fi \fi
- \executeXMLelement\currentXMLelement}
-
-\def\executeXMLelement#1%
- {\getvalue{\@@XMLelement:#1}}
-
-\newif\ifXMLrawentities
-
-% \bgroup
-%
-% \catcode`<=\@@active
-%
-% \gdef\defineXMLentity[#1]#2%
-% {\unspaceargument#1\to\ascii
-% \long\setvalue{\@@XMLelement:ent:\@EA\firstofoneargument\ascii/}{#2}}
-%
-% \gdef\doXMLentity#1;%
-% {\ifXMLrawentities#1\else\executeXMLentity{#1}\fi}
-%
-% \gdef\executeXMLentity#1%
-% {<ent:#1/>}
-%
-% \gdef\getXMLentity#1%
-% {\getvalue{\@@XMLelement:ent:#1/}}
-%
-% \gdef\doifXMLentityelse#1#2#3%
-% {\ifundefined{\@@XMLelement:ent:#1/}#3\else#2\fi}
-%
-% \egroup
-
-\gdef\defineXMLentity[#1]#2%
- {\unspaceargument#1\to\ascii
- \long\setvalue{\@@XMLentity:\@EA\firstofoneargument\ascii}{#2}}
-
-% we need to be able to do:
-%
-% \defineXMLentity[amp] {\FunnyAmp} \def\FunnyAmp#1;{\getXMLentity{#1}}
-%
-% \defineXMLentity [pound] {(why not use euro's?)}
-%
-% \startXMLdata
-% test &amp;pound; test
-% \stopXMLdata
-%
-% so we need an ifless implementation of:
-
-\gdef\doXMLentity#1;%
- {\ifXMLrawentities
- \expandafter\firstofoneargument
- \else
- \expandafter\executeXMLentity
- \fi{#1}}
-
-\def\executeXMLentity#1% internal ! ! !
- {\getXMLentity{#1}}
-
-\def\expandedXMLentity#1%
- {\getvalue{\@@XMLentity:#1}}
-
-\unexpanded\def\getXMLentity#1%
- {\getvalue{\@@XMLentity:#1}}
-
-\gdef\doifXMLentityelse#1#2#3%
- {\ifundefined{\@@XMLentity:#1}#3\else#2\fi}
-
-% \long\def\getXMLarguments#1#2%
-% {\dogetXMLarguments{#1}#2>}
-%
-% \long\def\dogetXMLarguments#1%
-% {\XMLtoks\emptytoks
-% \def\@@XMLclass{#1}%
-% \let\dodoparseXMLarguments\doparseXMLarguments
-% \doparseXMLarguments}
-%
-% \def\dosetXMLargument#1%
-% {\setvalue{\@@XMLvariable:\@@XMLclass:\@@XMLname}{#1}%
-% %\message{[\@@XMLname=#1]}%
-% \let\dodoparseXMLarguments\doparseXMLarguments
-% \dodoparseXMLarguments}
-
-% see \defineXML... commands:
-%
-% [key=val] => \presetXMLarguments{element} => default key/vals
-% [blabla] => \theXMLarguments{blabla} => user key/vals
-% [blabla] [key=val] => \presetXMLarguments{element} => default key/vals
-% \theXMLarguments{blabla} => user key/vals
-%
-% <element key="val"> stored in case of [blabla] else set as \XMLpar
-%
-% see m-steps for an example of usage
-
-\long\def\getXMLarguments#1#2%
- {\dogetXMLarguments{#1}#2>}
-
-\long\def\dogetXMLarguments#1%
- {\XMLtoks\emptytoks
- \ifcsname\@@XMLmap:#1\endcsname
- \let\dosetXMLargument\dosetXMLargumentB
- \else
- \def\@@XMLclass{#1}%
- \let\dosetXMLargument\dosetXMLargumentA
- \fi
- \let\dodoparseXMLarguments\doparseXMLarguments
- \doparseXMLarguments}
-
-\def\dosetXMLargumentA#1%
- {\setvalue{\@@XMLvariable:\@@XMLclass:\@@XMLname}{#1}%
- \let\dodoparseXMLarguments\doparseXMLarguments
- %\message{[\@@XMLclass][\@@XMLname=#1]}\wait
- \dodoparseXMLarguments}
-
-\def\dosetXMLargumentB#1%
- {\setevalue{\@@XMLmap:\@@XMLmapmap}%
- {\@EA\ifx\csname\@@XMLmap:\@@XMLmapmap\endcsname\empty\else
- \csname\@@XMLmap:\@@XMLmapmap\endcsname,%
- \fi
- \@@XMLname=#1}%
- \let\dodoparseXMLarguments\doparseXMLarguments
- %\message{[\@@XMLprefix][\@@XMLname=#1]}\wait
- \dodoparseXMLarguments}
-
-\appendtoks
- \resetXMLarguments\currentXMLelement
-\to \everyXMLelement
-
-\def\resetXMLarguments#1%
- {\ifcsname\@@XMLmap:#1\endcsname
- \@EA\let\@EA\@@XMLmapmap\csname\@@XMLmap:#1\endcsname
- \@EA\let\csname\@@XMLmap:\@@XMLmapmap\endcsname\empty
- \fi}
-
-\def\theXMLarguments#1%
- {\ifcsname\@@XMLmap:#1\endcsname\csname\@@XMLmap:#1\endcsname\fi}
-
-\long\def\doparseXMLarguments#1% space goes ok
- {\if#1>%
- \let\dodoparseXMLarguments\empty
- \else\if#1=%
- \edef\@@XMLname{\the\XMLtoks}%
- \XMLtoks\emptytoks
- \else\if#1"%
- \let\dodoparseXMLarguments\dodoparseXMLargumentsD
- \else\if#1'%
- \let\dodoparseXMLarguments\dodoparseXMLargumentsS
- \else\if#1/%
- \edef\currentXMLelement{\currentXMLelement/}%
- \else
- \@EA\XMLtoks\@EA{\the\XMLtoks#1}%
- \fi\fi\fi\fi\fi
- \dodoparseXMLarguments}
-
-\def\dodoparseXMLargumentsD#1"{\dosetXMLargument{#1}}
-\def\dodoparseXMLargumentsS#1'{\dosetXMLargument{#1}}
-
-%D The previous macros were the basic parser and their working
-%D is left to the imagination of the reader. These macros
-%D will be improved.
-
-\bgroup
-
-\catcode`<=\@@active
-
-\long\gdef\dododefineXMLsingular#1#2%
- {\long\setvalue{\@@XMLelement:#1/}{#2}}
-
-\long\gdef\dododefineXMLcommand#1#2%
- {\long\setvalue{\@@XMLelement:#1/}{#2}%
- \long\setvalue{\@@XMLelement:#1}{#2}}
-
-\long\gdef\dododefineXMLgrouped#1#2%
- {\long\setvalue{\@@XMLelement:#1}{\groupedcommand{#2}{}\bgroup}%
- \long\setvalue{\@@XMLelement:/#1}{\egroup}}
-
-\long\gdef\dododefineXMLargument#1#2% watch the {} around ##1
- {\long\setvalue{\@@XMLelement:#1/}{#2{}}%
- \long\setvalue{\@@XMLelement:#1}##1</#1>{#2{##1}}}
-
-\long\gdef\dododefineXMLignore#1%
- {\long\setvalue{\@@XMLelement:#1/}{}%
- \long\setvalue{\@@XMLelement:#1}##1</#1>{}}
-
-\long\gdef\dododefineXMLpickup#1#2#3%
- {\long\setvalue{\@@XMLelement:#1/}{#2#3}%
- \long\setvalue{\@@XMLelement:#1}##1</#1>{#2##1#3}}
-
-\long\gdef\dododefineXMLenvironment#1#2#3%
- {\long\setvalue{\@@XMLelement:#1/}{#2#3}% % genereert evt relax
- \long\setvalue{\@@XMLelement:#1}{#2}%
- \long\setvalue{\@@XMLelement:/#1}{#3}}
-
-\long\gdef\dododefineXMLpush#1%
- {\long\setvalue{\@@XMLelement:#1/}{\long\setvalue{\@@XMLdata:#1}{}}%
- \long\setvalue{\@@XMLelement:#1}##1</#1>{\long\setvalue{\@@XMLdata:#1}{##1}}}
-
-\long\gdef\dododefineXMLenvironmentpush#1#2#3%
- {\long\setvalue{\@@XMLelement:#1/}{#2\long\setvalue{\@@XMLdata:#1}{}#3}%
- \long\setvalue{\@@XMLelement:#1}##1</#1>{#2\long\setvalue{\@@XMLdata:#1}{##1}#3}}
-
-\long\gdef\dododefineXMLprocess#1%
- {\long\setvalue{\@@XMLelement:#1/}{}%
- \long\setvalue{\@@XMLelement:#1}{}%
- \long\setvalue{\@@XMLelement:/#1}{}}
-
-\long\gdef\dododefineXMLnestedenvironment#1#2#3%
- {\long\setvalue{\@@XMLelement:#1}{\getXMLgroupedenvironment{#1}{#2}{#3}}}
-
-\long\gdef\dododefineXMLnestedargument#1#2%
- {\long\setvalue{\@@XMLelement:#1}{\getXMLgroupedargument{#1}{#2}}}
-
-\egroup
-
-%D The high level definition macros.
-
-\def\defineXMLsingular {\dotripleempty\dodefineXMLsingular}
-\def\defineXMLcommand {\dotripleempty\dodefineXMLcommand}
-\def\defineXMLgrouped {\dotripleempty\dodefineXMLgrouped}
-\def\defineXMLargument {\dotripleempty\dodefineXMLargument}
-\def\defineXMLignore {\dotripleempty\dodefineXMLignore}
-\def\defineXMLpickup {\dotripleempty\dodefineXMLpickup}
-\def\defineXMLenvironment {\dotripleempty\dodefineXMLenvironment}
-\def\defineXMLpush {\dotripleempty\dodefineXMLpush}
-\def\defineXMLenvironmentpush{\dotripleempty\dodefineXMLenvironmentpush}
-\def\defineXMLprocess {\dotripleempty\dodefineXMLprocess}
-
-% goes for all types
-
-\def\defineXMLnested {\dotripleempty\dodefineXMLnestedenvironment}
-\def\defineXMLnestedenvironment{\dotripleempty\dodefineXMLnestedenvironment}
-\def\defineXMLnestedargument {\dotripleempty\dodefineXMLnestedargument}
-
-\long\def\dodefineXMLsingular[#1][#2][#3]#4%
- {\defineXMLmethod\dododefineXMLsingular{#1}{#2}{#3}{#4}{}}
-
-\long\def\dodefineXMLcommand[#1][#2][#3]#4%
- {\defineXMLmethod\dododefineXMLcommand{#1}{#2}{#3}{#4}{}}
-
-\long\def\dodefineXMLgrouped[#1][#2][#3]#4%
- {\defineXMLmethod\dododefineXMLgrouped{#1}{#2}{#3}{#4}{}}
-
-\long\def\dodefineXMLargument[#1][#2][#3]#4%
- {\defineXMLmethod\dododefineXMLargument{#1}{#2}{#3}{#4}{}}
-
-\long\def\dodefineXMLignore[#1][#2][#3]%
- {\defineXMLmethod\dododefineXMLignore{#1}{#2}{#3}{}{}}
-
-\long\def\dodefineXMLpickup[#1][#2][#3]#4#5%
- {\defineXMLmethod\dododefineXMLpickup{#1}{#2}{#3}{#4}{#5}}
-
-\long\def\dodefineXMLenvironment[#1][#2][#3]#4#5%
- {\defineXMLmethod\dododefineXMLenvironment{#1}{#2}{#3}{#4}{#5}}
-
-\long\def\dodefineXMLpush[#1][#2][#3]%
- {\defineXMLmethod\dododefineXMLpush{#1}{#2}{#3}{}{}}
-
-\long\def\dodefineXMLenvironmentpush[#1][#2][#3]#4#5%
- {\defineXMLmethod\dododefineXMLenvironmentpush{#1}{#2}{#3}{#4}{#5}}
-
-\long\def\dodefineXMLprocess[#1][#2][#3]%
- {\defineXMLmethod\dododefineXMLprocess{#1}{#2}{#3}{}{}}
-
-\long\def\dodefineXMLnestedenvironment[#1][#2][#3]#4#5%
- {\defineXMLmethod\dododefineXMLnestedenvironment{#1}{#2}{#3}{#4}{#5}}
-
-\long\def\dodefineXMLnestedargument[#1][#2][#3]#4%
- {\defineXMLmethod\dododefineXMLnestedargument{#1}{#2}{#3}{#4}{}}
-
-% [key=val] => \presetXMLarguments{element} => default key/vals
-% [blabla] => \theXMLarguments{blabla} => user key/vals
-% [blabla] [key=val] => \presetXMLarguments{element} => default key/vals
-% \theXMLarguments{blabla} => user key/vals
-
-\long\def\defineXMLmethod#1#2#3#4#5#6% command element [map] [parlst] begin end
- {\ifsecondargument
- \setXMLarguments{#2}{#3}{#4}%
- \fi
- \ifignoreXMLcase
- \lowercasestring#2\to\ascii \@EA#1\@EA{\ascii}{#5}{#6}%
- \uppercasestring#2\to\ascii \@EA#1\@EA{\ascii}{#5}{#6}%
- \else
- #1{#2}{#5}{#6}%
- \fi}
-
-\def\setXMLarguments#1#2#3% element [tag] settings
- {\doifassignmentelse{#2}
- {\setvalue{\@@XMLpars:#1}{\getrawparameters[\@@XMLvariable:#1:][#2]}}
- {\setvalue{\@@XMLmap :#1}{#2}% later we can init vars by this name
- \doifsomething{#3}{\setvalue{\@@XMLpars:#1}{\getrawparameters[#2][#3]}}}}
-
-\def\presetXMLarguments#1%
- {\getvalue{\@@XMLpars:#1}}
-
-\prependtoks
- \presetXMLarguments\currentXMLelement
-\to \everyXMLelement
-
-\def\doifXMLdataelse#1#2#3% % \relax too, so no etex
-% wrong
-% {\expandafter\ifx\csname\@@XMLdata:#1\endcsname\relax
-% slow
-% {\ifundefined{\@@XMLdata:#1}%
-% etex
- {\unless\ifcsname\@@XMLdata:#1\endcsname
- #3%
- \else\expandafter\ifx\csname\@@XMLdata:#1\endcsname\empty
- #3%
- \else\expandafter\ifx\csname\@@XMLdata:#1\endcsname\relax
- #3%
- \else
- #2%
- \fi\fi\fi}
-
-\def\XMLpop#1% one level
-% wrong
-% {\expandafter\ifx\csname\@@XMLdata:#1\endcsname\relax\else
-% \csname\@@XMLdata:#1\endcsname
-% \fi}
-% slow, hm was not commented
-% {\ifundefined{\@@XMLdata:#1}\else\getvalue{\@@XMLdata:#1}\fi}
-% etex
- {\ifcsname\@@XMLdata:#1\endcsname\csname\@@XMLdata:#1\endcsname\fi}
-
-\def\XMLpopdata#1% see m-steps for usage
- {\unless\ifcsname\@@XMLdata:#1\endcsname
- \else\expandafter\ifx\csname\@@XMLdata:#1\endcsname\empty
- \else\expandafter\ifx\csname\@@XMLdata:#1\endcsname\relax
- \else
- \@EA\@EA\@EA\XMLdata\@EA\@EA\@EA{\csname\@@XMLdata:#1\endcsname}%
- \fi\fi\fi}
-
-\def\XMLappend#1#2%
- {\edef\!!stringa{\@@XMLdata:#1}%
- \doifXMLdataelse{#1}%
- {\@EA\@EA\@EA\setvalue\@EA\@EA\@EA\!!stringa\@EA\@EA\@EA
- {\csname\!!stringa\endcsname#2}}
- {\setvalue\!!stringa{#2}}}
-
-\def\XMLprepend#1#2%
- {\edef\!!stringa{\@@XMLdata:#1}%
- \doifXMLdataelse{#1}%
- {\@EA\@EA\@EA\setvalue\@EA\@EA\@EA\!!stringa\@EA\@EA\@EA
- {#2\csname\!!stringa\endcsname}}
- {\setvalue\!!stringa{#2}}}
-
-\def\XMLerase#1%
- {\letvalue{\@@XMLdata:#1}\empty}
-
-\def\XMLassign#1%
- {\setvalue{\@@XMLdata:#1}}
-
-\def\defXMLstring#1#2%
-% {\@EA\convertcommand\csname\@@XMLdata:#2\endcsname\to#1}
- {\bgroup
- \let\getXMLentity\firstofoneargument
- \xdef\@@XML@@string{\csname\@@XMLdata:#2\endcsname}%
- \egroup
- \@EA\convertcommand\@@XML@@string\to#1}
-
-\def\XMLshow#1%
- {\showvalue{\@@XMLdata:#1\endcsname}}
-
-\def\XMLunspace#1%
- {\ifcsname\@@XMLdata:#1\endcsname
- \setevalue{\@@XMLdata:#1}%
- {\@EA\@EA\@EA\dounspaced\csname\@@XMLdata:#1\endcsname\end}%
- \fi}
-
-\def\defXMLlowerclean#1% lowercase ! evt tzt upper too
- {\bgroup
- \lccode`\#=32\lccode`\$=32\lccode`\%=32\lccode`\\=32\lccode`\^=32
- \lccode`\_=32\lccode`\{=32\lccode`\}=32\lccode`\|=32\lccode`\~=32
- \@EA\lowercase\@EA{\@EA\xdef\@EA#1\@EA{#1}}%
- \egroup}
-
-\def\processXMLparelse#1#2#3#4%
- {\processaction
- [\XMLpar{#1}{#2}{}]
- [#3,\s!unknown=>{#4},\s!default={#4}]}
-
-%D We can pick up key|/|value pairs, but we still need a way
-%D to process these.
-
-\def\mapXMLvalue#1#2#3% td align center -> middle
- {\setvalue{\@@XMLvalue:#1:#2:#3}}
-
-% \def\XMLvar#1#2#3% td align center
-% {\ifundefined{\@@XMLvariable:#1:#2}%
-% \XMLval{#1}{#2}{#3}%
-% \else
-% \XMLval{#1}{#2}{\getvalue{\@@XMLvariable:#1:#2}}%
-% \fi}
-%
-% \def\XMLval#1#2#3%
-% {\ifundefined{\@@XMLvalue:#1:#2}%
-% #3%
-% \else
-% \getvalue{\@@XMLvalue:#1:#2}%
-% \fi}
-%
-% \def\XMLpar#1#2#3%
-% {\ifundefined{\@@XMLvariable:#1:#2}%
-% #3%
-% \else
-% \getvalue{\@@XMLvariable:#1:#2}%
-% \fi}
-%
-% speedup
-
-\def\XMLvar#1#2#3% td align center
- {\ifcsname\@@XMLvariable:#1:#2\endcsname
- \XMLval{#1}{#2}{\csname\@@XMLvariable:#1:#2\endcsname}%
- \else
- \XMLval{#1}{#2}{#3}% evt inline code
- \fi}
-
-\def\XMLval#1#2#3%
- {\ifcsname\@@XMLvalue:#1:#2\endcsname
- \csname\@@XMLvalue:#1:#2\endcsname
- \else
- #3%
- \fi}
-
-\def\XMLpar#1#2#3%
- {\ifcsname\@@XMLvariable:#1:#2\endcsname
- \csname\@@XMLvariable:#1:#2\endcsname
- \else
- #3%
- \fi}
-
-% so far for speedup
-
-\defineXMLsingular [begingroup] {\begingroup}
-\defineXMLsingular [endgroup] {\endgroup}
-
-\def\XMLstr#1%
- {{\enableXML\scantokens{#1}\unskip}}
-
-\def\XMLstr#1% test
- {\scantokens{\begingroup\enableXML#1<endgroup/>}}
-
-%\def\XMLstrpar#1#2#3%
-% {{\enableXML
-% \ifundefined{\@@XMLvariable:#1:#2}%
-% \scantokens{#3}%
-% \else
-% \scantokens\@EA\@EA\@EA
-% {\csname\@@XMLvariable:#1:#2\endcsname}\unskip
-% \fi}}
-
-\def\XMLstrpar#1#2#3% test
- {\ifundefined{\@@XMLvariable:#1:#2}%
- \scantokens{\begingroup\enableXML#3<endgroup/>}%
- \else
- \scantokens\@EA\@EA\@EA{\@EA\begingroup\@EA\enableXML
- \csname\@@XMLvariable:#1:#2\endcsname<endgroup/>}%
- \fi}
-
-\def\doifXMLvarelse#1#2#3#4% geen etex, \relax too
- {\expandafter\ifx\csname\@@XMLvariable:#1:#2\endcsname\relax#4\else
- \expandafter\ifx\csname\@@XMLvariable:#1:#2\endcsname\empty#4\else#3\fi\fi}
-
-\def\doifXMLvalelse#1#2#3#4% geen etex, \relax too
- {\expandafter\ifx\csname\@@XMLvalue:#1:#2\endcsname\relax#4\else
- \expandafter\ifx\csname\@@XMLvalue:#1:#2\endcsname\empty#4\else#3\fi\fi}
-
-\let\doifXMLparelse\doifXMLvarelse
-
-\def\dogotoXML%
- {\ifx\nexttoken<%
- \expandafter\nexttoken
- \else
- \expandafter\gotoXML
- \fi}
-
-\def\gotoXML%
- {\afterassignment\dogotoXML\let\nexttoken=}
-
-%D Saves tokens and typing.
-
-\def\XMLownvar {\XMLvar \currentXMLelement}
-\def\XMLownval {\XMLval \currentXMLelement}
-\def\XMLownpar {\XMLpar \currentXMLelement}
-\def\XMLownstrpar {\XMLstrpar \currentXMLelement}
-\def\doifXMLownvarelse{\doifXMLvarelse\currentXMLelement}
-\def\doifXMLownvalelse{\doifXMLvalelse\currentXMLelement}
-\def\doifXMLownparelse{\doifXMLparelse\currentXMLelement}
-
-%D
-
-\long\def\startXMLcode[#1] #2 \stopXMLcode
- {\setgvalue{\@@XMLcode:#1}{\startXMLdata#2\stopXMLdata}}
-
-\def\getXMLcode[#1]% \expandXMLcode
- {\getvalue{\@@XMLcode:#1}}
-
-% \long\def\startXMLdata#1\stopXMLdata%
-% {\begingroup\enableXML\scantokens{#1}\endgroup}
-%
-% \defineXMLentity[tex-backslash] {\catchXMLpar}
-%
-% \def\catchXMLpar#1#2#3
-% {\if#1p\if#2a\if#3r\ifmmode\else\endgraf\fi
-% \else\texescape\fi\else\texescape\fi\else\texescape\fi}
-
-\long\def\startXMLdata
- {\begingroup
- \catcode`\^^I=\@@space
- \catcode`\^^M=\@@space
- \catcode`\^^L=\@@space
- \dostartXMLdata}
-
-% \long\def\dostartXMLdata#1\stopXMLdata
-% {\enableXML\scantokens{#1}\endgroup}
-
-\long\def\dostartXMLdata#1\stopXMLdata
- {\enableXML\scantokens{#1}\ifhmode\unskip\unskip\fi\endgroup}
-
-\unexpanded\def\XMLdata#1% % \unexpanded added 22/5/2001
- {\begingroup
- \enableXML\scantokens{#1}\ifhmode\unskip\unskip\fi
- \endgroup}
-
-\unexpanded\def\XMLdata#1% % grouping changed 20/5/2001
- {\scantokens{\begingroup\enableXML#1<endgroup/>}}
-
-%D
-
-\def\bXMLs{\ifignoreXMLspaces\ignorespaces\fi}
-\def\eXMLs{\ifignoreXMLspaces\ifhmode\unskip\fi\fi}
-
-\protect
-
-% \defineXMLcommand{placeindex/}
-% {\placeindex[criterium=all]}
-%
-% \defineXMLargument{index}
-% {\index[\XMLvar{index}{key}{}]}
-
-%D Here we implement the handling of preformatted code.
-
-\unprotect
-
-\def\startXMLpreformatted#1%
- {\startpacked
- #1%
- \fixedXMLfonttrue
- \obeylines
- \obeyspaces
- \setbox\scratchbox=\hbox{x}%
- \edef\obeyedspace{\noindent\noexpand\kern\the\wd\scratchbox}}
-
-\def\stopXMLpreformatted#1%
- {\stoppacked}
-
-%D
-
-\def\XMLinput{\enableXML\input} \global\let\inputXML\XMLinput
-
-% options
-
-\def\processXMLfile #1{\enableXML\processfile{#1}}
-\def\processXMLfilegrouped#1{{\enableXML\processfile{#1}\relax\ifmmode\else\par\fi}}
-
-% partially defined here
-
-\fetchruntimecommand\showXMLfile {\f!xtagprefix\s!run}
-\fetchruntimecommand\showXMLbuffer{\f!xtagprefix\s!run}
-
-\fetchruntimecommand\showXMLtxt {\f!xtagprefix\s!run}
-\fetchruntimecommand\showXMLpar {\f!xtagprefix\s!run}
-\fetchruntimecommand\showXMLlin {\f!xtagprefix\s!run}
-\fetchruntimecommand\showXMLwrd {\f!xtagprefix\s!run}
-\fetchruntimecommand\showXMLemp {\f!xtagprefix\s!run}
-
-%D \type
-%D {processXMLbuffer}
-%D
-%D For illustrative purposes, we need to be able to reuse
-%D definitions, which is why we implement a buffer processor
-%D here. The macro \type {\processXMLbuffer} behaves like
-%D any buffer processor.
-
-\def\processXMLbuffer%
- {\dosingleempty\doprocessXMLbuffer}
-
-\def\doprocessXMLbuffer[#1]%
- {\doifelsenothing{#1}
- {\doprocessXMLbuffer[\jobname]}
- {\begingroup
- \def\dodoprocessXMLbuffer##1%
- {\enableXML\processXMLfile{\TEXbufferfile{##1}}}%
- \processcommalist[#1]\dodoprocessXMLbuffer
- \endgroup}}
-
-%D Loading specific modules takes place with \type
-%D {\useXMLfilters}.
-
-\def\useXMLfilter[#1]%
- {\processcommalist[#1]\douseXMLfilter}
-
-\def\douseXMLfilter#1%
- {\doifundefined{\c!file\f!xtagprefix#1}
- {\setvalue{\c!file\f!xtagprefix#1}{}%
- \makeshortfilename[\f!xtagprefix#1]%
- \writestatus{xml}{loading module #1}% will be \showmessage
- \startreadingfile
- \readsysfile{\shortfilename}{}{}%
- \stopreadingfile}}
-
-%D Temporarily here.
-
-\newtoks\groupedtoks
-
-\bgroup
-
-\catcode`\<=\@@active
-
-\long\unexpanded\gdef\getXMLgrouped#1#2#3%
- {\groupedtoks\emptytoks
- \convertargument<#1>\to\xxascii
- \convertargument<#1 \to\yyascii
- \newcounter\groupedlevel
- \long\def\dogetgrouped##1</#1>%
- {\appendtoks##1\to\groupedtoks
- \convertargument##1\to\ascii
- \doloop
- {\@EA\@EA\@EA\aftersplitstring\@EA\ascii\@EA\at\xxascii\to\ascii
- \ifx\ascii\empty
- \exitloop
- \else
- \increment\groupedlevel
- \fi}%
- \convertargument##1\to\ascii
- \doloop
- {\@EA\@EA\@EA\aftersplitstring\@EA\ascii\@EA\at\yyascii\to\ascii
- \ifx\ascii\empty
- \exitloop
- \else
- \increment\groupedlevel
- \fi}%
- \ifnum\groupedlevel>0
- \decrement\groupedlevel
- \appendtoks</#1>\to\groupedtoks
- \else
- \edef\dogetgrouped{\noexpand#2\the\groupedtoks\noexpand#3}%
- \fi
- \dogetgrouped}%
- \dogetgrouped}
-
-%D Cleaner but hardly faster unless big strings are passed.
-
-\long\gdef\docountXMLgrouped#1\end#2\end
- {\long\def\dosplitstring##1#2##2@@##3\end%
- {\def\ascii{##2}%
- \ifx\ascii\empty \else
- \advance\scratchcounter 1
- \dosplitstring##2@@#2@@\end
- \fi}%
- \dosplitstring#1@@#2@@\end}
-
-\long\unexpanded\gdef\getXMLgrouped#1#2#3%
- {\groupedtoks\emptytoks
- \scratchcounter=0
- \long\def\dogetgrouped##1</#1>%
- {\appendtoks##1\to\groupedtoks
- \docountXMLgrouped##1\end<#1>\end
- \docountXMLgrouped##1\end<#1 \end
- \ifcase\scratchcounter
- \def\dogetgrouped{\@EA#2\the\groupedtoks#3}%
- \else
- \advance\scratchcounter -1
- \appendtoks</#1>\to\groupedtoks
- \fi
- \dogetgrouped}%
- \dogetgrouped}
-
-%D More versatile.
-
-\long\unexpanded\gdef\getXMLgroupedenvironment#1#2#3%
- {\def\dodogetgrouped{\@EA#2\the\groupedtoks#3}%
- \getXMLgrouped{#1}}
-
-\long\unexpanded\gdef\getXMLgroupedargument#1#2%
- {\def\dodogetgrouped{\@EA#2\@EA{\the\groupedtoks}}%
- \getXMLgrouped{#1}}
-
-\long\unexpanded\gdef\getXMLgrouped#1%
- {\groupedtoks\emptytoks
- \scratchcounter=0
- \long\def\dogetgrouped##1</#1>%
- {\appendtoks##1\to\groupedtoks
- \docountXMLgrouped##1\end<#1>\end
- \docountXMLgrouped##1\end<#1 \end
- \ifcase\scratchcounter
- \let\dogetgrouped\dodogetgrouped
- \else
- \advance\scratchcounter -1
- \appendtoks</#1>\to\groupedtoks
- \fi
- \dogetgrouped}%
- \dogetgrouped}
-
-\egroup
-
-% {pre}{pos}{before}{after}
-%
-%\unexpanded\def\getgrouped#1#2#3#4%
-% {\groupedtoks\emptytoks
-% \convertargument#1\to\xxascii
-% \newcounter\groupedlevel
-% \def\dogetgrouped##1#2%
-% {\appendtoks##1\to\groupedtoks
-% \convertargument##1\to\ascii
-% \doloop
-% {\@EA\@EA\@EA\aftersplitstring\@EA\ascii\@EA\at\xxascii\to\ascii
-% \ifx\ascii\empty
-% \exitloop
-% \else
-% \increment\groupedlevel
-% \fi}%
-% \ifnum\groupedlevel>0
-% \decrement\groupedlevel
-% \appendtoks#2\to\groupedtoks
-% \else
-% \edef\dogetgrouped{\noexpand#3\the\groupedtoks\noexpand#4}%
-% \fi
-% \dogetgrouped}%
-% \dogetgrouped}
-
-% interesting and fully expandable
-
-\def\XMLifequalelse#1#2#3#4#5%
- {\ifundefined{\@@XMLvariable:#1:#2}%
- #5%
- \else
- \@EA\@EA\@EA\@@ifequal\csname\@@XMLvariable:#1:#2\endcsname
- \relax\@@and#3\relax\@@then#4\@@else#5\@@fi
- \fi}
-
-\def\expifequalelse#1#2#3#4%
- {\@@ifequal#1\relax\relax\@@and#2\relax\relax\@@then#3\@@else#4\@@fi}
-
-\def\@@ifequal#1#2\@@and#3#4\@@then#5\@@else#6\@@fi%
- {\ifx#1\relax
- \ifx#3\relax#5\else#6\fi
- \else
- \ifx#3\relax#6\else\@@ifequal#2\@@and#4\@@then#5\@@else#6\@@fi\fi
- \fi}
-
-\protect \endinput
diff --git a/tex/context/user/cont-sys.rme b/tex/context/user/cont-sys.rme
index 69483c98d..4da61099c 100644
--- a/tex/context/user/cont-sys.rme
+++ b/tex/context/user/cont-sys.rme
@@ -16,47 +16,66 @@
% Here you can take care of overloading some (style)
% defaults. What goes here, depends on your local system.
%
-% Set default file name mapping (not really needed):
+% The following commands sets the default font encoding:
%
-% \usetypescript [ber]
+% \setupencoding [\s!default=ec]
%
-% Overload Lucida by Adobe-15:
+% You can let \CONTEXT\ load the map files for \PDFTEX.
+%
+% \autoloadmapfilestrue
+%
+% If you use the more verbose naming scheme, uncomment this:
+%
+% \usetypescript [map] [default,\defaultencoding]
+%
+% or :
+%
+% \usetypescript [map] [all]
+%
+% In case you have set psfonts.map already, you can comment
+% the following lines. Beware: pdftex uses the fontname
+% (second entry on map file lines) for (not so) clever
+% remapping, so in case of troubles, remove the names (is
+% safe)!
+%
+% \preloadmapfile [original-ams-cmr]
+% \preloadmapfile [original-ams-euler]
+% \preloadmapfile [il2-ams-cmr]
+% \preloadmapfile [pl0-ams-cmr]
+%
+% If you want the default berry names (ec and 8r only):
+%
+% \usetypescript [berry] [\defaultencoding]
+%
+% Overload Lucida by Times cum suis:
%
% \definetypescriptsynonym [lbr] [pos]
%
% Compensate for missing files:
%
-% \definefontsynonym [Courier-Bold] [Courier]
-% \definefontsynonym [Courier-BoldOblique] [Courier]
-%
% \definefontsynonym [gbhei] [gbsong]
% \definefontsynonym [gbheisl] [gbsong]
% \definefontsynonym [gbheisl] [gbsong]
%
-% You can let \CONTEXT\ load the map files for \PDFTEX.
+% The already loaded map file list can be reset with:
%
-% \autoloadmapfilestrue
+% \forgetmapfiles
%
-% Setting up a global figure path (beware, \c!gebied may change):
+% Setting up a global figure path:
%
-% \setupexternalfigures
-% [\c!gebied={e:/fig/eps,t:/pragma/metapost/symbols}]
+% \setupexternalfigures [\c!gebied={e:/fig/eps,t:/mine/figs}]
%
% Loading a specific special driver:
%
-% \setupoutput
-% [dviwindo]
+% \setupoutput [dviwindo]
%
% Enabling \CONTEXT\ navigation symbols as well as \euro's.
-\usesymbols
- [nav,eur]
+\usesymbols [nav,eur]
-\setupsymbolset
- [navigation 1]
+\setupsymbolset [navigation 1]
-\setupinteraction
- [\c!symboolset=navigation 1]
+\setupinteraction [\c!symboolset=navigation 1]
% Changing language defaults:
%
@@ -64,31 +83,38 @@
% [nl]
% [\c!leftquote=\upperleftsinglesixquote,
% \c!leftquotation=\upperleftdoublesixquote]
-%
-% So far for the settings.
-% Loading local preferences:
+% Loading local preferences, for example
%
% \input prag-gen % company styles
% \input prag-log % more company styles
%
-% Enabling run time \METAPOST\ (also enable \write18 in texmf.cnf):
+% Enabling run time \METAPOST\ (also enable \write18 in
+% texmf.cnf):
+
+% \runMPgraphicstrue
+% \runMPTEXgraphicstrue
+% \recycleMPslotstrue
+
+% This saves some runtime, but needs a format, which you can
+% make with 'texexec --make --alone metafun'. Make sure that
+% the mem files are moved to the used web2c path (locate with
+% 'kpsewhich plain.mem').
- \runMPgraphicstrue
-\runMPTEXgraphicstrue
- \recycleMPslotstrue
\useMETAFUNformattrue
% Enabling nested pretty printing:
- \newprettytrue
+\newprettytrue
-% Protect filenames:
+% This can be a way to get things working on system with
+% name clashes. (Some \TeX's tend do search system wide.)
- \protectbufferstrue
-
-% not really needed
+\protectbufferstrue
+% You can enable a rigurous figure searching, but normally
+% this is not really needed and even annoying.
+%
% \runutilityfiletrue
% So far.
diff --git a/tex/context/user/cont-sys.tex b/tex/context/user/cont-sys.tex
deleted file mode 100644
index 69483c98d..000000000
--- a/tex/context/user/cont-sys.tex
+++ /dev/null
@@ -1,96 +0,0 @@
-%D \module
-%D [ file=cont-sys,
-%D version=1995.10.10,
-%D title=\CONTEXT\ Miscellaneous Macros,
-%D subtitle=System Specific Setups,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
-%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
-
-% Here you can take care of overloading some (style)
-% defaults. What goes here, depends on your local system.
-%
-% Set default file name mapping (not really needed):
-%
-% \usetypescript [ber]
-%
-% Overload Lucida by Adobe-15:
-%
-% \definetypescriptsynonym [lbr] [pos]
-%
-% Compensate for missing files:
-%
-% \definefontsynonym [Courier-Bold] [Courier]
-% \definefontsynonym [Courier-BoldOblique] [Courier]
-%
-% \definefontsynonym [gbhei] [gbsong]
-% \definefontsynonym [gbheisl] [gbsong]
-% \definefontsynonym [gbheisl] [gbsong]
-%
-% You can let \CONTEXT\ load the map files for \PDFTEX.
-%
-% \autoloadmapfilestrue
-%
-% Setting up a global figure path (beware, \c!gebied may change):
-%
-% \setupexternalfigures
-% [\c!gebied={e:/fig/eps,t:/pragma/metapost/symbols}]
-%
-% Loading a specific special driver:
-%
-% \setupoutput
-% [dviwindo]
-%
-% Enabling \CONTEXT\ navigation symbols as well as \euro's.
-
-\usesymbols
- [nav,eur]
-
-\setupsymbolset
- [navigation 1]
-
-\setupinteraction
- [\c!symboolset=navigation 1]
-
-% Changing language defaults:
-%
-% \setuplanguage
-% [nl]
-% [\c!leftquote=\upperleftsinglesixquote,
-% \c!leftquotation=\upperleftdoublesixquote]
-%
-% So far for the settings.
-
-% Loading local preferences:
-%
-% \input prag-gen % company styles
-% \input prag-log % more company styles
-%
-% Enabling run time \METAPOST\ (also enable \write18 in texmf.cnf):
-
- \runMPgraphicstrue
-\runMPTEXgraphicstrue
- \recycleMPslotstrue
-\useMETAFUNformattrue
-
-% Enabling nested pretty printing:
-
- \newprettytrue
-
-% Protect filenames:
-
- \protectbufferstrue
-
-% not really needed
-
-% \runutilityfiletrue
-
-% So far.
-
-\protect \endinput