summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2005-02-14 00:00:00 +0100
committerHans Hagen <pragma@wxs.nl>2005-02-14 00:00:00 +0100
commitd909306dc001ba4d17a31200f3b794dbd9e06783 (patch)
tree5bb44133dc52bcecc7635aed279c62195db53bfd /tex
parent832f714d45cd58bd72317a6f4e41420d61520600 (diff)
downloadcontext-d909306dc001ba4d17a31200f3b794dbd9e06783.tar.gz
stable 2005.02.14
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-en.tex6
-rw-r--r--tex/context/base/cont-log.tex14
-rw-r--r--tex/context/base/cont-new.tex106
-rw-r--r--tex/context/base/cont-sys.ori9
-rw-r--r--tex/context/base/cont-usr.ori103
-rw-r--r--tex/context/base/context.tex239
-rw-r--r--tex/context/base/core-des.tex8
-rw-r--r--tex/context/base/core-grd.tex3
-rw-r--r--tex/context/base/core-itm.tex2
-rw-r--r--tex/context/base/core-mat.tex2
-rw-r--r--tex/context/base/core-not.tex2
-rw-r--r--tex/context/base/core-sec.tex30
-rw-r--r--tex/context/base/core-spa.tex26
-rw-r--r--tex/context/base/core-var.tex4
-rw-r--r--tex/context/base/enco-ans.tex83
-rw-r--r--tex/context/base/enco-def.tex3
-rw-r--r--tex/context/base/enco-ec.tex17
-rw-r--r--tex/context/base/enco-fpl.tex14
-rw-r--r--tex/context/base/enco-il2.tex2
-rw-r--r--tex/context/base/enco-ini.tex65
-rw-r--r--tex/context/base/enco-pol.tex128
-rw-r--r--tex/context/base/font-run.tex46
-rw-r--r--tex/context/base/lang-ctx.tex51
-rw-r--r--tex/context/base/lang-dis.tex120
-rw-r--r--tex/context/base/lang-ini.tex146
-rw-r--r--tex/context/base/mult-ini.tex10
-rw-r--r--tex/context/base/mult-sys.tex1
-rw-r--r--tex/context/base/page-flt.tex4
-rw-r--r--tex/context/base/page-mar.tex14
-rw-r--r--tex/context/base/supp-box.tex3
-rw-r--r--tex/context/base/supp-pat.tex172
-rw-r--r--tex/context/base/syst-gen.tex6
-rw-r--r--tex/context/base/syst-pln.tex4
-rw-r--r--tex/context/base/syst-prm.tex7
-rw-r--r--tex/context/base/syst-tex.tex8
-rw-r--r--tex/context/base/type-ini.tex16
-rw-r--r--tex/context/base/type-map.tex6
-rw-r--r--tex/context/base/unic-000.tex116
-rw-r--r--tex/context/config/cont-usr.tex103
-rw-r--r--tex/context/interface/keys-cz.xml2
-rw-r--r--tex/context/interface/keys-de.xml2
-rw-r--r--tex/context/interface/keys-en.xml2
-rw-r--r--tex/context/interface/keys-it.xml2
-rw-r--r--tex/context/interface/keys-nl.xml2
-rw-r--r--tex/context/interface/keys-ro.xml2
-rw-r--r--tex/context/user/cont-sys.rme9
46 files changed, 979 insertions, 741 deletions
diff --git a/tex/context/base/cont-en.tex b/tex/context/base/cont-en.tex
index f2a960091..49e19f36e 100644
--- a/tex/context/base/cont-en.tex
+++ b/tex/context/base/cont-en.tex
@@ -21,13 +21,19 @@
\loaduserspecifications
+% Do we need more defaults? or maybe all languages?
+
\installlanguage [\s!en] [\c!state=\v!start]
\installlanguage [\s!uk] [\c!state=\v!start]
\installlanguage [\s!de] [\c!state=\v!start]
\installlanguage [\s!fr] [\c!state=\v!start]
\installlanguage [\s!es] [\c!state=\v!start]
+\installlanguage [\s!pt] [\c!state=\v!start]
\installlanguage [\s!it] [\c!state=\v!start]
\installlanguage [\s!nl] [\c!state=\v!start]
+\installlanguage [\s!cz] [\c!state=\v!start]
+\installlanguage [\s!sk] [\c!state=\v!start]
+\installlanguage [\s!pl] [\c!state=\v!start]
% \setupbodyfont [cmr,ams,rm,12pt]
%
diff --git a/tex/context/base/cont-log.tex b/tex/context/base/cont-log.tex
index 463df089a..5bbe8b284 100644
--- a/tex/context/base/cont-log.tex
+++ b/tex/context/base/cont-log.tex
@@ -220,7 +220,7 @@
\def\eTeX {\mathematics{\varepsilon}-\TeX}
\def\pdfTeX {pdf\TeX}
\def\pdfeTeX {pdfe-\TeX}
-\def\XeTeX {X\lower.5ex\hbox{\kern-.15em\mirror{E}}\kern-.1667em\TeX} % Adam Lindsay
+\def\XeTeX {X\lower.5ex\hbox{\kern-.15em\mirror{E}}\kern-.1667em\TeX}
\let\ETEX \eTeX
\let\PDFTEX \pdfTeX
@@ -230,4 +230,16 @@
\def\XML {XML}
\def\MATHML {MathML}
+\beginXETEX depth adjustment of logos
+
+ % The next patch by Adam Lindsay is needed to satisfy XeTeX's
+ % feelings about what depths and heights are supposed to be.
+
+ \let\NormalTeXLogo\TeX
+
+ \def\TeX {T\smash[d]{\kern-.1667em\lower.5ex\hbox{E}}\kern-.125emX}
+ \def\XeTeX{X\smash[d]{\lower.5ex\hbox{\kern-.15em\mirror{E}}}\kern-.1667em\TeX}
+
+\endXETEX
+
\protect \endinput
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index c8f16615e..b7fe39335 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -24,6 +24,112 @@
\ifx\normalcompound\undefined \let\normalcompound=| \fi
+\def\undepthed
+ {\dowithnextbox{\nextboxdp\zeropoint\flushnextbox}\hbox}
+
+\def\rawsectionnumber#1{\countervalue{\??se#1}}
+
+% new: \forcebaselinecorrection --> core-spa & core-grd
+
+\chardef\baselinecorrectionmode\plusone
+
+\def\onbaselinecorrection {\chardef\baselinecorrectionmode\plusone }
+\def\offbaselinecorrection {\chardef\baselinecorrectionmode\plustwo }
+\def\forcebaselinecorrection{\chardef\baselinecorrectionmode\plusthree}
+
+\def\topbaselinecorrection
+ {\ifvmode \ifdim\pagegoal<\maxdimen
+ \forcedtopbaselinecorrection
+ \fi \fi}
+
+\def\forcedtopbaselinecorrection
+ {\ifvmode
+ \bgroup
+ \setbaselinecorrections
+ \whitespace
+ \nointerlineskip
+ \dotopbaselinecorrection
+ \egroup
+ \fi}
+
+\let\forcedbotbaselinecorrection\botbaselinecorrection
+
+\def\startbaselinecorrection
+ {\ifcase\baselinecorectionmode
+ \or % normal
+ \baselinecorrection
+ \ifvmode
+ \bgroup
+ \setbox\scratchbox\vbox\bgroup
+ \ignorespaces
+ \let\stopbaselinecorrection\donormalstopbaselinecorrection
+ \else
+ \bgroup
+ \let\stopbaselinecorrection\egroup
+ \fi
+ \or % off
+ \bgroup
+ \let\stopbaselinecorrection\egroup
+ \or % force
+ \baselinecorrection
+ \ifvmode
+ \bgroup
+ \setbox\scratchbox\vbox\bgroup
+ \ignorespaces
+ \let\stopbaselinecorrection\doforcedstopbaselinecorrection
+ \else
+ \bgroup
+ \let\stopbaselinecorrection\egroup
+ \fi
+ \fi}
+
+\def\startbaselinecorrection
+ {\bgroup
+ \let\stopbaselinecorrection\egroup
+ \ifcase\baselinecorrectionmode
+ \or % normal
+ \baselinecorrection
+ \ifvmode
+ \setbox\scratchbox\vbox\bgroup\ignorespaces
+ \let\stopbaselinecorrection\donormalstopbaselinecorrection
+ \fi
+ \or % off
+ \or % force
+ \baselinecorrection
+ \ifvmode
+ \setbox\scratchbox\vbox\bgroup\ignorespaces
+ \let\stopbaselinecorrection\doforcedstopbaselinecorrection
+ \fi
+ \fi}
+
+\let\stopbaselinecorrection\relax
+
+\def\donormalstopbaselinecorrection % I have to check columns yet.
+ {\egroup
+ \topbaselinecorrection
+ \box\scratchbox
+ \botbaselinecorrection
+ \egroup}
+
+\def\doforcedstopbaselinecorrection % I have to check columns yet.
+ {\egroup
+ \forcedtopbaselinecorrection
+ \box\scratchbox
+ \forcedbotbaselinecorrection
+ \egroup}
+
+% core-grd:
+
+\let\normalstartbaselinecorrection=\startbaselinecorrection
+
+\def\startbaselinecorrection
+ {\ifgridsnapping
+ \centertogrid\bgroup
+ \let\stopbaselinecorrection\egroup
+ \else
+ \normalstartbaselinecorrection
+ \fi}
+
% todo: fast processor
\def\gettwopassdatalist#1%
diff --git a/tex/context/base/cont-sys.ori b/tex/context/base/cont-sys.ori
index 33e0d01d5..6a9e7eec3 100644
--- a/tex/context/base/cont-sys.ori
+++ b/tex/context/base/cont-sys.ori
@@ -169,15 +169,6 @@
%
% \runutilityfiletrue
-% You can also load additional encodings here:
-%
-% \useencoding[x5]
-%
-% \useregime[cyr]
-% \useencoding[cyr]
-% \enableregime[cp1251]
-% \setupbodyfont[cyr]
-
% So far.
\protect \endinput
diff --git a/tex/context/base/cont-usr.ori b/tex/context/base/cont-usr.ori
index a6d43a747..67a3f4d37 100644
--- a/tex/context/base/cont-usr.ori
+++ b/tex/context/base/cont-usr.ori
@@ -11,111 +11,10 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D In this file users can specify what hyphenation patterns
-%D they want to load into the format file. Normally, when
-%D using the \type {cont-..} files, this file can best be
-%D left unchanged. The default language and font settings
-%D done in the \type {cont-.} files take precedence! This file
-%D is subject to changes.
+\writestatus{loading}{User Settings}
\unprotect
-%D Hyphenation patterns are normally sought in filed named
-%D \type {lang-xx.pat}. When present on the system, those
-%D patterns take precedence. (The next list is inspired on
-%D Thomas Esser's \TETEX\ distribution.) This list will be
-%D adapted to the actual situation.
-
-\definefilesynonym [lang-ca.pat] [cahyph.tex]
-\definefilesynonym [lang-da.pat] [dkhyph.tex]
-\definefilesynonym [lang-de.pat] [dehyphn.tex]
-\definefilesynonym [lang-es.pat] [eshyph.tex]
-\definefilesynonym [lang-fi.pat] [fihyph.tex]
-\definefilesynonym [lang-fr.pat] [frhyph.tex]
-\definefilesynonym [lang-hr.pat] [hrhyph.tex]
-\definefilesynonym [lang-hu.pat] [huhyph.tex]
-\definefilesynonym [lang-it.pat] [ithyph.tex]
-\definefilesynonym [lang-la.pat] [lahyph7.tex]
-\definefilesynonym [lang-no.pat] [nohyph.tex]
-\definefilesynonym [lang-pl.pat] [plhyph.tex]
-\definefilesynonym [lang-pt.pat] [pthyph.tex]
-\definefilesynonym [lang-ro.pat] [rohyph.tex]
-\definefilesynonym [lang-ru.pat] [ruenhyph.tex] % sic: ruen
-\definefilesynonym [lang-sl.pat] [sihyph.tex] % sic: sl/si
-\definefilesynonym [lang-sv.pat] [svhyph.tex] % was [sehyph.tex]
-\definefilesynonym [lang-tr.pat] [tkhyph.tex] % was [trhyph.tex]
-\definefilesynonym [lang-ua.pat] [ukrenhyp.tex] % sic ukren
-
-\definefilesynonym [lang-uk.pat] [ukhyphen.tex] % symbolic name, see below
-
-\definefilesynonym [lang-nl.pat] [nlhyphen.tex] % symbolic name, see below
-\definefilesynonym [lang-af.pat] [nlhyphen.tex] % symbolic name, see below
-
-\definefilesynonym [lang-en.pat] [ushyphen.tex] % symbolic name, see below
-\definefilesynonym [lang-us.pat] [ushyphen.tex] % symbolic name, see below
-
-%definefilesynonym [czhyph.pat] [czhyphen.tex] % safeguard
-%definefilesynonym [skhyph.pat] [skhyphen.tex] % safeguard
-
-\definefilesynonym [lang-cz.pat] [czhyphen.tex] % in a different part of the tree, sigh
-\definefilesynonym [lang-sk.pat] [skhyphen.tex] % in a different part of the tree, sigh
-
-%definefilesynonym [lang-cz.hyp] [czhyphen.ex] % in a different part of the tree, sigh
-%definefilesynonym [lang-sk.hyp] [skhyphen.ex] % in a different part of the tree, sigh
-
-\definefilesynonym [lang-deo.pat] [dehypht.tex] % old german patterns
-
-%D When the dutch spelling changed, new patterns were
-%D constructed. For long these were named \type {dutch96.pat}.
-%D From 2000 however, the old \type {nehyph} files were
-%D replaced by \type {nehyph96.tex}. Typical something that
-%D you have to find out by accident. The names of hyphenation
-%D files as well as their coding is one of the dark areas of
-%D \TEX\ distributions.
-
- \doiffileelse{nehyph96.tex} {\definefilesynonym[nlhyphen.tex][nehyph96.tex]}
-{\doiffileelse{dutch96.pat} {\definefilesynonym[nlhyphen.tex][dutch96.pat]}
- {\definefilesynonym[nlhyphen.tex][nehyph.tex]}}
-
-%D Ah, something changed in 2003 with respect to ushyph.tex, so let's
-%D fall back when needed. I first noticed this during a workshop at the
-%D practical tex conference 2004 in sf. Yet another proof of a mess in
-%D filenames. So, we now use \type {ushyphen} as name and do some
-%D searching.
-%D
-%D Well, it happened again, this time in 2004/2005. We're now back at
-%D \type {hyphen.tex}. At the same time the uk patterns have changed. It
-%D clearly demonstrates that those taking care of patterns don't think
-%D generic and completely trust this aliasses mechanism in kpse. It's about
-%D time that \CONTEXT\ starts shipping its own pattern files again in order
-%D to get around this everlasting mess.
-
- \doiffileelse{hyphen.tex} {\definefilesynonym[ushyphen.tex][hyphen.tex] }
-{\doiffileelse{ushyph.tex} {\definefilesynonym[ushyphen.tex][ushyph.tex] }
-{\doiffileelse{ushyph1.tex} {\definefilesynonym[ushyphen.tex][ushyph1.tex]}
-{\doiffileelse{ushyph2.tex} {\definefilesynonym[ushyphen.tex][ushyph2.tex]}}}}
-
- \doiffileelse{ukhyph.tex} {\definefilesynonym[ukhyphen.tex][ukhyph.tex] }
-{\doiffileelse{ukhyph1.tex} {\definefilesynonym[ukhyphen.tex][ukhyph1.tex]}
-{\doiffileelse{ukhyph2.tex} {\definefilesynonym[ukhyphen.tex][ukhyph2.tex]}
- {\definefilesynonym[ukhyphen.tex][hyphen.tex] }}}
-
-%D In order to get 8 bit characters hyphenated, we need to load
-%D patterns under the right circumstances. In some countries, more
-%D than one font encoding is in use. I can add more defaults here
-%D if users let me know what encoding they use.
-
-\installlanguage [\s!nl] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
-\installlanguage [\s!fr] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
-\installlanguage [\s!de] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
-\installlanguage [\s!it] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
-
-\installlanguage [\s!hr] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
-\installlanguage [\s!pl] [\s!mapping={pl0,ec},\s!encoding={pl0,ec}]
-\installlanguage [\s!cz] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
-\installlanguage [\s!sk] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
-\installlanguage [\s!sl] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
-
%D Additional languages can be defined here. Beware of
%D encoding incompatibilities. Please take a look at the
%D \type {cont-en.tex}, \type {cont-nl.tex}, enz.\ files
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 415dd602d..a81897071 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -31,7 +31,7 @@
%D 2004.8.30 the low level interface is english. Watch out and adapt
%D your styles an modules.
-\def\contextversion{2005.02.07}
+\def\contextversion{2005.02.14}
%D Welcome to the main module. When this module is ran through
%D \type{initex} or \type {tex -i} or \type {whatevertex} using
@@ -76,18 +76,18 @@
%D manipulation macros. The first one loads \PLAIN\ \TEX, as
%D minimal as possible.
-\input syst-pln.tex % english / stripped plain
-\input syst-prm.tex % english / saved primitives (will be extended)
+\input syst-pln.tex % stripped plain
+\input syst-prm.tex % saved primitives (will be extended)
-\input syst-etx.tex % english / etex
-\input syst-omg.tex % english / omega-aleph
-\input syst-xtx.tex % english / xetex
-\input syst-gen.tex % english
-\input syst-ext.tex % english
-\input syst-new.tex % english
-\input syst-con.tex % english
+\input syst-etx.tex % etex
+\input syst-omg.tex % omega-aleph
+\input syst-xtx.tex % xetex
+\input syst-gen.tex
+\input syst-ext.tex
+\input syst-new.tex
+\input syst-con.tex
-\input math-pln.tex % english / basic plain math
+\input math-pln.tex % basic plain math
%D To enable selective loading, we say:
@@ -96,51 +96,51 @@
%D In order to conveniently load files, we need a few
%D support modules.
-\input supp-ini.tex % english
-\input supp-fil.tex % english
-\input supp-dir.tex % english
+\input supp-ini.tex
+\input supp-fil.tex
+\input supp-dir.tex
%D After this we're ready for the multi||lingual interface
%D modules.
-\input mult-ini.tex % english
-\input mult-sys.tex % english
-\input mult-con.tex % english
-\input mult-com.tex % english
+\input mult-ini.tex
+\input mult-sys.tex
+\input mult-con.tex
+\input mult-com.tex
%D We also use some third party macros. These are loaded by
%D saying:
-\input thrd-ran.tex % english / based on: Donald Arseneau
-\input thrd-trg.tex % english / based on: David Carlisle
+\input thrd-ran.tex % based on: Donald Arseneau
+\input thrd-trg.tex % based on: David Carlisle
%D Now we're ready for some general support modules. These
%D modules implement some basic typesetting functionality.
-\input supp-box.tex % english
-\input supp-mrk.tex % english
-\input supp-vis.tex % english
-\input supp-fun.tex % english
-\input supp-eps.tex % english
-\input supp-pdf.tex % english
-\input supp-spe.tex % english
-\input supp-mps.tex % english
-\input supp-mpe.tex % english
-\input supp-tpi.tex % english
-\input supp-mat.tex % english
-\input supp-ran.tex % english
-\input supp-ali.tex % english
+\input supp-box.tex
+\input supp-mrk.tex
+\input supp-vis.tex
+\input supp-fun.tex
+\input supp-eps.tex
+\input supp-pdf.tex
+\input supp-spe.tex
+\input supp-mps.tex
+\input supp-mpe.tex
+\input supp-tpi.tex
+\input supp-mat.tex
+\input supp-ran.tex
+\input supp-ali.tex
%D The next module deals with language specific typographic
%D extensions.
-\input typo-ini.tex % english / I must not forget about this module
+\input typo-ini.tex % I must not forget about this module
%D Verbatim typesetting is implemented in a separate class of
%D modules. The pretty typesetting modules are loaded at run
%D time.
-\input verb-ini.tex % english / replaces supp-ver
+\input verb-ini.tex % replaces supp-ver
%D The following modules are not sequentially dependent,
%D i.e. they have ugly dependencies, which will be cleaned
@@ -150,70 +150,73 @@
%D bit more advanced file handling as well as some general
%D variables, and features, so next we load:
-\input core-var.tex % english
-\input core-ins.tex % english
-\input core-fil.tex % english
-\input core-con.tex % english
+\input core-var.tex
+\input core-ins.tex
+\input core-fil.tex
+\input core-con.tex
%D We already need some synonyms (patterns). At runtime this
%D file will be reloaded.
-\input cont-fil.tex % english
+\input cont-fil.tex
%D \CONTEXT\ does not implement its own table handling. We
%D just go for the best there is and load \TABLE. Just to be
%D sure we do it here, before we redefine \type{|}.
-\input thrd-tab.tex % english / based on: Michael Wichura / will be reimplemented
+\input thrd-tab.tex % based on: Michael Wichura / will be reimplemented
%D Here comes the last support modules. They take care of
%D some language specific things.
-\input supp-lan.tex % english
-\input supp-num.tex % english
+\input supp-lan.tex
+\input supp-num.tex
+\input supp-pat.tex % generic pattern loading
%D The next few modules do what their names state. They
%D load additional definition modules when needed.
-\input enco-ini.tex % english
-\input filt-ini.tex % english
-\input hand-ini.tex % english
-\input regi-ini.tex % english
-\input lang-ini.tex % english
-\input unic-ini.tex % english
+\input enco-ini.tex
+\input filt-ini.tex
+\input hand-ini.tex
+\input regi-ini.tex
+\input lang-ini.tex
+\input lang-ctx.tex
+\input lang-dis.tex % after lang-ctx !
+\input unic-ini.tex
-\input colo-ini.tex % english
-\input colo-ext.tex % english
+\input colo-ini.tex
+\input colo-ext.tex
-\input spec-mis.tex % english
-\input spec-ini.tex % english
-\input spec-def.tex % english
-\input spec-var.tex % english
+\input spec-mis.tex
+\input spec-ini.tex
+\input spec-def.tex
+\input spec-var.tex
%D For the moment we load a lot of languages. In the future
%D we'll have to be more space conservative.
-\input lang-spe.tex % english
-\input lang-lab.tex % english
+\input lang-spe.tex
+\input lang-lab.tex
-\input lang-ger.tex % english
-\input lang-ita.tex % english
-\input lang-sla.tex % english
+\input lang-ger.tex
+\input lang-ita.tex
+\input lang-sla.tex
-\input lang-alt.tex % english
-\input lang-ana.tex % english
-\input lang-art.tex % english
-\input lang-bal.tex % english
-\input lang-cel.tex % english
-\input lang-grk.tex % english
-\input lang-ind.tex % english
-\input lang-ura.tex % english
+\input lang-alt.tex
+\input lang-ana.tex
+\input lang-art.tex
+\input lang-bal.tex
+\input lang-cel.tex
+\input lang-grk.tex
+\input lang-ind.tex
+\input lang-ura.tex
-\input lang-vn.tex % english / vietnamese, maybe this belongs in lang-ita
+\input lang-vn.tex % vietnamese, maybe this belongs in lang-ita
%D All kind of symbols are handled in:
-\input symb-ini.tex % english
+\input symb-ini.tex
%D Next we load some core macro's. These implement the
%D macros' that are seen by the users. The order of loading
@@ -229,23 +232,23 @@
\input core-ver.tex
\input core-vis.tex
%input core-con.tex
-\input core-rul.tex % english
+\input core-rul.tex
\input core-tab.tex
\input core-nav.tex
\input core-ref.tex
-\input core-obj.tex % english
+\input core-obj.tex
\input core-buf.tex
\input core-lst.tex
-\input core-num.tex % english
+\input core-num.tex
\input core-itm.tex
\input core-des.tex
-\input core-mat.tex % english
+\input core-mat.tex
\input core-syn.tex
\input core-spa.tex
\input core-sys.tex
\input page-ini.tex
-\input page-not.tex % english
+\input page-not.tex
\input page-one.tex
\input page-lay.tex
\input page-log.tex
@@ -254,15 +257,15 @@
\input page-flt.tex
\input page-mul.tex
\input page-set.tex
-\input page-lyr.tex % english
+\input page-lyr.tex
\input page-mak.tex
-\input page-num.tex % english
+\input page-num.tex
\input page-lin.tex
-\input page-mar.tex % english
-\input page-bck.tex % english
-\input page-app.tex % english / unfinished
-\input page-flw.tex % english / experimental: flows
-\input page-spr.tex % english / experimental: spreads
+\input page-mar.tex
+\input page-bck.tex
+\input page-app.tex % unfinished
+\input page-flw.tex % experimental: flows
+\input page-spr.tex % experimental: spreads
\input core-job.tex
@@ -278,25 +281,25 @@
%D Like languages, fonts, encodings and symbols, \METAPOST\
%D support is also organized in its own class of modules.
-\input meta-ini.tex % english
-\input meta-pag.tex % english
-\input meta-fig.tex % english
+\input meta-ini.tex
+\input meta-pag.tex
+\input meta-fig.tex
%D On which the next one depends:
-\input core-pos.tex % english
-\input core-snc.tex % english
+\input core-pos.tex
+\input core-snc.tex
%D A few more languages, that have specifics using core
%D functionality:
-\input lang-chi.tex % english
+\input lang-chi.tex
%D How about fill||in fields and related stuff?
-\input java-ini.tex % english / needs a cleanup
-\input core-fld.tex % english / needs a cleanup
-\input core-hlp.tex % english / will become a m-module
+\input java-ini.tex % needs a cleanup
+\input core-fld.tex % needs a cleanup
+\input core-hlp.tex % will become a m-module
%D Registers can depend on fields, so we load that now.
@@ -307,53 +310,53 @@
%D content. Here we also redefine \type{\it} as {\it italic}
%D instead of italian.
-\input font-ini.tex % english
-\input font-uni.tex % english
-\input font-bfm.tex % english
+\input font-ini.tex
+\input font-uni.tex
+\input font-bfm.tex
-\input type-ini.tex % english
-\input type-def.tex % english
+\input type-ini.tex
+\input type-def.tex
-\input prop-ini.tex % english
-\input prop-lay.tex % english / needs core-ref.tex
-\input prop-mis.tex % english
+\input prop-ini.tex
+\input prop-lay.tex % needs core-ref.tex
+\input prop-mis.tex
-\input math-ini.tex % english / needs enco-ini.tex
+\input math-ini.tex % needs enco-ini.tex
%D Now we're ready for more core modules.
-\input core-fnt.tex % english / todo: document setupinitial !
-\input core-not.tex % english
-\input core-lnt.tex % english / to be documented (with idris)
+\input core-fnt.tex % todo: document setupinitial !
+\input core-not.tex
+\input core-lnt.tex % to be documented (with idris)
\input core-mis.tex
-\input core-fig.tex % english / after page body
-\input core-par.tex % english / maybe this should become a m-module
+\input core-fig.tex % after page body
+\input core-par.tex % maybe this should become a m-module
-\input core-box.tex % english
+\input core-box.tex
%D Language specific spacing.
-\input lang-spa.tex % english
+\input lang-spa.tex
%D Only the basic XML parser and remapper are part of the core.
%D These macrosa re loaded last since they overload and|/|or
%D extend previously defined ones.
-\input xtag-ini.tex % english
-\input xtag-ext.tex % english
-\input xtag-prs.tex % english
-\input xtag-map.tex % english
-\input xtag-exp.tex % english
-\input xtag-pre.tex % english
-\input xtag-xsd.tex % english
-\input xtag-rng.tex % english
-%input xtag-ent.tex % english
+\input xtag-ini.tex
+\input xtag-ext.tex
+\input xtag-prs.tex
+\input xtag-map.tex
+\input xtag-exp.tex
+\input xtag-pre.tex
+\input xtag-xsd.tex
+\input xtag-rng.tex
+%input xtag-ent.tex
%D How about this:
-\input meta-xml.tex % english / to be documented
+\input meta-xml.tex % to be documented
% %D The next two modules implement some additional
% %D functionality concerning classes of documents and output.
@@ -365,7 +368,7 @@
%D \TEX\ related logo's are always typeset in a special way.
%D Here they come:
-\input cont-log.tex % english
+\input cont-log.tex
%D Defaults go here (more will be moved to this module
%D later):
diff --git a/tex/context/base/core-des.tex b/tex/context/base/core-des.tex
index d9a92e30b..7f049b6a2 100644
--- a/tex/context/base/core-des.tex
+++ b/tex/context/base/core-des.tex
@@ -441,8 +441,8 @@
\bgroup
\letvalue{\??dd#1\c!sectionnumber}\v!yes
\protectconversion
- \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!number}]%
- \preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber
+ \makeprecedingsectionnumber[\getvalue{\??dd#1\??dd\c!number}]%
+ \preparethenumber{\??dd#1}\precedingsectionnumber\preparednumber
\ifcase\descriptioncoupling \or
\xdef\@@internalenumber{#3{#1}}%
\rawreference\s!num{#1:\@@internalenumber}{}%
@@ -452,8 +452,8 @@
\fi
\egroup
\fi
- \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!number}]%
- \preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber
+ \makeprecedingsectionnumber[\getvalue{\??dd#1\??dd\c!number}]%
+ \preparethenumber{\??dd#1}\precedingsectionnumber\preparednumber
\disablepseudocaps % sorry, uppercase causes troubles
\doattributes % \nocase primitive needed
{\??dd#1}\c!headstyle\c!headcolor
diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex
index ff69c925a..a1ff8cd50 100644
--- a/tex/context/base/core-grd.tex
+++ b/tex/context/base/core-grd.tex
@@ -180,8 +180,7 @@
\let\stopbaselinecorrection=\relax
\def\offbaselinecorrection % Can be used inside correction.
- {\def\startbaselinecorrection
- {\bgroup\let\stopbaselinecorrection\egroup}}
+ {\def\startbaselinecorrection{\bgroup\let\stopbaselinecorrection\egroup}}
%D \macros
%D {topbaselinecorrection,botbaselinecorrection}
diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex
index d3a0c61aa..12f85097b 100644
--- a/tex/context/base/core-itm.tex
+++ b/tex/context/base/core-itm.tex
@@ -14,7 +14,7 @@
% new: text + lefttext=(,righttext=)
% start=
-\writestatus{loading}{Context Core Macros / itemgroup}
+\writestatus{loading}{Context Core Macros / Itemgroups}
\startmessages dutch library: layouts
9: momenteel maximaal -- niveaus in opsommingen
diff --git a/tex/context/base/core-mat.tex b/tex/context/base/core-mat.tex
index a243b91c4..10f8d16f3 100644
--- a/tex/context/base/core-mat.tex
+++ b/tex/context/base/core-mat.tex
@@ -143,7 +143,7 @@
\ifconditional\incrementformulanumber
\incrementnumber[\v!formula]%
\fi
- \maakhetnummer[\v!formula]%
+ \makesectionnumber[\v!formula]%
\setbox0\hbox{\ignorespaces#2\unskip}%
\ifdim\wd0>\zeropoint
\edef\hetsubnummer{#2}%
diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex
index 93122ec99..410626a66 100644
--- a/tex/context/base/core-not.tex
+++ b/tex/context/base/core-not.tex
@@ -546,7 +546,7 @@
{}%
\fi
\incrementnumber[\currentnote]%
- \maakhetnummer[\currentnote]%
+ \makesectionnumber[\currentnote]%
\rawreference\s!fnt{#1}\hetnummer
\let\lastnotenumber\hetnummer}%
\dostartnote}
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex
index b3a0e4336..25b3b93b9 100644
--- a/tex/context/base/core-sec.tex
+++ b/tex/context/base/core-sec.tex
@@ -162,9 +162,9 @@
\dochecknummer{#1}%
\egroup}
-\def\domaakvoorafgaandenummer[#1]% will become ugly after speed up
+\def\domakeprecedingsectionnumber[#1]% will become ugly after speed up
{\bgroup % added
- \globallet\voorafgaandenummer\empty
+ \globallet\precedingsectionnumber\empty
\ifsectienummer
\doifvalue{\??sb\@@sectionblock\c!number}\v!yes % added
{\doifelsevalue{\@@thenumber{#1}\c!sectionnumber}\v!yes
@@ -174,37 +174,37 @@
\ifdone
\edef\currentsection
{\getvalue{\??by\getvalue{\@@thenumber{#1}\c!way\c!local}}}%
- \doifnot{\currentsection}\zerosection
- {\doifnot{\@@sectionvalue{\currentsection}}{0}
- {\xdef\voorafgaandenummer%
+ \doifnot\currentsection\zerosection
+ {\doifnot{\@@sectionvalue\currentsection}{0}
+ {\xdef\precedingsectionnumber%
{\getvalue{\currentsection\c!number}.}}}%
\fi}%
\fi
\egroup}
-\def\maakvoorafgaandenummer[#1]%
+\def\makeprecedingsectionnumber[#1]%
{\bgroup
%\ifnum\blocklevel>0
%\ifcase\blocklevel\else
\ifdoingblocks
\doifnotvalue{\@@thenumber{#1}\c!blockway}\v!no\setblockcounters
\fi
- \domaakvoorafgaandenummer[#1]%
+ \domakeprecedingsectionnumber[#1]%
\egroup}
-% \def\maakhetnummer[#1]%
-% {\maakvoorafgaandenummer[#1]%
+% \def\makesectionnumber[#1]%
+% {\makeprecedingsectionnumber[#1]%
% \xdef\hetnummer%
-% {\voorafgaandenummer\convertednumber[#1]}}%
+% {\precedingsectionnumber\convertednumber[#1]}}%
%
% hack needed for chinese and oldstyle in normal tex, will change
-\def\maakhetnummer[#1]%
+\def\makesectionnumber[#1]%
{\bgroup
\forceunexpanded % i don't like this hack
- \maakvoorafgaandenummer[#1]%
+ \makeprecedingsectionnumber[#1]%
\xdef\hetnummer% was \xdef maar dat gaat fout met font switches
- {\voorafgaandenummer\convertednumber[#1]}%
+ {\precedingsectionnumber\convertednumber[#1]}%
\egroup}
\def\preparethenumber#1#2#3% {\??id#1} \number \result
@@ -216,7 +216,7 @@
\edef#3{\@EA\separatednumber\@EA{#2}}}} % hm, etex
\def\lossenummer[#1]%
- {\maakhetnummer[#1]%
+ {\makesectionnumber[#1]%
\hetnummer}
\def\currentnumber[#1]% kan tekst hier weg ?
@@ -264,7 +264,7 @@
{\setvalue{#1\c!number}{\@@longsectionnumber{#1}}}
{\setvalue{#1\c!number}{\@@shortsectionnumber{#1}}}}
-\def\setupsection%
+\def\setupsection
{\dodoubleargument\dosetupsection}
%%%%%%%%% new, multilingual
diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex
index 5a1d11c41..c3ae6dc3a 100644
--- a/tex/context/base/core-spa.tex
+++ b/tex/context/base/core-spa.tex
@@ -1586,8 +1586,10 @@
\def\regelcorrectie {\baselinecorrection}
% \prevdepth crosses pageboundaries!
+%
+% todo: a version that works ok inside a box
-\let\dorondomregelcorrectie=\relax
+\let\doaroundlinecorrection\relax
\def\startlinecorrection
{\dodoubleempty\dostartlinecorrection}
@@ -1596,17 +1598,17 @@
{\bgroup
\processaction
[#1]
- [ \v!blank=>\let\dorondomregelcorrectie\blank,
- \s!default=>\let\dorondomregelcorrectie\relax,
- \s!unknown=>{\def\dorondomregelcorrectie{\blank[#1]}}]%
- \dorondomregelcorrectie
+ [ \v!blank=>\let\doaroundlinecorrection\blank,
+ \s!default=>\let\doaroundlinecorrection\relax,
+ \s!unknown=>{\def\doaroundlinecorrection{\blank[#1]}}]%
+ \doaroundlinecorrection
\startbaselinecorrection
\offbaselinecorrection
\ignorespaces}
\def\stoplinecorrection
{\stopbaselinecorrection
- \dorondomregelcorrectie
+ \doaroundlinecorrection
\egroup}
\def\correctwhitespace
@@ -2213,12 +2215,12 @@
% to be documented
\def\nopenalties
- {\widowpenalty \zerocount
- \clubpenalty \zerocount
- \brokenpenalty \zerocount
- \doublehyphendemerits\zerocount
- \finalhyphendemerits \zerocount
- \adjdemerits \zerocount}
+ {\widowpenalty \zerocount
+ \clubpenalty \zerocount
+ \brokenpenalty \zerocount
+ \doublehyphendemerits\zerocount
+ \finalhyphendemerits \zerocount
+ \adjdemerits \zerocount}
\def\setdefaultpenalties
{\setups[\systemsetupsprefix\s!default]}
diff --git a/tex/context/base/core-var.tex b/tex/context/base/core-var.tex
index b181067fc..875bfc889 100644
--- a/tex/context/base/core-var.tex
+++ b/tex/context/base/core-var.tex
@@ -128,9 +128,9 @@
%D This boolean can be used to bypass certain
%D initializations.
-\newif\ifproductionrun
+\newif\ifproductionrun \appendtoks \productionruntrue \to \everydump
-\appendtoks \productionruntrue \to \everydump
+\appendtoks \ifcase\protectionlevel\else\reportunprotection\fi \to \everydump
%D \macros
%D {everyboxedcontent, ifboxedcontent,
diff --git a/tex/context/base/enco-ans.tex b/tex/context/base/enco-ans.tex
index a4d255202..6bd7df7bf 100644
--- a/tex/context/base/enco-ans.tex
+++ b/tex/context/base/enco-ans.tex
@@ -8,16 +8,18 @@
%D copyright=PRAGMA-ADE]
%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.
-%D This is \YandY's texnansi encoding vector, which combines
-%D the best of the ansi encoding vector (prebuilt accented
-%D characters etc.) and some of \TEX's vectors.
+%D This is \YandY's texnansi encoding vector, which combines
+%D the best of the ansi encoding vector (prebuilt accented
+%D characters etc.) and some of \TEX's vectors.
-\startmapping[texnansi]
+\startmapping[texnansi]
-\definecasemap 228 228 196 \definecasemap 196 228 196
+\definecasemap 231 231 199 \definecasemap 199 231 199
+
+\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
@@ -47,8 +49,21 @@
\definecasemap 241 241 209 \definecasemap 209 241 209
\definecasemap 245 245 213 \definecasemap 213 245 213
-\definecasemap 240 240 208 \definecasemap 208 240 208
-\definecasemap 254 254 222 \definecasemap 222 254 222
+\definecasemap 240 240 208 \definecasemap 208 240 208
+\definecasemap 254 254 222 \definecasemap 222 254 222
+
+% needed by some patterns:
+
+% \definecaseself 34 % quotedbl
+% \definecaseself 132 % quotedblbase
+% \definecaseself 147 % quotedblleft
+% \definecaseself 148 % quotedblright
+% \definecaseself 129 % quotesingle
+% \definecaseself 130 % quotesinglebase
+% \definecaseself 145 % quoteleft
+% \definecaseself 146 % quoteright
+
+\definecaseself 223
\stopmapping
@@ -57,18 +72,18 @@
\definecharacter textacute 19
\definecharacter textbreve 21
\definecharacter textcaron 20
-\definecharacter textcedilla 184
+\definecharacter textcedilla 184
\definecharacter textcircumflex 94 % 136
\definecharacter textdiaeresis 168
\definecharacter textdotaccent 5
\definecharacter textgrave 18
\definecharacter texthungarumlaut 6
-\definecharacter textmacron 175
+\definecharacter textmacron 175
\definecharacter textogonek 7
\definecharacter textring 23
\definecharacter texttilde 152
-\definecharacter dotlessi 16 % 105
+\definecharacter dotlessi 16 % 105
\definecharacter dotlessj 17
\definecharacter endash 150 % lig
@@ -106,30 +121,30 @@
\definecharacter threesuperior 179
\definecharacter textcent 162 % ?
-\definecharacter textcurrency 164
+\definecharacter textcurrency 164
\definecharacter texteuro 1
\definecharacter textflorin 131
\definecharacter textsterling 163
-\definecharacter textyen 165
+\definecharacter textyen 165
\definecharacter percent 37
\definecharacter perthousand 137
-\definecharacter softhyphen 45
+\definecharacter softhyphen 45
\definecharacter periodcentered 183
-\definecharacter textasciicircum 142
+\definecharacter textasciicircum 142
\definecharacter textasciitilde 158
-\definecharacter textbackslash 92
-\definecharacter textbraceleft 123
-\definecharacter textbraceright 125
+\definecharacter textbackslash 92
+\definecharacter textbraceleft 123
+\definecharacter textbraceright 125
\definecharacter textunderscore 95
-\definecharacter textbrokenbar 166
+\definecharacter textbrokenbar 166
\definecharacter textbullet 149
\definecharacter textdag 134
\definecharacter textddag 135
-\definecharacter textdegree 176
+\definecharacter textdegree 176
\definecharacter textdiv 247
\definecharacter textellipsis 133
\definecharacter textfraction 4
@@ -145,13 +160,13 @@
\definecharacter quotedblright 148
\definecharacter quotesingle 129
-\definecharacter quotesinglebase 130
+\definecharacter quotesinglebase 130
\definecharacter quoteleft 145
\definecharacter quoteright 146
-\definecharacter guilsingleleft 139
-\definecharacter guilsingleright 155
+\definecharacter guilsingleleft 139
+\definecharacter guilsingleright 155
\definecharacter leftguillemot 171
\definecharacter rightguillemot 187
@@ -187,9 +202,9 @@
\definecharacter ucircumflex 251
\definecharacter Ucircumflex 219
-\definecharacter adiaeresis 228
-\definecharacter Adiaeresis 196
-\definecharacter ediaeresis 235
+\definecharacter adiaeresis 228
+\definecharacter Adiaeresis 196
+\definecharacter ediaeresis 235
\definecharacter Ediaeresis 203
\definecharacter idiaeresis 239
\definecharacter Idiaeresis 207
@@ -228,16 +243,16 @@
\stopencoding
-% will be replaced by math collection, fails anyway
+% will be replaced by math collection, fails anyway
\startencoding[texnansi]
-\definecharacter mathgrave "7060
-\definecharacter mathacute "70B4
-\definecharacter mathhat "7088
-\definecharacter mathtilde "7098
-\definecharacter mathddot "70A8
-\definecharacter mathbar "70AF
+\definecharacter mathgrave "7060
+\definecharacter mathacute "70B4
+\definecharacter mathhat "7088
+\definecharacter mathtilde "7098
+\definecharacter mathddot "70A8
+\definecharacter mathbar "70AF
\stopencoding
diff --git a/tex/context/base/enco-def.tex b/tex/context/base/enco-def.tex
index 5e87c8e03..2f6ce633d 100644
--- a/tex/context/base/enco-def.tex
+++ b/tex/context/base/enco-def.tex
@@ -808,4 +808,7 @@
% \stopencoding
+\ifx\zdot\undefined \def\zdot{\zdotaccent} \fi
+\ifx\Zdot\undefined \def\Zdot{\Zdotaccent} \fi
+
\endinput
diff --git a/tex/context/base/enco-ec.tex b/tex/context/base/enco-ec.tex
index 329558f57..78b5212f6 100644
--- a/tex/context/base/enco-ec.tex
+++ b/tex/context/base/enco-ec.tex
@@ -39,6 +39,23 @@
\definecasemaps 192 to 255 lc 0 uc -32
+%D Less systematic (probably incomplete)
+
+\definecasemap 187 187 155 % z dotaccent
+\definecasemap 155 187 155 % Z dotaccent
+\definecasemap 158 158 68 % dmacron
+
+%D Some languages need this:
+
+% \definecaseself 34 % quotedbl
+% \definecaseself 18 % quotedblbase
+% \definecaseself 16 % quotedblleft
+% \definecaseself 17 % quotedblright
+% \definecaseself 39 % quotesingle
+% \definecaseself 13 % quotesinglebase
+% \definecaseself 96 % quoteleft
+% \definecaseself 39 % quoteright
+
%D So far for the mapping.
%D The following characters are kind of dangerous,
diff --git a/tex/context/base/enco-fpl.tex b/tex/context/base/enco-fpl.tex
index 0ae286873..ec9c81070 100644
--- a/tex/context/base/enco-fpl.tex
+++ b/tex/context/base/enco-fpl.tex
@@ -15,7 +15,9 @@
\unprotect
-\startlanguagespecifics[\s!pl]
+% todo : named glyphs
+
+\startlanguagespecifics[\s!pl]
\appendtoks \makecharacteractive / \to \everynormalcatcodes
@@ -40,7 +42,7 @@
\stoplanguagespecifics
-\startlanguagespecifics[\s!pl]
+\startlanguagespecifics[\s!pl]
\installcompoundcharacter /, {\handlequotation\c!leftquotation}
\installcompoundcharacter /' {\handlequotation\c!rightquotation}
@@ -52,15 +54,15 @@
\c!rightsentence=\rightguillemot,
\c!leftsubsentence=\leftsubguillemot,
\c!rightsubsentence=\rightsubguillemot]}
-
+
\installcompoundcharacter /< {{\setupPLlanguage|<|}}
\installcompoundcharacter /> {{\setupPLlanguage|>|}}
- \installcompoundcharacter /- {|-|}
+ \installcompoundcharacter /- {|-|}
\stoplanguagespecifics
-\startlanguagespecifics[\s!pl]
+\startlanguagespecifics[\s!pl]
\definesortkey {/a}{a}{a}{\k a}
\definesortkey {/A}{a}{a}{\k a}
@@ -84,7 +86,7 @@
\stoplanguagespecifics
\startencoding[pdfdoc]
- \startlanguagespecifics[pl]% hm
+ \startlanguagespecifics[pl]% hm
\defineactivecharacter / {\simplifiedcompoundcharacter/}
\stoplanguagespecifics
\stopencoding
diff --git a/tex/context/base/enco-il2.tex b/tex/context/base/enco-il2.tex
index 042ccf075..f5a118845 100644
--- a/tex/context/base/enco-il2.tex
+++ b/tex/context/base/enco-il2.tex
@@ -44,7 +44,7 @@
\stopmapping
-\startcoding[il2]
+\startcoding[il2][il2]
\definecharacter textgrave 18
\definecharacter textacute 19
diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex
index d77150059..79649501d 100644
--- a/tex/context/base/enco-ini.tex
+++ b/tex/context/base/enco-ini.tex
@@ -418,6 +418,13 @@
{\mappingtoks\@EA{\the\mappingtoks\setcasemap #1 #2 #3 }}%
\ignorespaces}
+%D Saves a few tokens
+
+\def\definecaseself #1 % lower=upper=self
+ {\setmappingtoks
+ \mappingtoks\@EA{\the\mappingtoks\setcaseself #1 }%
+ \ignorespaces}
+
%D Watch the \type {\definecasemap 127 to 255} option!
%D Dedicated to Taco there is also:
@@ -469,6 +476,7 @@
%D \starttyping
%D \definecasemaps 128 to 156 lc 32 uc 0
%D \definecasemaps 160 to 188 lc -32 uc 0
+%D \definecasemaps 160 to 188 lc -32 uc 0
%D \definecasemaps 192 to 255 lc 32 uc 0
%D \stoptyping
%D
@@ -538,6 +546,11 @@
\lccode #1=#2
\uccode #1=#3 }
+\def\setcaseself #1 %
+ {\setregimecode{#1}\@@letter
+ \lccode #1=#1
+ \uccode #1=#1 }
+
% \def\definespacemap #1 #2 % code sfcode
% {\setmappingtoks
% \appendtoks\setspacemap #1 #2 \to\mappingtoks
@@ -547,13 +560,13 @@
\def\definespacemap #1 #2 % code sfcode
{\setmappingtoks
- \expandafter\mappingtoks{\the\mappingtoks\setspacemap #1 #2 }%
+ \mappingtoks\expandafter{\the\mappingtoks\setspacemap #1 #2 }%
\ignorespaces}
\def\setspacemap #1 #2 %
{\setregimecode{#1}\@@other
- \lccode #1=\zerocount
- \uccode #1=\zerocount
+ %\lccode #1=\zerocount
+ %\uccode #1=\zerocount
\sfcode #1=#2 }
% \def\defineuppercasecom#1#2%
@@ -590,6 +603,7 @@
\ifx\enabledmapping\charactermapping \else
\doifdefined{\@map@\charactermapping}
{\the\csname\@map@\charactermapping\endcsname}%
+ % == \the\executeifdefined{\@map@\charactermapping}\emptytoks
\edef\enabledmapping{\charactermapping}%
\enablelanguagespecifics[\currentlanguage]% new
% \edef\enabledmapping{\charactermapping\currentlanguage}% can be comma list
@@ -604,6 +618,7 @@
\@EA\ifx\csname\@map@\charactermapping\endcsname\relax\else
\the\csname\@map@\charactermapping\endcsname
\fi
+ % == \the\executeifdefined{\@map@\charactermapping}\emptytoks
\let\enabledmapping\charactermapping
\enablelanguagespecifics[\currentlanguage]% to faster
\fi}
@@ -769,7 +784,7 @@
{\doifelsenothing{#1}
{\let\stopencoding\relax}
{%\protectfontcharacters % problematic in language loading
- \showmessage\m!encodings1{#1}%
+ %\showmessage\m!encodings1{#1}%
\pushmacro\dohandleaccent % still needed?
\pushmacro\dohandlecommand % still needed?
\pushmacro\definesortkey
@@ -915,17 +930,34 @@
%D In patterns, characters have to be bytes. These will be
%D mapped onto the compact pattern arrays.
-\let\normaldohandleaccent\dohandleaccent
+\def\patternchar#1 {\rawcharacter{#1}} % space is part of character definition !
-\def\patternchar#1 {\rawcharacter{#1}}
+\ifx \enablepatterntokens\undefined
+ \def\handlepatterntoken#1]{\csname#1\endcsname}
+\fi
-\def\startpatternaccents
- {\let\savedpatternchar\char
+\def\startpatternaccents#1#2% % used grouped
+ {\bgroup
\let\char\patternchar
+ \doifelsenothing{#1}{\enableencoding[ec]}{\enableencoding[#1]}%
+ \doifelsenothing{#2}{\enablemapping [ec]}{\enablemapping [#2]}%
+ \ifx \enablepatterntokens\undefined
+ \defineactivecharacter [ {\handlepatterntoken}%
+ \else
+ \enablepatterntokens
+ \fi
+ \ifx \enablepatternxml\undefined \else
+ \enablepatternxml
+ \fi
+ \catcode16 =\@@letter\lccode16=16 % brrr, extra quote in ec (turkish)
+ \catcode17 =\@@letter\lccode17=17 % brrr, extra quote in ec (turkish)
+ \catcode`\"=\@@letter\lccode`\"=`\"
+ \catcode`\'=\@@letter\lccode`\'=`\'
+ \catcode`\-=\@@letter\lccode`\-=`\-
\let\dohandleaccent\normaldohandleaccent}
\def\stoppatternaccents
- {\let\char\savedpatternchar}
+ {\egroup}
\def\definecharacter#1 #2 %
{\ifundefined{#1}\setvalue{#1}{\dohandlecharacter{#1}}\fi
@@ -952,6 +984,10 @@
{\csname\characterprefix\expandafter\ifx\csname\characterprefix\characterencoding#1\endcsname\relax
\nocharacterencoding\else\characterencoding\fi#1\endcsname}
+% \def\dopatterncharacter#1%
+% {\csname\expandafter\ifx\csname\characterprefix\characterencoding#1\endcsname\relax
+% \strippedcsname\fallbackpatternchar\else\characterprefix\characterencoding#1\fi\endcsname}
+
\endTEX
\beginETEX \ifcsname
@@ -960,8 +996,14 @@
{\csname\characterprefix\ifcsname\characterprefix\characterencoding#1\endcsname
\characterencoding\else\nocharacterencoding\fi#1\endcsname}
+% \def\dopatterncharacter#1%
+% {\csname\ifcsname\characterprefix\characterencoding#1\endcsname
+% \characterprefix\characterencoding#1\else\strippedcsname\fallbackpatternchar\fi\endcsname}
+
\endETEX
+% \def\fallbackpatternchar{x} % makes no sense, duplicate patterns
+
\def\defaultcharacter#1%
{\csname\characterprefix\nocharacterencoding\strippedcsname#1\endcsname}
@@ -1663,6 +1705,11 @@
\keepencodedtokens
\to \everysafeexpanded
+%D Now we will not redefine any more, so:
+
+\let\normaldohandleaccent \dohandleaccent
+\let\normaldohandlecharacter\dohandlecharacter
+
%D We preload several encodings:
\useencoding[def,acc,raw,com,cas,mis] % mis should come first
diff --git a/tex/context/base/enco-pol.tex b/tex/context/base/enco-pol.tex
index b05a12f01..b470a027e 100644
--- a/tex/context/base/enco-pol.tex
+++ b/tex/context/base/enco-pol.tex
@@ -24,17 +24,17 @@
\definecasemap 243 243 211 % o acute
\definecasemap 177 177 145 % s acute
\definecasemap 185 185 153 % z acute
-\definecasemap 187 187 155 % z dot
+\definecasemap 187 187 155 % z dotaccent
\definecasemap 129 161 129 % A ogonek
-\definecasemap 130 162 130 % C accute
+\definecasemap 130 162 130 % C acute
\definecasemap 134 166 134 % E ogonek
\definecasemap 138 170 138 % L crossed
-\definecasemap 139 171 139 % N accute
+\definecasemap 139 171 139 % N acute
\definecasemap 211 243 211 % O acute
\definecasemap 145 177 145 % S acute
\definecasemap 153 185 153 % Z acute
-\definecasemap 155 187 155 % Z dot
+\definecasemap 155 187 155 % Z dotaccent
\stopmapping
@@ -54,24 +54,24 @@
\startencoding[pl0]
-\definecharacter Aogonek 129
-\definecharacter Caccute 130
-\definecharacter Eogonek 134
-\definecharacter Lstroke 138
-\definecharacter Naccute 139
-\definecharacter Sacute 145
-\definecharacter Zacute 153
-\definecharacter Zdot 155
-\definecharacter aogonek 161
-\definecharacter cacute 162
-\definecharacter eogonek 166
-\definecharacter lstroke 170
-\definecharacter nacute 171
-\definecharacter sacute 177
-\definecharacter zacute 185
-\definecharacter zdot 187
-\definecharacter Oacute 211
-\definecharacter oacute 243
+\definecharacter Aogonek 129
+\definecharacter Cacute 130
+\definecharacter Eogonek 134
+\definecharacter Lstroke 138
+\definecharacter Nacute 139
+\definecharacter Sacute 145
+\definecharacter Zacute 153
+\definecharacter Zdotaccent 155
+\definecharacter aogonek 161
+\definecharacter cacute 162
+\definecharacter eogonek 166
+\definecharacter lstroke 170
+\definecharacter nacute 171
+\definecharacter sacute 177
+\definecharacter zacute 185
+\definecharacter zdotaccent 187
+\definecharacter Oacute 211
+\definecharacter oacute 243
\stopencoding
@@ -123,10 +123,10 @@
% \definecasemap 191 191 175 % z dot
%
% \definecasemap 165 165 185 % A ogonek
-% \definecasemap 198 198 230 % C accute
+% \definecasemap 198 198 230 % C acute
% \definecasemap 202 202 234 % E ogonek
% \definecasemap 163 163 179 % L crossed
-% \definecasemap 209 209 241 % N accute
+% \definecasemap 209 209 241 % N acute
% \definecasemap 211 211 243 % O acute
% \definecasemap 140 140 156 % S acute
% \definecasemap 143 143 159 % Z acute
@@ -150,24 +150,24 @@
%
% \startencoding[pl1]
%
-% \definecharacter Sacute 140
-% \definecharacter Zacute 143
-% \definecharacter sacute 156
-% \definecharacter zacute 159
-% \definecharacter Lstroke 163
-% \definecharacter Aogonek 165
-% \definecharacter Zdot 175
-% \definecharacter lstroke 179
-% \definecharacter aogonek 185
-% \definecharacter zdot 191
-% \definecharacter Caccute 198
-% \definecharacter Eogonek 202
-% \definecharacter Naccute 209
-% \definecharacter Oacute 211
-% \definecharacter cacute 230
-% \definecharacter eogonek 234
-% \definecharacter nacute 241
-% \definecharacter oacute 243
+% \definecharacter Sacute 140
+% \definecharacter Zacute 143
+% \definecharacter sacute 156
+% \definecharacter zacute 159
+% \definecharacter Lstroke 163
+% \definecharacter Aogonek 165
+% \definecharacter Zdotaccent 175
+% \definecharacter lstroke 179
+% \definecharacter aogonek 185
+% \definecharacter zdotaccent 191
+% \definecharacter Cacute 198
+% \definecharacter Eogonek 202
+% \definecharacter Nacute 209
+% \definecharacter Oacute 211
+% \definecharacter cacute 230
+% \definecharacter eogonek 234
+% \definecharacter nacute 241
+% \definecharacter oacute 243
%
% \stopencoding
%
@@ -192,17 +192,17 @@
% \definecasemap 243 243 211 % o acute
% \definecasemap 182 182 166 % s acute
% \definecasemap 188 188 172 % z acute
-% \definecasemap 191 191 175 % z dot
+% \definecasemap 191 191 175 % z dotaccent
%
% \definecasemap 161 161 177 % A ogonek
-% \definecasemap 198 198 230 % C accute
+% \definecasemap 198 198 230 % C acute
% \definecasemap 202 202 234 % E ogonek
% \definecasemap 163 163 179 % L crossed
-% \definecasemap 209 209 241 % N accute
+% \definecasemap 209 209 241 % N acute
% \definecasemap 211 211 243 % O acute
% \definecasemap 166 166 182 % S acute
% \definecasemap 172 172 188 % Z acute
-% \definecasemap 175 175 191 % Z dot
+% \definecasemap 175 175 191 % Z dotaccent
%
% \stopmapping
%
@@ -222,24 +222,24 @@
%
% \startencoding[pl2]
%
-% \definecharacter Aogonek 161
-% \definecharacter Lstroke 163
-% \definecharacter Sacute 166
-% \definecharacter Zacute 172
-% \definecharacter Zdot 175
-% \definecharacter aogonek 177
-% \definecharacter lstroke 179
-% \definecharacter sacute 182
-% \definecharacter zacute 188
-% \definecharacter zdot 191
-% \definecharacter Caccute 198
-% \definecharacter Eogonek 202
-% \definecharacter Naccute 209
-% \definecharacter Oacute 211
-% \definecharacter cacute 230
-% \definecharacter eogonek 234
-% \definecharacter nacute 241
-% \definecharacter oacute 243
+% \definecharacter Aogonek 161
+% \definecharacter Lstroke 163
+% \definecharacter Sacute 166
+% \definecharacter Zacute 172
+% \definecharacter Zdotaccent 175
+% \definecharacter aogonek 177
+% \definecharacter lstroke 179
+% \definecharacter sacute 182
+% \definecharacter zacute 188
+% \definecharacter zdotaccent 191
+% \definecharacter Cacute 198
+% \definecharacter Eogonek 202
+% \definecharacter Nacute 209
+% \definecharacter Oacute 211
+% \definecharacter cacute 230
+% \definecharacter eogonek 234
+% \definecharacter nacute 241
+% \definecharacter oacute 243
%
% \stopencoding
%
diff --git a/tex/context/base/font-run.tex b/tex/context/base/font-run.tex
index 0cb5ecdd5..08537e374 100644
--- a/tex/context/base/font-run.tex
+++ b/tex/context/base/font-run.tex
@@ -101,7 +101,7 @@
\ifinsidefloat\else\stopbaselinecorrection\fi}
\gdef\showfont
- {\dosingleempty\doshowfont}
+ {\dodoubleempty\doshowfont}
\beginTEX \iffontchar
@@ -109,7 +109,7 @@
\endTEX
-\gdef\doshowfont[#1]%
+\gdef\doshowfont[#1][#2]%
{\bgroup
\boxrulewidth=.1pt
\setupcolors[\c!state=\v!local]%
@@ -135,7 +135,7 @@
\edef\rowcol{\the\scratchcounter}%
\iffontchar\font\scratchcounter
\setbox\scratchbox\ruledhbox{\black\char\scratchcounter}%
- \ifdim\wd\scratchbox>\!!zeropoint\relax
+ \ifdim\wd\scratchbox>\zeropoint
\donetrue \else \donefalse
\fi
\else
@@ -160,19 +160,16 @@
\vss}}
{\tf\vbox to 2.3em
{\ifdone
- \blue \hsize2.4em
- \edef\ascii
- {\ifnum\hyphenchar\font=\rowcol
- hyph%
- \else\ifnum\skewchar\font=\rowcol
- skew%
- \fi\fi}%
- \tinyfont
- {\red\ascii}\hfill
- \number\rowcol
+ \hsize2.4em
+ \blue
+ \edef\theshowfontspecs
+ {\ifnum\hyphenchar\font=\rowcol hyph\else
+ \ifnum\skewchar \font=\rowcol skew\fi\fi}%
+ \tinyfont % after \edef, else wrong font analyzed
+ \doifnot\v!unknown{#2}{{\red\theshowfontspecs}}\hfill\number\rowcol
\vfill
- \octnumber\rowcol\hfill
- \lchexnumbers\rowcol\par
+ \octnumber\rowcol\hfill\lchexnumbers\rowcol
+ \par
\fi}}
\stopoverlay}}}
\par}}
@@ -180,13 +177,18 @@
\stopoverlay
\nointerlineskip
\vskip2pt
- \edef\ascii % \noexpand needed for non etex
- {name: {\noexpand\black\fontname\font }\quad
- encoding: {\noexpand\black\currentencoding}\quad
- mapping: {\noexpand\black\currentmapping }\quad
- handling: {\noexpand\black\fonthandling }}%
- \tf\hbox to 40em
- {\blue\hfill\tinyfont\setstrut\strut\ascii}
+ % the \noexpand before \blank is needed for non etex
+ \edef\ascii {name: {\noexpand\black\fontname\font}}
+ \doifelse\v!unknown{#2}
+ {\edef\theshowfontspecs
+ {name: {\noexpand\black\fontname\font}}}
+ {\edef\theshowfontspecs
+ {name: {\noexpand\black\fontname\font }\noexpand\quad
+ encoding: {\noexpand\black\currentencoding}\noexpand\quad
+ mapping: {\noexpand\black\currentmapping }\noexpand\quad
+ handling: {\noexpand\black\fonthandling }}}%
+ \tf % also sets em
+ \hbox to 40em{\blue\hfill\tinyfont\setstrut\strut\theshowfontspecs}
\egroup
\ifinsidefloat\else\stopbaselinecorrection\fi
\egroup}
diff --git a/tex/context/base/lang-ctx.tex b/tex/context/base/lang-ctx.tex
new file mode 100644
index 000000000..2bf6460dc
--- /dev/null
+++ b/tex/context/base/lang-ctx.tex
@@ -0,0 +1,51 @@
+%D \module
+%D [ file=lang-ctx,
+%D version=2005.02.12,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Generic Patterns,
+%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.
+
+\writestatus{loading}{Context Language Macros / Generic Patterns}
+
+\unprotect
+
+%D The \CONTEXT\ specific patterns are more generic and
+%D are more or less encoding independent. They are generated
+%D from the ones shipped with distributions using:
+%D
+%D \starttyping
+%D ctxtools --pattern --all
+%D \stoptyping
+%D
+%D Later we will provide utf specific patterns.
+
+%D Todo:
+
+\definefilesynonym [lang-ru.pat] [ruenhyph.tex]
+\definefilesynonym [lang-ua.pat] [ukrenhyp.tex]
+\definefilesynonym [lang-af.pat] [lang-nl.pat]
+
+%D In order to get 8 bit characters hyphenated, we need to load
+%D patterns under the right circumstances. In some countries, more
+%D than one font encoding is in use. I can add more defaults here
+%D if users let me know what encoding they use.
+
+\installlanguage [\s!nl] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
+\installlanguage [\s!fr] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
+\installlanguage [\s!de] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
+\installlanguage [\s!it] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
+
+\installlanguage [\s!hr] [\s!mapping=ec,\s!encoding=ec] % no il2, misses cacute characters
+
+\installlanguage [\s!pl] [\s!mapping={pl0,ec},\s!encoding={pl0,ec}]
+\installlanguage [\s!cz] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
+\installlanguage [\s!sk] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
+\installlanguage [\s!sl] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
+
+\protect \endinput
diff --git a/tex/context/base/lang-dis.tex b/tex/context/base/lang-dis.tex
new file mode 100644
index 000000000..4c5785acc
--- /dev/null
+++ b/tex/context/base/lang-dis.tex
@@ -0,0 +1,120 @@
+%D \module
+%D [ file=lang-dis,
+%D version=2005.02.12,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Distribution Patterns,
+%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 code used to be part of cont-usr.tex but now that we
+%D use more generic pattern files, we decided to isolate these
+%D mappings.
+
+\writestatus{loading}{Context Language Macros / Distribution Patterns}
+
+\doiffileelse{lang-en.pat} \endinput \donothing
+
+\unprotect
+
+%D Hyphenation patterns are normally sought in filed named
+%D \type {lang-xx.pat}. When present on the system, those
+%D patterns take precedence. This list will be adapted to
+%D the actual situation, given that it's noticed.
+
+\definefilesynonym [lang-ca.pat] [cahyph.tex]
+\definefilesynonym [lang-da.pat] [dkhyph.tex]
+\definefilesynonym [lang-de.pat] [dehyphn.tex]
+\definefilesynonym [lang-es.pat] [eshyph.tex]
+\definefilesynonym [lang-fi.pat] [fihyph.tex]
+\definefilesynonym [lang-fr.pat] [frhyph.tex]
+\definefilesynonym [lang-hr.pat] [hrhyph.tex]
+\definefilesynonym [lang-hu.pat] [huhyph.tex]
+\definefilesynonym [lang-it.pat] [ithyph.tex]
+\definefilesynonym [lang-la.pat] [lahyph7.tex]
+\definefilesynonym [lang-no.pat] [nohyph.tex]
+\definefilesynonym [lang-pl.pat] [plhyph.tex]
+\definefilesynonym [lang-pt.pat] [pthyph.tex]
+\definefilesynonym [lang-ro.pat] [rohyph.tex]
+\definefilesynonym [lang-ru.pat] [ruenhyph.tex] % sic: ruen
+\definefilesynonym [lang-sl.pat] [sihyph.tex] % sic: sl/si
+\definefilesynonym [lang-sv.pat] [svhyph.tex] % was [sehyph.tex]
+\definefilesynonym [lang-tr.pat] [tkhyph.tex] % was [trhyph.tex]
+\definefilesynonym [lang-ua.pat] [ukrenhyp.tex] % sic ukren
+
+\definefilesynonym [lang-uk.pat] [ukhyphen.tex] % symbolic name, see below
+
+\definefilesynonym [lang-nl.pat] [nlhyphen.tex] % symbolic name, see below
+\definefilesynonym [lang-af.pat] [nlhyphen.tex] % symbolic name, see below
+
+\definefilesynonym [lang-en.pat] [ushyphen.tex] % symbolic name, see below
+\definefilesynonym [lang-us.pat] [ushyphen.tex] % symbolic name, see below
+
+%definefilesynonym [czhyph.pat] [czhyphen.tex] % safeguard
+%definefilesynonym [skhyph.pat] [skhyphen.tex] % safeguard
+
+\definefilesynonym [lang-cz.pat] [czhyphen.tex] % in a different part of the tree, sigh
+\definefilesynonym [lang-sk.pat] [skhyphen.tex] % in a different part of the tree, sigh
+
+%definefilesynonym [lang-cz.hyp] [czhyphen.ex] % in a different part of the tree, sigh
+%definefilesynonym [lang-sk.hyp] [skhyphen.ex] % in a different part of the tree, sigh
+
+\definefilesynonym [lang-deo.pat] [dehypht.tex] % old german patterns
+
+%D When the dutch spelling changed, new patterns were
+%D constructed. For long these were named \type {dutch96.pat}.
+%D From 2000 however, the old \type {nehyph} files were
+%D replaced by \type {nehyph96.tex}. Typical something that
+%D you have to find out by accident. The names of hyphenation
+%D files as well as their coding is one of the dark areas of
+%D \TEX\ distributions.
+
+ \doiffileelse{nehyph96.tex} {\definefilesynonym[nlhyphen.tex][nehyph96.tex]}
+{\doiffileelse{dutch96.pat} {\definefilesynonym[nlhyphen.tex][dutch96.pat]}
+ {\definefilesynonym[nlhyphen.tex][nehyph.tex]}}
+
+%D Ah, something changed in 2003 with respect to ushyph.tex, so let's
+%D fall back when needed. I first noticed this during a workshop at the
+%D practical tex conference 2004 in sf. Yet another proof of a mess in
+%D filenames. So, we now use \type {ushyphen} as name and do some
+%D searching.
+%D
+%D Well, it happened again, this time in 2004/2005. We're now back at
+%D \type {hyphen.tex}. At the same time the uk patterns have changed. It
+%D clearly demonstrates that those taking care of patterns don't think
+%D generic and completely trust this aliasses mechanism in kpse. It's about
+%D time that \CONTEXT\ starts shipping its own pattern files again in order
+%D to get around this everlasting mess.
+
+ \doiffileelse{hyphen.tex} {\definefilesynonym[ushyphen.tex][hyphen.tex] }
+{\doiffileelse{ushyph.tex} {\definefilesynonym[ushyphen.tex][ushyph.tex] }
+{\doiffileelse{ushyph1.tex} {\definefilesynonym[ushyphen.tex][ushyph1.tex]}
+{\doiffileelse{ushyph2.tex} {\definefilesynonym[ushyphen.tex][ushyph2.tex]}}}}
+
+ \doiffileelse{ukhyph.tex} {\definefilesynonym[ukhyphen.tex][ukhyph.tex] }
+{\doiffileelse{ukhyph1.tex} {\definefilesynonym[ukhyphen.tex][ukhyph1.tex]}
+{\doiffileelse{ukhyph2.tex} {\definefilesynonym[ukhyphen.tex][ukhyph2.tex]}
+ {\definefilesynonym[ukhyphen.tex][hyphen.tex] }}}
+
+%D In order to get 8 bit characters hyphenated, we need to load
+%D patterns under the right circumstances. In some countries, more
+%D than one font encoding is in use. I can add more defaults here
+%D if users let me know what encoding they use.
+
+\installlanguage [\s!nl] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
+\installlanguage [\s!fr] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
+\installlanguage [\s!de] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
+\installlanguage [\s!it] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
+
+\installlanguage [\s!hr] [\s!mapping=ec,\s!encoding=ec] % no il2, misses cacute characters
+
+\installlanguage [\s!pl] [\s!mapping={pl0,ec},\s!encoding={pl0,ec}]
+\installlanguage [\s!cz] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
+\installlanguage [\s!sk] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
+\installlanguage [\s!sl] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
+
+\protect \endinput
diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex
index 463a36cd6..7bbd3cd32 100644
--- a/tex/context/base/lang-ini.tex
+++ b/tex/context/base/lang-ini.tex
@@ -24,10 +24,10 @@
\startmessages dutch library: linguals
title: taal
- 1: afbreekpatronen -- voor -- geladen (n=--)
- 2: geen afbreekpatronen -- voor -- (n=--) (--,--)
- 3: afbreekdefinities -- voor -- geladen (n=--)
- 4: geen afbreekdefinities -- voor -- (n=--)
+ 1: afbreekpatronen -- voor -- geladen (n=--,e=--,m=--)
+ 2: geen afbreekpatronen -- voor -- (n=--,e=--,m=--) (--,--)
+ 3: afbreekdefinities -- voor -- geladen (n=--,e=--,m=--)
+ 4: geen afbreekdefinities -- voor -- (n=--,e=--,m=--)
5: afbreekpatronen voor -- niet geladen
6: taal -- is niet gedefinieerd
7: taal specifieke opties [--] introduceren een skip van --
@@ -38,10 +38,10 @@
\startmessages english library: linguals
title: language
- 1: patterns -- for -- loaded (n=--)
- 2: no patterns -- for -- (n=--) (--,--)
- 3: hyphenations -- for -- loaded (n=--)
- 4: no hyphenations -- for -- (n=--)
+ 1: patterns -- for -- loaded (n=--,e=--,m=--)
+ 2: no patterns -- for -- (n=--,e=--,m=--) (--,--)
+ 3: hyphenations -- for -- loaded (n=--,e=--,m=--)
+ 4: no hyphenations -- for -- (n=--,e=--,m=--)
5: patterns for -- not loaded
6: language -- is undefined
7: language specific options [--] introduce a -- skip
@@ -52,10 +52,10 @@
\startmessages german library: linguals
title: Sprache
- 1: Trennmuster -- fuer -- geladen (n=--)
- 2: Keine Trennmuster -- fuer -- (n=--) (--,--)
- 3: Trenndefinitionen -- fuer -- geladen (n=--)
- 4: Keine Trenndefinitionen -- fuer -- (n=--)
+ 1: Trennmuster -- fuer -- geladen (n=--,e=--,m=--)
+ 2: Keine Trennmuster -- fuer -- (n=--,e=--,m=--) (--,--)
+ 3: Trenndefinitionen -- fuer -- geladen (n=--,e=--,m=--)
+ 4: Keine Trenndefinitionen -- fuer -- (n=--,e=--,m=--)
5: Trennmuster fuer -- nicht geladen
6: Sprache -- ist undefiniert
7: Sprachenspezifische Option [--] fuegt eine Luecke von -- ein
@@ -68,10 +68,10 @@
\startmessages czech library: linguals
title: jazyky
- 1: vzory -- pro -- nacteny (n=--)
- 2: zadne vzory -- pro -- (n=--) (--,--)
- 3: deleni slov -- pro -- nacteno (n=--)
- 4: zadne deleni slov -- pro -- (n=--)
+ 1: vzory -- pro -- nacteny (n=--,e=--,m=--)
+ 2: zadne vzory -- pro -- (n=--,e=--,m=--) (--,--)
+ 3: deleni slov -- pro -- nacteno (n=--,e=--,m=--)
+ 4: zadne deleni slov -- pro -- (n=--,e=--,m=--)
5: vzory pro -- nenacteny
6: jazyk -- neni definovan
7: specificke volby jazyka [--] zavadeji -- (zavlecenou) mezeru
@@ -82,10 +82,10 @@
\startmessages italian library: linguals
title: lingua
- 1: schemi -- per -- caricati (n=--)
- 2: niente schemi -- per -- (n=--) (--,--)
- 3: sillabazione -- per -- caricata (n=--)
- 4: niente sillabazione -- per -- (n=--)
+ 1: schemi -- per -- caricati (n=--,e=--,m=--)
+ 2: niente schemi -- per -- (n=--,e=--,m=--) (--,--)
+ 3: sillabazione -- per -- caricata (n=--,e=--,m=--)
+ 4: niente sillabazione -- per -- (n=--,e=--,m=--)
5: schemi per -- non caricati
6: lingua -- non definita
7: opzioni specifiche per la lingua [--] introducono un salto --
@@ -96,10 +96,10 @@
\startmessages norwegian library: linguals
title: språk
- 1: orddelingsmønster -- for -- er lest inn (n=--)
- 2: ingen orddelingsmønster -- for -- (n=--) (--,--)
- 3: orddelingsdefinisjon -- for -- er lest inn (n=--)
- 4: ingen orddelingsdefinisjon -- for -- (n=--)
+ 1: orddelingsmønster -- for -- er lest inn (n=--,e=--,m=--)
+ 2: ingen orddelingsmønster -- for -- (n=--,e=--,m=--) (--,--)
+ 3: orddelingsdefinisjon -- for -- er lest inn (n=--,e=--,m=--)
+ 4: ingen orddelingsdefinisjon -- for -- (n=--,e=--,m=--)
5: orddelingsmønster for -- er ikke lest inn
6: språk -- er udefinert
7: språk spesifikk opsjon [--] introduserer et -- hopp
@@ -110,10 +110,10 @@
\startmessages romanian library: linguals
title: limbi
- 1: sablonul -- pentru -- s-a incarcat (n=--)
- 2: nu exista sabloane -- pentru -- (n=--) (--,--)
- 3: despartirea in silabe -- pentru -- s-a incarcat (n=--)
- 4: nu exista despartire in silabe -- pentru -- (n=--)
+ 1: sablonul -- pentru -- s-a incarcat (n=--,e=--,m=--)
+ 2: nu exista sabloane -- pentru -- (n=--,e=--,m=--) (--,--)
+ 3: despartirea in silabe -- pentru -- s-a incarcat (n=--,e=--,m=--)
+ 4: nu exista despartire in silabe -- pentru -- (n=--,e=--,m=--)
5: sabloanele pentru -- nu sunt incarcate
6: limba -- nu este definita
7: optiunile specifice ale limbii [--] introduc un spatiu --
@@ -241,10 +241,12 @@
\let\installedlanguages\empty
+\def\doiflanguageelse#1{\doifdefinedelse{\??la#1\c!state}}
+
\def\doinstalllanguage[#1][#2]%
{%\ConvertConstantAfter\doifinstringelse{=}{#2}
\doifassignmentelse{#2}
- {\doifdefinedelse{\??la#1\c!state}
+ {\doiflanguageelse{#1}
{\getparameters[\??la#1][#2]}
{\setvalue{\l!prefix!#1}{#1}%
\addtocommalist{#1}\installedlanguages
@@ -256,53 +258,9 @@
\s!patterns=,
\s!mapping=,
\s!encoding=,
-% \s!lefthyphenmin=2,
-% \s!righthyphenmin=2,
-% \c!spacing=\v!packed,
-% \c!midsentence=---,
-% \c!leftsentence=---,
-% \c!rightsentence=---,
-% \c!leftsubsentence=---,
-% \c!rightsubsentence=---,
-% \c!leftquote=\upperleftsinglesixquote,
-% \c!rightquote=\upperrightsingleninequote,
-% \c!leftquotation=\upperleftdoublesixquote,
-% \c!rightquotation=\upperrightdoubleninequote,
-% \c!leftspeech=\getvalue{\??la#1\c!leftquotation},
-% \c!middlespeech=,
-% \c!rightspeech=\getvalue{\??la#1\c!rightquotation},
-% \c!limittext=\unknown,
-% \c!date={\v!year,\ ,\v!month,\ ,\v!day},
-% \c!text=Ag,
- #2]%
-% \doifvaluesomething{\??la#1\c!default}
-% {\doifnotvalue{\??la#1\c!default}{#1}
-% {\getparameters
-% [\??la#1]
-% [\s!lefthyphenmin=\languagedefault{#1}\s!lefthyphenmin,
-% \s!righthyphenmin=\languagedefault{#1}\s!righthyphenmin,
-% \c!spacing=\languagedefault{#1}\c!spacing,
-% \c!leftsentence=\languagedefault{#1}\c!leftsentence,
-% \c!rightsentence=\languagedefault{#1}\c!rightsentence,
-% \c!leftsubsentence=\languagedefault{#1}\c!leftsubsentence,
-% \c!rightsubsentence=\languagedefault{#1}\c!rightsubsentence,
-% \c!leftquote=\languagedefault{#1}\c!leftquote,
-% \c!rightquote=\languagedefault{#1}\c!rightquote,
-% \c!leftquotation=\languagedefault{#1}\c!leftquotation,
-% \c!rightquotation=\languagedefault{#1}\c!rightquotation,
-% \c!leftspeech=\languagedefault{#1}\c!leftspeech,
-% \c!middlespeech=\languagedefault{#1}\c!middlespeech,
-% \c!rightspeech=\languagedefault{#1}\c!rightspeech,
-% \c!date=\languagedefault{#1}\c!date,
-% \s!mapping=\languagedefault{#1}\s!mapping,
-% \s!encoding=\languagedefault{#1}\s!encoding,
-% \c!text=\languagedefault{#1}\c!text,
-% #2]}}}%
-}%
+ #2]}%
\doifvalue{\??la#1\c!default}{#1}{\letvalue{\??la#1\c!default}\empty}%
- % loop in deo
- % \doifvalue{\??la#1\s!patterns}{#1}{\letvalue{\??la#1\c!default}\empty}%
- %
+ % loop in deo: \doifvalue{\??la#1\s!patterns}{#1}{\letvalue{\??la#1\c!default}\empty}%
\doifelsevalue{\??la#1\c!state}\v!start
{\doifelsevaluenothing{\??la#1\s!patterns}
{\edef\languagesuffix{#1}}
@@ -311,8 +269,8 @@
{\doloadpatterns{#1}\languagesuffix}
{\bgroup
\edef\loadedlanguage{\getvalue{\??la\??la:\currentencoding:\currentmapping:\languagesuffix}}%
- \showmessage\m!linguals1{\languagesuffix,#1,\loadedlanguage}%
- \showmessage\m!linguals3{\languagesuffix,#1,\loadedlanguage}%
+ \showmessage\m!linguals1{\languagesuffix,#1,\loadedlanguage,*,*}%
+ \showmessage\m!linguals3{\languagesuffix,#1,\loadedlanguage,*,*}%
\egroup}}
{\showmessage\m!linguals5{#1}}}
{\setvalue{\l!prefix!#1}{#2}%
@@ -359,10 +317,14 @@
\def\dodoloadpatterns#1#2#3#4% beware, loaded language also incr
{\normallanguage\loadedlanguage % when not really needed
\bgroup
- \startencoding[#3]%
- \enablemapping[#4]%
- \doifnothing\currentencoding{\let\currentencoding\s!default}%
- \doifnothing\currentmapping {\let\currentmapping \s!default}%
+ % \startencoding[#3]%
+ % \enablemapping[#4]% hm, does a sync patterns
+ % \doifnothing\currentencoding{\let\currentencoding\s!default}%
+ % \doifnothing\currentmapping {\let\currentmapping \s!default}%
+ % better:
+\let\synchronizepatterns\relax \let\enabledmapping\empty % needed?
+ \doifelsenothing{#3}{\enableencoding[\s!default]}{\enableencoding[#3]}%
+ \doifelsenothing{#4}{\enablemapping [\s!default]}{\enablemapping [#4]}%
\ifundefined{\??la\??la:\currentencoding:\currentmapping:#2}%
\let\showpatterns\relax
\scratchtoks\everyjob % we don't want additional junk put there, is saving needed?
@@ -374,36 +336,36 @@
\letgvalue{\??la\??la:\currentencoding:\currentmapping:#2}\loadedlanguage
\doifundefined{\??la\??la:\s!default:\s!default:#2}{\letgvalue{\??la\??la:\s!default:\s!default:#2}\loadedlanguage}% fall back
\startreadingfile
- \startpatternaccents
+ \startpatternaccents{#3}{#4}%
\readsysfile{\truefilename{\f!languageprefix#2.\f!patternsextension}}
{\setxvalue{\??la#1\s!patterns}{#2}%
\setxvalue{\??la\??la:\currentencoding:\currentmapping:\truefilename{\f!languageprefix#2.\f!patternsextension}}{\number\loadedlanguage}%
\xdef\preloadedpmessage{\preloadedpmessage\showpatterns{#2}{\number\normallanguage}{\currentencoding}{\currentmapping}}%
\doglobal\addtocommalist{#2}\preloadedpatterns
- \showmessage\m!linguals1{#2,#1,\loadedlanguage}}
+ \showmessage\m!linguals1{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}}
{\readsysfile{\f!languageprefix#2.\f!patternsextension}
{\setxvalue{\??la#1\s!patterns}{#2}%
\setxvalue{\??la\??la:\currentencoding:\currentmapping:\f!languageprefix#2.\f!patternsextension}{\number\loadedlanguage}%
\xdef\preloadedpmessage{\preloadedpmessage\showpatterns{#2}{\number\normallanguage}{\currentencoding}{\currentmapping}}%
\doglobal\addtocommalist{#2}\preloadedpatterns
- \showmessage\m!linguals1{#2,#1,\loadedlanguage}}
- {\showmessage\m!linguals2{#2,#1,\loadedlanguage,\f!languageprefix#2.\f!patternsextension,\truefilename{\f!languageprefix#2.\f!patternsextension}}}}%
- \readsysfile{\truefilename{\f!languageprefix#2.\f!hyphensextension}}
- {\showmessage\m!linguals3{#2,#1,\loadedlanguage}}
- {\readsysfile{\f!languageprefix#2.\f!hyphensextension}
- {\showmessage\m!linguals3{#2,#1,\loadedlanguage}}
- {\showmessage\m!linguals4{#2,#1,\loadedlanguage}}}%
+ \showmessage\m!linguals1{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}}
+ {\showmessage\m!linguals2{#2,#1,\loadedlanguage,\currentencoding,\currentmapping,\f!languageprefix#2.\f!patternsextension,\truefilename{\f!languageprefix#2.\f!patternsextension}}}}%
+ \readsysfile{\truefilename{\f!languageprefix#2.\f!hyphensextension}}
+ {\showmessage\m!linguals3{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}}
+ {\readsysfile{\f!languageprefix#2.\f!hyphensextension}
+ {\showmessage\m!linguals3{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}}
+ {\showmessage\m!linguals4{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}}}%
\doglobal\increment\loadedlanguage
\stoppatternaccents
\stopreadingfile
- \stopencoding
+ % \stopencoding
\else % optimization, introduced 2004.08.24, while sorting out changes in tl
\letgvalue{\??la\??la:\currentencoding:\currentmapping:#2}\alreadyloadedlanguage
\doifundefined{\??la\??la:\s!default:\s!default:#2}{\letgvalue{\??la\??la:\s!default:\s!default:#2}\loadedlanguage}% fall back
\setxvalue{\??la#1\s!patterns}{#2}%
\xdef\preloadedpmessage{\preloadedpmessage\showpatterns{#2}{[\number\alreadyloadedlanguage]}{\currentencoding}{\currentmapping}}%
\doglobal\addtocommalist{#2}\preloadedpatterns
- \showmessage\m!linguals1{#2,#1,[\alreadyloadedlanguage]}%
+ \showmessage\m!linguals1{#2,#1,[\alreadyloadedlanguage],\currentencoding,\currentmapping}%
\fi
\global\everyjob\scratchtoks
\fi
diff --git a/tex/context/base/mult-ini.tex b/tex/context/base/mult-ini.tex
index 19e87e591..abc01562a 100644
--- a/tex/context/base/mult-ini.tex
+++ b/tex/context/base/mult-ini.tex
@@ -359,9 +359,9 @@
\edef\!!stringa{\getvalue{\??ms\currentmessagelibrary} #1: \relax}%
\expandafter\dofindinterfacemessage\!!stringa\end}
-\def\composemessagetext#1--#2--#3--#4--#5--#6\\%
- {\def\docomposemessagetext##1,##2,##3,##4,##5,##6\\%
- {\edef\currentmessagetext{#1##1#2##2#3##3#4##4#5##5}}%
+\def\composemessagetext#1--#2--#3--#4--#5--#6--#7--#8--#9\\%
+ {\def\docomposemessagetext##1,##2,##3,##4,##5,##6,##7,##8,##9\\%
+ {\edef\currentmessagetext{#1##1#2##2#3##3#4##4#5##5#6##6#7##7#8##8}}%
\docomposemessagetext}
\def\dogetmessage#1#2%
@@ -376,7 +376,7 @@
\unexpanded\def\makemessage#1#2#3%
{\def\currentmessagelibrary{#1}%
\findinterfacemessage{#2}\currentmessagetext
- \@EA\composemessagetext\currentmessagetext----------\\#3,,,,,\\%
+ \@EA\composemessagetext\currentmessagetext----------------\\#3,,,,,,,,\\%
\currentmessagetext}
\def\showmessage#1#2#3%
@@ -386,7 +386,7 @@
\ifx\currentmessagetext\empty
\def\currentmessagetext{<unknown message #2>}%
\else
- \@EA\composemessagetext\currentmessagetext----------\\#3,,,,,\\%
+ \@EA\composemessagetext\currentmessagetext----------------\\#3,,,,,,,,\\%
\fi
\@EA\writestatus\@EA{\currentmessagetitle}{\currentmessagetext}}
diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex
index d0ad04f74..6eb9d08d6 100644
--- a/tex/context/base/mult-sys.tex
+++ b/tex/context/base/mult-sys.tex
@@ -181,6 +181,7 @@
\definesystemconstant {hyphenchar}
\definesystemconstant {encoding}
\definesystemconstant {mapping}
+\definesystemconstant {language}
\definesystemconstant {patterns}
\definesystemconstant {rscale}
\definesystemconstant {handling}
diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex
index 0e3357a0b..963ef8d43 100644
--- a/tex/context/base/page-flt.tex
+++ b/tex/context/base/page-flt.tex
@@ -1114,7 +1114,7 @@
\letgvalue{@fl@t@#1}\relax
\else
\incrementnumber[#1]%
- \maakhetnummer[#1]%
+ \makesectionnumber[#1]%
% \globallet\flhetnummer\hetnummer % beware, not unique should be done on a per class base
\letgvalue{@fl@n@#1}\hetnummer
% indirect macro can be more efficient
@@ -1677,7 +1677,7 @@
\dofloat{#4}{}{#6}{#1}%
\else
\incrementnumber[#1]%
- \maakhetnummer[#1]%
+ \makesectionnumber[#1]%
\global\setbox\floatbox\vbox
{\unvbox\floatbox % no \vss, keep the depth
\dofloatreference
diff --git a/tex/context/base/page-mar.tex b/tex/context/base/page-mar.tex
index e0961d4e4..91192cfab 100644
--- a/tex/context/base/page-mar.tex
+++ b/tex/context/base/page-mar.tex
@@ -482,10 +482,10 @@
%D This permits definitions like:
%D
%D \starttyping
-%D \defineinmargins[SomePlace] [inner] [normal] [distance=1cm]
-%D \defineinmargins[SomePlace] [inner] [normal] [SomePlace] \setupinmargin[SomePlace][distance=1cm]
-%D \defineinmargins[MyPlace] [inner] [normal] [SomePlace]
-%D \defineinmargins[YourPlace] [inner] [normal] [SomePlace]
+%D \defineinmargin [SomePlace] [inner] [normal] [distance=1cm]
+%D \defineinmargin [SomePlace] [inner] [normal] [SomePlace] \setupinmargin[SomePlace][distance=1cm]
+%D \defineinmargin [MyPlace] [inner] [normal] [SomePlace]
+%D \defineinmargin [YourPlace] [inner] [normal] [SomePlace]
%D \stoptyping
%D
%D A torture test:
@@ -506,9 +506,9 @@
%D and
%D
%D \starttyping
-%D \defineinmargin[InOuterA] [outer] [normal] [distance=0cm]
-%D \defineinmargin[InOuterB] [outer] [normal] [distance=1cm]
-%D \defineinmargin[InOuterC] [outer] [normal] [distance=2cm,line=2]
+%D \defineinmargin [InOuterA] [outer] [normal] [distance=0cm]
+%D \defineinmargin [InOuterB] [outer] [normal] [distance=1cm]
+%D \defineinmargin [InOuterC] [outer] [normal] [distance=2cm,line=2]
%D
%D \startbuffer
%D \InOuterA{\TestLine{red} {A}} test test test \par
diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex
index 1a572e848..06c7f54e8 100644
--- a/tex/context/base/supp-box.tex
+++ b/tex/context/base/supp-box.tex
@@ -2650,6 +2650,9 @@
\def\obeydepth
{\par \removedepth \ifvmode \kern\strutdp \fi}
+\def\undepthed
+ {\dowithnextbox{\nextboxdp\zeropoint\flushnextbox}\hbox}
+
%D \macros
%D {removebottomthings, removelastskip}
%D
diff --git a/tex/context/base/supp-pat.tex b/tex/context/base/supp-pat.tex
new file mode 100644
index 000000000..3cbe1b0b1
--- /dev/null
+++ b/tex/context/base/supp-pat.tex
@@ -0,0 +1,172 @@
+%D \module
+%D [ file=supp-pat,
+%D version=2005.02.12,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Loading (Generic) Patterns,
+%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 We support:
+%D
+%D \starttyping
+%D \patterns {
+%D ...[namedglyphs]...
+%D }
+%D \stoptyping
+%D
+%D as well as:
+%D
+%D \starttyping
+%D <patterns>
+%D ...&namedglyphs;...
+%D </patterns>
+%D \stoptyping
+%D
+%D The \XML\ variant has very limited \XML\ parsing capabilities and
+%D is meant as an experiment.
+
+\ifx\writestatus\undefined \else
+
+ \writestatus{loading}{Context Language Macros / Loading Generic Patterns}
+
+\fi
+
+%D \CONTEXT:
+
+\ifx\startmapping\undefined \else \ifx\startencoding\undefined \else
+
+ \def\fetchpatterntoken#1{\csname#1\endcsname}
+
+\fi \fi
+
+%D Any\TEX:
+
+\ifx \fetchpatterntoken \undefined
+
+ \ifx \eTeXversion \undefined
+
+ \def\fetchpatterntoken#1%
+ {\csname
+ \expandafter\ifx\csname @pattok@#1\endcsname\relax
+ \expandafter\ifx\csname#1\endcsname\relax
+ #1%
+ \else
+ @pattok@default%
+ \fi
+ \else
+ @pattok@#1%
+ \fi
+ \endcsname}
+
+ \else
+
+ \def\fetchpatterntoken#1%
+ {\csname
+ \ifcsname @pattok@#1\endcsname
+ @pattok@#1%
+ \else\ifcsname#1\endcsname
+ #1%
+ \else
+ @pattok@default%
+ \fi\fi
+ \endcsname}
+
+ \fi
+
+\fi
+
+\def\definepatterntoken #1 #2 %
+ {\expandafter\def\csname @pattok@#1\endcsname{#2}}
+
+%D \TEX\ based:
+
+\bgroup \catcode`\[=\active
+
+ \gdef\enablepatterntokens
+ {\catcode`\[=\active \let[\handlepatterntoken}
+
+\egroup
+
+\def\handlepatterntoken#1]%
+ {\fetchpatterntoken{#1}}
+
+%D \XML\ based:
+
+\bgroup \catcode`\<=\active \catcode`\&=\active
+
+ \gdef\enablepatternxml
+ {\catcode`\<=\active
+ \catcode`\&=\active
+ \let&\handlepatternentity
+ \let<\handlepatternxml}
+
+\egroup
+
+\def\handlepatternentity#1;%
+ {\fetchpatterntoken{#1}}
+
+%D We use a very simple \XML\ parser, and we only trigger on the first
+%D two characters of the tag name. Consider this feature a playground
+%D (and a bit of a joke).
+
+\def\handlepatternxml#1#2% we only distinguish the first two chars
+ {\csname @patxml@\ifcsname @patxml@#1#2\endcsname#1#2\else de\fi\endcsname}
+
+\def\definepatternxml #1#2#3 #4%
+ {\expandafter\def\csname @patxml@#1#2\endcsname{#4}}
+
+\def\fetchpatternxml#1#2>%
+ {\bgroup
+ \long\def\next##1>{\egroup}%
+ \catcode`\<=2 % \@@endgroup
+ \afterassignment\next
+ #1\bgroup}
+
+\def\gobblepatternxml
+ {\bgroup
+ \catcode`\%=11
+ \dogobblepatternxml}
+
+\long\def\dogobblepatternxml#1>%
+ {\egroup}
+
+%D Here are the default definitions. We don't catch empty elements.
+
+\definepatternxml patterns {\fetchpatternxml\patterns}
+\definepatternxml hyphenations {\fetchpatternxml\hyphenation}
+\definepatternxml pattern {\fetchpatternxml\patterns}
+\definepatternxml hyphenation {\fetchpatternxml\hyphenation}
+\definepatternxml default {\gobblepatternxml}
+
+\definepatterntoken default x
+
+\ifx\pattern \undefined \let\pattern \patterns \fi
+\ifx\hyphenations\undefined \let\hyphenations\hyphenation \fi
+
+%D An example of usage in another format than \CONTEXT:
+%D
+%D \bgroup
+%D
+%D \lccode"E4="E4 \definepatterntoken adiaeresis ^^e4
+%D \lccode"F6="F6 \definepatterntoken odiaeresis ^^f6
+%D \lccode"FC="FC \definepatterntoken ediaeresis ^^fc
+%D \lccode"FF="FF \definepatterntoken ssharp ^^ff
+%D
+%D \enablepatterntokens
+%D \enablepatternxml
+%D
+%D \input lang-de.pat
+%D \input lang-de.hyp
+%D
+%D \egroup
+%D
+%D This is a minimal example for EC encoding, and of course
+%D a couple of more language related settings need to take
+%D place (like uc mappings).
+
+\endinput
diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex
index b35994af8..baffb4636 100644
--- a/tex/context/base/syst-gen.tex
+++ b/tex/context/base/syst-gen.tex
@@ -121,7 +121,7 @@
\fi
%D \macros
-%D [beschermen]
+%D [protecting]
%D {protect,unprotect}
%D
%D We can shield macros from users by using some special
@@ -158,13 +158,13 @@
% a simple version is already defined
\fi
-\let\normalprotect=\protect % only for latex
+\let\normalprotect\protect % only for latex
%D Although we don't need the \type{%} after commands that
%D don't take arguments, unless lines are obeyed, I decided
%D to put it there as a reminder. I only mention this once.
-\chardef\protectionthreshold=2
+\chardef\protectionthreshold=10
%chardef\protectionthreshold=0 % for testing
% \def\unprotect
diff --git a/tex/context/base/syst-pln.tex b/tex/context/base/syst-pln.tex
index becf67f83..67482a48e 100644
--- a/tex/context/base/syst-pln.tex
+++ b/tex/context/base/syst-pln.tex
@@ -68,8 +68,8 @@
%D First we define a simplified version of the \CONTEXT\
%D protection mechanism.
-\def\unprotect{\catcode`@=11}
-\def\protect {\catcode`@=12}
+\def\unprotect{\catcode`@=11 }
+\def\protect {\catcode`@=12 }
\unprotect
diff --git a/tex/context/base/syst-prm.tex b/tex/context/base/syst-prm.tex
index 3214a5bb2..05aa171ce 100644
--- a/tex/context/base/syst-prm.tex
+++ b/tex/context/base/syst-prm.tex
@@ -43,9 +43,12 @@
\gdef\beginETEX%
{\bgroup\obeylines\dobeginETEX}
+% \gdef\dobeginETEX#1
+% {\egroup\immediate\write16%
+% {system (E-TEX) : [line \the\inputlineno] \detokenize{#1}}}
+
\gdef\dobeginETEX#1
- {\egroup\immediate\write16%
- {system (E-TEX) : [line \the\inputlineno] \detokenize{#1}}}
+ {\egroup}
\global\let\endETEX\relax
diff --git a/tex/context/base/syst-tex.tex b/tex/context/base/syst-tex.tex
index 55a160237..b439275a4 100644
--- a/tex/context/base/syst-tex.tex
+++ b/tex/context/base/syst-tex.tex
@@ -166,10 +166,12 @@
\gdef\beginETEX%
{\bgroup\obeylines\dobeginETEX}
+% \gdef\dobeginETEX#1
+% {\egroup\immediate\write16%
+% {system (E-TEX) : [line \the\inputlineno] \detokenize{#1}}}
+
\gdef\dobeginETEX#1
- {\egroup\immediate\write16%
- %{line \the\inputlineno: inserting E-TEX code \detokenize{#1}}}
- {system (E-TEX) : [line \the\inputlineno] \detokenize{#1}}}
+ {\egroup}
\global\let\endETEX\relax
diff --git a/tex/context/base/type-ini.tex b/tex/context/base/type-ini.tex
index a198a0522..c580399db 100644
--- a/tex/context/base/type-ini.tex
+++ b/tex/context/base/type-ini.tex
@@ -54,6 +54,11 @@
% exa quit : 2700 ms ( 500 ms)
% preload : 1300 ms (1900 ms) (60-70%)
+% \usetypescript [modern][\defaultencoding]
+% \usetypescript [map] [latin-modern-os] [\defaultencoding]
+% \setupbodyfont[modern]
+% test 1234 test
+
\unprotect
\def\starttypescriptcollection
@@ -172,7 +177,9 @@
\starttypescriptcollection##1\stoptypescriptcollection}}%
\startreadingfile
\pushendofline
+ \unprotect
\readfile\currenttypefile\donothing\donothing
+ \protect
\popendofline
\stopreadingfile
\egroup
@@ -184,7 +191,9 @@
% process files each time
\startreadingfile
\pushendofline
+ \unprotect
\readfile\currenttypefile\donothing\donothing
+ \protect
\popendofline
\stopreadingfile
\fi
@@ -472,6 +481,13 @@
\forgetmapfiles
\fi}
+\def\loadmapline
+ {\dodoubleempty\dodoloadmapline}
+
+\def\dodoloadmapline[#1][#2]%
+ {\loadallfontmapfiles % ! ! !
+ \doloadmapline{#1}{#2}} % special
+
% since this is driver dependent, and since we may set map files
% before an output format is defined, we need to postpone it
diff --git a/tex/context/base/type-map.tex b/tex/context/base/type-map.tex
index 7e12e4078..fdfb02f7e 100644
--- a/tex/context/base/type-map.tex
+++ b/tex/context/base/type-map.tex
@@ -114,6 +114,10 @@
\loadmapfile[\typescriptthree-var-exclusive-public-lm.map]
\stoptypescript
+\starttypescript [map] [latin-modern-os] [ec,texnansi,qx,t5,pl0,il2]
+ \loadmapfile[\typescriptthree-os-public-lm.map]
+\stoptypescript
+
% the next applies to texfont generated metrics
\starttypescript [map] [utopia] [ec,texnansi,t5,8r]
@@ -154,7 +158,7 @@
\starttypescript [map] [palatino] [ec,texnansi,t5,8r]
\loadmapfile[\typescriptthree-urw-palatino.map]
- \loadmapfile[\typescriptthree-public-pfl.map]
+% \loadmapfile[\typescriptthree-public-pfl.map]
\stoptypescript
\starttypescript [map] [times] [ec,texnansi,t5,8r]
diff --git a/tex/context/base/unic-000.tex b/tex/context/base/unic-000.tex
index 3f226f326..abf23fbf9 100644
--- a/tex/context/base/unic-000.tex
+++ b/tex/context/base/unic-000.tex
@@ -13,109 +13,19 @@
\unprotect
-\startunicodevector 0
- \ifcase\numexpr(#1-159)
- \@@unknownchar\or
- \@@unknownchar\or % NO-BREAK SPACE
- exclamdown\or
- textcent\or
- textsterling\or
- textcurrency\or
- textyen\or
- textbrokenbar\or
- sectionmark\or
- textdiaeresis\or
- copyright\or
- ordfeminine\or % FEMININE ORDINAL INDICATOR
- leftguillemot\or % LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
- textlognot\or
- softhyphen\or
- registered\or
- textmacron\or
- textdegree\or
- textpm\or
- twosuperior\or % SUPERSCRIPT TWO
- threesuperior\or % SUPERSCRIPT THREE
- textacute\or
- textmu\or % MICRO SIGN
- paragraphmark\or % PILCROW SIGN
- periodcentered\or % MIDDLE DOT
- textcedilla\or
- onesuperior\or % SUPERSCRIPT ONE
- ordmasculine\or % MASCULINE ORDINAL INDICATOR
- rightguillemot\or % RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
- onequarter\or % VULGAR FRACTION ONE QUARTER
- onehalf\or % VULGAR FRACTION ONE HALF
- threequarters\or % VULGAR FRACTION THREE QUARTERS
- questiondown\or
- Agrave\or
- Aacute\or
- Acircumflex\or
- Atilde\or
- Adiaeresis\or
- Aring\or
- AEligature\or
- Ccedilla\or
- Egrave\or
- Eacute\or
- Ecircumflex\or
- Ediaeresis\or
- Igrave\or
- Iacute\or
- Icircumflex\or
- Idiaeresis\or
- Eth\or % Eth\or
- Ntilde\or
- Ograve\or
- Oacute\or
- Ocircumflex\or
- Otilde\or
- Odiaeresis\or
- textmultiply\or
- Ostroke\or
- Ugrave\or
- Uacute\or
- Ucircumflex\or
- Udiaeresis\or
- Yacute\or
- Thorn\or
- ssharp\or
- agrave\or
- aacute\or
- acircumflex\or
- atilde\or
- adiaeresis\or
- aring\or
- aeligature\or
- ccedilla\or
- egrave\or
- eacute\or
- ecircumflex\or
- ediaeresis\or
- igrave\or
- iacute\or
- icircumflex\or
- idiaeresis\or
- eth\or % eth\or
- ntilde\or
- ograve\or
- oacute\or
- ocircumflex\or
- ohungarumlaut\or
- odiaeresis\or
- textdiv\or
- ostroke\or
- ugrave\or
- uacute\or
- ucircumflex\or
- udiaeresis\or
- yacute\or
- thorn\or
- ydiaeresis\else
- \@@unknownchar
- \fi
-\stopunicodevector
-
+% \startunicodevector 0
+% \ifcase\numexpr(#1-159)
+% \@@unknownchar\or
+% \@@unknownchar\or
+% exclamdown\or
+% textcent\or
+% textsterling\or
+% textcurrency\or
+% ydiaeresis\else
+% \@@unknownchar
+% \fi
+% \stopunicodevector
+%
% 20\% faster:
\startunicodevector 0
diff --git a/tex/context/config/cont-usr.tex b/tex/context/config/cont-usr.tex
index a6d43a747..67a3f4d37 100644
--- a/tex/context/config/cont-usr.tex
+++ b/tex/context/config/cont-usr.tex
@@ -11,111 +11,10 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D In this file users can specify what hyphenation patterns
-%D they want to load into the format file. Normally, when
-%D using the \type {cont-..} files, this file can best be
-%D left unchanged. The default language and font settings
-%D done in the \type {cont-.} files take precedence! This file
-%D is subject to changes.
+\writestatus{loading}{User Settings}
\unprotect
-%D Hyphenation patterns are normally sought in filed named
-%D \type {lang-xx.pat}. When present on the system, those
-%D patterns take precedence. (The next list is inspired on
-%D Thomas Esser's \TETEX\ distribution.) This list will be
-%D adapted to the actual situation.
-
-\definefilesynonym [lang-ca.pat] [cahyph.tex]
-\definefilesynonym [lang-da.pat] [dkhyph.tex]
-\definefilesynonym [lang-de.pat] [dehyphn.tex]
-\definefilesynonym [lang-es.pat] [eshyph.tex]
-\definefilesynonym [lang-fi.pat] [fihyph.tex]
-\definefilesynonym [lang-fr.pat] [frhyph.tex]
-\definefilesynonym [lang-hr.pat] [hrhyph.tex]
-\definefilesynonym [lang-hu.pat] [huhyph.tex]
-\definefilesynonym [lang-it.pat] [ithyph.tex]
-\definefilesynonym [lang-la.pat] [lahyph7.tex]
-\definefilesynonym [lang-no.pat] [nohyph.tex]
-\definefilesynonym [lang-pl.pat] [plhyph.tex]
-\definefilesynonym [lang-pt.pat] [pthyph.tex]
-\definefilesynonym [lang-ro.pat] [rohyph.tex]
-\definefilesynonym [lang-ru.pat] [ruenhyph.tex] % sic: ruen
-\definefilesynonym [lang-sl.pat] [sihyph.tex] % sic: sl/si
-\definefilesynonym [lang-sv.pat] [svhyph.tex] % was [sehyph.tex]
-\definefilesynonym [lang-tr.pat] [tkhyph.tex] % was [trhyph.tex]
-\definefilesynonym [lang-ua.pat] [ukrenhyp.tex] % sic ukren
-
-\definefilesynonym [lang-uk.pat] [ukhyphen.tex] % symbolic name, see below
-
-\definefilesynonym [lang-nl.pat] [nlhyphen.tex] % symbolic name, see below
-\definefilesynonym [lang-af.pat] [nlhyphen.tex] % symbolic name, see below
-
-\definefilesynonym [lang-en.pat] [ushyphen.tex] % symbolic name, see below
-\definefilesynonym [lang-us.pat] [ushyphen.tex] % symbolic name, see below
-
-%definefilesynonym [czhyph.pat] [czhyphen.tex] % safeguard
-%definefilesynonym [skhyph.pat] [skhyphen.tex] % safeguard
-
-\definefilesynonym [lang-cz.pat] [czhyphen.tex] % in a different part of the tree, sigh
-\definefilesynonym [lang-sk.pat] [skhyphen.tex] % in a different part of the tree, sigh
-
-%definefilesynonym [lang-cz.hyp] [czhyphen.ex] % in a different part of the tree, sigh
-%definefilesynonym [lang-sk.hyp] [skhyphen.ex] % in a different part of the tree, sigh
-
-\definefilesynonym [lang-deo.pat] [dehypht.tex] % old german patterns
-
-%D When the dutch spelling changed, new patterns were
-%D constructed. For long these were named \type {dutch96.pat}.
-%D From 2000 however, the old \type {nehyph} files were
-%D replaced by \type {nehyph96.tex}. Typical something that
-%D you have to find out by accident. The names of hyphenation
-%D files as well as their coding is one of the dark areas of
-%D \TEX\ distributions.
-
- \doiffileelse{nehyph96.tex} {\definefilesynonym[nlhyphen.tex][nehyph96.tex]}
-{\doiffileelse{dutch96.pat} {\definefilesynonym[nlhyphen.tex][dutch96.pat]}
- {\definefilesynonym[nlhyphen.tex][nehyph.tex]}}
-
-%D Ah, something changed in 2003 with respect to ushyph.tex, so let's
-%D fall back when needed. I first noticed this during a workshop at the
-%D practical tex conference 2004 in sf. Yet another proof of a mess in
-%D filenames. So, we now use \type {ushyphen} as name and do some
-%D searching.
-%D
-%D Well, it happened again, this time in 2004/2005. We're now back at
-%D \type {hyphen.tex}. At the same time the uk patterns have changed. It
-%D clearly demonstrates that those taking care of patterns don't think
-%D generic and completely trust this aliasses mechanism in kpse. It's about
-%D time that \CONTEXT\ starts shipping its own pattern files again in order
-%D to get around this everlasting mess.
-
- \doiffileelse{hyphen.tex} {\definefilesynonym[ushyphen.tex][hyphen.tex] }
-{\doiffileelse{ushyph.tex} {\definefilesynonym[ushyphen.tex][ushyph.tex] }
-{\doiffileelse{ushyph1.tex} {\definefilesynonym[ushyphen.tex][ushyph1.tex]}
-{\doiffileelse{ushyph2.tex} {\definefilesynonym[ushyphen.tex][ushyph2.tex]}}}}
-
- \doiffileelse{ukhyph.tex} {\definefilesynonym[ukhyphen.tex][ukhyph.tex] }
-{\doiffileelse{ukhyph1.tex} {\definefilesynonym[ukhyphen.tex][ukhyph1.tex]}
-{\doiffileelse{ukhyph2.tex} {\definefilesynonym[ukhyphen.tex][ukhyph2.tex]}
- {\definefilesynonym[ukhyphen.tex][hyphen.tex] }}}
-
-%D In order to get 8 bit characters hyphenated, we need to load
-%D patterns under the right circumstances. In some countries, more
-%D than one font encoding is in use. I can add more defaults here
-%D if users let me know what encoding they use.
-
-\installlanguage [\s!nl] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
-\installlanguage [\s!fr] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
-\installlanguage [\s!de] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
-\installlanguage [\s!it] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}]
-
-\installlanguage [\s!hr] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
-\installlanguage [\s!pl] [\s!mapping={pl0,ec},\s!encoding={pl0,ec}]
-\installlanguage [\s!cz] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
-\installlanguage [\s!sk] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
-\installlanguage [\s!sl] [\s!mapping={il2,ec},\s!encoding={il2,ec}]
-
%D Additional languages can be defined here. Beware of
%D encoding incompatibilities. Please take a look at the
%D \type {cont-en.tex}, \type {cont-nl.tex}, enz.\ files
diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml
index 0bb3c085b..f990a6773 100644
--- a/tex/context/interface/keys-cz.xml
+++ b/tex/context/interface/keys-cz.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2005.02.07">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2005.02.14">
<cd:variables>
<cd:variable name="one" value="jedna"/>
diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml
index 02e828433..41a52009a 100644
--- a/tex/context/interface/keys-de.xml
+++ b/tex/context/interface/keys-de.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2005.02.07">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2005.02.14">
<cd:variables>
<cd:variable name="one" value="eins"/>
diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml
index ef11fe4d4..16d1e0b45 100644
--- a/tex/context/interface/keys-en.xml
+++ b/tex/context/interface/keys-en.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2005.02.07">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2005.02.14">
<cd:variables>
<cd:variable name="one" value="one"/>
diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml
index 9930d3f46..8300c632c 100644
--- a/tex/context/interface/keys-it.xml
+++ b/tex/context/interface/keys-it.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2005.02.07">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2005.02.14">
<cd:variables>
<cd:variable name="one" value="uno"/>
diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml
index 6f9e85d66..8784a3236 100644
--- a/tex/context/interface/keys-nl.xml
+++ b/tex/context/interface/keys-nl.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2005.02.07">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2005.02.14">
<cd:variables>
<cd:variable name="one" value="een"/>
diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml
index 41722d943..1d3a1d797 100644
--- a/tex/context/interface/keys-ro.xml
+++ b/tex/context/interface/keys-ro.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2005.02.07">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2005.02.14">
<cd:variables>
<cd:variable name="one" value="unu"/>
diff --git a/tex/context/user/cont-sys.rme b/tex/context/user/cont-sys.rme
index 33e0d01d5..6a9e7eec3 100644
--- a/tex/context/user/cont-sys.rme
+++ b/tex/context/user/cont-sys.rme
@@ -169,15 +169,6 @@
%
% \runutilityfiletrue
-% You can also load additional encodings here:
-%
-% \useencoding[x5]
-%
-% \useregime[cyr]
-% \useencoding[cyr]
-% \enableregime[cp1251]
-% \setupbodyfont[cyr]
-
% So far.
\protect \endinput