summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2006-07-13 22:26:00 +0200
committerHans Hagen <pragma@wxs.nl>2006-07-13 22:26:00 +0200
commitcb58eea8a8460f4288c8ba9279bcd1a4d9333f74 (patch)
treea935db5f4be07adc3ab7ff0a6838505030a72fc4
parentf9420a5dde4d6646f2e117813bd85e0bfc701d7d (diff)
downloadcontext-cb58eea8a8460f4288c8ba9279bcd1a4d9333f74.tar.gz
stable 2006.07.13 22:26
-rw-r--r--bibtex/bst/context/cont-ab.bst1
-rw-r--r--bibtex/bst/context/cont-au.bst1
-rw-r--r--bibtex/bst/context/cont-no.bst1
-rw-r--r--bibtex/bst/context/cont-ti.bst1
-rw-r--r--doc/context/bib/bibmod-doc.pdfbin258514 -> 266046 bytes
-rw-r--r--doc/context/bib/bibmod-doc.tex117
-rw-r--r--doc/fonts/hoekwater/koeieletters/koeieletters.rme45
-rw-r--r--fonts/afm/hoekwater/koeieletters/koeieletters-contour.afm185
-rw-r--r--fonts/afm/hoekwater/koeieletters/koeieletters.afm855
-rw-r--r--fonts/afm/hoekwater/koeieletters/koeielogos-contour.afm39
-rw-r--r--fonts/afm/hoekwater/koeieletters/koeielogos.afm39
-rw-r--r--fonts/afm/hoekwater/koeieletters/koeien-ex.afm879
-rw-r--r--fonts/afm/hoekwater/koeieletters/koeien-mi.afm879
-rw-r--r--fonts/afm/hoekwater/koeieletters/koeien-sy.afm879
-rw-r--r--fonts/enc/pdftex/context/koeieletters-ex.enc259
-rw-r--r--fonts/enc/pdftex/context/koeieletters-mi.enc271
-rw-r--r--fonts/enc/pdftex/context/koeieletters-sy.enc271
-rw-r--r--fonts/enc/pdftex/context/koeieletters.enc271
-rw-r--r--fonts/enc/pdftex/context/koeielogos.enc258
-rw-r--r--fonts/map/pdftex/context/koeieletters.map8
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeielett-contour.tfmbin0 -> 4552 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeielett.tfmbin0 -> 4552 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeieletter-ex.tfmbin0 -> 824 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeieletter-mi.tfmbin0 -> 3364 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeieletter-sy.tfmbin0 -> 800 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeieletter-syx.tfmbin0 -> 800 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeieletters-contour.tfmbin0 -> 1496 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeieletters.tfmbin0 -> 1492 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeielettx.tfmbin0 -> 4552 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeielogos-contour.tfmbin0 -> 352 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeielogos.tfmbin0 -> 352 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeien-ex.tfmbin0 -> 796 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeien-mi.tfmbin0 -> 704 bytes
-rw-r--r--fonts/tfm/hoekwater/koeieletters/koeien-sy.tfmbin0 -> 932 bytes
-rw-r--r--fonts/type1/hoekwater/koeieletters/koeieletters-contour.pfbbin0 -> 38601 bytes
-rw-r--r--fonts/type1/hoekwater/koeieletters/koeieletters.pfbbin0 -> 323932 bytes
-rw-r--r--fonts/type1/hoekwater/koeieletters/koeielogos-contour.pfbbin0 -> 29912 bytes
-rw-r--r--fonts/type1/hoekwater/koeieletters/koeielogos.pfbbin0 -> 164827 bytes
-rw-r--r--fonts/vf/hoekwater/koeieletters/koeielett-contour.vfbin0 -> 1032 bytes
-rw-r--r--fonts/vf/hoekwater/koeieletters/koeielett.vfbin0 -> 1016 bytes
-rw-r--r--fonts/vf/hoekwater/koeieletters/koeieletter-ex.vfbin0 -> 288 bytes
-rw-r--r--fonts/vf/hoekwater/koeieletters/koeieletter-mi.vfbin0 -> 520 bytes
-rw-r--r--fonts/vf/hoekwater/koeieletters/koeieletter-sy.vfbin0 -> 204 bytes
-rw-r--r--fonts/vf/hoekwater/koeieletters/koeieletter-syx.vfbin0 -> 204 bytes
-rw-r--r--fonts/vf/hoekwater/koeieletters/koeielettx.vfbin0 -> 1028 bytes
-rw-r--r--metapost/context/base/metafun.mp10
-rw-r--r--metapost/context/base/mp-base.mp556
-rw-r--r--metapost/context/base/mp-txts.mp67
-rw-r--r--scripts/context/perl/texexec.pl12
-rw-r--r--scripts/context/ruby/base/mp.rb2
-rw-r--r--scripts/context/ruby/base/system.rb7
-rw-r--r--scripts/context/ruby/base/tex.rb210
-rw-r--r--scripts/context/ruby/base/texutil.rb12
-rw-r--r--scripts/context/ruby/ctxtools.rb14
-rw-r--r--scripts/context/ruby/fcd_start.rb32
-rw-r--r--scripts/context/ruby/pdftools.rb816
-rw-r--r--scripts/context/ruby/texexec.rb65
-rw-r--r--scripts/context/ruby/texmfstart.rb6
-rw-r--r--scripts/context/ruby/xmltools.rb117
-rw-r--r--tex/context/base/colo-ini.tex23
-rw-r--r--tex/context/base/cont-new.tex71
-rw-r--r--tex/context/base/context.tex7
-rw-r--r--tex/context/base/core-con.tex15
-rw-r--r--tex/context/base/core-des.tex15
-rw-r--r--tex/context/base/core-lst.tex2
-rw-r--r--tex/context/base/core-mak.tex18
-rw-r--r--tex/context/base/core-mat.tex12
-rw-r--r--tex/context/base/core-ntb.tex444
-rw-r--r--tex/context/base/core-ref.tex14
-rw-r--r--tex/context/base/core-reg.tex18
-rw-r--r--tex/context/base/core-rul.tex75
-rw-r--r--tex/context/base/core-sec.tex172
-rw-r--r--tex/context/base/core-spa.tex115
-rw-r--r--tex/context/base/core-tab.tex379
-rw-r--r--tex/context/base/core-tbl.tex169
-rw-r--r--tex/context/base/core-tsp.tex451
-rw-r--r--tex/context/base/core-uti.tex7
-rw-r--r--tex/context/base/font-ini.tex78
-rw-r--r--tex/context/base/lang-all.xml2
-rw-r--r--tex/context/base/lang-ini.tex2
-rw-r--r--tex/context/base/lang-ita.tex2
-rw-r--r--tex/context/base/m-database.tex286
-rw-r--r--tex/context/base/m-r.tex83
-rw-r--r--tex/context/base/m-streams.tex26
-rw-r--r--tex/context/base/m-tryout.tex4
-rw-r--r--tex/context/base/m-units.tex2
-rw-r--r--tex/context/base/math-cow.tex30
-rw-r--r--tex/context/base/math-eul.tex106
-rw-r--r--tex/context/base/math-ext.tex199
-rw-r--r--tex/context/base/meta-ini.tex51
-rw-r--r--tex/context/base/meta-pdf.tex197
-rw-r--r--tex/context/base/meta-tex.tex205
-rw-r--r--tex/context/base/mult-con.tex10
-rw-r--r--tex/context/base/mult-ini.tex16
-rw-r--r--tex/context/base/page-bck.tex24
-rw-r--r--tex/context/base/page-flt.tex177
-rw-r--r--tex/context/base/page-imp.tex2
-rw-r--r--tex/context/base/page-ini.tex13
-rw-r--r--tex/context/base/page-lay.tex16
-rw-r--r--tex/context/base/page-log.tex2
-rw-r--r--tex/context/base/page-lyr.tex2
-rw-r--r--tex/context/base/page-mak.tex11
-rw-r--r--tex/context/base/page-mar.tex2
-rw-r--r--tex/context/base/page-num.tex18
-rw-r--r--tex/context/base/page-one.tex106
-rw-r--r--tex/context/base/page-run.tex2
-rw-r--r--tex/context/base/page-set.tex2
-rw-r--r--tex/context/base/page-spr.tex2
-rw-r--r--tex/context/base/s-abr-01.tex6
-rw-r--r--tex/context/base/s-pre-30.tex13
-rw-r--r--tex/context/base/s-pre-50.tex28
-rw-r--r--tex/context/base/supp-lan.tex34
-rw-r--r--tex/context/base/supp-mis.tex38
-rw-r--r--tex/context/base/supp-mps.tex26
-rw-r--r--tex/context/base/symb-cow.tex104
-rw-r--r--tex/context/base/syst-gen.tex8
-rw-r--r--tex/context/base/type-cow.tex83
-rw-r--r--tex/context/base/type-gyr.tex36
-rw-r--r--tex/context/base/type-syn.tex20
-rw-r--r--tex/context/base/verb-c.tex11
-rw-r--r--tex/context/base/x-fe.tex2
-rw-r--r--tex/context/base/x-set-11.tex13
-rw-r--r--tex/context/base/x-set-12.tex57
-rw-r--r--tex/context/base/xtag-run.tex4
-rw-r--r--tex/context/bib/bibl-ams.tex2
-rw-r--r--tex/context/bib/bibl-apa-de.tex2
-rw-r--r--tex/context/bib/bibl-apa-fr.tex2
-rw-r--r--tex/context/bib/bibl-apa.tex5
-rw-r--r--tex/context/bib/bibl-aps.tex2
-rw-r--r--tex/context/bib/bibl-num-fr.tex2
-rw-r--r--tex/context/bib/bibl-num.tex8
-rw-r--r--tex/context/bib/bibl-ssa.tex2
-rw-r--r--tex/context/bib/t-bib.tex638
-rw-r--r--tex/context/bib/t-bibltx.tex75
-rw-r--r--tex/context/interface/cont-cz.xml13
-rw-r--r--tex/context/interface/cont-de.xml13
-rw-r--r--tex/context/interface/cont-en.xml13
-rw-r--r--tex/context/interface/cont-fr.xml13
-rw-r--r--tex/context/interface/cont-it.xml13
-rw-r--r--tex/context/interface/cont-nl.xml13
-rw-r--r--tex/context/interface/cont-ro.xml13
-rw-r--r--tex/context/interface/keys-cz.xml3
-rw-r--r--tex/context/interface/keys-de.xml3
-rw-r--r--tex/context/interface/keys-en.xml3
-rw-r--r--tex/context/interface/keys-fr.xml3
-rw-r--r--tex/context/interface/keys-it.xml3
-rw-r--r--tex/context/interface/keys-nl.xml3
-rw-r--r--tex/context/interface/keys-ro.xml3
-rw-r--r--tex/context/interface/t-bib.xml13
-rw-r--r--tpm/t-bib.tpm11
150 files changed, 10478 insertions, 1749 deletions
diff --git a/bibtex/bst/context/cont-ab.bst b/bibtex/bst/context/cont-ab.bst
index 3b1b3c9f9..c524ff8ee 100644
--- a/bibtex/bst/context/cont-ab.bst
+++ b/bibtex/bst/context/cont-ab.bst
@@ -686,6 +686,7 @@ FUNCTION {patent}
format.authors
format.year
format.t.title
+ "" "\bibnumber" number do.out
"" "\city" address do.out
"" "\nationality" nationality do.out
"" "\assignee" assignee do.out
diff --git a/bibtex/bst/context/cont-au.bst b/bibtex/bst/context/cont-au.bst
index 946860901..2eba98b0a 100644
--- a/bibtex/bst/context/cont-au.bst
+++ b/bibtex/bst/context/cont-au.bst
@@ -686,6 +686,7 @@ FUNCTION {patent}
format.authors
format.year
format.t.title
+ "" "\bibnumber" number do.out
"" "\city" address do.out
"" "\nationality" nationality do.out
"" "\assignee" assignee do.out
diff --git a/bibtex/bst/context/cont-no.bst b/bibtex/bst/context/cont-no.bst
index a0cb52151..dbeb8a45d 100644
--- a/bibtex/bst/context/cont-no.bst
+++ b/bibtex/bst/context/cont-no.bst
@@ -686,6 +686,7 @@ FUNCTION {patent}
format.authors
format.year
format.t.title
+ "" "\bibnumber" number do.out
"" "\city" address do.out
"" "\nationality" nationality do.out
"" "\assignee" assignee do.out
diff --git a/bibtex/bst/context/cont-ti.bst b/bibtex/bst/context/cont-ti.bst
index a0d53433a..734cbb4b6 100644
--- a/bibtex/bst/context/cont-ti.bst
+++ b/bibtex/bst/context/cont-ti.bst
@@ -686,6 +686,7 @@ FUNCTION {patent}
format.authors
format.year
format.t.title
+ "" "\bibnumber" number do.out
"" "\city" address do.out
"" "\nationality" nationality do.out
"" "\assignee" assignee do.out
diff --git a/doc/context/bib/bibmod-doc.pdf b/doc/context/bib/bibmod-doc.pdf
index 4a5aa523d..d56562ecc 100644
--- a/doc/context/bib/bibmod-doc.pdf
+++ b/doc/context/bib/bibmod-doc.pdf
Binary files differ
diff --git a/doc/context/bib/bibmod-doc.tex b/doc/context/bib/bibmod-doc.tex
index b1ba4dcc3..32daa3168 100644
--- a/doc/context/bib/bibmod-doc.tex
+++ b/doc/context/bib/bibmod-doc.tex
@@ -5,6 +5,7 @@
\setupcolors[state=start]
\usemodule[bib,set-11,mod-01]
+
\setuppublications[alternative=num]
\startXMLmapping[zero]
@@ -33,7 +34,7 @@
\title{\CONTEXT\ Publication Module, The user documententation}
\pubyear{2006}
\note{In case you didn't know: it's the document you are reading now}
-\pages{12}
+\pages{14}
\stoppublication
\stopbuffer
@@ -59,7 +60,7 @@
The bibliographic module (\type{t-bib.tex}) takes care of references
to publications and the typesetting of publication lists, as well as
providing an interface between \BIBTEX and \CONTEXT. This manual
-documents version 2006.03.13.
+documents version 2006.06.16.
The bibliographic subsystem consists of the main module
\type{t-bib.tex}; four \BIBTEX\ styles (\type{cont-xx.bst}); and a set
@@ -78,7 +79,7 @@ A typical input file obeys following structure:
main text of the article. The source of these definitions can be
a combination of:
\startitemize
- \item THe \type{\jobname.bbl} file (automatically read at \type{\starttext})
+ \item The \type{\jobname.bbl} file (automatically read at \type{\starttext})
\item extra bbl files
\item a file or inline macros before \type{\starttext}
\stopitemize
@@ -86,7 +87,7 @@ a combination of:
only important to realize that of all these definitions have to be known
{\it before} the first citation in the text.
\item \type{\starttext}
-\item The body text, with a number of \type{\cite} commands.
+\item The body text, with a number of \type{\cite} and \type{\nocite} commands.
\item The list of publications, called using the command
\type{\placepublications} or the command\break \type{\completepublications}.
\item \type{\stoptext}
@@ -138,7 +139,7 @@ allowing you to override specific settings from the chosen style.\NC\NR
means that all referred-to publications are listed
before all others, otherwise (if `sorttype' equals `bbl') you will
just get a typeset version of the used database(s).\crlf
- The default for apa is `used'\NC\NR
+ The default for apa is `used'.\NC\NR
\NC numbering\NC Whether or not the publication list
should be labelled and if so, how. \type{yes} uses the item number in
the publication list as label. \type{short} uses the short
@@ -150,15 +151,20 @@ allowing you to override specific settings from the chosen style.\NC\NR
hanging indent should be re-calculated based on the real size of the
label. This option only applies if numbering is turned on.\crlf
The default is `no'.\NC\NR
+\NC monthconversion\NC The presentation form of any month field, if it
+ is entered in the database as a numeric value. The default is to
+ typeset the number without any conversion\NC\NR
\stoptabulate
\subsection{How the entries are formatted: \type{\setuppublicationlist}}
\setup{setuppublicationlist}
-The list of publications at the end of the article is essentially a
-normal context `list' that behaves much like the list that defines the
-table of contents, with the following changes:
+The list of publications at the end of the article is comparable with
+a sequence of normal \CONTEXT\ `list items' that behaves much like the
+list that defines the table of contents. {\it In previous versions, it was
+in fact implemented as a `normal' \CONTEXT\ list, but this is no
+longer the true.\/}
The module defines a set of extra options. These option names are static, they
do {\it not} change to follow the selected \CONTEXT\ interface language.
@@ -201,7 +207,7 @@ macros provide formatting that looks like this:
}
As you can see in the examples, there is a connection between certain
styles of displaying a name and the punctuation used. Punctuation in
-this document has been set up by the `ap' style, and that style makes
+this document has been set up by the `apa' style, and that style makes
sure that \type{\invertedshortauthor} looks good, since that is the default
command for `apa' style. (Keep in mind that the comma at the end of the
author will be inserted by either `namesep' or `lastnamesep'.)
@@ -224,27 +230,7 @@ but commands can be a lot simpler, like this:
\setuppublicationlist[editor=\surnameonly]
\stoptyping
-
-Apart from these extra options,
-the module itself sets some of the options to the internal call to
-\type{\setuplist} itself.
-
-To get a reasonable layout for the reference list, the following are
-set as a precaution:
-\starttabulate[|l|p|]
-\NC alternative\NC Always re-initialized to `a'. This makes sure that no
-space is allocated for the page number.\NC\NR
-\NC pagenumber\NC Always re-initialized to `no'. The list is a bit of
-a special one, and page numbers don't make much sense. All entries
-will have the same page number: the number of the page on
-which \type{\placepublications} was called.\NC\NR
-\NC interaction\NC Alway made empty. There should never be any
-interactivity in the list of publications, because the entries all
-point to themselves (this limitation is similar to one for `pagenumber').
-\stoptabulate
-
-
-And also, the following options are initialized depending on the
+The following options are initialized depending on the
global settings for `numbering' and `autohang':
\starttabulate[|l|p|]
\NC width\NC Set to the calculated width of the largest label, but only if autohang is `yes'\NC\NR
@@ -361,9 +347,21 @@ files cannot be found (the \type{.tuo} file is needed to get correct
page references for \type{\cite[page]}).
+\subsection{Legacy database support}
+
+Old \BIBTEX\ databases tend to contain \LaTeX-specific commands and,
+especially, command||definitions. To make it easier to handle these
+databases, a support module that defines a simplified version of
+\LaTeX's \type{\newcommand} is shipped alongside the bib module.
+You can load this support code by adding
+\starttyping
+\usemodule[bibltx]
+\stoptyping
+to your document preamble.
+
\section{Citations}
-Citations are handled through the \type{\cite} command.
+Citations are normally handled through the \type{\cite} command.
\type{\cite} has two basic appearances:
@@ -420,6 +418,7 @@ Three of the options are combinations:
\starttabulate[|l|l|p|]
\NC authoryear\NC \cite[authoryear][me]\NC(from `a' and `y')\hfil\NC\NR
\NC authoryears\NC \cite[authoryears][me]\NC(from `a' and `y')\hfil\NC\NR
+\NC authornum\NC \cite[authornum][me]\NC(from `a' and `num')\hfil\NC\NR
\NC data\NC \vtop{\hsize .45\hsize \cite[data][me]}\NC The data content of the entry\hfil\NC\NR
\stoptabulate
@@ -439,24 +438,40 @@ except for \type{extras}. The argument of `\type{extras}' is typeset
at the end of the reference, but before a potential `\type{right}', so
it can be used for e.g. page or chapter specifiers.
+\subsection{Invisible citations}
+
+\setup{nocite}
+
+This command registers the references in the argument list, but does
+not generate typeset material. It can be used to force certain entries
+from the database to appear in the typeset list of publications.
\section{Placing the publication list}
-This is really simple: use \type{\completepublications}
-or \type{\placepublications} at the location in your
-text where you want the publication list to appear. As is normal in
-\CONTEXT, \type{\placepublications} gives you a raw list, and
-\type{\completepublications} a list with a heading. The module uses
-the following defaults for the generated head:
+To typset the list of publications, use \type{\completepublications}
+or \type{\placepublications} at the location in your text where you
+want the publication list to appear. As is normal in \CONTEXT,
+\type{\placepublications} gives you a raw list, and
+\type{\completepublications} a list with a heading.
+
+
+The default for the publication list is to contain only the `locally'
+referenced items, so if you want to use your own heading instead of
+the default one, you most likely want to call
+\type{\placepublications} with an explicit criterium, like so:
\starttyping
-\setupheadtext[en][\biblistname=References]
-\setupheadtext[nl][\biblistname=Literatuur]
-\setupheadtext[de][\biblistname=Literatur]
-\setupheadtext[it][\biblistname=Bibliografia]
-\setupheadtext[sl][\biblistname=Literatura]
-\setupheadtext[fr][\biblistname=Bibliographie]
+\placepublications[criterium=all]
\stoptyping
+The module uses the following defaults for the generated head:
+\starttyping
+\setupheadtext[en][pubs=References]
+\setupheadtext[nl][pubs=Literatuur]
+\setupheadtext[de][pubs=Literatur]
+\setupheadtext[it][pubs=Bibliografia]
+\setupheadtext[sl][pubs=Literatura]
+\setupheadtext[fr][pubs=Bibliographie]
+\stoptyping
These (or new ones) can be redefined as needed.
\section{The bbl file}
@@ -548,8 +563,8 @@ differentiates between these.\NC\NR
\NC\type{\day}\NC\tfx DAY \NC Date of publication (for a patent)\NC\NR
\NC\type{\dayfiled}\NC\tfx DAYFILED\NC Filing date for a patent\NC\NR
\NC\type{\doi}\NC\tfx DOI \NC Document Object Identifier\NC\NR
-\NC\type{\eprint}\NC\tfx EPRINT\NC E-print information\NC\NR
\NC\type{\edition}\NC\tfx EDITION\NC The edition.\NC\NR
+\NC\type{\eprint}\NC\tfx EPRINT\NC E-print information\NC\NR
\NC\type{\howpublished}\NC\tfx HOWPUBLISHED\NC \NC\NR
\NC\type{\isbn}\NC\tfx ISNB\NC isbn number (for books)\NC\NR
\NC\type{\issn}\NC\tfx ISSN\NC issn number (for journals)\NC\NR
@@ -558,7 +573,7 @@ differentiates between these.\NC\NR
\NC\type{\keyword}\NC\tfx KEYWORD \NC just text (for use in indices).\NC\NR
\NC\type{\keywords}\NC\tfx KEYWORDS \NC just text (for use in indices).\NC\NR
\NC\type{\lang}\NC\tfx LANGUAGE \NC The language of the
- current bibliographic record (ignored at the moment)\NC\NR
+ current bibliographic record\NC\NR
\NC\type{\month}\NC\tfx MONTH\NC Month of publication\NC\NR
\NC\type{\monthfiled}\NC\tfx MONTHFILED\NC Filing month for a patent\NC\NR
\NC\type{\names}\NC\tfx NAMES\NC just text (for use in indices).\NC\NR
@@ -588,6 +603,16 @@ differentiates between these.\NC\NR
\NC\type{\yearfiled}\NC\tfx YEARFILED\NC Filing year for a patent\NC\NR
\stoptabulate
+When the \type{\lang} field's content is a full word instead of a
+two||letter code, correct processing depends on an auxiliary command
+\type{\setbiblanguage}, to be used like this:
+\starttyping
+\setbiblanguage{English}{en}
+\stoptyping
+The first argument is a literal \type{\lang} argument, the second
+argument has to be a two||letter language abbreviation understood by
+\CONTEXT.
+
Adding in one of your own fields is reasonably simple:
\starttyping
@@ -656,7 +681,7 @@ point.
\section{References}
-\placepublications
+\placepublications[criterium=all]
\stopdocumentation
diff --git a/doc/fonts/hoekwater/koeieletters/koeieletters.rme b/doc/fonts/hoekwater/koeieletters/koeieletters.rme
new file mode 100644
index 000000000..4be11cce8
--- /dev/null
+++ b/doc/fonts/hoekwater/koeieletters/koeieletters.rme
@@ -0,0 +1,45 @@
+Remarks
+
+The Koeieletters font is copyrighted (2006) by Hans Hagen
+and Taco Hoekwater. The font is based on original drawings
+by Duane Bibby.
+
+The Koeieletters font is distributed under the Creative
+Commons Attribution No Derivative Works licence. A summary
+of this licence can be found at the bottom of this file. The
+complete version of the licence can be found at:
+
+ http://creativecommons.org/licenses/by-nd/2.5/legalcode
+
+The font is supported by ConTeXt and more information about
+its history, evolution and usage can be found in the manual
+at www.pragma-ade.com.
+
+==== http://creativecommons.org/licenses/by-nd/2.5/ ====
+
+Attribution-NoDerivs 2.5
+
+You are free:
+
+ * to copy, distribute, display, and perform the work
+ * to make commercial use of the work
+
+Under the following conditions:
+
+ Attribution: You must attribute the work in the manner
+ specified by the author or licensor.
+
+ Derivative Works: You may not alter, transform, or
+ build upon this work.
+
+ * For any reuse or distribution, you must make clear
+ to others the license terms of this work.
+ * Any of these conditions can be waived if you get
+ permission from the copyright holder.
+
+Your fair use and other rights are in no way affected
+by the above.
+
+==== end of copy =======================================
+
+
diff --git a/fonts/afm/hoekwater/koeieletters/koeieletters-contour.afm b/fonts/afm/hoekwater/koeieletters/koeieletters-contour.afm
new file mode 100644
index 000000000..1a0f31dcb
--- /dev/null
+++ b/fonts/afm/hoekwater/koeieletters/koeieletters-contour.afm
@@ -0,0 +1,185 @@
+StartFontMetrics 2.0
+Comment Generated by FontForge 20050809
+Comment Creation Date: Thu Jul 13 13:10:04 2006
+FontName koeieletters-contour
+FullName koeieletters-contour
+FamilyName koeieletters-contour
+Weight Medium
+Notice (Copyright 2006 Hans Hagen, Taco Hoekwater. Based on original drawings by Duane Bibby.)
+ItalicAngle 0
+IsFixedPitch false
+UnderlinePosition -100
+UnderlineThickness 16
+Version 001.001
+EncodingScheme FontSpecific
+FontBBox -60 -1667 1117 762
+CapHeight 532
+XHeight 540
+Ascender 533
+StartCharMetrics 164
+C 0 ; WX 321 ; N parenleft.big ; B 25 -1001 296 39 ;
+C 1 ; WX 323 ; N parenright.big ; B 25 -999 298 42 ;
+C 2 ; WX 539 ; N slash.big ; B 97 -825 634 39 ;
+C 3 ; WX 382 ; N bracketleft.big ; B 25 -988 357 52 ;
+C 4 ; WX 489 ; N backslash.big ; B -60 -820 392 44 ;
+C 5 ; WX 376 ; N bracketright.big ; B 25 -990 351 50 ;
+C 6 ; WX 332 ; N braceleft.big ; B 25 -1008 307 52 ;
+C 7 ; WX 243 ; N bar.big ; B 25 -982 218 49 ;
+C 8 ; WX 323 ; N braceright.big ; B 24 -1013 303 61 ;
+C 9 ; WX 613 ; N integral.big ; B 25 -1159 631 0 ;
+C 10 ; WX 814 ; N summation.big ; B 29 -1049 989 0 ;
+C 11 ; WX 668 ; N radical.big ; B 25 -792 676 74 ;
+C 12 ; WX 726 ; N radical.bigg ; B 25 -967 735 74 ;
+C 13 ; WX 840 ; N radical.Bigg ; B 25 -1317 848 74 ;
+C 14 ; WX 954 ; N radical.BIGG ; B 24 -1667 962 74 ;
+C 15 ; WX 122 ; N radical.end ; B -8 0 122 74 ;
+C 16 ; WX 8 ; N radical.extender ; B -8 0 17 74 ;
+C 17 ; WX 611 ; N radical.alt ; B 25 -617 619 74 ;
+C 18 ; WX 613 ; N integral.alt ; B 25 -809 588 0 ;
+C 19 ; WX 814 ; N summation.alt ; B 25 -699 789 0 ;
+C 20 ; WX 321 ; N parenleft.bigg ; B 25 -1351 296 39 ;
+C 21 ; WX 323 ; N parenright.bigg ; B 25 -1349 298 42 ;
+C 22 ; WX 539 ; N slash.bigg ; B -32 -1175 634 39 ;
+C 23 ; WX 382 ; N bracketleft.bigg ; B 25 -1338 357 52 ;
+C 24 ; WX 489 ; N backslash.bigg ; B -60 -1170 488 44 ;
+C 25 ; WX 376 ; N bracketright.bigg ; B 25 -1340 351 50 ;
+C 26 ; WX 332 ; N braceleft.bigg ; B 25 -1358 307 52 ;
+C 27 ; WX 243 ; N bar.bigg ; B 25 -1332 218 49 ;
+C 28 ; WX 323 ; N braceright.bigg ; B 24 -1363 303 61 ;
+C 29 ; WX 195 ; N radical.begin ; B 0 0 203 74 ;
+C 32 ; WX 500 ; N space ; B 0 0 0 0 ;
+C 33 ; WX 345 ; N exclam ; B 25 0 320 530 ;
+C 34 ; WX 460 ; N quotedbl ; B 25 338 435 544 ;
+C 39 ; WX 239 ; N quotesingle ; B 25 338 214 544 ;
+C 40 ; WX 321 ; N parenleft ; B 25 -79 296 611 ;
+C 41 ; WX 323 ; N parenright ; B 25 -80 298 611 ;
+C 42 ; WX 414 ; N asterisk ; B 25 32 389 404 ;
+C 43 ; WX 461 ; N plus ; B 25 44 436 404 ;
+C 44 ; WX 232 ; N comma ; B 25 -66 207 140 ;
+C 45 ; WX 355 ; N hyphen ; B 25 176 330 294 ;
+C 46 ; WX 231 ; N period ; B 25 0 206 151 ;
+C 47 ; WX 539 ; N slash ; B 25 0 514 514 ;
+C 48 ; WX 499 ; N zero ; B 25 0 474 531 ;
+C 49 ; WX 488 ; N one ; B 25 0 463 532 ;
+C 50 ; WX 539 ; N two ; B 25 0 514 528 ;
+C 51 ; WX 501 ; N three ; B 25 0 476 518 ;
+C 52 ; WX 514 ; N four ; B 25 0 489 511 ;
+C 53 ; WX 521 ; N five ; B 25 0 496 515 ;
+C 54 ; WX 513 ; N six ; B 25 -1 488 516 ;
+C 55 ; WX 540 ; N seven ; B 25 -1 515 526 ;
+C 56 ; WX 498 ; N eight ; B 25 -1 473 512 ;
+C 57 ; WX 495 ; N nine ; B 25 0 470 514 ;
+C 58 ; WX 234 ; N colon ; B 25 52 209 460 ;
+C 59 ; WX 245 ; N semicolon ; B 25 -10 220 461 ;
+C 60 ; WX 544 ; N less ; B 25 81 519 456 ;
+C 61 ; WX 460 ; N equal ; B 25 88 435 404 ;
+C 62 ; WX 581 ; N greater ; B 25 66 556 448 ;
+C 63 ; WX 518 ; N question ; B 25 -6 493 536 ;
+C 64 ; WX 585 ; N at ; B 25 -4 560 479 ;
+C 65 ; WX 565 ; N A ; B 25 -7 540 527 ;
+C 66 ; WX 545 ; N B ; B 25 -11 520 524 ;
+C 67 ; WX 593 ; N C ; B 25 0 568 535 ;
+C 68 ; WX 562 ; N D ; B 25 0 537 523 ;
+C 69 ; WX 564 ; N E ; B 25 0 539 531 ;
+C 70 ; WX 572 ; N F ; B 25 -12 547 533 ;
+C 71 ; WX 570 ; N G ; B 25 0 545 536 ;
+C 72 ; WX 597 ; N H ; B 25 0 572 536 ;
+C 73 ; WX 462 ; N I ; B 25 -6 437 532 ;
+C 74 ; WX 610 ; N J ; B 25 -6 585 544 ;
+C 75 ; WX 601 ; N K ; B 25 -6 576 532 ;
+C 76 ; WX 522 ; N L ; B 25 -9 497 533 ;
+C 77 ; WX 609 ; N M ; B 24 -7 584 528 ;
+C 78 ; WX 590 ; N N ; B 25 -1 565 556 ;
+C 79 ; WX 613 ; N O ; B 25 -6 588 546 ;
+C 80 ; WX 602 ; N P ; B 25 -1 577 544 ;
+C 81 ; WX 609 ; N Q ; B 25 0 584 536 ;
+C 82 ; WX 586 ; N R ; B 25 -8 561 549 ;
+C 83 ; WX 625 ; N S ; B 25 -13 600 541 ;
+C 84 ; WX 632 ; N T ; B 25 -8 607 538 ;
+C 85 ; WX 573 ; N U ; B 25 0 548 549 ;
+C 86 ; WX 607 ; N V ; B 25 -5 582 523 ;
+C 87 ; WX 602 ; N W ; B 25 -8 577 531 ;
+C 88 ; WX 597 ; N X ; B 25 -5 572 540 ;
+C 89 ; WX 605 ; N Y ; B 25 -28 580 536 ;
+C 90 ; WX 571 ; N Z ; B 25 -19 546 528 ;
+C 91 ; WX 382 ; N bracketleft ; B 25 -88 357 602 ;
+C 92 ; WX 489 ; N backslash ; B 25 0 464 514 ;
+C 93 ; WX 376 ; N bracketright ; B 25 -88 351 602 ;
+C 94 ; WX 480 ; N asciicircum ; B 25 322 455 515 ;
+C 95 ; WX 579 ; N underscore ; B 25 -183 554 -51 ;
+C 96 ; WX 338 ; N grave ; B 25 570 313 762 ;
+C 97 ; WX 565 ; N a ; B 25 -7 540 527 ;
+C 98 ; WX 545 ; N b ; B 25 -11 520 524 ;
+C 99 ; WX 593 ; N c ; B 25 0 568 535 ;
+C 100 ; WX 562 ; N d ; B 25 0 537 523 ;
+C 101 ; WX 564 ; N e ; B 25 0 539 531 ;
+C 102 ; WX 572 ; N f ; B 25 -12 547 533 ;
+C 103 ; WX 570 ; N g ; B 25 0 545 536 ;
+C 104 ; WX 597 ; N h ; B 25 0 572 536 ;
+C 105 ; WX 462 ; N i ; B 25 -6 437 532 ;
+C 106 ; WX 610 ; N j ; B 25 -6 585 544 ;
+C 107 ; WX 600 ; N k ; B 25 -5 575 531 ;
+C 108 ; WX 522 ; N l ; B 25 -9 497 533 ;
+C 109 ; WX 609 ; N m ; B 24 -7 584 528 ;
+C 110 ; WX 590 ; N n ; B 25 -1 565 556 ;
+C 111 ; WX 613 ; N o ; B 25 -6 588 546 ;
+C 112 ; WX 602 ; N p ; B 25 -1 577 544 ;
+C 113 ; WX 609 ; N q ; B 25 0 584 536 ;
+C 114 ; WX 586 ; N r ; B 25 -8 561 549 ;
+C 115 ; WX 625 ; N s ; B 25 -13 600 541 ;
+C 116 ; WX 632 ; N t ; B 25 -8 607 538 ;
+C 117 ; WX 573 ; N u ; B 25 0 548 549 ;
+C 118 ; WX 607 ; N v ; B 25 -5 582 523 ;
+C 119 ; WX 602 ; N w ; B 25 -8 577 531 ;
+C 120 ; WX 597 ; N x ; B 25 -5 572 540 ;
+C 121 ; WX 605 ; N y ; B 25 -28 580 536 ;
+C 122 ; WX 571 ; N z ; B 25 -19 546 528 ;
+C 123 ; WX 332 ; N braceleft ; B 25 -85 307 625 ;
+C 124 ; WX 243 ; N bar ; B 25 0 218 681 ;
+C 125 ; WX 323 ; N braceright ; B 24 -74 298 650 ;
+C 126 ; WX 592 ; N asciitilde ; B 25 198 568 388 ;
+C 156 ; WX 448 ; N dieresis ; B 25 557 423 711 ;
+C 168 ; WX 336 ; N acute ; B 25 569 312 754 ;
+C 203 ; WX 468 ; N multiply ; B 25 41 443 411 ;
+C 244 ; WX 770 ; N infinity ; B 25 87 745 427 ;
+C 245 ; WX 645 ; N arrowleft ; B 25 49 620 433 ;
+C 246 ; WX 683 ; N arrowright ; B 25 53 658 433 ;
+C 247 ; WX 460 ; N minus ; B 25 154 435 302 ;
+C 248 ; WX 414 ; N asteriskmath ; B 25 32 389 404 ;
+C 249 ; WX 613 ; N integral ; B 25 -155 588 654 ;
+C 250 ; WX 814 ; N summation ; B 25 -116 789 583 ;
+C 251 ; WX 614 ; N equivalence ; B 25 58 590 429 ;
+C 252 ; WX 592 ; N similar ; B 25 198 568 388 ;
+C 253 ; WX 224 ; N minute ; B 25 197 199 514 ;
+C 254 ; WX 763 ; N emdash ; B 25 165 738 297 ;
+C 255 ; WX 534 ; N endash ; B 25 165 509 297 ;
+C -1 ; WX 1000 ; N k.001 ; B 3 -6 554 532 ;
+C -1 ; WX 460 ; N quotedblright ; B 25 358 435 564 ;
+C -1 ; WX 256 ; N quoteright ; B 25 358 231 564 ;
+C -1 ; WX 237 ; N quoteleft ; B 25 357 212 564 ;
+C -1 ; WX 465 ; N breve ; B 25 561 440 749 ;
+C -1 ; WX 451 ; N quotedblleft ; B 25 358 426 564 ;
+C -1 ; WX 256 ; N quotesinglbase ; B 25 -58 231 148 ;
+C -1 ; WX 460 ; N quotedblbase ; B 25 -65 435 141 ;
+C -1 ; WX 378 ; N second ; B 25 197 353 514 ;
+C -1 ; WX 530 ; N radical ; B 25 -62 1117 629 ;
+C -1 ; WX 480 ; N circumflex ; B 25 561 455 754 ;
+C -1 ; WX 521 ; N tilde ; B 25 564 496 728 ;
+C -1 ; WX 462 ; N dotlessi ; B 25 -13 437 525 ;
+C -1 ; WX 610 ; N dotlessj ; B 25 -6 585 544 ;
+C -1 ; WX 496 ; N plus.alt ; B 25 64 471 463 ;
+C -1 ; WX 481 ; N minus.alt ; B 25 174 456 355 ;
+C -1 ; WX 552 ; N zero.alt ; B 25 -9 527 529 ;
+C -1 ; WX 554 ; N one.alt ; B 25 -12 529 543 ;
+C -1 ; WX 569 ; N two.alt ; B 25 -16 544 523 ;
+C -1 ; WX 563 ; N three.alt ; B 25 -17 538 533 ;
+C -1 ; WX 595 ; N four.alt ; B 25 -19 570 523 ;
+C -1 ; WX 573 ; N five.alt ; B 25 -18 548 539 ;
+C -1 ; WX 558 ; N six.alt ; B 25 -7 533 535 ;
+C -1 ; WX 594 ; N seven.alt ; B 25 -3 569 523 ;
+C -1 ; WX 544 ; N eight.alt ; B 25 -19 519 529 ;
+C -1 ; WX 594 ; N nine.alt ; B 25 -19 569 536 ;
+C -1 ; WX 231 ; N periodcentered ; B 25 153 206 304 ;
+C -1 ; WX 231 ; N dotaccent ; B 25 561 206 712 ;
+EndCharMetrics
+EndFontMetrics
diff --git a/fonts/afm/hoekwater/koeieletters/koeieletters.afm b/fonts/afm/hoekwater/koeieletters/koeieletters.afm
new file mode 100644
index 000000000..617e5560d
--- /dev/null
+++ b/fonts/afm/hoekwater/koeieletters/koeieletters.afm
@@ -0,0 +1,855 @@
+StartFontMetrics 2.0
+Comment Generated by FontForge 20050809
+Comment Creation Date: Thu Jul 13 13:09:31 2006
+FontName koeieletters
+FullName koeieletters
+FamilyName koeieletters
+Weight Medium
+Notice (Copyright 2006 Hans Hagen, Taco Hoekwater. Based on original drawings by Duane Bibby.)
+ItalicAngle 0
+IsFixedPitch false
+UnderlinePosition -100
+UnderlineThickness 16
+Version 001.001
+EncodingScheme FontSpecific
+FontBBox -60 -1667 1117 762
+CapHeight 532
+XHeight 540
+Ascender 533
+StartCharMetrics 163
+C 0 ; WX 321 ; N parenleft.big ; B 25 -1001 296 39 ;
+C 1 ; WX 323 ; N parenright.big ; B 25 -999 298 42 ;
+C 2 ; WX 539 ; N slash.big ; B 97 -825 634 39 ;
+C 3 ; WX 382 ; N bracketleft.big ; B 25 -988 357 52 ;
+C 4 ; WX 489 ; N backslash.big ; B -60 -820 392 44 ;
+C 5 ; WX 376 ; N bracketright.big ; B 25 -990 351 50 ;
+C 6 ; WX 332 ; N braceleft.big ; B 25 -1008 307 52 ;
+C 7 ; WX 243 ; N bar.big ; B 25 -982 218 49 ;
+C 8 ; WX 323 ; N braceright.big ; B 24 -1013 303 61 ;
+C 9 ; WX 613 ; N integral.big ; B 25 -1159 631 0 ;
+C 10 ; WX 814 ; N summation.big ; B 29 -1049 989 0 ;
+C 11 ; WX 668 ; N radical.big ; B 25 -792 676 74 ;
+C 12 ; WX 726 ; N radical.bigg ; B 25 -967 734 74 ;
+C 13 ; WX 840 ; N radical.Bigg ; B 25 -1317 848 74 ;
+C 14 ; WX 954 ; N radical.BIGG ; B 24 -1667 962 74 ;
+C 15 ; WX 122 ; N radical.end ; B -8 0 122 74 ;
+C 16 ; WX 8 ; N radical.extender ; B -12 0 21 74 ;
+C 17 ; WX 611 ; N radical.alt ; B 25 -617 619 74 ;
+C 18 ; WX 613 ; N integral.alt ; B 25 -809 588 0 ;
+C 19 ; WX 814 ; N summation.alt ; B 25 -699 789 0 ;
+C 20 ; WX 321 ; N parenleft.bigg ; B 25 -1351 296 39 ;
+C 21 ; WX 323 ; N parenright.bigg ; B 25 -1349 298 42 ;
+C 22 ; WX 539 ; N slash.bigg ; B -32 -1175 634 39 ;
+C 23 ; WX 382 ; N bracketleft.bigg ; B 25 -1338 357 52 ;
+C 24 ; WX 489 ; N backslash.bigg ; B -60 -1170 488 44 ;
+C 25 ; WX 376 ; N bracketright.bigg ; B 25 -1340 351 50 ;
+C 26 ; WX 332 ; N braceleft.bigg ; B 25 -1358 307 52 ;
+C 27 ; WX 243 ; N bar.bigg ; B 25 -1332 218 49 ;
+C 28 ; WX 323 ; N braceright.bigg ; B 24 -1363 303 61 ;
+C 29 ; WX 195 ; N radical.begin ; B 0 0 203 74 ;
+C 32 ; WX 500 ; N space ; B 0 0 0 0 ;
+C 33 ; WX 345 ; N exclam ; B 25 0 320 530 ;
+C 34 ; WX 460 ; N quotedbl ; B 25 338 435 544 ;
+C 39 ; WX 239 ; N quotesingle ; B 25 338 214 544 ;
+C 40 ; WX 321 ; N parenleft ; B 25 -79 296 611 ;
+C 41 ; WX 323 ; N parenright ; B 25 -80 298 611 ;
+C 42 ; WX 414 ; N asterisk ; B 25 32 389 404 ;
+C 43 ; WX 461 ; N plus ; B 25 44 436 404 ;
+C 44 ; WX 232 ; N comma ; B 25 -66 207 140 ;
+C 45 ; WX 355 ; N hyphen ; B 25 176 330 294 ;
+C 46 ; WX 231 ; N period ; B 25 0 206 151 ;
+C 47 ; WX 539 ; N slash ; B 25 0 514 514 ;
+C 48 ; WX 499 ; N zero ; B 25 0 474 531 ;
+C 49 ; WX 488 ; N one ; B 25 0 463 532 ;
+C 50 ; WX 539 ; N two ; B 25 0 514 528 ;
+C 51 ; WX 501 ; N three ; B 25 0 476 518 ;
+C 52 ; WX 514 ; N four ; B 25 0 489 511 ;
+C 53 ; WX 521 ; N five ; B 25 0 496 515 ;
+C 54 ; WX 513 ; N six ; B 25 -1 488 516 ;
+C 55 ; WX 540 ; N seven ; B 25 -1 515 526 ;
+C 56 ; WX 498 ; N eight ; B 25 -1 473 512 ;
+C 57 ; WX 495 ; N nine ; B 25 0 470 514 ;
+C 58 ; WX 234 ; N colon ; B 25 52 209 460 ;
+C 59 ; WX 245 ; N semicolon ; B 25 -10 220 461 ;
+C 60 ; WX 544 ; N less ; B 25 81 519 456 ;
+C 61 ; WX 460 ; N equal ; B 25 88 435 404 ;
+C 62 ; WX 581 ; N greater ; B 25 66 556 448 ;
+C 63 ; WX 518 ; N question ; B 25 -6 493 536 ;
+C 64 ; WX 585 ; N at ; B 25 -4 560 479 ;
+C 65 ; WX 565 ; N A ; B 25 -7 540 527 ;
+C 66 ; WX 545 ; N B ; B 25 -11 520 524 ;
+C 67 ; WX 593 ; N C ; B 25 0 568 535 ;
+C 68 ; WX 562 ; N D ; B 25 0 537 523 ;
+C 69 ; WX 564 ; N E ; B 25 0 539 531 ;
+C 70 ; WX 572 ; N F ; B 25 -12 547 533 ;
+C 71 ; WX 570 ; N G ; B 25 0 545 536 ;
+C 72 ; WX 597 ; N H ; B 25 0 572 536 ;
+C 73 ; WX 462 ; N I ; B 25 -6 437 532 ;
+C 74 ; WX 610 ; N J ; B 25 -6 585 544 ;
+C 75 ; WX 600 ; N K ; B 25 -5 575 531 ;
+C 76 ; WX 522 ; N L ; B 25 -9 497 533 ;
+C 77 ; WX 609 ; N M ; B 24 -7 584 528 ;
+C 78 ; WX 590 ; N N ; B 25 -1 565 556 ;
+C 79 ; WX 613 ; N O ; B 25 -6 588 546 ;
+C 80 ; WX 602 ; N P ; B 25 -1 577 544 ;
+C 81 ; WX 609 ; N Q ; B 25 0 584 536 ;
+C 82 ; WX 586 ; N R ; B 25 -8 561 549 ;
+C 83 ; WX 625 ; N S ; B 25 -13 600 541 ;
+C 84 ; WX 632 ; N T ; B 25 -8 607 538 ;
+C 85 ; WX 573 ; N U ; B 25 0 548 549 ;
+C 86 ; WX 607 ; N V ; B 25 -5 582 523 ;
+C 87 ; WX 602 ; N W ; B 25 -8 577 531 ;
+C 88 ; WX 597 ; N X ; B 25 -5 572 540 ;
+C 89 ; WX 605 ; N Y ; B 25 -28 580 536 ;
+C 90 ; WX 571 ; N Z ; B 25 -19 546 528 ;
+C 91 ; WX 382 ; N bracketleft ; B 25 -88 357 602 ;
+C 92 ; WX 489 ; N backslash ; B 25 0 464 514 ;
+C 93 ; WX 376 ; N bracketright ; B 25 -88 351 602 ;
+C 94 ; WX 480 ; N asciicircum ; B 25 322 455 515 ;
+C 95 ; WX 579 ; N underscore ; B 25 -183 554 -51 ;
+C 96 ; WX 338 ; N grave ; B 25 570 313 762 ;
+C 97 ; WX 565 ; N a ; B 25 -7 540 527 ;
+C 98 ; WX 545 ; N b ; B 25 -11 520 524 ;
+C 99 ; WX 593 ; N c ; B 25 0 568 535 ;
+C 100 ; WX 562 ; N d ; B 25 0 537 523 ;
+C 101 ; WX 564 ; N e ; B 25 0 539 531 ;
+C 102 ; WX 572 ; N f ; B 25 -12 547 533 ;
+C 103 ; WX 570 ; N g ; B 25 0 545 536 ;
+C 104 ; WX 597 ; N h ; B 25 0 572 536 ;
+C 105 ; WX 462 ; N i ; B 25 -6 437 532 ;
+C 106 ; WX 610 ; N j ; B 25 -6 585 544 ;
+C 107 ; WX 600 ; N k ; B 25 -5 575 531 ;
+C 108 ; WX 522 ; N l ; B 25 -9 497 533 ;
+C 109 ; WX 609 ; N m ; B 24 -7 584 528 ;
+C 110 ; WX 590 ; N n ; B 25 -1 565 556 ;
+C 111 ; WX 613 ; N o ; B 25 -6 588 546 ;
+C 112 ; WX 602 ; N p ; B 25 -1 577 544 ;
+C 113 ; WX 609 ; N q ; B 25 0 584 536 ;
+C 114 ; WX 586 ; N r ; B 25 -8 561 549 ;
+C 115 ; WX 625 ; N s ; B 25 -13 600 541 ;
+C 116 ; WX 632 ; N t ; B 25 -8 607 538 ;
+C 117 ; WX 573 ; N u ; B 25 0 548 549 ;
+C 118 ; WX 607 ; N v ; B 25 -5 582 523 ;
+C 119 ; WX 602 ; N w ; B 25 -8 577 531 ;
+C 120 ; WX 597 ; N x ; B 25 -5 572 540 ;
+C 121 ; WX 605 ; N y ; B 25 -28 580 536 ;
+C 122 ; WX 571 ; N z ; B 25 -19 546 528 ;
+C 123 ; WX 332 ; N braceleft ; B 25 -85 307 625 ;
+C 124 ; WX 243 ; N bar ; B 25 0 218 681 ;
+C 125 ; WX 323 ; N braceright ; B 24 -74 298 650 ;
+C 126 ; WX 592 ; N asciitilde ; B 25 198 568 388 ;
+C 156 ; WX 448 ; N dieresis ; B 25 557 423 711 ;
+C 168 ; WX 336 ; N acute ; B 25 569 312 754 ;
+C 203 ; WX 468 ; N multiply ; B 25 41 443 411 ;
+C 244 ; WX 770 ; N infinity ; B 25 87 745 427 ;
+C 245 ; WX 645 ; N arrowleft ; B 25 49 620 433 ;
+C 246 ; WX 683 ; N arrowright ; B 25 53 658 433 ;
+C 247 ; WX 460 ; N minus ; B 25 154 435 302 ;
+C 248 ; WX 414 ; N asteriskmath ; B 25 32 389 404 ;
+C 249 ; WX 613 ; N integral ; B 25 -155 588 654 ;
+C 250 ; WX 814 ; N summation ; B 25 -116 789 583 ;
+C 251 ; WX 614 ; N equivalence ; B 25 58 590 429 ;
+C 252 ; WX 592 ; N similar ; B 25 198 568 388 ;
+C 253 ; WX 224 ; N minute ; B 25 197 199 514 ;
+C 254 ; WX 763 ; N emdash ; B 25 165 738 297 ;
+C 255 ; WX 534 ; N endash ; B 25 165 509 297 ;
+C -1 ; WX 460 ; N quotedblright ; B 25 358 435 564 ;
+C -1 ; WX 256 ; N quoteright ; B 25 358 231 564 ;
+C -1 ; WX 237 ; N quoteleft ; B 25 357 212 564 ;
+C -1 ; WX 465 ; N breve ; B 25 561 440 749 ;
+C -1 ; WX 451 ; N quotedblleft ; B 25 358 426 564 ;
+C -1 ; WX 256 ; N quotesinglbase ; B 25 -58 231 148 ;
+C -1 ; WX 460 ; N quotedblbase ; B 25 -65 435 141 ;
+C -1 ; WX 378 ; N second ; B 25 197 353 514 ;
+C -1 ; WX 530 ; N radical ; B 25 -62 1117 629 ;
+C -1 ; WX 480 ; N circumflex ; B 25 561 455 754 ;
+C -1 ; WX 521 ; N tilde ; B 25 564 496 728 ;
+C -1 ; WX 462 ; N dotlessi ; B 25 -6 437 532 ;
+C -1 ; WX 610 ; N dotlessj ; B 25 -6 585 544 ;
+C -1 ; WX 496 ; N plus.alt ; B 25 64 471 463 ;
+C -1 ; WX 481 ; N minus.alt ; B 25 174 456 355 ;
+C -1 ; WX 552 ; N zero.alt ; B 25 -9 527 529 ;
+C -1 ; WX 554 ; N one.alt ; B 25 -12 529 543 ;
+C -1 ; WX 569 ; N two.alt ; B 25 -16 544 523 ;
+C -1 ; WX 563 ; N three.alt ; B 25 -17 538 533 ;
+C -1 ; WX 595 ; N four.alt ; B 25 -19 570 523 ;
+C -1 ; WX 573 ; N five.alt ; B 25 -18 548 539 ;
+C -1 ; WX 558 ; N six.alt ; B 25 -7 533 535 ;
+C -1 ; WX 594 ; N seven.alt ; B 25 -3 569 523 ;
+C -1 ; WX 544 ; N eight.alt ; B 25 -19 519 529 ;
+C -1 ; WX 594 ; N nine.alt ; B 25 -19 569 536 ;
+C -1 ; WX 231 ; N periodcentered ; B 25 153 206 304 ;
+C -1 ; WX 231 ; N dotaccent ; B 25 561 206 712 ;
+EndCharMetrics
+StartKernData
+StartKernPairs 667
+KPX C a -31
+KPX C j -31
+KPX C s -30
+KPX C x -23
+KPX C period -35
+KPX C comma -38
+KPX C hyphen -44
+KPX D x -36
+KPX D period -32
+KPX D comma -40
+KPX E a -52
+KPX E b -29
+KPX E c -56
+KPX E e -27
+KPX E f -32
+KPX E g -66
+KPX E h -45
+KPX E j -52
+KPX E k -20
+KPX E l -26
+KPX E m -23
+KPX E n -21
+KPX E o -67
+KPX E p -20
+KPX E q -46
+KPX E s -59
+KPX E x -26
+KPX E z -23
+KPX E period -51
+KPX E comma -52
+KPX E colon -27
+KPX E semicolon -26
+KPX E hyphen -88
+KPX F a -86
+KPX F b -29
+KPX F c -47
+KPX F e -29
+KPX F f -35
+KPX F g -58
+KPX F h -45
+KPX F j -101
+KPX F k -20
+KPX F l -28
+KPX F m -26
+KPX F n -21
+KPX F o -61
+KPX F p -22
+KPX F q -43
+KPX F s -89
+KPX F x -27
+KPX F z -23
+KPX F period -166
+KPX F comma -166
+KPX F colon -30
+KPX F semicolon -30
+KPX F hyphen -115
+KPX G x -32
+KPX G z -24
+KPX G period -32
+KPX G comma -37
+KPX H x -31
+KPX H period -26
+KPX H comma -31
+KPX I a -46
+KPX I b -32
+KPX I c -34
+KPX I d -20
+KPX I e -31
+KPX I f -29
+KPX I g -30
+KPX I h -40
+KPX I j -45
+KPX I k -22
+KPX I l -28
+KPX I m -26
+KPX I n -22
+KPX I o -35
+KPX I p -24
+KPX I q -29
+KPX I s -43
+KPX I x -28
+KPX I z -24
+KPX I period -51
+KPX I comma -54
+KPX I colon -30
+KPX I semicolon -30
+KPX I hyphen -41
+KPX J a -35
+KPX J b -31
+KPX J c -23
+KPX J e -26
+KPX J g -22
+KPX J h -29
+KPX J j -34
+KPX J k -23
+KPX J n -29
+KPX J o -24
+KPX J p -20
+KPX J r -20
+KPX J s -32
+KPX J x -42
+KPX J z -29
+KPX J period -44
+KPX J comma -48
+KPX J hyphen -26
+KPX K a -70
+KPX K b -33
+KPX K c -38
+KPX K d -22
+KPX K e -33
+KPX K f -31
+KPX K g -41
+KPX K h -45
+KPX K j -73
+KPX K k -24
+KPX K l -30
+KPX K m -28
+KPX K n -24
+KPX K o -44
+KPX K p -25
+KPX K q -32
+KPX K s -74
+KPX K x -29
+KPX K z -27
+KPX K period -73
+KPX K comma -74
+KPX K colon -28
+KPX K semicolon -28
+KPX K hyphen -73
+KPX L t -56
+KPX L v -24
+KPX L y -59
+KPX L quoteright -50
+KPX L quotedblright -50
+KPX M a -26
+KPX M j -25
+KPX M s -22
+KPX M x -28
+KPX M period -29
+KPX M comma -32
+KPX M hyphen -21
+KPX N a -32
+KPX N b -32
+KPX N c -28
+KPX N d -22
+KPX N e -30
+KPX N f -24
+KPX N g -28
+KPX N h -31
+KPX N j -31
+KPX N k -26
+KPX N l -23
+KPX N m -23
+KPX N n -28
+KPX N o -28
+KPX N p -25
+KPX N q -25
+KPX N s -30
+KPX N x -38
+KPX N z -29
+KPX N period -35
+KPX N comma -38
+KPX N hyphen -27
+KPX O x -33
+KPX O period -41
+KPX O comma -47
+KPX P a -60
+KPX P b -33
+KPX P c -33
+KPX P d -22
+KPX P e -35
+KPX P f -27
+KPX P g -32
+KPX P h -40
+KPX P j -60
+KPX P k -24
+KPX P l -27
+KPX P m -27
+KPX P n -25
+KPX P o -36
+KPX P p -27
+KPX P q -28
+KPX P s -72
+KPX P x -34
+KPX P z -26
+KPX P period -175
+KPX P comma -175
+KPX P colon -25
+KPX P semicolon -25
+KPX P hyphen -50
+KPX Q a -22
+KPX Q j -23
+KPX Q s -23
+KPX Q x -34
+KPX Q period -34
+KPX Q comma -34
+KPX R a -36
+KPX R j -36
+KPX R s -42
+KPX R x -23
+KPX R period -47
+KPX R comma -49
+KPX R hyphen -33
+KPX S a -54
+KPX S b -28
+KPX S c -43
+KPX S e -21
+KPX S f -28
+KPX S g -48
+KPX S h -40
+KPX S j -53
+KPX S l -21
+KPX S o -51
+KPX S q -36
+KPX S s -51
+KPX S x -21
+KPX S z -21
+KPX S period -60
+KPX S comma -63
+KPX S hyphen -50
+KPX T a -81
+KPX T b -28
+KPX T c -56
+KPX T e -23
+KPX T f -29
+KPX T g -54
+KPX T h -40
+KPX T j -80
+KPX T l -23
+KPX T m -21
+KPX T o -57
+KPX T q -38
+KPX T s -89
+KPX T x -23
+KPX T z -22
+KPX T period -158
+KPX T comma -159
+KPX T hyphen -71
+KPX U x -25
+KPX U comma -24
+KPX V a -62
+KPX V b -28
+KPX V c -38
+KPX V e -23
+KPX V f -29
+KPX V g -36
+KPX V h -41
+KPX V j -62
+KPX V l -25
+KPX V o -38
+KPX V q -33
+KPX V s -67
+KPX V x -23
+KPX V z -22
+KPX V period -93
+KPX V comma -97
+KPX V hyphen -47
+KPX W a -30
+KPX W b -30
+KPX W c -26
+KPX W e -27
+KPX W f -23
+KPX W g -25
+KPX W h -28
+KPX W j -29
+KPX W k -22
+KPX W l -23
+KPX W m -23
+KPX W n -22
+KPX W o -26
+KPX W p -21
+KPX W q -24
+KPX W s -27
+KPX W x -25
+KPX W z -25
+KPX W period -41
+KPX W comma -47
+KPX W colon -25
+KPX W semicolon -24
+KPX W hyphen -25
+KPX X g -22
+KPX X o -25
+KPX X hyphen -46
+KPX Y a -72
+KPX Y b -28
+KPX Y c -46
+KPX Y e -24
+KPX Y f -29
+KPX Y g -44
+KPX Y h -40
+KPX Y j -71
+KPX Y l -24
+KPX Y m -21
+KPX Y o -48
+KPX Y q -40
+KPX Y s -88
+KPX Y x -24
+KPX Y z -22
+KPX Y period -154
+KPX Y comma -154
+KPX Y colon -20
+KPX Y semicolon -20
+KPX Y hyphen -68
+KPX Z a -43
+KPX Z b -28
+KPX Z c -44
+KPX Z e -21
+KPX Z f -24
+KPX Z g -44
+KPX Z h -40
+KPX Z j -43
+KPX Z l -20
+KPX Z o -50
+KPX Z q -35
+KPX Z s -43
+KPX Z x -20
+KPX Z z -21
+KPX Z period -44
+KPX Z comma -44
+KPX Z hyphen -47
+KPX c a -31
+KPX c j -31
+KPX c s -30
+KPX c x -23
+KPX c period -35
+KPX c comma -38
+KPX c hyphen -44
+KPX d x -36
+KPX d period -32
+KPX d comma -40
+KPX e a -52
+KPX e b -29
+KPX e c -56
+KPX e e -27
+KPX e f -32
+KPX e g -66
+KPX e h -45
+KPX e j -52
+KPX e k -20
+KPX e l -26
+KPX e m -23
+KPX e n -21
+KPX e o -67
+KPX e p -20
+KPX e q -46
+KPX e s -59
+KPX e x -26
+KPX e z -23
+KPX e period -51
+KPX e comma -52
+KPX e colon -27
+KPX e semicolon -26
+KPX e hyphen -88
+KPX f a -86
+KPX f b -29
+KPX f c -47
+KPX f e -29
+KPX f f -35
+KPX f g -58
+KPX f h -45
+KPX f j -101
+KPX f k -20
+KPX f l -28
+KPX f m -26
+KPX f n -21
+KPX f o -61
+KPX f p -22
+KPX f q -43
+KPX f s -89
+KPX f x -27
+KPX f z -23
+KPX f period -166
+KPX f comma -166
+KPX f colon -30
+KPX f semicolon -30
+KPX f hyphen -115
+KPX g x -32
+KPX g z -24
+KPX g period -32
+KPX g comma -37
+KPX h x -31
+KPX h period -26
+KPX h comma -31
+KPX i a -46
+KPX i b -32
+KPX i c -34
+KPX i d -20
+KPX i e -31
+KPX i f -29
+KPX i g -30
+KPX i h -40
+KPX i j -45
+KPX i k -22
+KPX i l -28
+KPX i m -26
+KPX i n -22
+KPX i o -35
+KPX i p -24
+KPX i q -29
+KPX i s -43
+KPX i x -28
+KPX i z -24
+KPX i period -51
+KPX i comma -54
+KPX i colon -30
+KPX i semicolon -30
+KPX i hyphen -41
+KPX j a -35
+KPX j b -31
+KPX j c -23
+KPX j e -26
+KPX j g -22
+KPX j h -29
+KPX j j -34
+KPX j k -23
+KPX j n -29
+KPX j o -24
+KPX j p -20
+KPX j r -20
+KPX j s -32
+KPX j x -42
+KPX j z -29
+KPX j period -44
+KPX j comma -48
+KPX j hyphen -26
+KPX k a -71
+KPX k b -32
+KPX k c -38
+KPX k e -28
+KPX k f -31
+KPX k g -42
+KPX k h -45
+KPX k j -72
+KPX k k -22
+KPX k l -28
+KPX k m -26
+KPX k n -22
+KPX k o -46
+KPX k p -22
+KPX k q -32
+KPX k s -73
+KPX k x -27
+KPX k z -25
+KPX k period -72
+KPX k comma -73
+KPX k colon -25
+KPX k semicolon -25
+KPX k hyphen -74
+KPX l t -56
+KPX l v -24
+KPX l y -59
+KPX l quoteright -50
+KPX l quotedblright -50
+KPX m a -26
+KPX m j -25
+KPX m s -22
+KPX m x -28
+KPX m period -29
+KPX m comma -32
+KPX m hyphen -21
+KPX n a -32
+KPX n b -32
+KPX n c -28
+KPX n d -22
+KPX n e -30
+KPX n f -24
+KPX n g -28
+KPX n h -31
+KPX n j -31
+KPX n k -26
+KPX n l -23
+KPX n m -23
+KPX n n -28
+KPX n o -28
+KPX n p -25
+KPX n q -25
+KPX n s -30
+KPX n x -38
+KPX n z -29
+KPX n period -35
+KPX n comma -38
+KPX n hyphen -27
+KPX o x -33
+KPX o period -41
+KPX o comma -47
+KPX p a -60
+KPX p b -33
+KPX p c -33
+KPX p d -22
+KPX p e -35
+KPX p f -27
+KPX p g -32
+KPX p h -40
+KPX p j -60
+KPX p k -24
+KPX p l -27
+KPX p m -27
+KPX p n -25
+KPX p o -36
+KPX p p -27
+KPX p q -28
+KPX p s -72
+KPX p x -34
+KPX p z -26
+KPX p period -175
+KPX p comma -175
+KPX p colon -25
+KPX p semicolon -25
+KPX p hyphen -50
+KPX q a -22
+KPX q j -23
+KPX q s -23
+KPX q x -34
+KPX q period -34
+KPX q comma -34
+KPX r a -36
+KPX r j -36
+KPX r s -42
+KPX r x -23
+KPX r period -47
+KPX r comma -49
+KPX r hyphen -33
+KPX s a -54
+KPX s b -28
+KPX s c -43
+KPX s e -21
+KPX s f -28
+KPX s g -48
+KPX s h -40
+KPX s j -53
+KPX s l -21
+KPX s o -51
+KPX s q -36
+KPX s s -51
+KPX s x -21
+KPX s z -21
+KPX s period -60
+KPX s comma -63
+KPX s hyphen -50
+KPX t a -81
+KPX t b -28
+KPX t c -56
+KPX t e -23
+KPX t f -29
+KPX t g -54
+KPX t h -40
+KPX t j -80
+KPX t l -23
+KPX t m -21
+KPX t o -57
+KPX t q -38
+KPX t s -89
+KPX t x -23
+KPX t z -22
+KPX t period -158
+KPX t comma -159
+KPX t hyphen -71
+KPX u x -25
+KPX u comma -24
+KPX v a -62
+KPX v b -28
+KPX v c -38
+KPX v e -23
+KPX v f -29
+KPX v g -36
+KPX v h -41
+KPX v j -62
+KPX v l -25
+KPX v o -38
+KPX v q -33
+KPX v s -67
+KPX v x -23
+KPX v z -22
+KPX v period -93
+KPX v comma -97
+KPX v hyphen -47
+KPX w a -30
+KPX w b -30
+KPX w c -26
+KPX w e -27
+KPX w f -23
+KPX w g -25
+KPX w h -28
+KPX w j -29
+KPX w k -22
+KPX w l -23
+KPX w m -23
+KPX w n -22
+KPX w o -26
+KPX w p -21
+KPX w q -24
+KPX w s -27
+KPX w x -25
+KPX w z -25
+KPX w period -41
+KPX w comma -47
+KPX w colon -25
+KPX w semicolon -24
+KPX w hyphen -25
+KPX x g -22
+KPX x o -25
+KPX x hyphen -46
+KPX y a -72
+KPX y b -28
+KPX y c -46
+KPX y e -24
+KPX y f -29
+KPX y g -44
+KPX y h -40
+KPX y j -71
+KPX y l -24
+KPX y m -21
+KPX y o -48
+KPX y q -40
+KPX y s -88
+KPX y x -24
+KPX y z -22
+KPX y period -154
+KPX y comma -154
+KPX y colon -20
+KPX y semicolon -20
+KPX y hyphen -68
+KPX z a -43
+KPX z b -28
+KPX z c -44
+KPX z e -21
+KPX z f -24
+KPX z g -44
+KPX z h -40
+KPX z j -43
+KPX z l -20
+KPX z o -50
+KPX z q -35
+KPX z s -43
+KPX z x -20
+KPX z z -21
+KPX z period -44
+KPX z comma -44
+KPX z hyphen -47
+KPX quoteleft a -50
+KPX quoteleft j -50
+KPX quoteleft A -50
+KPX quoteleft J -50
+KPX quoteleft c -30
+KPX quoteleft g -30
+KPX quoteleft o -30
+KPX quoteleft q -30
+KPX quoteleft s -30
+KPX quoteleft C -30
+KPX quoteleft G -30
+KPX quoteleft O -30
+KPX quoteleft Q -30
+KPX quoteleft S -30
+KPX quotedblleft a -50
+KPX quotedblleft j -50
+KPX quotedblleft A -50
+KPX quotedblleft J -50
+KPX quotedblleft c -30
+KPX quotedblleft g -30
+KPX quotedblleft o -30
+KPX quotedblleft q -30
+KPX quotedblleft s -30
+KPX quotedblleft C -30
+KPX quotedblleft G -30
+KPX quotedblleft O -30
+KPX quotedblleft Q -30
+KPX quotedblleft S -30
+EndKernPairs
+EndKernData
+EndFontMetrics
diff --git a/fonts/afm/hoekwater/koeieletters/koeielogos-contour.afm b/fonts/afm/hoekwater/koeieletters/koeielogos-contour.afm
new file mode 100644
index 000000000..7c320ea93
--- /dev/null
+++ b/fonts/afm/hoekwater/koeieletters/koeielogos-contour.afm
@@ -0,0 +1,39 @@
+StartFontMetrics 2.0
+Comment Generated by FontForge 20050809
+Comment Creation Date: Thu Jul 13 13:10:41 2006
+FontName koeielogos-contour
+FullName koeielogos-contour
+FamilyName koeielogos-contour
+Weight Medium
+Notice (Copyright 2006 Hans Hagen, Taco Hoekwater. Based on original drawings by Duane Bibby.)
+ItalicAngle 0
+IsFixedPitch false
+UnderlinePosition -100
+UnderlineThickness 16
+Version 001.001
+EncodingScheme FontSpecific
+FontBBox 25 -199 4833 813
+StartCharMetrics 21
+C 0 ; WX 4858 ; N P_r_a_g_m_a_A_d_e ; B 25 -34 4833 808 ;
+C 1 ; WX 4382 ; N p_r_a_g_m_a_a_d_e ; B 25 -28 4357 648 ;
+C 2 ; WX 3411 ; N c_o_n_t_e_x_t ; B 25 -53 3386 618 ;
+C 3 ; WX 3411 ; N contextlogo ; B 25 -28 3386 765 ;
+C 4 ; WX 3411 ; N contextlogo.shadow ; B 183 -28 3074 24 ;
+C 5 ; WX 3411 ; N contextlogo.contour ; B 29 98 3384 762 ;
+C 6 ; WX 3411 ; N contextlogo.skeleton ; B 25 94 3387 765 ;
+C 7 ; WX 3411 ; N contextlogo.dots ; B 57 414 3111 714 ;
+C 8 ; WX 1108 ; N M_P ; B 25 -34 1083 599 ;
+C 9 ; WX 1108 ; N mplogo ; B 25 -27 1083 677 ;
+C 10 ; WX 1167 ; N T_e_X ; B 25 -199 1142 571 ;
+C 11 ; WX 1167 ; N texlogo ; B 25 -27 1142 813 ;
+C 12 ; WX 1640 ; N boo ; B 25 69 1615 422 ;
+C 13 ; WX 1642 ; N cow ; B 25 60 1617 420 ;
+C 14 ; WX 3302 ; N examplelogo ; B 25 -29 3277 717 ;
+C 15 ; WX 2584 ; N foxetlogo ; B 25 -28 2559 740 ;
+C 16 ; WX 2727 ; N m_e_t_a_f_u_n ; B 25 -51 2703 584 ;
+C 17 ; WX 2727 ; N metafunlogo ; B 25 -28 2703 700 ;
+C 18 ; WX 1386 ; N texlogo.alt ; B 25 -26 1361 745 ;
+C 19 ; WX 1811 ; N wikilogo ; B 25 -27 1786 702 ;
+C -1 ; WX 500 ; N space ; B 0 0 0 0 ;
+EndCharMetrics
+EndFontMetrics
diff --git a/fonts/afm/hoekwater/koeieletters/koeielogos.afm b/fonts/afm/hoekwater/koeieletters/koeielogos.afm
new file mode 100644
index 000000000..69cd7e6e8
--- /dev/null
+++ b/fonts/afm/hoekwater/koeieletters/koeielogos.afm
@@ -0,0 +1,39 @@
+StartFontMetrics 2.0
+Comment Generated by FontForge 20050809
+Comment Creation Date: Thu Jul 13 13:09:47 2006
+FontName koeielogos
+FullName koeielogos
+FamilyName koeielogos
+Weight Medium
+Notice (Copyright 2006 Hans Hagen, Taco Hoekwater. Based on original drawings by Duane Bibby.)
+ItalicAngle 0
+IsFixedPitch false
+UnderlinePosition -100
+UnderlineThickness 16
+Version 001.001
+EncodingScheme FontSpecific
+FontBBox 25 -199 4833 813
+StartCharMetrics 21
+C 0 ; WX 4858 ; N P_r_a_g_m_a_A_d_e ; B 25 -34 4833 808 ;
+C 1 ; WX 4382 ; N p_r_a_g_m_a_a_d_e ; B 25 -28 4357 648 ;
+C 2 ; WX 3411 ; N c_o_n_t_e_x_t ; B 25 -53 3386 618 ;
+C 3 ; WX 3411 ; N contextlogo ; B 25 -28 3386 765 ;
+C 4 ; WX 3411 ; N contextlogo.shadow ; B 183 -28 3074 24 ;
+C 5 ; WX 3411 ; N contextlogo.contour ; B 28 98 3383 762 ;
+C 6 ; WX 3411 ; N contextlogo.skeleton ; B 25 94 3387 765 ;
+C 7 ; WX 3411 ; N contextlogo.dots ; B 42 414 3096 714 ;
+C 8 ; WX 1108 ; N M_P ; B 25 -34 1083 599 ;
+C 9 ; WX 1108 ; N mplogo ; B 25 -27 1083 677 ;
+C 10 ; WX 1167 ; N T_e_X ; B 25 -199 1142 571 ;
+C 11 ; WX 1167 ; N texlogo ; B 25 -27 1142 813 ;
+C 12 ; WX 1640 ; N boo ; B 25 69 1615 422 ;
+C 13 ; WX 1642 ; N cow ; B 25 60 1617 420 ;
+C 14 ; WX 3302 ; N examplelogo ; B 25 -29 3277 717 ;
+C 15 ; WX 2584 ; N foxetlogo ; B 25 -28 2559 740 ;
+C 16 ; WX 2727 ; N m_e_t_a_f_u_n ; B 25 -51 2703 584 ;
+C 17 ; WX 2727 ; N metafunlogo ; B 25 -28 2703 700 ;
+C 18 ; WX 1386 ; N texlogo.alt ; B 25 -26 1361 745 ;
+C 19 ; WX 1811 ; N wikilogo ; B 25 -27 1786 702 ;
+C -1 ; WX 500 ; N space ; B 0 0 0 0 ;
+EndCharMetrics
+EndFontMetrics
diff --git a/fonts/afm/hoekwater/koeieletters/koeien-ex.afm b/fonts/afm/hoekwater/koeieletters/koeien-ex.afm
new file mode 100644
index 000000000..057ae7b6a
--- /dev/null
+++ b/fonts/afm/hoekwater/koeieletters/koeien-ex.afm
@@ -0,0 +1,879 @@
+StartFontMetrics 2.0
+Comment Generated by FontForge 20050809
+Comment Creation Date: Sat Jun 24 11:02:20 2006
+FontName koeieletters
+FullName koeieletters
+FamilyName koeieletters
+Weight Medium
+Notice (Created by Taco Hoekwater with FontForge 1.0 (http://fontforge.sf.net))
+ItalicAngle 0
+IsFixedPitch false
+UnderlinePosition -100
+UnderlineThickness 16
+Version 001.001
+EncodingScheme FontSpecific
+FontBBox -60 -1667 1117 762
+CapHeight 532
+XHeight 540
+Ascender 533
+StartCharMetrics 164
+C 0 ; WX 321 ; N parenleft.big ; B 25 -1001 296 39 ;
+C 1 ; WX 323 ; N parenright.big ; B 25 -999 298 42 ;
+C 2 ; WX 539 ; N slash.big ; B 97 -825 634 39 ;
+C 3 ; WX 382 ; N bracketleft.big ; B 25 -988 357 52 ;
+C 4 ; WX 489 ; N backslash.big ; B -60 -820 392 44 ;
+C 5 ; WX 376 ; N bracketright.big ; B 25 -990 351 50 ;
+C 6 ; WX 332 ; N braceleft.big ; B 25 -1008 307 52 ;
+C 7 ; WX 243 ; N bar.big ; B 25 -982 218 49 ;
+C 8 ; WX 323 ; N braceright.big ; B 24 -1013 303 61 ;
+C 9 ; WX 613 ; N integral.big ; B 25 -1159 631 0 ;
+C 10 ; WX 814 ; N summation.big ; B 29 -1049 989 0 ;
+C 11 ; WX 668 ; N radical.big ; B 25 -792 676 74 ;
+C 12 ; WX 726 ; N radical.bigg ; B 25 -967 734 74 ;
+C 13 ; WX 840 ; N radical.Bigg ; B 25 -1317 848 74 ;
+C 14 ; WX 954 ; N radical.BIGG ; B 24 -1667 962 74 ;
+C 15 ; WX 122 ; N radical.end ; B -8 0 122 74 ;
+C 16 ; WX 8 ; N radical.extender ; B -12 0 21 74 ;
+C 17 ; WX 611 ; N radical.alt ; B 25 -617 619 74 ;
+C 18 ; WX 613 ; N integral.alt ; B 25 -809 588 0 ;
+C 19 ; WX 814 ; N summation.alt ; B 25 -699 789 0 ;
+C 20 ; WX 321 ; N parenleft.bigg ; B 25 -1351 296 39 ;
+C 21 ; WX 323 ; N parenright.bigg ; B 25 -1349 298 42 ;
+C 22 ; WX 539 ; N slash.bigg ; B -32 -1175 634 39 ;
+C 23 ; WX 382 ; N bracketleft.bigg ; B 25 -1338 357 52 ;
+C 24 ; WX 489 ; N backslash.bigg ; B -60 -1170 488 44 ;
+C 25 ; WX 376 ; N bracketright.bigg ; B 25 -1340 351 50 ;
+C 26 ; WX 332 ; N braceleft.bigg ; B 25 -1358 307 52 ;
+C 27 ; WX 243 ; N bar.bigg ; B 25 -1332 218 49 ;
+C 28 ; WX 323 ; N braceright.bigg ; B 24 -1363 303 61 ;
+C 29 ; WX 195 ; N radical.begin ; B 0 0 203 74 ;
+C 32 ; WX 500 ; N space ; B 0 0 0 0 ;
+C 33 ; WX 345 ; N exclam ; B 25 0 320 530 ;
+C 34 ; WX 460 ; N quotedbl ; B 25 338 435 544 ;
+C 39 ; WX 239 ; N quotesingle ; B 25 338 214 544 ;
+C 40 ; WX 321 ; N parenleft ; B 25 -79 296 611 ;
+C 41 ; WX 323 ; N parenright ; B 25 -80 298 611 ;
+C 42 ; WX 414 ; N asterisk ; B 25 32 389 404 ;
+C 43 ; WX 461 ; N plus ; B 25 44 436 404 ;
+C 44 ; WX 232 ; N comma ; B 25 -66 207 140 ;
+C 45 ; WX 355 ; N hyphen ; B 25 176 330 294 ;
+C 46 ; WX 231 ; N period ; B 25 0 206 151 ;
+C 47 ; WX 539 ; N slash ; B 25 0 514 514 ;
+C 48 ; WX 499 ; N zero ; B 25 0 474 531 ;
+C 49 ; WX 488 ; N one ; B 25 0 463 532 ;
+C 50 ; WX 539 ; N two ; B 25 0 514 528 ;
+C 51 ; WX 501 ; N three ; B 25 0 476 518 ;
+C 52 ; WX 514 ; N four ; B 25 0 489 511 ;
+C 53 ; WX 521 ; N five ; B 25 0 496 515 ;
+C 54 ; WX 513 ; N six ; B 25 -1 488 516 ;
+C 55 ; WX 540 ; N seven ; B 25 -1 515 526 ;
+C 56 ; WX 498 ; N eight ; B 25 -1 473 512 ;
+C 57 ; WX 495 ; N nine ; B 25 0 470 514 ;
+C 58 ; WX 234 ; N colon ; B 25 52 209 460 ;
+C 59 ; WX 245 ; N semicolon ; B 25 -10 220 461 ;
+C 60 ; WX 544 ; N less ; B 25 81 519 456 ;
+C 61 ; WX 460 ; N equal ; B 25 88 435 404 ;
+C 62 ; WX 581 ; N greater ; B 25 66 556 448 ;
+C 63 ; WX 518 ; N question ; B 25 -6 493 536 ;
+C 64 ; WX 585 ; N at ; B 25 -4 560 479 ;
+C 65 ; WX 565 ; N A ; B 25 -7 540 527 ;
+C 66 ; WX 545 ; N B ; B 25 -11 520 524 ;
+C 67 ; WX 593 ; N C ; B 25 0 568 535 ;
+C 68 ; WX 562 ; N D ; B 25 0 537 523 ;
+C 69 ; WX 564 ; N E ; B 25 0 539 531 ;
+C 70 ; WX 572 ; N F ; B 25 -12 547 533 ;
+C 71 ; WX 570 ; N G ; B 25 0 545 536 ;
+C 72 ; WX 597 ; N H ; B 25 0 572 536 ;
+C 73 ; WX 462 ; N I ; B 25 -6 437 532 ;
+C 74 ; WX 610 ; N J ; B 25 -6 585 544 ;
+C 75 ; WX 601 ; N K ; B 25 -6 576 532 ;
+C 76 ; WX 522 ; N L ; B 25 -9 497 533 ;
+C 77 ; WX 609 ; N M ; B 24 -7 584 528 ;
+C 78 ; WX 590 ; N N ; B 25 -1 565 556 ;
+C 79 ; WX 613 ; N O ; B 25 -6 588 546 ;
+C 80 ; WX 602 ; N P ; B 25 -1 577 544 ;
+C 81 ; WX 609 ; N Q ; B 25 0 584 536 ;
+C 82 ; WX 586 ; N R ; B 25 -8 561 549 ;
+C 83 ; WX 625 ; N S ; B 25 -13 600 541 ;
+C 84 ; WX 632 ; N T ; B 25 -8 607 538 ;
+C 85 ; WX 573 ; N U ; B 25 0 548 549 ;
+C 86 ; WX 607 ; N V ; B 25 -5 582 523 ;
+C 87 ; WX 602 ; N W ; B 25 -8 577 531 ;
+C 88 ; WX 597 ; N X ; B 25 -5 572 540 ;
+C 89 ; WX 605 ; N Y ; B 25 -28 580 536 ;
+C 90 ; WX 571 ; N Z ; B 25 -19 546 528 ;
+C 91 ; WX 382 ; N bracketleft ; B 25 -88 357 602 ;
+C 92 ; WX 489 ; N backslash ; B 25 0 464 514 ;
+C 93 ; WX 376 ; N bracketright ; B 25 -88 351 602 ;
+C 94 ; WX 480 ; N asciicircum ; B 25 322 455 515 ;
+C 95 ; WX 579 ; N underscore ; B 25 -183 554 -51 ;
+C 96 ; WX 338 ; N grave ; B 25 570 313 762 ;
+C 97 ; WX 565 ; N a ; B 25 -7 540 527 ;
+C 98 ; WX 545 ; N b ; B 25 -11 520 524 ;
+C 99 ; WX 593 ; N c ; B 25 0 568 535 ;
+C 100 ; WX 562 ; N d ; B 25 0 537 523 ;
+C 101 ; WX 564 ; N e ; B 25 0 539 531 ;
+C 102 ; WX 572 ; N f ; B 25 -12 547 533 ;
+C 103 ; WX 570 ; N g ; B 25 0 545 536 ;
+C 104 ; WX 597 ; N h ; B 25 0 572 536 ;
+C 105 ; WX 462 ; N i ; B 25 -6 437 532 ;
+C 106 ; WX 610 ; N j ; B 25 -6 585 544 ;
+C 107 ; WX 600 ; N k ; B 25 -5 575 531 ;
+C 108 ; WX 522 ; N l ; B 25 -9 497 533 ;
+C 109 ; WX 609 ; N m ; B 24 -7 584 528 ;
+C 110 ; WX 590 ; N n ; B 25 -1 565 556 ;
+C 111 ; WX 613 ; N o ; B 25 -6 588 546 ;
+C 112 ; WX 602 ; N p ; B 25 -1 577 544 ;
+C 113 ; WX 609 ; N q ; B 25 0 584 536 ;
+C 114 ; WX 586 ; N r ; B 25 -8 561 549 ;
+C 115 ; WX 625 ; N s ; B 25 -13 600 541 ;
+C 116 ; WX 632 ; N t ; B 25 -8 607 538 ;
+C 117 ; WX 573 ; N u ; B 25 0 548 549 ;
+C 118 ; WX 607 ; N v ; B 25 -5 582 523 ;
+C 119 ; WX 602 ; N w ; B 25 -8 577 531 ;
+C 120 ; WX 597 ; N x ; B 25 -5 572 540 ;
+C 121 ; WX 605 ; N y ; B 25 -28 580 536 ;
+C 122 ; WX 571 ; N z ; B 25 -19 546 528 ;
+C 123 ; WX 332 ; N braceleft ; B 25 -85 307 625 ;
+C 124 ; WX 243 ; N bar ; B 25 0 218 681 ;
+C 125 ; WX 323 ; N braceright ; B 24 -74 298 650 ;
+C 126 ; WX 592 ; N asciitilde ; B 25 198 568 388 ;
+C 156 ; WX 448 ; N dieresis ; B 25 557 423 711 ;
+C 168 ; WX 336 ; N acute ; B 25 569 312 754 ;
+C 203 ; WX 468 ; N multiply ; B 25 41 443 411 ;
+C 244 ; WX 770 ; N infinity ; B 25 87 745 427 ;
+C 245 ; WX 645 ; N arrowleft ; B 25 49 620 433 ;
+C 246 ; WX 683 ; N arrowright ; B 25 53 658 433 ;
+C 247 ; WX 460 ; N minus ; B 25 154 435 302 ;
+C 248 ; WX 414 ; N asteriskmath ; B 25 32 389 404 ;
+C 249 ; WX 613 ; N integral ; B 25 -155 588 654 ;
+C 250 ; WX 814 ; N summation ; B 25 -116 789 583 ;
+C 251 ; WX 614 ; N equivalence ; B 25 58 590 429 ;
+C 252 ; WX 592 ; N similar ; B 25 198 568 388 ;
+C 253 ; WX 224 ; N minute ; B 25 197 199 514 ;
+C 254 ; WX 763 ; N emdash ; B 25 165 738 297 ;
+C 255 ; WX 534 ; N endash ; B 25 165 509 297 ;
+C -1 ; WX 1000 ; N k.001 ; B 3 -6 554 532 ;
+C -1 ; WX 460 ; N quotedblright ; B 25 358 435 564 ;
+C -1 ; WX 256 ; N quoteright ; B 25 358 231 564 ;
+C -1 ; WX 237 ; N quoteleft ; B 25 357 212 564 ;
+C -1 ; WX 465 ; N breve ; B 25 561 440 749 ;
+C -1 ; WX 451 ; N quotedblleft ; B 25 358 426 564 ;
+C -1 ; WX 256 ; N quotesinglbase ; B 25 -58 231 148 ;
+C -1 ; WX 460 ; N quotedblbase ; B 25 -65 435 141 ;
+C -1 ; WX 378 ; N second ; B 25 197 353 514 ;
+C -1 ; WX 530 ; N radical ; B 25 -62 1117 629 ;
+C -1 ; WX 480 ; N circumflex ; B 25 561 455 754 ;
+C -1 ; WX 521 ; N tilde ; B 25 564 496 728 ;
+C -1 ; WX 462 ; N dotlessi ; B 25 -13 437 525 ;
+C -1 ; WX 610 ; N dotlessj ; B 25 -6 585 544 ;
+C -1 ; WX 496 ; N plus.alt ; B 25 64 471 463 ;
+C -1 ; WX 481 ; N minus.alt ; B 25 174 456 355 ;
+C -1 ; WX 552 ; N zero.alt ; B 25 -9 527 529 ;
+C -1 ; WX 554 ; N one.alt ; B 25 -12 529 543 ;
+C -1 ; WX 569 ; N two.alt ; B 25 -16 544 523 ;
+C -1 ; WX 563 ; N three.alt ; B 25 -17 538 533 ;
+C -1 ; WX 595 ; N four.alt ; B 25 -19 570 523 ;
+C -1 ; WX 573 ; N five.alt ; B 25 -18 548 539 ;
+C -1 ; WX 558 ; N six.alt ; B 25 -7 533 535 ;
+C -1 ; WX 594 ; N seven.alt ; B 25 -3 569 523 ;
+C -1 ; WX 544 ; N eight.alt ; B 25 -19 519 529 ;
+C -1 ; WX 594 ; N nine.alt ; B 25 -19 569 536 ;
+C -1 ; WX 231 ; N periodcentered ; B 25 153 206 304 ;
+C -1 ; WX 231 ; N dotaccent ; B 25 561 206 712 ;
+EndCharMetrics
+StartKernData
+StartKernPairs 690
+KPX C a -31
+KPX C j -31
+KPX C s -30
+KPX C x -23
+KPX C period -35
+KPX C comma -38
+KPX C hyphen -44
+KPX D x -36
+KPX D period -32
+KPX D comma -40
+KPX E a -52
+KPX E b -29
+KPX E c -56
+KPX E e -27
+KPX E f -32
+KPX E g -66
+KPX E h -45
+KPX E j -52
+KPX E k -20
+KPX E l -26
+KPX E m -23
+KPX E n -21
+KPX E o -67
+KPX E p -20
+KPX E q -46
+KPX E s -59
+KPX E x -26
+KPX E z -23
+KPX E period -51
+KPX E comma -52
+KPX E colon -27
+KPX E semicolon -26
+KPX E hyphen -88
+KPX F a -86
+KPX F b -29
+KPX F c -47
+KPX F e -29
+KPX F f -35
+KPX F g -58
+KPX F h -45
+KPX F j -101
+KPX F k -20
+KPX F l -28
+KPX F m -26
+KPX F n -21
+KPX F o -61
+KPX F p -22
+KPX F q -43
+KPX F s -89
+KPX F x -27
+KPX F z -23
+KPX F period -166
+KPX F comma -166
+KPX F colon -30
+KPX F semicolon -30
+KPX F hyphen -115
+KPX G x -32
+KPX G z -24
+KPX G period -32
+KPX G comma -37
+KPX H x -31
+KPX H period -26
+KPX H comma -31
+KPX I a -46
+KPX I b -32
+KPX I c -34
+KPX I d -20
+KPX I e -31
+KPX I f -29
+KPX I g -30
+KPX I h -40
+KPX I j -45
+KPX I k -22
+KPX I l -28
+KPX I m -26
+KPX I n -22
+KPX I o -35
+KPX I p -24
+KPX I q -29
+KPX I s -43
+KPX I x -28
+KPX I z -24
+KPX I period -51
+KPX I comma -54
+KPX I colon -30
+KPX I semicolon -30
+KPX I hyphen -41
+KPX J a -35
+KPX J b -31
+KPX J c -23
+KPX J e -26
+KPX J g -22
+KPX J h -29
+KPX J j -34
+KPX J k -23
+KPX J n -29
+KPX J o -24
+KPX J p -20
+KPX J r -20
+KPX J s -32
+KPX J x -42
+KPX J z -29
+KPX J period -44
+KPX J comma -48
+KPX J hyphen -26
+KPX K a -70
+KPX K b -33
+KPX K c -38
+KPX K d -22
+KPX K e -33
+KPX K f -31
+KPX K g -41
+KPX K h -45
+KPX K j -73
+KPX K k -24
+KPX K l -30
+KPX K m -28
+KPX K n -24
+KPX K o -44
+KPX K p -25
+KPX K q -32
+KPX K s -74
+KPX K x -29
+KPX K z -27
+KPX K period -73
+KPX K comma -74
+KPX K colon -28
+KPX K semicolon -28
+KPX K hyphen -73
+KPX L t -56
+KPX L v -24
+KPX L y -59
+KPX L quoteright -50
+KPX L quotedblright -50
+KPX M a -26
+KPX M j -25
+KPX M s -22
+KPX M x -28
+KPX M period -29
+KPX M comma -32
+KPX M hyphen -21
+KPX N a -32
+KPX N b -32
+KPX N c -28
+KPX N d -22
+KPX N e -30
+KPX N f -24
+KPX N g -28
+KPX N h -31
+KPX N j -31
+KPX N k -26
+KPX N l -23
+KPX N m -23
+KPX N n -28
+KPX N o -28
+KPX N p -25
+KPX N q -25
+KPX N s -30
+KPX N x -38
+KPX N z -29
+KPX N period -35
+KPX N comma -38
+KPX N hyphen -27
+KPX O x -33
+KPX O period -41
+KPX O comma -47
+KPX P a -60
+KPX P b -33
+KPX P c -33
+KPX P d -22
+KPX P e -35
+KPX P f -27
+KPX P g -32
+KPX P h -40
+KPX P j -60
+KPX P k -24
+KPX P l -27
+KPX P m -27
+KPX P n -25
+KPX P o -36
+KPX P p -27
+KPX P q -28
+KPX P s -72
+KPX P x -34
+KPX P z -26
+KPX P period -175
+KPX P comma -175
+KPX P colon -25
+KPX P semicolon -25
+KPX P hyphen -50
+KPX Q a -22
+KPX Q j -23
+KPX Q s -23
+KPX Q x -34
+KPX Q period -34
+KPX Q comma -34
+KPX R a -36
+KPX R j -36
+KPX R s -42
+KPX R x -23
+KPX R period -47
+KPX R comma -49
+KPX R hyphen -33
+KPX S a -54
+KPX S b -28
+KPX S c -43
+KPX S e -21
+KPX S f -28
+KPX S g -48
+KPX S h -40
+KPX S j -53
+KPX S l -21
+KPX S o -51
+KPX S q -36
+KPX S s -51
+KPX S x -21
+KPX S z -21
+KPX S period -60
+KPX S comma -63
+KPX S hyphen -50
+KPX T a -81
+KPX T b -28
+KPX T c -56
+KPX T e -23
+KPX T f -29
+KPX T g -54
+KPX T h -40
+KPX T j -80
+KPX T l -23
+KPX T m -21
+KPX T o -57
+KPX T q -38
+KPX T s -89
+KPX T x -23
+KPX T z -22
+KPX T period -158
+KPX T comma -159
+KPX T hyphen -71
+KPX U x -25
+KPX U comma -24
+KPX V a -62
+KPX V b -28
+KPX V c -38
+KPX V e -23
+KPX V f -29
+KPX V g -36
+KPX V h -41
+KPX V j -62
+KPX V l -25
+KPX V o -38
+KPX V q -33
+KPX V s -67
+KPX V x -23
+KPX V z -22
+KPX V period -93
+KPX V comma -97
+KPX V hyphen -47
+KPX W a -30
+KPX W b -30
+KPX W c -26
+KPX W e -27
+KPX W f -23
+KPX W g -25
+KPX W h -28
+KPX W j -29
+KPX W k -22
+KPX W l -23
+KPX W m -23
+KPX W n -22
+KPX W o -26
+KPX W p -21
+KPX W q -24
+KPX W s -27
+KPX W x -25
+KPX W z -25
+KPX W period -41
+KPX W comma -47
+KPX W colon -25
+KPX W semicolon -24
+KPX W hyphen -25
+KPX X g -22
+KPX X o -25
+KPX X hyphen -46
+KPX Y a -72
+KPX Y b -28
+KPX Y c -46
+KPX Y e -24
+KPX Y f -29
+KPX Y g -44
+KPX Y h -40
+KPX Y j -71
+KPX Y l -24
+KPX Y m -21
+KPX Y o -48
+KPX Y q -40
+KPX Y s -88
+KPX Y x -24
+KPX Y z -22
+KPX Y period -154
+KPX Y comma -154
+KPX Y colon -20
+KPX Y semicolon -20
+KPX Y hyphen -68
+KPX Z a -43
+KPX Z b -28
+KPX Z c -44
+KPX Z e -21
+KPX Z f -24
+KPX Z g -44
+KPX Z h -40
+KPX Z j -43
+KPX Z l -20
+KPX Z o -50
+KPX Z q -35
+KPX Z s -43
+KPX Z x -20
+KPX Z z -21
+KPX Z period -44
+KPX Z comma -44
+KPX Z hyphen -47
+KPX c a -31
+KPX c j -31
+KPX c s -30
+KPX c x -23
+KPX c period -35
+KPX c comma -38
+KPX c hyphen -44
+KPX d x -36
+KPX d period -32
+KPX d comma -40
+KPX e a -52
+KPX e b -29
+KPX e c -56
+KPX e e -27
+KPX e f -32
+KPX e g -66
+KPX e h -45
+KPX e j -52
+KPX e k -20
+KPX e l -26
+KPX e m -23
+KPX e n -21
+KPX e o -67
+KPX e p -20
+KPX e q -46
+KPX e s -59
+KPX e x -26
+KPX e z -23
+KPX e period -51
+KPX e comma -52
+KPX e colon -27
+KPX e semicolon -26
+KPX e hyphen -88
+KPX f a -86
+KPX f b -29
+KPX f c -47
+KPX f e -29
+KPX f f -35
+KPX f g -58
+KPX f h -45
+KPX f j -101
+KPX f k -20
+KPX f l -28
+KPX f m -26
+KPX f n -21
+KPX f o -61
+KPX f p -22
+KPX f q -43
+KPX f s -89
+KPX f x -27
+KPX f z -23
+KPX f period -166
+KPX f comma -166
+KPX f colon -30
+KPX f semicolon -30
+KPX f hyphen -115
+KPX g x -32
+KPX g z -24
+KPX g period -32
+KPX g comma -37
+KPX h x -31
+KPX h period -26
+KPX h comma -31
+KPX i a -46
+KPX i b -32
+KPX i c -34
+KPX i d -20
+KPX i e -31
+KPX i f -29
+KPX i g -30
+KPX i h -40
+KPX i j -45
+KPX i k -22
+KPX i l -28
+KPX i m -26
+KPX i n -22
+KPX i o -35
+KPX i p -24
+KPX i q -29
+KPX i s -43
+KPX i x -28
+KPX i z -24
+KPX i period -51
+KPX i comma -54
+KPX i colon -30
+KPX i semicolon -30
+KPX i hyphen -41
+KPX j a -35
+KPX j b -31
+KPX j c -23
+KPX j e -26
+KPX j g -22
+KPX j h -29
+KPX j j -34
+KPX j k -23
+KPX j n -29
+KPX j o -24
+KPX j p -20
+KPX j r -20
+KPX j s -32
+KPX j x -42
+KPX j z -29
+KPX j period -44
+KPX j comma -48
+KPX j hyphen -26
+KPX k a -71
+KPX k b -32
+KPX k c -38
+KPX k e -28
+KPX k f -31
+KPX k g -42
+KPX k h -45
+KPX k j -72
+KPX k k -22
+KPX k l -28
+KPX k m -26
+KPX k n -22
+KPX k o -46
+KPX k p -22
+KPX k q -32
+KPX k s -73
+KPX k x -27
+KPX k z -25
+KPX k period -72
+KPX k comma -73
+KPX k colon -25
+KPX k semicolon -25
+KPX k hyphen -74
+KPX l t -56
+KPX l v -24
+KPX l y -59
+KPX l quoteright -50
+KPX l quotedblright -50
+KPX m a -26
+KPX m j -25
+KPX m s -22
+KPX m x -28
+KPX m period -29
+KPX m comma -32
+KPX m hyphen -21
+KPX n a -32
+KPX n b -32
+KPX n c -28
+KPX n d -22
+KPX n e -30
+KPX n f -24
+KPX n g -28
+KPX n h -31
+KPX n j -31
+KPX n k -26
+KPX n l -23
+KPX n m -23
+KPX n n -28
+KPX n o -28
+KPX n p -25
+KPX n q -25
+KPX n s -30
+KPX n x -38
+KPX n z -29
+KPX n period -35
+KPX n comma -38
+KPX n hyphen -27
+KPX o x -33
+KPX o period -41
+KPX o comma -47
+KPX p a -60
+KPX p b -33
+KPX p c -33
+KPX p d -22
+KPX p e -35
+KPX p f -27
+KPX p g -32
+KPX p h -40
+KPX p j -60
+KPX p k -24
+KPX p l -27
+KPX p m -27
+KPX p n -25
+KPX p o -36
+KPX p p -27
+KPX p q -28
+KPX p s -72
+KPX p x -34
+KPX p z -26
+KPX p period -175
+KPX p comma -175
+KPX p colon -25
+KPX p semicolon -25
+KPX p hyphen -50
+KPX q a -22
+KPX q j -23
+KPX q s -23
+KPX q x -34
+KPX q period -34
+KPX q comma -34
+KPX r a -36
+KPX r j -36
+KPX r s -42
+KPX r x -23
+KPX r period -47
+KPX r comma -49
+KPX r hyphen -33
+KPX s a -54
+KPX s b -28
+KPX s c -43
+KPX s e -21
+KPX s f -28
+KPX s g -48
+KPX s h -40
+KPX s j -53
+KPX s l -21
+KPX s o -51
+KPX s q -36
+KPX s s -51
+KPX s x -21
+KPX s z -21
+KPX s period -60
+KPX s comma -63
+KPX s hyphen -50
+KPX t a -81
+KPX t b -28
+KPX t c -56
+KPX t e -23
+KPX t f -29
+KPX t g -54
+KPX t h -40
+KPX t j -80
+KPX t l -23
+KPX t m -21
+KPX t o -57
+KPX t q -38
+KPX t s -89
+KPX t x -23
+KPX t z -22
+KPX t period -158
+KPX t comma -159
+KPX t hyphen -71
+KPX u x -25
+KPX u comma -24
+KPX v a -62
+KPX v b -28
+KPX v c -38
+KPX v e -23
+KPX v f -29
+KPX v g -36
+KPX v h -41
+KPX v j -62
+KPX v l -25
+KPX v o -38
+KPX v q -33
+KPX v s -67
+KPX v x -23
+KPX v z -22
+KPX v period -93
+KPX v comma -97
+KPX v hyphen -47
+KPX w a -30
+KPX w b -30
+KPX w c -26
+KPX w e -27
+KPX w f -23
+KPX w g -25
+KPX w h -28
+KPX w j -29
+KPX w k -22
+KPX w l -23
+KPX w m -23
+KPX w n -22
+KPX w o -26
+KPX w p -21
+KPX w q -24
+KPX w s -27
+KPX w x -25
+KPX w z -25
+KPX w period -41
+KPX w comma -47
+KPX w colon -25
+KPX w semicolon -24
+KPX w hyphen -25
+KPX x g -22
+KPX x o -25
+KPX x hyphen -46
+KPX y a -72
+KPX y b -28
+KPX y c -46
+KPX y e -24
+KPX y f -29
+KPX y g -44
+KPX y h -40
+KPX y j -71
+KPX y l -24
+KPX y m -21
+KPX y o -48
+KPX y q -40
+KPX y s -88
+KPX y x -24
+KPX y z -22
+KPX y period -154
+KPX y comma -154
+KPX y colon -20
+KPX y semicolon -20
+KPX y hyphen -68
+KPX z a -43
+KPX z b -28
+KPX z c -44
+KPX z e -21
+KPX z f -24
+KPX z g -44
+KPX z h -40
+KPX z j -43
+KPX z l -20
+KPX z o -50
+KPX z q -35
+KPX z s -43
+KPX z x -20
+KPX z z -21
+KPX z period -44
+KPX z comma -44
+KPX z hyphen -47
+KPX k.001 a -71
+KPX k.001 b -32
+KPX k.001 c -38
+KPX k.001 e -28
+KPX k.001 f -31
+KPX k.001 g -42
+KPX k.001 h -45
+KPX k.001 j -72
+KPX k.001 k -22
+KPX k.001 l -28
+KPX k.001 m -26
+KPX k.001 n -22
+KPX k.001 o -46
+KPX k.001 p -22
+KPX k.001 q -32
+KPX k.001 s -73
+KPX k.001 x -27
+KPX k.001 z -25
+KPX k.001 period -72
+KPX k.001 comma -73
+KPX k.001 colon -25
+KPX k.001 semicolon -25
+KPX k.001 hyphen -74
+KPX quoteleft a -50
+KPX quoteleft j -50
+KPX quoteleft A -50
+KPX quoteleft J -50
+KPX quoteleft c -30
+KPX quoteleft g -30
+KPX quoteleft o -30
+KPX quoteleft q -30
+KPX quoteleft s -30
+KPX quoteleft C -30
+KPX quoteleft G -30
+KPX quoteleft O -30
+KPX quoteleft Q -30
+KPX quoteleft S -30
+KPX quotedblleft a -50
+KPX quotedblleft j -50
+KPX quotedblleft A -50
+KPX quotedblleft J -50
+KPX quotedblleft c -30
+KPX quotedblleft g -30
+KPX quotedblleft o -30
+KPX quotedblleft q -30
+KPX quotedblleft s -30
+KPX quotedblleft C -30
+KPX quotedblleft G -30
+KPX quotedblleft O -30
+KPX quotedblleft Q -30
+KPX quotedblleft S -30
+EndKernPairs
+EndKernData
+EndFontMetrics
diff --git a/fonts/afm/hoekwater/koeieletters/koeien-mi.afm b/fonts/afm/hoekwater/koeieletters/koeien-mi.afm
new file mode 100644
index 000000000..057ae7b6a
--- /dev/null
+++ b/fonts/afm/hoekwater/koeieletters/koeien-mi.afm
@@ -0,0 +1,879 @@
+StartFontMetrics 2.0
+Comment Generated by FontForge 20050809
+Comment Creation Date: Sat Jun 24 11:02:20 2006
+FontName koeieletters
+FullName koeieletters
+FamilyName koeieletters
+Weight Medium
+Notice (Created by Taco Hoekwater with FontForge 1.0 (http://fontforge.sf.net))
+ItalicAngle 0
+IsFixedPitch false
+UnderlinePosition -100
+UnderlineThickness 16
+Version 001.001
+EncodingScheme FontSpecific
+FontBBox -60 -1667 1117 762
+CapHeight 532
+XHeight 540
+Ascender 533
+StartCharMetrics 164
+C 0 ; WX 321 ; N parenleft.big ; B 25 -1001 296 39 ;
+C 1 ; WX 323 ; N parenright.big ; B 25 -999 298 42 ;
+C 2 ; WX 539 ; N slash.big ; B 97 -825 634 39 ;
+C 3 ; WX 382 ; N bracketleft.big ; B 25 -988 357 52 ;
+C 4 ; WX 489 ; N backslash.big ; B -60 -820 392 44 ;
+C 5 ; WX 376 ; N bracketright.big ; B 25 -990 351 50 ;
+C 6 ; WX 332 ; N braceleft.big ; B 25 -1008 307 52 ;
+C 7 ; WX 243 ; N bar.big ; B 25 -982 218 49 ;
+C 8 ; WX 323 ; N braceright.big ; B 24 -1013 303 61 ;
+C 9 ; WX 613 ; N integral.big ; B 25 -1159 631 0 ;
+C 10 ; WX 814 ; N summation.big ; B 29 -1049 989 0 ;
+C 11 ; WX 668 ; N radical.big ; B 25 -792 676 74 ;
+C 12 ; WX 726 ; N radical.bigg ; B 25 -967 734 74 ;
+C 13 ; WX 840 ; N radical.Bigg ; B 25 -1317 848 74 ;
+C 14 ; WX 954 ; N radical.BIGG ; B 24 -1667 962 74 ;
+C 15 ; WX 122 ; N radical.end ; B -8 0 122 74 ;
+C 16 ; WX 8 ; N radical.extender ; B -12 0 21 74 ;
+C 17 ; WX 611 ; N radical.alt ; B 25 -617 619 74 ;
+C 18 ; WX 613 ; N integral.alt ; B 25 -809 588 0 ;
+C 19 ; WX 814 ; N summation.alt ; B 25 -699 789 0 ;
+C 20 ; WX 321 ; N parenleft.bigg ; B 25 -1351 296 39 ;
+C 21 ; WX 323 ; N parenright.bigg ; B 25 -1349 298 42 ;
+C 22 ; WX 539 ; N slash.bigg ; B -32 -1175 634 39 ;
+C 23 ; WX 382 ; N bracketleft.bigg ; B 25 -1338 357 52 ;
+C 24 ; WX 489 ; N backslash.bigg ; B -60 -1170 488 44 ;
+C 25 ; WX 376 ; N bracketright.bigg ; B 25 -1340 351 50 ;
+C 26 ; WX 332 ; N braceleft.bigg ; B 25 -1358 307 52 ;
+C 27 ; WX 243 ; N bar.bigg ; B 25 -1332 218 49 ;
+C 28 ; WX 323 ; N braceright.bigg ; B 24 -1363 303 61 ;
+C 29 ; WX 195 ; N radical.begin ; B 0 0 203 74 ;
+C 32 ; WX 500 ; N space ; B 0 0 0 0 ;
+C 33 ; WX 345 ; N exclam ; B 25 0 320 530 ;
+C 34 ; WX 460 ; N quotedbl ; B 25 338 435 544 ;
+C 39 ; WX 239 ; N quotesingle ; B 25 338 214 544 ;
+C 40 ; WX 321 ; N parenleft ; B 25 -79 296 611 ;
+C 41 ; WX 323 ; N parenright ; B 25 -80 298 611 ;
+C 42 ; WX 414 ; N asterisk ; B 25 32 389 404 ;
+C 43 ; WX 461 ; N plus ; B 25 44 436 404 ;
+C 44 ; WX 232 ; N comma ; B 25 -66 207 140 ;
+C 45 ; WX 355 ; N hyphen ; B 25 176 330 294 ;
+C 46 ; WX 231 ; N period ; B 25 0 206 151 ;
+C 47 ; WX 539 ; N slash ; B 25 0 514 514 ;
+C 48 ; WX 499 ; N zero ; B 25 0 474 531 ;
+C 49 ; WX 488 ; N one ; B 25 0 463 532 ;
+C 50 ; WX 539 ; N two ; B 25 0 514 528 ;
+C 51 ; WX 501 ; N three ; B 25 0 476 518 ;
+C 52 ; WX 514 ; N four ; B 25 0 489 511 ;
+C 53 ; WX 521 ; N five ; B 25 0 496 515 ;
+C 54 ; WX 513 ; N six ; B 25 -1 488 516 ;
+C 55 ; WX 540 ; N seven ; B 25 -1 515 526 ;
+C 56 ; WX 498 ; N eight ; B 25 -1 473 512 ;
+C 57 ; WX 495 ; N nine ; B 25 0 470 514 ;
+C 58 ; WX 234 ; N colon ; B 25 52 209 460 ;
+C 59 ; WX 245 ; N semicolon ; B 25 -10 220 461 ;
+C 60 ; WX 544 ; N less ; B 25 81 519 456 ;
+C 61 ; WX 460 ; N equal ; B 25 88 435 404 ;
+C 62 ; WX 581 ; N greater ; B 25 66 556 448 ;
+C 63 ; WX 518 ; N question ; B 25 -6 493 536 ;
+C 64 ; WX 585 ; N at ; B 25 -4 560 479 ;
+C 65 ; WX 565 ; N A ; B 25 -7 540 527 ;
+C 66 ; WX 545 ; N B ; B 25 -11 520 524 ;
+C 67 ; WX 593 ; N C ; B 25 0 568 535 ;
+C 68 ; WX 562 ; N D ; B 25 0 537 523 ;
+C 69 ; WX 564 ; N E ; B 25 0 539 531 ;
+C 70 ; WX 572 ; N F ; B 25 -12 547 533 ;
+C 71 ; WX 570 ; N G ; B 25 0 545 536 ;
+C 72 ; WX 597 ; N H ; B 25 0 572 536 ;
+C 73 ; WX 462 ; N I ; B 25 -6 437 532 ;
+C 74 ; WX 610 ; N J ; B 25 -6 585 544 ;
+C 75 ; WX 601 ; N K ; B 25 -6 576 532 ;
+C 76 ; WX 522 ; N L ; B 25 -9 497 533 ;
+C 77 ; WX 609 ; N M ; B 24 -7 584 528 ;
+C 78 ; WX 590 ; N N ; B 25 -1 565 556 ;
+C 79 ; WX 613 ; N O ; B 25 -6 588 546 ;
+C 80 ; WX 602 ; N P ; B 25 -1 577 544 ;
+C 81 ; WX 609 ; N Q ; B 25 0 584 536 ;
+C 82 ; WX 586 ; N R ; B 25 -8 561 549 ;
+C 83 ; WX 625 ; N S ; B 25 -13 600 541 ;
+C 84 ; WX 632 ; N T ; B 25 -8 607 538 ;
+C 85 ; WX 573 ; N U ; B 25 0 548 549 ;
+C 86 ; WX 607 ; N V ; B 25 -5 582 523 ;
+C 87 ; WX 602 ; N W ; B 25 -8 577 531 ;
+C 88 ; WX 597 ; N X ; B 25 -5 572 540 ;
+C 89 ; WX 605 ; N Y ; B 25 -28 580 536 ;
+C 90 ; WX 571 ; N Z ; B 25 -19 546 528 ;
+C 91 ; WX 382 ; N bracketleft ; B 25 -88 357 602 ;
+C 92 ; WX 489 ; N backslash ; B 25 0 464 514 ;
+C 93 ; WX 376 ; N bracketright ; B 25 -88 351 602 ;
+C 94 ; WX 480 ; N asciicircum ; B 25 322 455 515 ;
+C 95 ; WX 579 ; N underscore ; B 25 -183 554 -51 ;
+C 96 ; WX 338 ; N grave ; B 25 570 313 762 ;
+C 97 ; WX 565 ; N a ; B 25 -7 540 527 ;
+C 98 ; WX 545 ; N b ; B 25 -11 520 524 ;
+C 99 ; WX 593 ; N c ; B 25 0 568 535 ;
+C 100 ; WX 562 ; N d ; B 25 0 537 523 ;
+C 101 ; WX 564 ; N e ; B 25 0 539 531 ;
+C 102 ; WX 572 ; N f ; B 25 -12 547 533 ;
+C 103 ; WX 570 ; N g ; B 25 0 545 536 ;
+C 104 ; WX 597 ; N h ; B 25 0 572 536 ;
+C 105 ; WX 462 ; N i ; B 25 -6 437 532 ;
+C 106 ; WX 610 ; N j ; B 25 -6 585 544 ;
+C 107 ; WX 600 ; N k ; B 25 -5 575 531 ;
+C 108 ; WX 522 ; N l ; B 25 -9 497 533 ;
+C 109 ; WX 609 ; N m ; B 24 -7 584 528 ;
+C 110 ; WX 590 ; N n ; B 25 -1 565 556 ;
+C 111 ; WX 613 ; N o ; B 25 -6 588 546 ;
+C 112 ; WX 602 ; N p ; B 25 -1 577 544 ;
+C 113 ; WX 609 ; N q ; B 25 0 584 536 ;
+C 114 ; WX 586 ; N r ; B 25 -8 561 549 ;
+C 115 ; WX 625 ; N s ; B 25 -13 600 541 ;
+C 116 ; WX 632 ; N t ; B 25 -8 607 538 ;
+C 117 ; WX 573 ; N u ; B 25 0 548 549 ;
+C 118 ; WX 607 ; N v ; B 25 -5 582 523 ;
+C 119 ; WX 602 ; N w ; B 25 -8 577 531 ;
+C 120 ; WX 597 ; N x ; B 25 -5 572 540 ;
+C 121 ; WX 605 ; N y ; B 25 -28 580 536 ;
+C 122 ; WX 571 ; N z ; B 25 -19 546 528 ;
+C 123 ; WX 332 ; N braceleft ; B 25 -85 307 625 ;
+C 124 ; WX 243 ; N bar ; B 25 0 218 681 ;
+C 125 ; WX 323 ; N braceright ; B 24 -74 298 650 ;
+C 126 ; WX 592 ; N asciitilde ; B 25 198 568 388 ;
+C 156 ; WX 448 ; N dieresis ; B 25 557 423 711 ;
+C 168 ; WX 336 ; N acute ; B 25 569 312 754 ;
+C 203 ; WX 468 ; N multiply ; B 25 41 443 411 ;
+C 244 ; WX 770 ; N infinity ; B 25 87 745 427 ;
+C 245 ; WX 645 ; N arrowleft ; B 25 49 620 433 ;
+C 246 ; WX 683 ; N arrowright ; B 25 53 658 433 ;
+C 247 ; WX 460 ; N minus ; B 25 154 435 302 ;
+C 248 ; WX 414 ; N asteriskmath ; B 25 32 389 404 ;
+C 249 ; WX 613 ; N integral ; B 25 -155 588 654 ;
+C 250 ; WX 814 ; N summation ; B 25 -116 789 583 ;
+C 251 ; WX 614 ; N equivalence ; B 25 58 590 429 ;
+C 252 ; WX 592 ; N similar ; B 25 198 568 388 ;
+C 253 ; WX 224 ; N minute ; B 25 197 199 514 ;
+C 254 ; WX 763 ; N emdash ; B 25 165 738 297 ;
+C 255 ; WX 534 ; N endash ; B 25 165 509 297 ;
+C -1 ; WX 1000 ; N k.001 ; B 3 -6 554 532 ;
+C -1 ; WX 460 ; N quotedblright ; B 25 358 435 564 ;
+C -1 ; WX 256 ; N quoteright ; B 25 358 231 564 ;
+C -1 ; WX 237 ; N quoteleft ; B 25 357 212 564 ;
+C -1 ; WX 465 ; N breve ; B 25 561 440 749 ;
+C -1 ; WX 451 ; N quotedblleft ; B 25 358 426 564 ;
+C -1 ; WX 256 ; N quotesinglbase ; B 25 -58 231 148 ;
+C -1 ; WX 460 ; N quotedblbase ; B 25 -65 435 141 ;
+C -1 ; WX 378 ; N second ; B 25 197 353 514 ;
+C -1 ; WX 530 ; N radical ; B 25 -62 1117 629 ;
+C -1 ; WX 480 ; N circumflex ; B 25 561 455 754 ;
+C -1 ; WX 521 ; N tilde ; B 25 564 496 728 ;
+C -1 ; WX 462 ; N dotlessi ; B 25 -13 437 525 ;
+C -1 ; WX 610 ; N dotlessj ; B 25 -6 585 544 ;
+C -1 ; WX 496 ; N plus.alt ; B 25 64 471 463 ;
+C -1 ; WX 481 ; N minus.alt ; B 25 174 456 355 ;
+C -1 ; WX 552 ; N zero.alt ; B 25 -9 527 529 ;
+C -1 ; WX 554 ; N one.alt ; B 25 -12 529 543 ;
+C -1 ; WX 569 ; N two.alt ; B 25 -16 544 523 ;
+C -1 ; WX 563 ; N three.alt ; B 25 -17 538 533 ;
+C -1 ; WX 595 ; N four.alt ; B 25 -19 570 523 ;
+C -1 ; WX 573 ; N five.alt ; B 25 -18 548 539 ;
+C -1 ; WX 558 ; N six.alt ; B 25 -7 533 535 ;
+C -1 ; WX 594 ; N seven.alt ; B 25 -3 569 523 ;
+C -1 ; WX 544 ; N eight.alt ; B 25 -19 519 529 ;
+C -1 ; WX 594 ; N nine.alt ; B 25 -19 569 536 ;
+C -1 ; WX 231 ; N periodcentered ; B 25 153 206 304 ;
+C -1 ; WX 231 ; N dotaccent ; B 25 561 206 712 ;
+EndCharMetrics
+StartKernData
+StartKernPairs 690
+KPX C a -31
+KPX C j -31
+KPX C s -30
+KPX C x -23
+KPX C period -35
+KPX C comma -38
+KPX C hyphen -44
+KPX D x -36
+KPX D period -32
+KPX D comma -40
+KPX E a -52
+KPX E b -29
+KPX E c -56
+KPX E e -27
+KPX E f -32
+KPX E g -66
+KPX E h -45
+KPX E j -52
+KPX E k -20
+KPX E l -26
+KPX E m -23
+KPX E n -21
+KPX E o -67
+KPX E p -20
+KPX E q -46
+KPX E s -59
+KPX E x -26
+KPX E z -23
+KPX E period -51
+KPX E comma -52
+KPX E colon -27
+KPX E semicolon -26
+KPX E hyphen -88
+KPX F a -86
+KPX F b -29
+KPX F c -47
+KPX F e -29
+KPX F f -35
+KPX F g -58
+KPX F h -45
+KPX F j -101
+KPX F k -20
+KPX F l -28
+KPX F m -26
+KPX F n -21
+KPX F o -61
+KPX F p -22
+KPX F q -43
+KPX F s -89
+KPX F x -27
+KPX F z -23
+KPX F period -166
+KPX F comma -166
+KPX F colon -30
+KPX F semicolon -30
+KPX F hyphen -115
+KPX G x -32
+KPX G z -24
+KPX G period -32
+KPX G comma -37
+KPX H x -31
+KPX H period -26
+KPX H comma -31
+KPX I a -46
+KPX I b -32
+KPX I c -34
+KPX I d -20
+KPX I e -31
+KPX I f -29
+KPX I g -30
+KPX I h -40
+KPX I j -45
+KPX I k -22
+KPX I l -28
+KPX I m -26
+KPX I n -22
+KPX I o -35
+KPX I p -24
+KPX I q -29
+KPX I s -43
+KPX I x -28
+KPX I z -24
+KPX I period -51
+KPX I comma -54
+KPX I colon -30
+KPX I semicolon -30
+KPX I hyphen -41
+KPX J a -35
+KPX J b -31
+KPX J c -23
+KPX J e -26
+KPX J g -22
+KPX J h -29
+KPX J j -34
+KPX J k -23
+KPX J n -29
+KPX J o -24
+KPX J p -20
+KPX J r -20
+KPX J s -32
+KPX J x -42
+KPX J z -29
+KPX J period -44
+KPX J comma -48
+KPX J hyphen -26
+KPX K a -70
+KPX K b -33
+KPX K c -38
+KPX K d -22
+KPX K e -33
+KPX K f -31
+KPX K g -41
+KPX K h -45
+KPX K j -73
+KPX K k -24
+KPX K l -30
+KPX K m -28
+KPX K n -24
+KPX K o -44
+KPX K p -25
+KPX K q -32
+KPX K s -74
+KPX K x -29
+KPX K z -27
+KPX K period -73
+KPX K comma -74
+KPX K colon -28
+KPX K semicolon -28
+KPX K hyphen -73
+KPX L t -56
+KPX L v -24
+KPX L y -59
+KPX L quoteright -50
+KPX L quotedblright -50
+KPX M a -26
+KPX M j -25
+KPX M s -22
+KPX M x -28
+KPX M period -29
+KPX M comma -32
+KPX M hyphen -21
+KPX N a -32
+KPX N b -32
+KPX N c -28
+KPX N d -22
+KPX N e -30
+KPX N f -24
+KPX N g -28
+KPX N h -31
+KPX N j -31
+KPX N k -26
+KPX N l -23
+KPX N m -23
+KPX N n -28
+KPX N o -28
+KPX N p -25
+KPX N q -25
+KPX N s -30
+KPX N x -38
+KPX N z -29
+KPX N period -35
+KPX N comma -38
+KPX N hyphen -27
+KPX O x -33
+KPX O period -41
+KPX O comma -47
+KPX P a -60
+KPX P b -33
+KPX P c -33
+KPX P d -22
+KPX P e -35
+KPX P f -27
+KPX P g -32
+KPX P h -40
+KPX P j -60
+KPX P k -24
+KPX P l -27
+KPX P m -27
+KPX P n -25
+KPX P o -36
+KPX P p -27
+KPX P q -28
+KPX P s -72
+KPX P x -34
+KPX P z -26
+KPX P period -175
+KPX P comma -175
+KPX P colon -25
+KPX P semicolon -25
+KPX P hyphen -50
+KPX Q a -22
+KPX Q j -23
+KPX Q s -23
+KPX Q x -34
+KPX Q period -34
+KPX Q comma -34
+KPX R a -36
+KPX R j -36
+KPX R s -42
+KPX R x -23
+KPX R period -47
+KPX R comma -49
+KPX R hyphen -33
+KPX S a -54
+KPX S b -28
+KPX S c -43
+KPX S e -21
+KPX S f -28
+KPX S g -48
+KPX S h -40
+KPX S j -53
+KPX S l -21
+KPX S o -51
+KPX S q -36
+KPX S s -51
+KPX S x -21
+KPX S z -21
+KPX S period -60
+KPX S comma -63
+KPX S hyphen -50
+KPX T a -81
+KPX T b -28
+KPX T c -56
+KPX T e -23
+KPX T f -29
+KPX T g -54
+KPX T h -40
+KPX T j -80
+KPX T l -23
+KPX T m -21
+KPX T o -57
+KPX T q -38
+KPX T s -89
+KPX T x -23
+KPX T z -22
+KPX T period -158
+KPX T comma -159
+KPX T hyphen -71
+KPX U x -25
+KPX U comma -24
+KPX V a -62
+KPX V b -28
+KPX V c -38
+KPX V e -23
+KPX V f -29
+KPX V g -36
+KPX V h -41
+KPX V j -62
+KPX V l -25
+KPX V o -38
+KPX V q -33
+KPX V s -67
+KPX V x -23
+KPX V z -22
+KPX V period -93
+KPX V comma -97
+KPX V hyphen -47
+KPX W a -30
+KPX W b -30
+KPX W c -26
+KPX W e -27
+KPX W f -23
+KPX W g -25
+KPX W h -28
+KPX W j -29
+KPX W k -22
+KPX W l -23
+KPX W m -23
+KPX W n -22
+KPX W o -26
+KPX W p -21
+KPX W q -24
+KPX W s -27
+KPX W x -25
+KPX W z -25
+KPX W period -41
+KPX W comma -47
+KPX W colon -25
+KPX W semicolon -24
+KPX W hyphen -25
+KPX X g -22
+KPX X o -25
+KPX X hyphen -46
+KPX Y a -72
+KPX Y b -28
+KPX Y c -46
+KPX Y e -24
+KPX Y f -29
+KPX Y g -44
+KPX Y h -40
+KPX Y j -71
+KPX Y l -24
+KPX Y m -21
+KPX Y o -48
+KPX Y q -40
+KPX Y s -88
+KPX Y x -24
+KPX Y z -22
+KPX Y period -154
+KPX Y comma -154
+KPX Y colon -20
+KPX Y semicolon -20
+KPX Y hyphen -68
+KPX Z a -43
+KPX Z b -28
+KPX Z c -44
+KPX Z e -21
+KPX Z f -24
+KPX Z g -44
+KPX Z h -40
+KPX Z j -43
+KPX Z l -20
+KPX Z o -50
+KPX Z q -35
+KPX Z s -43
+KPX Z x -20
+KPX Z z -21
+KPX Z period -44
+KPX Z comma -44
+KPX Z hyphen -47
+KPX c a -31
+KPX c j -31
+KPX c s -30
+KPX c x -23
+KPX c period -35
+KPX c comma -38
+KPX c hyphen -44
+KPX d x -36
+KPX d period -32
+KPX d comma -40
+KPX e a -52
+KPX e b -29
+KPX e c -56
+KPX e e -27
+KPX e f -32
+KPX e g -66
+KPX e h -45
+KPX e j -52
+KPX e k -20
+KPX e l -26
+KPX e m -23
+KPX e n -21
+KPX e o -67
+KPX e p -20
+KPX e q -46
+KPX e s -59
+KPX e x -26
+KPX e z -23
+KPX e period -51
+KPX e comma -52
+KPX e colon -27
+KPX e semicolon -26
+KPX e hyphen -88
+KPX f a -86
+KPX f b -29
+KPX f c -47
+KPX f e -29
+KPX f f -35
+KPX f g -58
+KPX f h -45
+KPX f j -101
+KPX f k -20
+KPX f l -28
+KPX f m -26
+KPX f n -21
+KPX f o -61
+KPX f p -22
+KPX f q -43
+KPX f s -89
+KPX f x -27
+KPX f z -23
+KPX f period -166
+KPX f comma -166
+KPX f colon -30
+KPX f semicolon -30
+KPX f hyphen -115
+KPX g x -32
+KPX g z -24
+KPX g period -32
+KPX g comma -37
+KPX h x -31
+KPX h period -26
+KPX h comma -31
+KPX i a -46
+KPX i b -32
+KPX i c -34
+KPX i d -20
+KPX i e -31
+KPX i f -29
+KPX i g -30
+KPX i h -40
+KPX i j -45
+KPX i k -22
+KPX i l -28
+KPX i m -26
+KPX i n -22
+KPX i o -35
+KPX i p -24
+KPX i q -29
+KPX i s -43
+KPX i x -28
+KPX i z -24
+KPX i period -51
+KPX i comma -54
+KPX i colon -30
+KPX i semicolon -30
+KPX i hyphen -41
+KPX j a -35
+KPX j b -31
+KPX j c -23
+KPX j e -26
+KPX j g -22
+KPX j h -29
+KPX j j -34
+KPX j k -23
+KPX j n -29
+KPX j o -24
+KPX j p -20
+KPX j r -20
+KPX j s -32
+KPX j x -42
+KPX j z -29
+KPX j period -44
+KPX j comma -48
+KPX j hyphen -26
+KPX k a -71
+KPX k b -32
+KPX k c -38
+KPX k e -28
+KPX k f -31
+KPX k g -42
+KPX k h -45
+KPX k j -72
+KPX k k -22
+KPX k l -28
+KPX k m -26
+KPX k n -22
+KPX k o -46
+KPX k p -22
+KPX k q -32
+KPX k s -73
+KPX k x -27
+KPX k z -25
+KPX k period -72
+KPX k comma -73
+KPX k colon -25
+KPX k semicolon -25
+KPX k hyphen -74
+KPX l t -56
+KPX l v -24
+KPX l y -59
+KPX l quoteright -50
+KPX l quotedblright -50
+KPX m a -26
+KPX m j -25
+KPX m s -22
+KPX m x -28
+KPX m period -29
+KPX m comma -32
+KPX m hyphen -21
+KPX n a -32
+KPX n b -32
+KPX n c -28
+KPX n d -22
+KPX n e -30
+KPX n f -24
+KPX n g -28
+KPX n h -31
+KPX n j -31
+KPX n k -26
+KPX n l -23
+KPX n m -23
+KPX n n -28
+KPX n o -28
+KPX n p -25
+KPX n q -25
+KPX n s -30
+KPX n x -38
+KPX n z -29
+KPX n period -35
+KPX n comma -38
+KPX n hyphen -27
+KPX o x -33
+KPX o period -41
+KPX o comma -47
+KPX p a -60
+KPX p b -33
+KPX p c -33
+KPX p d -22
+KPX p e -35
+KPX p f -27
+KPX p g -32
+KPX p h -40
+KPX p j -60
+KPX p k -24
+KPX p l -27
+KPX p m -27
+KPX p n -25
+KPX p o -36
+KPX p p -27
+KPX p q -28
+KPX p s -72
+KPX p x -34
+KPX p z -26
+KPX p period -175
+KPX p comma -175
+KPX p colon -25
+KPX p semicolon -25
+KPX p hyphen -50
+KPX q a -22
+KPX q j -23
+KPX q s -23
+KPX q x -34
+KPX q period -34
+KPX q comma -34
+KPX r a -36
+KPX r j -36
+KPX r s -42
+KPX r x -23
+KPX r period -47
+KPX r comma -49
+KPX r hyphen -33
+KPX s a -54
+KPX s b -28
+KPX s c -43
+KPX s e -21
+KPX s f -28
+KPX s g -48
+KPX s h -40
+KPX s j -53
+KPX s l -21
+KPX s o -51
+KPX s q -36
+KPX s s -51
+KPX s x -21
+KPX s z -21
+KPX s period -60
+KPX s comma -63
+KPX s hyphen -50
+KPX t a -81
+KPX t b -28
+KPX t c -56
+KPX t e -23
+KPX t f -29
+KPX t g -54
+KPX t h -40
+KPX t j -80
+KPX t l -23
+KPX t m -21
+KPX t o -57
+KPX t q -38
+KPX t s -89
+KPX t x -23
+KPX t z -22
+KPX t period -158
+KPX t comma -159
+KPX t hyphen -71
+KPX u x -25
+KPX u comma -24
+KPX v a -62
+KPX v b -28
+KPX v c -38
+KPX v e -23
+KPX v f -29
+KPX v g -36
+KPX v h -41
+KPX v j -62
+KPX v l -25
+KPX v o -38
+KPX v q -33
+KPX v s -67
+KPX v x -23
+KPX v z -22
+KPX v period -93
+KPX v comma -97
+KPX v hyphen -47
+KPX w a -30
+KPX w b -30
+KPX w c -26
+KPX w e -27
+KPX w f -23
+KPX w g -25
+KPX w h -28
+KPX w j -29
+KPX w k -22
+KPX w l -23
+KPX w m -23
+KPX w n -22
+KPX w o -26
+KPX w p -21
+KPX w q -24
+KPX w s -27
+KPX w x -25
+KPX w z -25
+KPX w period -41
+KPX w comma -47
+KPX w colon -25
+KPX w semicolon -24
+KPX w hyphen -25
+KPX x g -22
+KPX x o -25
+KPX x hyphen -46
+KPX y a -72
+KPX y b -28
+KPX y c -46
+KPX y e -24
+KPX y f -29
+KPX y g -44
+KPX y h -40
+KPX y j -71
+KPX y l -24
+KPX y m -21
+KPX y o -48
+KPX y q -40
+KPX y s -88
+KPX y x -24
+KPX y z -22
+KPX y period -154
+KPX y comma -154
+KPX y colon -20
+KPX y semicolon -20
+KPX y hyphen -68
+KPX z a -43
+KPX z b -28
+KPX z c -44
+KPX z e -21
+KPX z f -24
+KPX z g -44
+KPX z h -40
+KPX z j -43
+KPX z l -20
+KPX z o -50
+KPX z q -35
+KPX z s -43
+KPX z x -20
+KPX z z -21
+KPX z period -44
+KPX z comma -44
+KPX z hyphen -47
+KPX k.001 a -71
+KPX k.001 b -32
+KPX k.001 c -38
+KPX k.001 e -28
+KPX k.001 f -31
+KPX k.001 g -42
+KPX k.001 h -45
+KPX k.001 j -72
+KPX k.001 k -22
+KPX k.001 l -28
+KPX k.001 m -26
+KPX k.001 n -22
+KPX k.001 o -46
+KPX k.001 p -22
+KPX k.001 q -32
+KPX k.001 s -73
+KPX k.001 x -27
+KPX k.001 z -25
+KPX k.001 period -72
+KPX k.001 comma -73
+KPX k.001 colon -25
+KPX k.001 semicolon -25
+KPX k.001 hyphen -74
+KPX quoteleft a -50
+KPX quoteleft j -50
+KPX quoteleft A -50
+KPX quoteleft J -50
+KPX quoteleft c -30
+KPX quoteleft g -30
+KPX quoteleft o -30
+KPX quoteleft q -30
+KPX quoteleft s -30
+KPX quoteleft C -30
+KPX quoteleft G -30
+KPX quoteleft O -30
+KPX quoteleft Q -30
+KPX quoteleft S -30
+KPX quotedblleft a -50
+KPX quotedblleft j -50
+KPX quotedblleft A -50
+KPX quotedblleft J -50
+KPX quotedblleft c -30
+KPX quotedblleft g -30
+KPX quotedblleft o -30
+KPX quotedblleft q -30
+KPX quotedblleft s -30
+KPX quotedblleft C -30
+KPX quotedblleft G -30
+KPX quotedblleft O -30
+KPX quotedblleft Q -30
+KPX quotedblleft S -30
+EndKernPairs
+EndKernData
+EndFontMetrics
diff --git a/fonts/afm/hoekwater/koeieletters/koeien-sy.afm b/fonts/afm/hoekwater/koeieletters/koeien-sy.afm
new file mode 100644
index 000000000..057ae7b6a
--- /dev/null
+++ b/fonts/afm/hoekwater/koeieletters/koeien-sy.afm
@@ -0,0 +1,879 @@
+StartFontMetrics 2.0
+Comment Generated by FontForge 20050809
+Comment Creation Date: Sat Jun 24 11:02:20 2006
+FontName koeieletters
+FullName koeieletters
+FamilyName koeieletters
+Weight Medium
+Notice (Created by Taco Hoekwater with FontForge 1.0 (http://fontforge.sf.net))
+ItalicAngle 0
+IsFixedPitch false
+UnderlinePosition -100
+UnderlineThickness 16
+Version 001.001
+EncodingScheme FontSpecific
+FontBBox -60 -1667 1117 762
+CapHeight 532
+XHeight 540
+Ascender 533
+StartCharMetrics 164
+C 0 ; WX 321 ; N parenleft.big ; B 25 -1001 296 39 ;
+C 1 ; WX 323 ; N parenright.big ; B 25 -999 298 42 ;
+C 2 ; WX 539 ; N slash.big ; B 97 -825 634 39 ;
+C 3 ; WX 382 ; N bracketleft.big ; B 25 -988 357 52 ;
+C 4 ; WX 489 ; N backslash.big ; B -60 -820 392 44 ;
+C 5 ; WX 376 ; N bracketright.big ; B 25 -990 351 50 ;
+C 6 ; WX 332 ; N braceleft.big ; B 25 -1008 307 52 ;
+C 7 ; WX 243 ; N bar.big ; B 25 -982 218 49 ;
+C 8 ; WX 323 ; N braceright.big ; B 24 -1013 303 61 ;
+C 9 ; WX 613 ; N integral.big ; B 25 -1159 631 0 ;
+C 10 ; WX 814 ; N summation.big ; B 29 -1049 989 0 ;
+C 11 ; WX 668 ; N radical.big ; B 25 -792 676 74 ;
+C 12 ; WX 726 ; N radical.bigg ; B 25 -967 734 74 ;
+C 13 ; WX 840 ; N radical.Bigg ; B 25 -1317 848 74 ;
+C 14 ; WX 954 ; N radical.BIGG ; B 24 -1667 962 74 ;
+C 15 ; WX 122 ; N radical.end ; B -8 0 122 74 ;
+C 16 ; WX 8 ; N radical.extender ; B -12 0 21 74 ;
+C 17 ; WX 611 ; N radical.alt ; B 25 -617 619 74 ;
+C 18 ; WX 613 ; N integral.alt ; B 25 -809 588 0 ;
+C 19 ; WX 814 ; N summation.alt ; B 25 -699 789 0 ;
+C 20 ; WX 321 ; N parenleft.bigg ; B 25 -1351 296 39 ;
+C 21 ; WX 323 ; N parenright.bigg ; B 25 -1349 298 42 ;
+C 22 ; WX 539 ; N slash.bigg ; B -32 -1175 634 39 ;
+C 23 ; WX 382 ; N bracketleft.bigg ; B 25 -1338 357 52 ;
+C 24 ; WX 489 ; N backslash.bigg ; B -60 -1170 488 44 ;
+C 25 ; WX 376 ; N bracketright.bigg ; B 25 -1340 351 50 ;
+C 26 ; WX 332 ; N braceleft.bigg ; B 25 -1358 307 52 ;
+C 27 ; WX 243 ; N bar.bigg ; B 25 -1332 218 49 ;
+C 28 ; WX 323 ; N braceright.bigg ; B 24 -1363 303 61 ;
+C 29 ; WX 195 ; N radical.begin ; B 0 0 203 74 ;
+C 32 ; WX 500 ; N space ; B 0 0 0 0 ;
+C 33 ; WX 345 ; N exclam ; B 25 0 320 530 ;
+C 34 ; WX 460 ; N quotedbl ; B 25 338 435 544 ;
+C 39 ; WX 239 ; N quotesingle ; B 25 338 214 544 ;
+C 40 ; WX 321 ; N parenleft ; B 25 -79 296 611 ;
+C 41 ; WX 323 ; N parenright ; B 25 -80 298 611 ;
+C 42 ; WX 414 ; N asterisk ; B 25 32 389 404 ;
+C 43 ; WX 461 ; N plus ; B 25 44 436 404 ;
+C 44 ; WX 232 ; N comma ; B 25 -66 207 140 ;
+C 45 ; WX 355 ; N hyphen ; B 25 176 330 294 ;
+C 46 ; WX 231 ; N period ; B 25 0 206 151 ;
+C 47 ; WX 539 ; N slash ; B 25 0 514 514 ;
+C 48 ; WX 499 ; N zero ; B 25 0 474 531 ;
+C 49 ; WX 488 ; N one ; B 25 0 463 532 ;
+C 50 ; WX 539 ; N two ; B 25 0 514 528 ;
+C 51 ; WX 501 ; N three ; B 25 0 476 518 ;
+C 52 ; WX 514 ; N four ; B 25 0 489 511 ;
+C 53 ; WX 521 ; N five ; B 25 0 496 515 ;
+C 54 ; WX 513 ; N six ; B 25 -1 488 516 ;
+C 55 ; WX 540 ; N seven ; B 25 -1 515 526 ;
+C 56 ; WX 498 ; N eight ; B 25 -1 473 512 ;
+C 57 ; WX 495 ; N nine ; B 25 0 470 514 ;
+C 58 ; WX 234 ; N colon ; B 25 52 209 460 ;
+C 59 ; WX 245 ; N semicolon ; B 25 -10 220 461 ;
+C 60 ; WX 544 ; N less ; B 25 81 519 456 ;
+C 61 ; WX 460 ; N equal ; B 25 88 435 404 ;
+C 62 ; WX 581 ; N greater ; B 25 66 556 448 ;
+C 63 ; WX 518 ; N question ; B 25 -6 493 536 ;
+C 64 ; WX 585 ; N at ; B 25 -4 560 479 ;
+C 65 ; WX 565 ; N A ; B 25 -7 540 527 ;
+C 66 ; WX 545 ; N B ; B 25 -11 520 524 ;
+C 67 ; WX 593 ; N C ; B 25 0 568 535 ;
+C 68 ; WX 562 ; N D ; B 25 0 537 523 ;
+C 69 ; WX 564 ; N E ; B 25 0 539 531 ;
+C 70 ; WX 572 ; N F ; B 25 -12 547 533 ;
+C 71 ; WX 570 ; N G ; B 25 0 545 536 ;
+C 72 ; WX 597 ; N H ; B 25 0 572 536 ;
+C 73 ; WX 462 ; N I ; B 25 -6 437 532 ;
+C 74 ; WX 610 ; N J ; B 25 -6 585 544 ;
+C 75 ; WX 601 ; N K ; B 25 -6 576 532 ;
+C 76 ; WX 522 ; N L ; B 25 -9 497 533 ;
+C 77 ; WX 609 ; N M ; B 24 -7 584 528 ;
+C 78 ; WX 590 ; N N ; B 25 -1 565 556 ;
+C 79 ; WX 613 ; N O ; B 25 -6 588 546 ;
+C 80 ; WX 602 ; N P ; B 25 -1 577 544 ;
+C 81 ; WX 609 ; N Q ; B 25 0 584 536 ;
+C 82 ; WX 586 ; N R ; B 25 -8 561 549 ;
+C 83 ; WX 625 ; N S ; B 25 -13 600 541 ;
+C 84 ; WX 632 ; N T ; B 25 -8 607 538 ;
+C 85 ; WX 573 ; N U ; B 25 0 548 549 ;
+C 86 ; WX 607 ; N V ; B 25 -5 582 523 ;
+C 87 ; WX 602 ; N W ; B 25 -8 577 531 ;
+C 88 ; WX 597 ; N X ; B 25 -5 572 540 ;
+C 89 ; WX 605 ; N Y ; B 25 -28 580 536 ;
+C 90 ; WX 571 ; N Z ; B 25 -19 546 528 ;
+C 91 ; WX 382 ; N bracketleft ; B 25 -88 357 602 ;
+C 92 ; WX 489 ; N backslash ; B 25 0 464 514 ;
+C 93 ; WX 376 ; N bracketright ; B 25 -88 351 602 ;
+C 94 ; WX 480 ; N asciicircum ; B 25 322 455 515 ;
+C 95 ; WX 579 ; N underscore ; B 25 -183 554 -51 ;
+C 96 ; WX 338 ; N grave ; B 25 570 313 762 ;
+C 97 ; WX 565 ; N a ; B 25 -7 540 527 ;
+C 98 ; WX 545 ; N b ; B 25 -11 520 524 ;
+C 99 ; WX 593 ; N c ; B 25 0 568 535 ;
+C 100 ; WX 562 ; N d ; B 25 0 537 523 ;
+C 101 ; WX 564 ; N e ; B 25 0 539 531 ;
+C 102 ; WX 572 ; N f ; B 25 -12 547 533 ;
+C 103 ; WX 570 ; N g ; B 25 0 545 536 ;
+C 104 ; WX 597 ; N h ; B 25 0 572 536 ;
+C 105 ; WX 462 ; N i ; B 25 -6 437 532 ;
+C 106 ; WX 610 ; N j ; B 25 -6 585 544 ;
+C 107 ; WX 600 ; N k ; B 25 -5 575 531 ;
+C 108 ; WX 522 ; N l ; B 25 -9 497 533 ;
+C 109 ; WX 609 ; N m ; B 24 -7 584 528 ;
+C 110 ; WX 590 ; N n ; B 25 -1 565 556 ;
+C 111 ; WX 613 ; N o ; B 25 -6 588 546 ;
+C 112 ; WX 602 ; N p ; B 25 -1 577 544 ;
+C 113 ; WX 609 ; N q ; B 25 0 584 536 ;
+C 114 ; WX 586 ; N r ; B 25 -8 561 549 ;
+C 115 ; WX 625 ; N s ; B 25 -13 600 541 ;
+C 116 ; WX 632 ; N t ; B 25 -8 607 538 ;
+C 117 ; WX 573 ; N u ; B 25 0 548 549 ;
+C 118 ; WX 607 ; N v ; B 25 -5 582 523 ;
+C 119 ; WX 602 ; N w ; B 25 -8 577 531 ;
+C 120 ; WX 597 ; N x ; B 25 -5 572 540 ;
+C 121 ; WX 605 ; N y ; B 25 -28 580 536 ;
+C 122 ; WX 571 ; N z ; B 25 -19 546 528 ;
+C 123 ; WX 332 ; N braceleft ; B 25 -85 307 625 ;
+C 124 ; WX 243 ; N bar ; B 25 0 218 681 ;
+C 125 ; WX 323 ; N braceright ; B 24 -74 298 650 ;
+C 126 ; WX 592 ; N asciitilde ; B 25 198 568 388 ;
+C 156 ; WX 448 ; N dieresis ; B 25 557 423 711 ;
+C 168 ; WX 336 ; N acute ; B 25 569 312 754 ;
+C 203 ; WX 468 ; N multiply ; B 25 41 443 411 ;
+C 244 ; WX 770 ; N infinity ; B 25 87 745 427 ;
+C 245 ; WX 645 ; N arrowleft ; B 25 49 620 433 ;
+C 246 ; WX 683 ; N arrowright ; B 25 53 658 433 ;
+C 247 ; WX 460 ; N minus ; B 25 154 435 302 ;
+C 248 ; WX 414 ; N asteriskmath ; B 25 32 389 404 ;
+C 249 ; WX 613 ; N integral ; B 25 -155 588 654 ;
+C 250 ; WX 814 ; N summation ; B 25 -116 789 583 ;
+C 251 ; WX 614 ; N equivalence ; B 25 58 590 429 ;
+C 252 ; WX 592 ; N similar ; B 25 198 568 388 ;
+C 253 ; WX 224 ; N minute ; B 25 197 199 514 ;
+C 254 ; WX 763 ; N emdash ; B 25 165 738 297 ;
+C 255 ; WX 534 ; N endash ; B 25 165 509 297 ;
+C -1 ; WX 1000 ; N k.001 ; B 3 -6 554 532 ;
+C -1 ; WX 460 ; N quotedblright ; B 25 358 435 564 ;
+C -1 ; WX 256 ; N quoteright ; B 25 358 231 564 ;
+C -1 ; WX 237 ; N quoteleft ; B 25 357 212 564 ;
+C -1 ; WX 465 ; N breve ; B 25 561 440 749 ;
+C -1 ; WX 451 ; N quotedblleft ; B 25 358 426 564 ;
+C -1 ; WX 256 ; N quotesinglbase ; B 25 -58 231 148 ;
+C -1 ; WX 460 ; N quotedblbase ; B 25 -65 435 141 ;
+C -1 ; WX 378 ; N second ; B 25 197 353 514 ;
+C -1 ; WX 530 ; N radical ; B 25 -62 1117 629 ;
+C -1 ; WX 480 ; N circumflex ; B 25 561 455 754 ;
+C -1 ; WX 521 ; N tilde ; B 25 564 496 728 ;
+C -1 ; WX 462 ; N dotlessi ; B 25 -13 437 525 ;
+C -1 ; WX 610 ; N dotlessj ; B 25 -6 585 544 ;
+C -1 ; WX 496 ; N plus.alt ; B 25 64 471 463 ;
+C -1 ; WX 481 ; N minus.alt ; B 25 174 456 355 ;
+C -1 ; WX 552 ; N zero.alt ; B 25 -9 527 529 ;
+C -1 ; WX 554 ; N one.alt ; B 25 -12 529 543 ;
+C -1 ; WX 569 ; N two.alt ; B 25 -16 544 523 ;
+C -1 ; WX 563 ; N three.alt ; B 25 -17 538 533 ;
+C -1 ; WX 595 ; N four.alt ; B 25 -19 570 523 ;
+C -1 ; WX 573 ; N five.alt ; B 25 -18 548 539 ;
+C -1 ; WX 558 ; N six.alt ; B 25 -7 533 535 ;
+C -1 ; WX 594 ; N seven.alt ; B 25 -3 569 523 ;
+C -1 ; WX 544 ; N eight.alt ; B 25 -19 519 529 ;
+C -1 ; WX 594 ; N nine.alt ; B 25 -19 569 536 ;
+C -1 ; WX 231 ; N periodcentered ; B 25 153 206 304 ;
+C -1 ; WX 231 ; N dotaccent ; B 25 561 206 712 ;
+EndCharMetrics
+StartKernData
+StartKernPairs 690
+KPX C a -31
+KPX C j -31
+KPX C s -30
+KPX C x -23
+KPX C period -35
+KPX C comma -38
+KPX C hyphen -44
+KPX D x -36
+KPX D period -32
+KPX D comma -40
+KPX E a -52
+KPX E b -29
+KPX E c -56
+KPX E e -27
+KPX E f -32
+KPX E g -66
+KPX E h -45
+KPX E j -52
+KPX E k -20
+KPX E l -26
+KPX E m -23
+KPX E n -21
+KPX E o -67
+KPX E p -20
+KPX E q -46
+KPX E s -59
+KPX E x -26
+KPX E z -23
+KPX E period -51
+KPX E comma -52
+KPX E colon -27
+KPX E semicolon -26
+KPX E hyphen -88
+KPX F a -86
+KPX F b -29
+KPX F c -47
+KPX F e -29
+KPX F f -35
+KPX F g -58
+KPX F h -45
+KPX F j -101
+KPX F k -20
+KPX F l -28
+KPX F m -26
+KPX F n -21
+KPX F o -61
+KPX F p -22
+KPX F q -43
+KPX F s -89
+KPX F x -27
+KPX F z -23
+KPX F period -166
+KPX F comma -166
+KPX F colon -30
+KPX F semicolon -30
+KPX F hyphen -115
+KPX G x -32
+KPX G z -24
+KPX G period -32
+KPX G comma -37
+KPX H x -31
+KPX H period -26
+KPX H comma -31
+KPX I a -46
+KPX I b -32
+KPX I c -34
+KPX I d -20
+KPX I e -31
+KPX I f -29
+KPX I g -30
+KPX I h -40
+KPX I j -45
+KPX I k -22
+KPX I l -28
+KPX I m -26
+KPX I n -22
+KPX I o -35
+KPX I p -24
+KPX I q -29
+KPX I s -43
+KPX I x -28
+KPX I z -24
+KPX I period -51
+KPX I comma -54
+KPX I colon -30
+KPX I semicolon -30
+KPX I hyphen -41
+KPX J a -35
+KPX J b -31
+KPX J c -23
+KPX J e -26
+KPX J g -22
+KPX J h -29
+KPX J j -34
+KPX J k -23
+KPX J n -29
+KPX J o -24
+KPX J p -20
+KPX J r -20
+KPX J s -32
+KPX J x -42
+KPX J z -29
+KPX J period -44
+KPX J comma -48
+KPX J hyphen -26
+KPX K a -70
+KPX K b -33
+KPX K c -38
+KPX K d -22
+KPX K e -33
+KPX K f -31
+KPX K g -41
+KPX K h -45
+KPX K j -73
+KPX K k -24
+KPX K l -30
+KPX K m -28
+KPX K n -24
+KPX K o -44
+KPX K p -25
+KPX K q -32
+KPX K s -74
+KPX K x -29
+KPX K z -27
+KPX K period -73
+KPX K comma -74
+KPX K colon -28
+KPX K semicolon -28
+KPX K hyphen -73
+KPX L t -56
+KPX L v -24
+KPX L y -59
+KPX L quoteright -50
+KPX L quotedblright -50
+KPX M a -26
+KPX M j -25
+KPX M s -22
+KPX M x -28
+KPX M period -29
+KPX M comma -32
+KPX M hyphen -21
+KPX N a -32
+KPX N b -32
+KPX N c -28
+KPX N d -22
+KPX N e -30
+KPX N f -24
+KPX N g -28
+KPX N h -31
+KPX N j -31
+KPX N k -26
+KPX N l -23
+KPX N m -23
+KPX N n -28
+KPX N o -28
+KPX N p -25
+KPX N q -25
+KPX N s -30
+KPX N x -38
+KPX N z -29
+KPX N period -35
+KPX N comma -38
+KPX N hyphen -27
+KPX O x -33
+KPX O period -41
+KPX O comma -47
+KPX P a -60
+KPX P b -33
+KPX P c -33
+KPX P d -22
+KPX P e -35
+KPX P f -27
+KPX P g -32
+KPX P h -40
+KPX P j -60
+KPX P k -24
+KPX P l -27
+KPX P m -27
+KPX P n -25
+KPX P o -36
+KPX P p -27
+KPX P q -28
+KPX P s -72
+KPX P x -34
+KPX P z -26
+KPX P period -175
+KPX P comma -175
+KPX P colon -25
+KPX P semicolon -25
+KPX P hyphen -50
+KPX Q a -22
+KPX Q j -23
+KPX Q s -23
+KPX Q x -34
+KPX Q period -34
+KPX Q comma -34
+KPX R a -36
+KPX R j -36
+KPX R s -42
+KPX R x -23
+KPX R period -47
+KPX R comma -49
+KPX R hyphen -33
+KPX S a -54
+KPX S b -28
+KPX S c -43
+KPX S e -21
+KPX S f -28
+KPX S g -48
+KPX S h -40
+KPX S j -53
+KPX S l -21
+KPX S o -51
+KPX S q -36
+KPX S s -51
+KPX S x -21
+KPX S z -21
+KPX S period -60
+KPX S comma -63
+KPX S hyphen -50
+KPX T a -81
+KPX T b -28
+KPX T c -56
+KPX T e -23
+KPX T f -29
+KPX T g -54
+KPX T h -40
+KPX T j -80
+KPX T l -23
+KPX T m -21
+KPX T o -57
+KPX T q -38
+KPX T s -89
+KPX T x -23
+KPX T z -22
+KPX T period -158
+KPX T comma -159
+KPX T hyphen -71
+KPX U x -25
+KPX U comma -24
+KPX V a -62
+KPX V b -28
+KPX V c -38
+KPX V e -23
+KPX V f -29
+KPX V g -36
+KPX V h -41
+KPX V j -62
+KPX V l -25
+KPX V o -38
+KPX V q -33
+KPX V s -67
+KPX V x -23
+KPX V z -22
+KPX V period -93
+KPX V comma -97
+KPX V hyphen -47
+KPX W a -30
+KPX W b -30
+KPX W c -26
+KPX W e -27
+KPX W f -23
+KPX W g -25
+KPX W h -28
+KPX W j -29
+KPX W k -22
+KPX W l -23
+KPX W m -23
+KPX W n -22
+KPX W o -26
+KPX W p -21
+KPX W q -24
+KPX W s -27
+KPX W x -25
+KPX W z -25
+KPX W period -41
+KPX W comma -47
+KPX W colon -25
+KPX W semicolon -24
+KPX W hyphen -25
+KPX X g -22
+KPX X o -25
+KPX X hyphen -46
+KPX Y a -72
+KPX Y b -28
+KPX Y c -46
+KPX Y e -24
+KPX Y f -29
+KPX Y g -44
+KPX Y h -40
+KPX Y j -71
+KPX Y l -24
+KPX Y m -21
+KPX Y o -48
+KPX Y q -40
+KPX Y s -88
+KPX Y x -24
+KPX Y z -22
+KPX Y period -154
+KPX Y comma -154
+KPX Y colon -20
+KPX Y semicolon -20
+KPX Y hyphen -68
+KPX Z a -43
+KPX Z b -28
+KPX Z c -44
+KPX Z e -21
+KPX Z f -24
+KPX Z g -44
+KPX Z h -40
+KPX Z j -43
+KPX Z l -20
+KPX Z o -50
+KPX Z q -35
+KPX Z s -43
+KPX Z x -20
+KPX Z z -21
+KPX Z period -44
+KPX Z comma -44
+KPX Z hyphen -47
+KPX c a -31
+KPX c j -31
+KPX c s -30
+KPX c x -23
+KPX c period -35
+KPX c comma -38
+KPX c hyphen -44
+KPX d x -36
+KPX d period -32
+KPX d comma -40
+KPX e a -52
+KPX e b -29
+KPX e c -56
+KPX e e -27
+KPX e f -32
+KPX e g -66
+KPX e h -45
+KPX e j -52
+KPX e k -20
+KPX e l -26
+KPX e m -23
+KPX e n -21
+KPX e o -67
+KPX e p -20
+KPX e q -46
+KPX e s -59
+KPX e x -26
+KPX e z -23
+KPX e period -51
+KPX e comma -52
+KPX e colon -27
+KPX e semicolon -26
+KPX e hyphen -88
+KPX f a -86
+KPX f b -29
+KPX f c -47
+KPX f e -29
+KPX f f -35
+KPX f g -58
+KPX f h -45
+KPX f j -101
+KPX f k -20
+KPX f l -28
+KPX f m -26
+KPX f n -21
+KPX f o -61
+KPX f p -22
+KPX f q -43
+KPX f s -89
+KPX f x -27
+KPX f z -23
+KPX f period -166
+KPX f comma -166
+KPX f colon -30
+KPX f semicolon -30
+KPX f hyphen -115
+KPX g x -32
+KPX g z -24
+KPX g period -32
+KPX g comma -37
+KPX h x -31
+KPX h period -26
+KPX h comma -31
+KPX i a -46
+KPX i b -32
+KPX i c -34
+KPX i d -20
+KPX i e -31
+KPX i f -29
+KPX i g -30
+KPX i h -40
+KPX i j -45
+KPX i k -22
+KPX i l -28
+KPX i m -26
+KPX i n -22
+KPX i o -35
+KPX i p -24
+KPX i q -29
+KPX i s -43
+KPX i x -28
+KPX i z -24
+KPX i period -51
+KPX i comma -54
+KPX i colon -30
+KPX i semicolon -30
+KPX i hyphen -41
+KPX j a -35
+KPX j b -31
+KPX j c -23
+KPX j e -26
+KPX j g -22
+KPX j h -29
+KPX j j -34
+KPX j k -23
+KPX j n -29
+KPX j o -24
+KPX j p -20
+KPX j r -20
+KPX j s -32
+KPX j x -42
+KPX j z -29
+KPX j period -44
+KPX j comma -48
+KPX j hyphen -26
+KPX k a -71
+KPX k b -32
+KPX k c -38
+KPX k e -28
+KPX k f -31
+KPX k g -42
+KPX k h -45
+KPX k j -72
+KPX k k -22
+KPX k l -28
+KPX k m -26
+KPX k n -22
+KPX k o -46
+KPX k p -22
+KPX k q -32
+KPX k s -73
+KPX k x -27
+KPX k z -25
+KPX k period -72
+KPX k comma -73
+KPX k colon -25
+KPX k semicolon -25
+KPX k hyphen -74
+KPX l t -56
+KPX l v -24
+KPX l y -59
+KPX l quoteright -50
+KPX l quotedblright -50
+KPX m a -26
+KPX m j -25
+KPX m s -22
+KPX m x -28
+KPX m period -29
+KPX m comma -32
+KPX m hyphen -21
+KPX n a -32
+KPX n b -32
+KPX n c -28
+KPX n d -22
+KPX n e -30
+KPX n f -24
+KPX n g -28
+KPX n h -31
+KPX n j -31
+KPX n k -26
+KPX n l -23
+KPX n m -23
+KPX n n -28
+KPX n o -28
+KPX n p -25
+KPX n q -25
+KPX n s -30
+KPX n x -38
+KPX n z -29
+KPX n period -35
+KPX n comma -38
+KPX n hyphen -27
+KPX o x -33
+KPX o period -41
+KPX o comma -47
+KPX p a -60
+KPX p b -33
+KPX p c -33
+KPX p d -22
+KPX p e -35
+KPX p f -27
+KPX p g -32
+KPX p h -40
+KPX p j -60
+KPX p k -24
+KPX p l -27
+KPX p m -27
+KPX p n -25
+KPX p o -36
+KPX p p -27
+KPX p q -28
+KPX p s -72
+KPX p x -34
+KPX p z -26
+KPX p period -175
+KPX p comma -175
+KPX p colon -25
+KPX p semicolon -25
+KPX p hyphen -50
+KPX q a -22
+KPX q j -23
+KPX q s -23
+KPX q x -34
+KPX q period -34
+KPX q comma -34
+KPX r a -36
+KPX r j -36
+KPX r s -42
+KPX r x -23
+KPX r period -47
+KPX r comma -49
+KPX r hyphen -33
+KPX s a -54
+KPX s b -28
+KPX s c -43
+KPX s e -21
+KPX s f -28
+KPX s g -48
+KPX s h -40
+KPX s j -53
+KPX s l -21
+KPX s o -51
+KPX s q -36
+KPX s s -51
+KPX s x -21
+KPX s z -21
+KPX s period -60
+KPX s comma -63
+KPX s hyphen -50
+KPX t a -81
+KPX t b -28
+KPX t c -56
+KPX t e -23
+KPX t f -29
+KPX t g -54
+KPX t h -40
+KPX t j -80
+KPX t l -23
+KPX t m -21
+KPX t o -57
+KPX t q -38
+KPX t s -89
+KPX t x -23
+KPX t z -22
+KPX t period -158
+KPX t comma -159
+KPX t hyphen -71
+KPX u x -25
+KPX u comma -24
+KPX v a -62
+KPX v b -28
+KPX v c -38
+KPX v e -23
+KPX v f -29
+KPX v g -36
+KPX v h -41
+KPX v j -62
+KPX v l -25
+KPX v o -38
+KPX v q -33
+KPX v s -67
+KPX v x -23
+KPX v z -22
+KPX v period -93
+KPX v comma -97
+KPX v hyphen -47
+KPX w a -30
+KPX w b -30
+KPX w c -26
+KPX w e -27
+KPX w f -23
+KPX w g -25
+KPX w h -28
+KPX w j -29
+KPX w k -22
+KPX w l -23
+KPX w m -23
+KPX w n -22
+KPX w o -26
+KPX w p -21
+KPX w q -24
+KPX w s -27
+KPX w x -25
+KPX w z -25
+KPX w period -41
+KPX w comma -47
+KPX w colon -25
+KPX w semicolon -24
+KPX w hyphen -25
+KPX x g -22
+KPX x o -25
+KPX x hyphen -46
+KPX y a -72
+KPX y b -28
+KPX y c -46
+KPX y e -24
+KPX y f -29
+KPX y g -44
+KPX y h -40
+KPX y j -71
+KPX y l -24
+KPX y m -21
+KPX y o -48
+KPX y q -40
+KPX y s -88
+KPX y x -24
+KPX y z -22
+KPX y period -154
+KPX y comma -154
+KPX y colon -20
+KPX y semicolon -20
+KPX y hyphen -68
+KPX z a -43
+KPX z b -28
+KPX z c -44
+KPX z e -21
+KPX z f -24
+KPX z g -44
+KPX z h -40
+KPX z j -43
+KPX z l -20
+KPX z o -50
+KPX z q -35
+KPX z s -43
+KPX z x -20
+KPX z z -21
+KPX z period -44
+KPX z comma -44
+KPX z hyphen -47
+KPX k.001 a -71
+KPX k.001 b -32
+KPX k.001 c -38
+KPX k.001 e -28
+KPX k.001 f -31
+KPX k.001 g -42
+KPX k.001 h -45
+KPX k.001 j -72
+KPX k.001 k -22
+KPX k.001 l -28
+KPX k.001 m -26
+KPX k.001 n -22
+KPX k.001 o -46
+KPX k.001 p -22
+KPX k.001 q -32
+KPX k.001 s -73
+KPX k.001 x -27
+KPX k.001 z -25
+KPX k.001 period -72
+KPX k.001 comma -73
+KPX k.001 colon -25
+KPX k.001 semicolon -25
+KPX k.001 hyphen -74
+KPX quoteleft a -50
+KPX quoteleft j -50
+KPX quoteleft A -50
+KPX quoteleft J -50
+KPX quoteleft c -30
+KPX quoteleft g -30
+KPX quoteleft o -30
+KPX quoteleft q -30
+KPX quoteleft s -30
+KPX quoteleft C -30
+KPX quoteleft G -30
+KPX quoteleft O -30
+KPX quoteleft Q -30
+KPX quoteleft S -30
+KPX quotedblleft a -50
+KPX quotedblleft j -50
+KPX quotedblleft A -50
+KPX quotedblleft J -50
+KPX quotedblleft c -30
+KPX quotedblleft g -30
+KPX quotedblleft o -30
+KPX quotedblleft q -30
+KPX quotedblleft s -30
+KPX quotedblleft C -30
+KPX quotedblleft G -30
+KPX quotedblleft O -30
+KPX quotedblleft Q -30
+KPX quotedblleft S -30
+EndKernPairs
+EndKernData
+EndFontMetrics
diff --git a/fonts/enc/pdftex/context/koeieletters-ex.enc b/fonts/enc/pdftex/context/koeieletters-ex.enc
new file mode 100644
index 000000000..db67e0c38
--- /dev/null
+++ b/fonts/enc/pdftex/context/koeieletters-ex.enc
@@ -0,0 +1,259 @@
+/koeielettersEnc-ex [
+ /parenleft.big % 0x00
+ /parenright.big
+ /bracketleft.big
+ /bracketright.big
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /braceleft.big
+ /braceright.big
+ /.notdef
+ /.notdef
+ /bar.big
+ /bar.bigg
+ /slash.big
+ /backslash.big % 0x10
+ /parenleft.bigg
+ /parenright.bigg
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x20
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /slash.bigg
+ /backslash.bigg
+ /.notdef % 0x30
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x40
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /summation.alt % 0x50
+ /.notdef
+ /integral.alt
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /summation.big
+ /.notdef
+ /integral.big
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x60
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /bracketleft.bigg
+ /bracketright.bigg
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /braceleft.bigg
+ /braceright.bigg
+ /radical.alt % 0x70
+ /radical.big
+ /radical.bigg
+ /radical.Bigg
+ /radical.BIGG
+ /radical.extender
+ /radical.end
+ /radical.begin
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x80
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x90
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xa0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xb0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xc0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xd0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xe0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xf0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+] def
+
diff --git a/fonts/enc/pdftex/context/koeieletters-mi.enc b/fonts/enc/pdftex/context/koeieletters-mi.enc
new file mode 100644
index 000000000..60a91b83f
--- /dev/null
+++ b/fonts/enc/pdftex/context/koeieletters-mi.enc
@@ -0,0 +1,271 @@
+/koeielettersEnc-mi [
+ /.notdef % 0x00
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x10
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x20
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /zero.alt % 0x30
+ /one.alt
+ /two.alt
+ /three.alt
+ /four.alt
+ /five.alt
+ /six.alt
+ /seven.alt
+ /eight.alt
+ /nine.alt
+ /period
+ /comma
+ /less
+ /slash
+ /greater
+ /.notdef
+ /.notdef % 0x40
+ /A
+ /B
+ /C
+ /D
+ /E
+ /F
+ /G
+ /H
+ /I
+ /J
+ /K
+ /L
+ /M
+ /N
+ /O
+ /P % 0x50
+ /Q
+ /R
+ /S
+ /T
+ /U
+ /V
+ /W
+ /X
+ /Y
+ /Z
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x60
+ /a
+ /b
+ /c
+ /d
+ /e
+ /f
+ /g
+ /h
+ /i
+ /j
+ /k
+ /l
+ /m
+ /n
+ /o
+ /p % 0x70
+ /q
+ /r
+ /s
+ /t
+ /u
+ /v
+ /w
+ /x
+ /y
+ /z
+ /dotlessi
+ /dotlessj
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x80
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x90
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xa0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xb0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xc0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xd0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xe0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xf0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+] def
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fonts/enc/pdftex/context/koeieletters-sy.enc b/fonts/enc/pdftex/context/koeieletters-sy.enc
new file mode 100644
index 000000000..58e71fd6d
--- /dev/null
+++ b/fonts/enc/pdftex/context/koeieletters-sy.enc
@@ -0,0 +1,271 @@
+/koeielettersEnc-sy [
+ /minus % 0x00
+ /periodcentered
+ /multiply
+ /asteriskmath
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x10
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /similar
+ /equivalence
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /arrowleft % 0x20
+ /arrowright
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /minute % 0x30
+ /infinity
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /slash
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x40
+ /A
+ /B
+ /C
+ /D
+ /E
+ /F
+ /G
+ /H
+ /I
+ /J
+ /K
+ /L
+ /M
+ /N
+ /O
+ /P % 0x50
+ /Q
+ /R
+ /S
+ /T
+ /U
+ /V
+ /W
+ /X
+ /Y
+ /Z
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x60
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /braceleft
+ /braceright
+ /.notdef
+ /.notdef
+ /bar
+ /.notdef
+ /.notdef
+ /.notdef
+ /backslash
+ /.notdef
+ /radical % 0x70
+ /.notdef
+ /.notdef
+ /integral
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /minus.alt % 0x80
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0x90
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xa0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xb0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xc0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xd0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xe0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xf0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+] def
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fonts/enc/pdftex/context/koeieletters.enc b/fonts/enc/pdftex/context/koeieletters.enc
new file mode 100644
index 000000000..a3c7b4cf4
--- /dev/null
+++ b/fonts/enc/pdftex/context/koeieletters.enc
@@ -0,0 +1,271 @@
+/koeielettersEnc [
+ /parenleft.big % 0x00
+ /parenright.big
+ /slash.big
+ /bracketleft.big
+ /backslash.big
+ /bracketright.big
+ /braceleft.big
+ /bar.big
+ /braceright.big
+ /integral.big
+ /summation.big
+ /radical.big
+ /radical.bigg
+ /radical.Bigg
+ /radical.BIGG
+ /radical.end
+ /radical.extender % 0x10
+ /radical.alt
+ /integral.alt
+ /summation.alt
+ /parenleft.bigg
+ /parenright.bigg
+ /slash.bigg
+ /bracketleft.bigg
+ /backslash.bigg
+ /bracketright.bigg
+ /braceleft.bigg
+ /bar.bigg
+ /braceright.bigg
+ /radical.begin
+ /.notdef
+ /.notdef
+ /space % 0x20
+ /exclam
+ /quotedbl
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /quotesingle
+ /parenleft
+ /parenright
+ /asterisk
+ /plus
+ /comma
+ /hyphen
+ /period
+ /slash
+ /zero % 0x30
+ /one
+ /two
+ /three
+ /four
+ /five
+ /six
+ /seven
+ /eight
+ /nine
+ /colon
+ /semicolon
+ /less
+ /equal
+ /greater
+ /question
+ /at % 0x40
+ /A
+ /B
+ /C
+ /D
+ /E
+ /F
+ /G
+ /H
+ /I
+ /J
+ /K
+ /L
+ /M
+ /N
+ /O
+ /P % 0x50
+ /Q
+ /R
+ /S
+ /T
+ /U
+ /V
+ /W
+ /X
+ /Y
+ /Z
+ /bracketleft
+ /backslash
+ /bracketright
+ /asciicircum
+ /underscore
+ /grave % 0x60
+ /a
+ /b
+ /c
+ /d
+ /e
+ /f
+ /g
+ /h
+ /i
+ /j
+ /k
+ /l
+ /m
+ /n
+ /o
+ /p % 0x70
+ /q
+ /r
+ /s
+ /t
+ /u
+ /v
+ /w
+ /x
+ /y
+ /z
+ /braceleft
+ /bar
+ /braceright
+ /asciitilde
+ /quotedblright
+ /quoteright % 0x80
+ /quoteleft
+ /breve
+ /quotedblleft
+ /quotesinglbase
+ /quotedblbase
+ /second
+ /radical
+ /circumflex
+ /tilde
+ /dotlessi
+ /dotlessj
+ /plus.alt
+ /minus.alt
+ /zero.alt
+ /one.alt
+ /two.alt % 0x90
+ /three.alt
+ /four.alt
+ /five.alt
+ /six.alt
+ /seven.alt
+ /eight.alt
+ /nine.alt
+ /endash
+ /emdash
+ /dotaccent
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xa0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /dieresis
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xb0
+ /.notdef
+ /.notdef
+ /.notdef
+ /acute
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xc0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xd0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /multiply
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xe0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef % 0xf0
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+] def
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fonts/enc/pdftex/context/koeielogos.enc b/fonts/enc/pdftex/context/koeielogos.enc
new file mode 100644
index 000000000..97a8f78da
--- /dev/null
+++ b/fonts/enc/pdftex/context/koeielogos.enc
@@ -0,0 +1,258 @@
+/koeielogosEnc [
+ /P_r_a_g_m_a_A_d_e % 0x00
+ /p_r_a_g_m_a_a_d_e
+ /c_o_n_t_e_x_t
+ /contextlogo
+ /contextlogo.shadow
+ /contextlogo.contour
+ /contextlogo.skeleton
+ /contextlogo.dots
+ /M_P
+ /mplogo
+ /T_e_X
+ /texlogo
+ /boo
+ /cow
+ /examplelogo
+ /foxetlogo
+ /m_e_t_a_f_u_n % 0x10
+ /metafunlogo
+ /texlogo.alt
+ /wikilogo
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+ /.notdef
+] def
diff --git a/fonts/map/pdftex/context/koeieletters.map b/fonts/map/pdftex/context/koeieletters.map
new file mode 100644
index 000000000..c3e177c17
--- /dev/null
+++ b/fonts/map/pdftex/context/koeieletters.map
@@ -0,0 +1,8 @@
+koeieletters koeieletters " koeielettersEnc ReEncodeFont " <koeieletters.enc <koeieletters.pfb
+koeieletters-contour koeieletters-contour " koeielettersEnc ReEncodeFont " <koeieletters.enc <koeieletters-contour.pfb
+koeien-ex koeieletters " koeielettersEnc-ex ReEncodeFont " <koeieletters-ex.enc <koeieletters.pfb
+koeien-sy koeieletters " koeielettersEnc-sy ReEncodeFont " <koeieletters-sy.enc <koeieletters.pfb
+koeien-mi koeieletters " koeielettersEnc-mi ReEncodeFont " <koeieletters-mi.enc <koeieletters.pfb
+koeielogos koeielogos " koeielogosEnc ReEncodeFont " <koeielogos.enc <koeielogos.pfb
+koeielogos-contour koeielogos-contour " koeielogosEnc ReEncodeFont " <koeielogos.enc <koeielogos-contour.pfb
+
diff --git a/fonts/tfm/hoekwater/koeieletters/koeielett-contour.tfm b/fonts/tfm/hoekwater/koeieletters/koeielett-contour.tfm
new file mode 100644
index 000000000..ba491f0ac
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeielett-contour.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeielett.tfm b/fonts/tfm/hoekwater/koeieletters/koeielett.tfm
new file mode 100644
index 000000000..ba491f0ac
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeielett.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeieletter-ex.tfm b/fonts/tfm/hoekwater/koeieletters/koeieletter-ex.tfm
new file mode 100644
index 000000000..0c535244d
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeieletter-ex.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeieletter-mi.tfm b/fonts/tfm/hoekwater/koeieletters/koeieletter-mi.tfm
new file mode 100644
index 000000000..8cb8a9612
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeieletter-mi.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeieletter-sy.tfm b/fonts/tfm/hoekwater/koeieletters/koeieletter-sy.tfm
new file mode 100644
index 000000000..592f6234b
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeieletter-sy.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeieletter-syx.tfm b/fonts/tfm/hoekwater/koeieletters/koeieletter-syx.tfm
new file mode 100644
index 000000000..ecf1e3c66
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeieletter-syx.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeieletters-contour.tfm b/fonts/tfm/hoekwater/koeieletters/koeieletters-contour.tfm
new file mode 100644
index 000000000..d99fa8e9a
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeieletters-contour.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeieletters.tfm b/fonts/tfm/hoekwater/koeieletters/koeieletters.tfm
new file mode 100644
index 000000000..018ff0047
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeieletters.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeielettx.tfm b/fonts/tfm/hoekwater/koeieletters/koeielettx.tfm
new file mode 100644
index 000000000..d10af0f4b
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeielettx.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeielogos-contour.tfm b/fonts/tfm/hoekwater/koeieletters/koeielogos-contour.tfm
new file mode 100644
index 000000000..99d6ebab6
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeielogos-contour.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeielogos.tfm b/fonts/tfm/hoekwater/koeieletters/koeielogos.tfm
new file mode 100644
index 000000000..bfeb20d9d
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeielogos.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeien-ex.tfm b/fonts/tfm/hoekwater/koeieletters/koeien-ex.tfm
new file mode 100644
index 000000000..845dc9463
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeien-ex.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeien-mi.tfm b/fonts/tfm/hoekwater/koeieletters/koeien-mi.tfm
new file mode 100644
index 000000000..5f8264923
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeien-mi.tfm
Binary files differ
diff --git a/fonts/tfm/hoekwater/koeieletters/koeien-sy.tfm b/fonts/tfm/hoekwater/koeieletters/koeien-sy.tfm
new file mode 100644
index 000000000..e2fe46518
--- /dev/null
+++ b/fonts/tfm/hoekwater/koeieletters/koeien-sy.tfm
Binary files differ
diff --git a/fonts/type1/hoekwater/koeieletters/koeieletters-contour.pfb b/fonts/type1/hoekwater/koeieletters/koeieletters-contour.pfb
new file mode 100644
index 000000000..6f151ba7f
--- /dev/null
+++ b/fonts/type1/hoekwater/koeieletters/koeieletters-contour.pfb
Binary files differ
diff --git a/fonts/type1/hoekwater/koeieletters/koeieletters.pfb b/fonts/type1/hoekwater/koeieletters/koeieletters.pfb
new file mode 100644
index 000000000..98e56c84d
--- /dev/null
+++ b/fonts/type1/hoekwater/koeieletters/koeieletters.pfb
Binary files differ
diff --git a/fonts/type1/hoekwater/koeieletters/koeielogos-contour.pfb b/fonts/type1/hoekwater/koeieletters/koeielogos-contour.pfb
new file mode 100644
index 000000000..9b8d062ce
--- /dev/null
+++ b/fonts/type1/hoekwater/koeieletters/koeielogos-contour.pfb
Binary files differ
diff --git a/fonts/type1/hoekwater/koeieletters/koeielogos.pfb b/fonts/type1/hoekwater/koeieletters/koeielogos.pfb
new file mode 100644
index 000000000..3a1a1ecca
--- /dev/null
+++ b/fonts/type1/hoekwater/koeieletters/koeielogos.pfb
Binary files differ
diff --git a/fonts/vf/hoekwater/koeieletters/koeielett-contour.vf b/fonts/vf/hoekwater/koeieletters/koeielett-contour.vf
new file mode 100644
index 000000000..954e83522
--- /dev/null
+++ b/fonts/vf/hoekwater/koeieletters/koeielett-contour.vf
Binary files differ
diff --git a/fonts/vf/hoekwater/koeieletters/koeielett.vf b/fonts/vf/hoekwater/koeieletters/koeielett.vf
new file mode 100644
index 000000000..674fc9e01
--- /dev/null
+++ b/fonts/vf/hoekwater/koeieletters/koeielett.vf
Binary files differ
diff --git a/fonts/vf/hoekwater/koeieletters/koeieletter-ex.vf b/fonts/vf/hoekwater/koeieletters/koeieletter-ex.vf
new file mode 100644
index 000000000..5a4b720b6
--- /dev/null
+++ b/fonts/vf/hoekwater/koeieletters/koeieletter-ex.vf
Binary files differ
diff --git a/fonts/vf/hoekwater/koeieletters/koeieletter-mi.vf b/fonts/vf/hoekwater/koeieletters/koeieletter-mi.vf
new file mode 100644
index 000000000..424b5909a
--- /dev/null
+++ b/fonts/vf/hoekwater/koeieletters/koeieletter-mi.vf
Binary files differ
diff --git a/fonts/vf/hoekwater/koeieletters/koeieletter-sy.vf b/fonts/vf/hoekwater/koeieletters/koeieletter-sy.vf
new file mode 100644
index 000000000..6d30936d8
--- /dev/null
+++ b/fonts/vf/hoekwater/koeieletters/koeieletter-sy.vf
Binary files differ
diff --git a/fonts/vf/hoekwater/koeieletters/koeieletter-syx.vf b/fonts/vf/hoekwater/koeieletters/koeieletter-syx.vf
new file mode 100644
index 000000000..68a4df0da
--- /dev/null
+++ b/fonts/vf/hoekwater/koeieletters/koeieletter-syx.vf
Binary files differ
diff --git a/fonts/vf/hoekwater/koeieletters/koeielettx.vf b/fonts/vf/hoekwater/koeieletters/koeielettx.vf
new file mode 100644
index 000000000..3cc327790
--- /dev/null
+++ b/fonts/vf/hoekwater/koeieletters/koeielettx.vf
Binary files differ
diff --git a/metapost/context/base/metafun.mp b/metapost/context/base/metafun.mp
index 5071013c5..cfbf7b2f9 100644
--- a/metapost/context/base/metafun.mp
+++ b/metapost/context/base/metafun.mp
@@ -23,10 +23,15 @@
%D that we use (unless overloaded) the settings of \type
%D {mpost}.
+%D First we input John Hobby's metapost plain file. However,
+%D because we want to prevent dependency problems and in the
+%D end even may use a patched version, we prefer to use a
+%D copy,
+
if unknown ahangle :
- input plain.mp ; % John Hobby's file
+ input mp-base.mp ; % input plain.mp ;
else :
- let dump = relax ;
+ let dump = relax ;
fi ;
input mp-tool.mp ;
@@ -34,6 +39,7 @@ input mp-spec.mp ;
input mp-core.mp ;
input mp-page.mp ;
input mp-text.mp ;
+input mp-txts.mp ;
input mp-shap.mp ;
input mp-butt.mp ;
input mp-char.mp ;
diff --git a/metapost/context/base/mp-base.mp b/metapost/context/base/mp-base.mp
new file mode 100644
index 000000000..87f3fd2f7
--- /dev/null
+++ b/metapost/context/base/mp-base.mp
@@ -0,0 +1,556 @@
+% This is (currently) a copy of the plain.mp file. We use a copy
+% because (1) we want to make sure that there are no unresolved
+% dependencies, and (2) we may patch this file eventually.
+
+% This file gives the macros for plain MetaPost
+% It contains all the features of plain METAFONT except those specific to
+% font-making. (See The METAFONTbook by D.E. Knuth).
+% There are also a number of macros for labeling figures, etc.
+string base_name, base_version; base_name="plain"; base_version="0.63";
+
+message "Preloading the plain mem file, version "&base_version;
+
+delimiters (); % this makes parentheses behave like parentheses
+def upto = step 1 until enddef; % syntactic sugar
+def downto = step -1 until enddef;
+def exitunless expr c = exitif not c enddef;
+let relax = \; % ignore the word `relax', as in TeX
+let \\ = \; % double relaxation is like single
+def ]] = ] ] enddef; % right brackets should be loners
+def -- = {curl 1}..{curl 1} enddef;
+def --- = .. tension infinity .. enddef;
+def ... = .. tension atleast 1 .. enddef;
+
+def gobble primary g = enddef;
+primarydef g gobbled gg = enddef;
+def hide(text t) = exitif numeric begingroup t;endgroup; enddef;
+def ??? = hide(interim showstopping:=1; showdependencies) enddef;
+def stop expr s = message s; gobble readstring enddef;
+
+warningcheck:=1;
+tracinglostchars:=1;
+
+def interact = % sets up to make "show" commands stop
+ hide(showstopping:=1; tracingonline:=1) enddef;
+
+def loggingall = % puts tracing info into the log
+ tracingcommands:=3; tracingtitles:=1; tracingequations:=1;
+ tracingcapsules:=1; tracingspecs:=2; tracingchoices:=1; tracinglostchars:=1;
+ tracingstats:=1; tracingoutput:=1; tracingmacros:=1; tracingrestores:=1;
+ enddef;
+
+def tracingall = % turns on every form of tracing
+ tracingonline:=1; showstopping:=1; loggingall enddef;
+
+def tracingnone = % turns off every form of tracing
+ tracingcommands:=0; tracingtitles:=0; tracingequations:=0;
+ tracingcapsules:=0; tracingspecs:=0; tracingchoices:=0; tracinglostchars:=0;
+ tracingstats:=0; tracingoutput:=0; tracingmacros:=0; tracingrestores:=0;
+ enddef;
+
+
+
+%% dash patterns
+
+vardef dashpattern(text t) =
+ save on, off, w;
+ let on=_on_;
+ let off=_off_;
+ w = 0;
+ nullpicture t
+enddef;
+
+tertiarydef p _on_ d =
+ begingroup save pic;
+ picture pic; pic=p;
+ addto pic doublepath (w,w)..(w+d,w);
+ w := w+d;
+ pic shifted (0,d)
+ endgroup
+enddef;
+
+tertiarydef p _off_ d =
+ begingroup w:=w+d;
+ p shifted (0,d)
+ endgroup
+enddef;
+
+
+
+%% basic constants and mathematical macros
+
+% numeric constants
+newinternal eps,epsilon,infinity,_;
+eps := .00049; % this is a pretty small positive number
+epsilon := 1/256/256; % but this is the smallest
+infinity := 4095.99998; % and this is the largest
+_ := -1; % internal constant to make macros unreadable but shorter
+
+newinternal mitered, rounded, beveled, butt, squared;
+mitered:=0; rounded:=1; beveled:=2; % linejoin types
+butt:=0; rounded:=1; squared:=2; % linecap types
+
+
+% pair constants
+pair right,left,up,down,origin;
+origin=(0,0); up=-down=(0,1); right=-left=(1,0);
+
+% path constants
+path quartercircle,halfcircle,fullcircle,unitsquare;
+fullcircle = makepath pencircle;
+halfcircle = subpath (0,4) of fullcircle;
+quartercircle = subpath (0,2) of fullcircle;
+unitsquare=(0,0)--(1,0)--(1,1)--(0,1)--cycle;
+
+% transform constants
+transform identity;
+for z=origin,right,up: z transformed identity = z; endfor
+
+% color constants
+color black, white, red, green, blue, background;
+black = (0,0,0);
+white = (1,1,1);
+red = (1,0,0);
+green = (0,1,0);
+blue = (0,0,1);
+background = white; % The user can reset this
+
+% picture constants
+picture blankpicture,evenly,withdots;
+blankpicture=nullpicture; % `display blankpicture...'
+evenly=dashpattern(on 3 off 3); % `dashed evenly'
+withdots=dashpattern(off 2.5 on 0 off 2.5); % `dashed withdots'
+
+% string constants
+string ditto, EOF;
+ditto = char 34; % ASCII double-quote mark
+EOF = char 0; % end-of-file for readfrom and write..to
+
+% pen constants
+pen pensquare,penrazor,penspeck;
+pensquare = makepen(unitsquare shifted -(.5,.5));
+penrazor = makepen((-.5,0)--(.5,0)--cycle);
+penspeck=pensquare scaled eps;
+
+% nullary operators
+vardef whatever = save ?; ? enddef;
+
+% unary operators
+let abs = length;
+
+vardef round primary u =
+ if numeric u: floor(u+.5)
+ elseif pair u: (round xpart u, round ypart u)
+ else: u fi enddef;
+
+vardef ceiling primary x = -floor(-x) enddef;
+
+vardef byte primary s =
+ if string s: ASCII fi s enddef;
+
+vardef dir primary d = right rotated d enddef;
+
+vardef unitvector primary z = z/abs z enddef;
+
+vardef inverse primary T =
+ transform T_; T_ transformed T = identity; T_ enddef;
+
+vardef counterclockwise primary c =
+ if turningnumber c <= 0: reverse fi c enddef;
+
+vardef tensepath expr r =
+ for k=0 upto length r - 1: point k of r --- endfor
+ if cycle r: cycle else: point infinity of r fi enddef;
+
+vardef center primary p = .5[llcorner p, urcorner p] enddef;
+
+
+
+% binary operators
+
+primarydef x mod y = (x-y*floor(x/y)) enddef;
+primarydef x div y = floor(x/y) enddef;
+primarydef w dotprod z = (xpart w * xpart z + ypart w * ypart z) enddef;
+
+primarydef x**y = if y=2: x*x else: takepower y of x fi enddef;
+def takepower expr y of x =
+ if x>0: mexp(y*mlog x)
+ elseif (x=0) and (y>0): 0
+ else: 1
+ if y=floor y:
+ if y>=0: for n=1 upto y: *x endfor
+ else: for n=_ downto y: /x endfor
+ fi
+ else: hide(errmessage "Undefined power: " & decimal x&"**"&decimal y)
+ fi fi enddef;
+
+vardef direction expr t of p =
+ postcontrol t of p - precontrol t of p enddef;
+
+vardef directionpoint expr z of p =
+ a_:=directiontime z of p;
+ if a_<0: errmessage("The direction doesn't occur"); fi
+ point a_ of p enddef;
+
+secondarydef p intersectionpoint q =
+ begingroup save x_,y_; (x_,y_)=p intersectiontimes q;
+ if x_<0: errmessage("The paths don't intersect"); origin
+ else: .5[point x_ of p, point y_ of q] fi endgroup
+enddef;
+
+tertiarydef p softjoin q =
+ begingroup c_:=fullcircle scaled 2join_radius shifted point 0 of q;
+ a_:=ypart(c_ intersectiontimes p); b_:=ypart(c_ intersectiontimes q);
+ if a_<0:point 0 of p{direction 0 of p} else: subpath(0,a_) of p fi
+ ... if b_<0:{direction infinity of q}point infinity of q
+ else: subpath(b_,infinity) of q fi endgroup enddef;
+newinternal join_radius,a_,b_; path c_;
+
+
+path cuttings; % what got cut off
+
+tertiarydef a cutbefore b = % tries to cut as little as possible
+ begingroup save t;
+ (t, whatever) = a intersectiontimes b;
+ if t<0:
+ cuttings:=point 0 of a;
+ a
+ else: cuttings:= subpath (0,t) of a;
+ subpath (t,length a) of a
+ fi
+ endgroup
+enddef;
+
+tertiarydef a cutafter b =
+ reverse (reverse a cutbefore b)
+ hide(cuttings:=reverse cuttings)
+enddef;
+
+
+
+% special operators
+vardef incr suffix $ = $:=$+1; $ enddef;
+vardef decr suffix $ = $:=$-1; $ enddef;
+
+def reflectedabout(expr w,z) = % reflects about the line w..z
+ transformed
+ begingroup transform T_;
+ w transformed T_ = w; z transformed T_ = z;
+ xxpart T_ = -yypart T_; xypart T_ = yxpart T_; % T_ is a reflection
+ T_ endgroup enddef;
+
+def rotatedaround(expr z, d) = % rotates d degrees around z
+ shifted -z rotated d shifted z enddef;
+let rotatedabout = rotatedaround; % for roundabout people
+
+vardef min(expr u)(text t) = % t is a list of numerics, pairs, or strings
+ save u_; setu_ u; for uu = t: if uu<u_: u_:=uu; fi endfor
+ u_ enddef;
+
+vardef max(expr u)(text t) = % t is a list of numerics, pairs, or strings
+ save u_; setu_ u; for uu = t: if uu>u_: u_:=uu; fi endfor
+ u_ enddef;
+
+def setu_ primary u =
+ if pair u: pair u_ elseif string u: string u_ fi;
+ u_=u enddef;
+
+def flex(text t) = % t is a list of pairs
+ hide(n_:=0; for z=t: z_[incr n_]:=z; endfor
+ dz_:=z_[n_]-z_1)
+ z_1 for k=2 upto n_-1: ...z_[k]{dz_} endfor ...z_[n_] enddef;
+newinternal n_; pair z_[],dz_;
+
+def superellipse(expr r,t,l,b,s)=
+ r{up}...(s[xpart t,xpart r],s[ypart r,ypart t]){t-r}...
+ t{left}...(s[xpart t,xpart l],s[ypart l,ypart t]){l-t}...
+ l{down}...(s[xpart b,xpart l],s[ypart l,ypart b]){b-l}...
+ b{right}...(s[xpart b,xpart r],s[ypart r,ypart b]){r-b}...cycle enddef;
+
+vardef interpath(expr a,p,q) =
+ for t=0 upto length p-1: a[point t of p, point t of q]
+ ..controls a[postcontrol t of p, postcontrol t of q]
+ and a[precontrol t+1 of p, precontrol t+1 of q] .. endfor
+ if cycle p: cycle
+ else: a[point infinity of p, point infinity of q] fi enddef;
+
+vardef solve@#(expr true_x,false_x)= % @#(true_x)=true, @#(false_x)=false
+ tx_:=true_x; fx_:=false_x;
+ forever: x_:=.5[tx_,fx_]; exitif abs(tx_-fx_)<=tolerance;
+ if @#(x_): tx_ else: fx_ fi :=x_; endfor
+ x_ enddef; % now x_ is near where @# changes from true to false
+newinternal tolerance, tx_,fx_,x_; tolerance:=.01;
+
+vardef buildcycle(text ll) =
+ save ta_, tb_, k_, i_, pp_; path pp_[];
+ k_=0;
+ for q=ll: pp_[incr k_]=q; endfor
+ i_=k_;
+ for i=1 upto k_:
+ (ta_[i], length pp_[i_]-tb_[i_]) =
+ pp_[i] intersectiontimes reverse pp_[i_];
+ if ta_[i]<0:
+ errmessage("Paths "& decimal i &" and "& decimal i_ &" don't intersect");
+ fi
+ i_ := i;
+ endfor
+ for i=1 upto k_: subpath (ta_[i],tb_[i]) of pp_[i] .. endfor
+ cycle
+enddef;
+
+
+
+%% units of measure
+
+mm=2.83464; pt=0.99626; dd=1.06601; bp:=1;
+cm=28.34645; pc=11.95517; cc=12.79213; in:=72;
+
+vardef magstep primary m = mexp(46.67432m) enddef;
+
+
+
+%% macros for drawing and filling
+
+def drawoptions(text t) =
+ def _op_ = t enddef
+enddef;
+
+linejoin:=rounded; % parameters that effect drawing
+linecap:=rounded;
+miterlimit:=10;
+
+drawoptions();
+
+pen currentpen;
+picture currentpicture;
+
+def fill expr c = addto currentpicture contour c _op_ enddef;
+def draw expr p =
+ addto currentpicture
+ if picture p:
+ also p
+ else:
+ doublepath p withpen currentpen
+ fi
+ _op_
+enddef;
+def filldraw expr c =
+ addto currentpicture contour c withpen currentpen
+ _op_ enddef;
+def drawdot expr z =
+ addto currentpicture contour makepath currentpen shifted z
+ _op_ enddef;
+
+def unfill expr c = fill c withcolor background enddef;
+def undraw expr p = draw p withcolor background enddef;
+def unfilldraw expr c = filldraw c withcolor background enddef;
+def undrawdot expr z = drawdot z withcolor background enddef;
+def erase text t =
+ def _e_ = withcolor background hide(def _e_=enddef;) enddef;
+ t _e_
+enddef;
+def _e_= enddef;
+
+def cutdraw text t =
+ begingroup interim linecap:=butt; draw t _e_; endgroup enddef;
+
+vardef image(text t) =
+ save currentpicture;
+ picture currentpicture;
+ currentpicture := nullpicture;
+ t;
+ currentpicture
+enddef;
+
+def pickup secondary q =
+ if numeric q: numeric_pickup_ else: pen_pickup_ fi q enddef;
+def numeric_pickup_ primary q =
+ if unknown pen_[q]: errmessage "Unknown pen"; clearpen
+ else: currentpen:=pen_[q];
+ pen_lft:=pen_lft_[q];
+ pen_rt:=pen_rt_[q];
+ pen_top:=pen_top_[q];
+ pen_bot:=pen_bot_[q];
+ currentpen_path:=pen_path_[q] fi; enddef;
+def pen_pickup_ primary q =
+ currentpen:=q;
+ pen_lft:=xpart penoffset down of currentpen;
+ pen_rt:=xpart penoffset up of currentpen;
+ pen_top:=ypart penoffset left of currentpen;
+ pen_bot:=ypart penoffset right of currentpen;
+ path currentpen_path; enddef;
+newinternal pen_lft,pen_rt,pen_top,pen_bot,pen_count_;
+
+vardef savepen = pen_[incr pen_count_]=currentpen;
+ pen_lft_[pen_count_]=pen_lft;
+ pen_rt_[pen_count_]=pen_rt;
+ pen_top_[pen_count_]=pen_top;
+ pen_bot_[pen_count_]=pen_bot;
+ pen_path_[pen_count_]=currentpen_path;
+ pen_count_ enddef;
+
+def clearpen = currentpen:=nullpen;
+ pen_lft:=pen_rt:=pen_top:=pen_bot:=0;
+ path currentpen_path;
+ enddef;
+def clear_pen_memory =
+ pen_count_:=0;
+ numeric pen_lft_[],pen_rt_[],pen_top_[],pen_bot_[];
+ pen currentpen,pen_[];
+ path currentpen_path, pen_path_[];
+ enddef;
+
+vardef lft primary x = x + if pair x: (pen_lft,0) else: pen_lft fi enddef;
+vardef rt primary x = x + if pair x: (pen_rt,0) else: pen_rt fi enddef;
+vardef top primary y = y + if pair y: (0,pen_top) else: pen_top fi enddef;
+vardef bot primary y = y + if pair y: (0,pen_bot) else: pen_bot fi enddef;
+
+vardef penpos@#(expr b,d) =
+ (x@#r-x@#l,y@#r-y@#l)=(b,0) rotated d;
+ x@#=.5(x@#l+x@#r); y@#=.5(y@#l+y@#r) enddef;
+
+def penstroke text t =
+ forsuffixes e = l,r: path_.e:=t; endfor
+ fill path_.l -- reverse path_.r -- cycle enddef;
+path path_.l,path_.r;
+
+
+
+%% High level drawing commands
+
+newinternal ahlength, ahangle;
+ahlength := 4; % default arrowhead length 4bp
+ahangle := 45; % default head angle 45 degrees
+
+vardef arrowhead expr p =
+ save q,e; path q; pair e;
+ e = point length p of p;
+ q = gobble(p shifted -e cutafter makepath(pencircle scaled 2ahlength))
+ cuttings;
+ (q rotated .5ahangle & reverse q rotated -.5ahangle -- cycle) shifted e
+enddef;
+
+path _apth;
+def drawarrow expr p = _apth:=p; _finarr enddef;
+def drawdblarrow expr p = _apth:=p; _findarr enddef;
+
+def _finarr text t =
+ draw _apth t;
+ filldraw arrowhead _apth t
+enddef;
+
+def _findarr text t =
+ draw _apth t;
+ fill arrowhead _apth withpen currentpen t;
+ fill arrowhead reverse _apth withpen currentpen t
+enddef;
+
+
+
+%% macros for labels
+
+newinternal bboxmargin; bboxmargin:=2bp;
+
+vardef bbox primary p =
+ llcorner p-(bboxmargin,bboxmargin) -- lrcorner p+(bboxmargin,-bboxmargin)
+ -- urcorner p+(bboxmargin,bboxmargin) -- ulcorner p+(-bboxmargin,bboxmargin)
+ -- cycle
+enddef;
+
+string defaultfont;
+newinternal defaultscale, labeloffset;
+defaultfont = "cmr10";
+defaultscale := 1;
+labeloffset := 3bp;
+
+vardef thelabel@#(expr s,z) = % Position s near z
+ save p; picture p;
+ if picture s: p=s
+ else: p = s infont defaultfont scaled defaultscale
+ fi;
+ p shifted (z + labeloffset*laboff@# -
+ (labxf@#*lrcorner p + labyf@#*ulcorner p
+ + (1-labxf@#-labyf@#)*llcorner p
+ )
+ )
+enddef;
+
+def label = draw thelabel enddef;
+newinternal dotlabeldiam; dotlabeldiam:=3bp;
+vardef dotlabel@#(expr s,z) =
+ label@#(s,z);
+ interim linecap:=rounded;
+ draw z withpen pencircle scaled dotlabeldiam;
+enddef;
+def makelabel = dotlabel enddef;
+
+pair laboff, laboff.lft, laboff.rt, laboff.top, laboff.bot;
+pair laboff.ulft, laboff.llft, laboff.urt, laboff.lrt;
+laboff =(0,0); labxf =.5; labyf =.5;
+laboff.lft=(-1,0); labxf.lft=1; labyf.lft=.5;
+laboff.rt =(1,0); labxf.rt =0; labyf.rt =.5;
+laboff.bot=(0,-1); labxf.bot=.5; labyf.bot=1;
+laboff.top=(0,1); labxf.top=.5; labyf.top=0;
+laboff.ulft=(-.7,.7);labxf.ulft=1; labyf.ulft=0;
+laboff.urt=(.7,.7); labxf.urt=0; labyf.urt=0;
+laboff.llft=-(.7,.7);labxf.llft=1; labyf.llft=1;
+laboff.lrt=(.7,-.7); labxf.lrt=0; labyf.lrt=1;
+
+vardef labels@#(text t) =
+ forsuffixes $=t:
+ label@#(str$,z$); endfor
+ enddef;
+vardef dotlabels@#(text t) =
+ forsuffixes $=t:
+ dotlabel@#(str$,z$); endfor
+ enddef;
+vardef penlabels@#(text t) =
+ forsuffixes $$=l,,r: forsuffixes $=t:
+ makelabel@#(str$.$$,z$.$$); endfor endfor
+ enddef;
+
+
+def range expr x = numtok[x] enddef;
+def numtok suffix x=x enddef;
+tertiarydef m thru n =
+ m for x=m+1 step 1 until n: , numtok[x] endfor enddef;
+
+
+
+%% Overall adminstration
+
+string extra_beginfig, extra_endfig;
+extra_beginfig = extra_endfig = "";
+
+def beginfig(expr c) =
+ begingroup
+ charcode:=c;
+ clearxy; clearit; clearpen;
+ pickup defaultpen;
+ drawoptions();
+ scantokens extra_beginfig;
+enddef;
+
+def endfig =
+ scantokens extra_endfig;
+ shipit;
+ endgroup
+enddef;
+
+
+%% last-minute items
+
+vardef z@#=(x@#,y@#) enddef;
+
+def clearxy = save x,y enddef;
+def clearit = currentpicture:=nullpicture enddef;
+def shipit = shipout currentpicture enddef;
+
+let bye = end; outer end,bye;
+
+clear_pen_memory; % initialize the `savepen' mechanism
+clearit;
+
+newinternal defaultpen;
+pickup pencircle scaled .5bp; % set default line width
+defaultpen := savepen;
diff --git a/metapost/context/base/mp-txts.mp b/metapost/context/base/mp-txts.mp
new file mode 100644
index 000000000..f208c7149
--- /dev/null
+++ b/metapost/context/base/mp-txts.mp
@@ -0,0 +1,67 @@
+%D \module
+%D [ file=mp-txts.mp,
+%D version=2006.06.08,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=more text support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=PRAGMA]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C details.
+
+if unknown context_tool : input mp-tool ; fi ;
+if known context_txts : endinput ; fi ;
+
+boolean context_txts ; context_txts := true ;
+
+%D The real code:
+
+string txtfile ; txtfile := "" ;
+string txtfont ; txtfont := defaultfont ;
+string txtpref ; txtpref := "00001::::" ;
+numeric txtnext ; txtnext := 0 ;
+numeric txtdepth ; txtdepth := 0 ;
+
+vardef nexttxt =
+ txtnext := txtnext + 1 ;
+ txtnext
+enddef ;
+
+picture savedtxts[] ;
+numeric depthtxts[] ;
+
+vardef zerofilled(expr fd) =
+ if fd<10: "0000" else :
+ if fd<100: "000" else :
+ if fd<1000: "00" else :
+ if fd<10000: "0" else :
+ fi fi fi fi & decimal fd
+enddef;
+
+vardef savetxt(expr n,w,h,d) text t =
+ depthtxts[n] := d ;
+ savedtxts[n] := ((txtpref & zerofilled(n)) infont txtfont) xysized(w,h+d) t
+enddef ;
+
+vardef sometxt(expr n) =
+ if known savedtxts[n] :
+ txtdepth := depthtxts[n] ; savedtxts[n]
+ else :
+ txtdepth := 0 ; nullpicture
+ fi
+enddef ;
+
+def loadtxts =
+ if txtfile <> "" :
+ readfile(txtfile) ;
+ fi ;
+enddef ;
+
+def StartTexts =
+ loadtxts ;
+enddef ;
+
+def StopTexts =
+enddef ;
diff --git a/scripts/context/perl/texexec.pl b/scripts/context/perl/texexec.pl
index 21595aa7b..fb564bbd5 100644
--- a/scripts/context/perl/texexec.pl
+++ b/scripts/context/perl/texexec.pl
@@ -937,7 +937,7 @@ SetInterfaces( "en", "english", "english" );
SetInterfaces( "de", "german", "german" );
SetInterfaces( "fr", "french", "french" );
SetInterfaces( "cz", "czech", "czech" );
-SetInterfaces( "uk", "brittish", "english" );
+SetInterfaces( "uk", "british", "english" );
SetInterfaces( "it", "italian", "italian" );
SetInterfaces( "no", "norwegian", "norwegian" );
SetInterfaces( "ro", "romanian", "romanian" );
@@ -3151,7 +3151,7 @@ interface user interface
=de German
=fr French
=cz Czech
-=uk Brittish
+=uk British
=it Italian
-----------
language main hyphenation language
@@ -3178,7 +3178,7 @@ module typeset tex/pl/mp module
-----------
mptex run an MetaPost plus btex-etex cycle
-----------
-mpxtex generatet an MetaPostmpx file
+mpxtex generate an MetaPost mpx file
-----------
noarrange process but ignore arrange
-----------
@@ -3191,8 +3191,8 @@ automprun MetaPost at runtime when needed
once run TeX only once (no TeXUtil either)
-----------
output specials to use
-=pdftex Han The Than's pdf backend
-=dvips Thomas Rokicky's dvi to ps converter
+=pdftex Han The Thanh's pdf backend
+=dvips Tomas Rokicky's dvi to ps converter
=dvipsone YandY's dvi to ps converter
=dviwindo YandY's windows previewer
=dvipdfm Mark Wicks' dvi to pdf converter
@@ -3285,7 +3285,7 @@ verbose shows some additional info
-----------
help show this or more, e.g. '--help interface'
-----------
-alone bypass utilities (e.g. fmtutil for non-standard fmt's)
+alone bypass utilities (e.g. fmtutil for non-standard fmts)
-----------
texutil force TeXUtil run
-----------
diff --git a/scripts/context/ruby/base/mp.rb b/scripts/context/ruby/base/mp.rb
index 17e9eca76..d26882456 100644
--- a/scripts/context/ruby/base/mp.rb
+++ b/scripts/context/ruby/base/mp.rb
@@ -87,7 +87,7 @@ EOT
f.puts("")
f.puts(@@start[method])
end
- data.gsub!(/%.*?$/mo) do
+ data.gsub!(/[^\\]%.*?$/mo) do
''
end
data.scan(/(verbatim|b)tex\s*(.*?)\s*etex/mo) do
diff --git a/scripts/context/ruby/base/system.rb b/scripts/context/ruby/base/system.rb
index 4a8cba652..267a22cb9 100644
--- a/scripts/context/ruby/base/system.rb
+++ b/scripts/context/ruby/base/system.rb
@@ -33,6 +33,13 @@ module System
if @@mswindows then 'nul' else '/dev/null/' end
end
+ def System.unix?
+ not @@mswindows
+ end
+ def System.mswin?
+ @@mswindows
+ end
+
def System.binnames(str)
if @@binnames.key?(str) then
@@binnames[str]
diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb
index c09327725..29e0de44f 100644
--- a/scripts/context/ruby/base/tex.rb
+++ b/scripts/context/ruby/base/tex.rb
@@ -83,7 +83,27 @@ class TEX
@@texmethods = Hash.new
@@mpsmethods = Hash.new
- ['tex','pdftex','pdfetex','standard'] .each do |e| @@texengines[e] = 'pdfetex' end
+ @@pdftex = 'pdftex' # new default, pdfetex is gone
+
+ ENV['PATH'].split(File::PATH_SEPARATOR).each do |p|
+ if System.unix? then
+ pp, pe = "#{p}/pdftex" , "#{p}/pdfetex"
+ else
+ pp, pe = "#{p}/pdftex.exe", "#{p}/pdfetex.exe"
+ end
+ if FileTest.file?(pe) then
+ # we assume no update
+ @@pdftex = 'pdfetex'
+ break
+ elsif FileTest.file?(pp) then
+ # we assume an update
+ @@pdftex = 'pdftex'
+ break
+ end
+ end
+
+ ['etex','pdfetex','standard'] .each do |e| @@texengines[e] = @@pdftex end
+ ['tex','pdftex'] .each do |e| @@texengines[e] = 'pdftex' end
['aleph','omega'] .each do |e| @@texengines[e] = 'aleph' end
['xetex'] .each do |e| @@texengines[e] = 'xetex' end
['luatex'] .each do |e| @@texengines[e] = 'luatex' end
@@ -122,7 +142,8 @@ class TEX
['plain','mpost'] .each do |f| @@mpsformats[f] = 'plain' end
['metafun','context','standard'] .each do |f| @@mpsformats[f] = 'metafun' end
- ['pdfetex','aleph','omega','xetex','luatex'] .each do |p| @@prognames[p] = 'context' end
+ ['pdftex','pdfetex','aleph','omega',
+ 'xetex','luatex'] .each do |p| @@prognames[p] = 'context' end
['mpost'] .each do |p| @@prognames[p] = 'metafun' end
['plain','default','standard','mptopdf'] .each do |f| @@texmethods[f] = 'plain' end
@@ -140,15 +161,16 @@ class TEX
'cont-fr','cont-cz','cont-ro','cont-uk'] .each do |f| @@texprocstr[f] = "\\emergencyend" end
# @@runoptions['xetex'] = ['--output-driver \\\"-d 4 -V 5\\\"'] # we need the pos pass
- @@runoptions['xetex'] = ['--8bit --no-pdf'] # from now on we assume (x)dvipdfmx to be used
- @@runoptions['pdfetex'] = ['--8bit']
- @@runoptions['luatex'] = ['--8bit']
- @@runoptions['aleph'] = ['--8bit']
+ @@runoptions['xetex'] = ['--8bit -no-pdf'] # from now on we assume (x)dvipdfmx to be used
+ @@runoptions['pdfetex'] = ['--8bit ']
+ @@runoptions['pdftex'] = ['--8bit '] # pdftex is now pdfetex
+ @@runoptions['luatex'] = ['--8bit ']
+ @@runoptions['aleph'] = ['--8bit ']
@@booleanvars = [
'batchmode', 'nonstopmode', 'fast', 'fastdisabled', 'silentmode', 'final',
'paranoid', 'notparanoid', 'nobanner', 'once', 'allpatterns',
- 'nompmode', 'nomprun', 'automprun',
+ 'nompmode', 'nomprun', 'automprun', 'combine',
'nomapfiles', 'local',
'arrange', 'noarrange',
'forcexml', 'foxet',
@@ -244,6 +266,11 @@ class TEX
setvariable('texengine', 'standard')
setvariable('mpsengine', 'standard')
setvariable('backend', 'standard')
+ setvariable('error', '')
+ end
+
+ def error?
+ not getvariable('error').empty?
end
def runtime
@@ -344,11 +371,12 @@ class TEX
end
def prefixed(format,engine)
+ # format
case engine
- when /etex|eetex|pdfetex|pdfeetex|pdfxtex|xpdfetex|eomega|aleph|xetex|luatex/io then
- "*#{format}"
- else
- format
+ when /etex|pdftex|pdfetex|aleph|xetex|luatex/io then
+ "*#{format}"
+ else
+ format
end
end
@@ -608,7 +636,7 @@ class TEX
f.close
if FileTest.file?(tempfilename('tex')) then
format = File.basename(name)
- engine = if name =~ /(pdfetex|aleph|xetex)[\/\\]#{format}/ then $1 else '' end
+ engine = if name =~ /(pdftex|pdfetex|aleph|xetex|luatex)[\/\\]#{format}/ then $1 else '' end
if engine.empty? then
engineflag = ""
else
@@ -843,7 +871,7 @@ class TEX
if tmp = openedfile(File.suffixed(rawbase,'run')) then
tmp << "\\starttext\n"
if forcexml then
- tmp << checkxmlfile(rawname)
+ # tmp << checkxmlfile(rawname)
tmp << "\\processXMLfilegrouped{#{rawname}}\n"
else
tmp << "\\processfile{#{rawname}}\n"
@@ -856,8 +884,48 @@ class TEX
end
end
+ # def checkxmlfile(rawname)
+ # tmp = ''
+ # if FileTest.file?(rawname) && (xml = File.open(rawname)) then
+ # xml.each do |line|
+ # case line
+ # when /<\?context\-directive\s+(\S+)\s+(\S+)\s+(\S+)\s*(.*?)\s*\?>/o then
+ # category, key, value, rest = $1, $2, $3, $4
+ # case category
+ # when 'job' then
+ # case key
+ # when 'control' then
+ # setvariable(value,if rest.empty? then true else rest end)
+ # when 'mode', 'modes' then
+ # tmp << "\\enablemode[#{value}]\n"
+ # when 'stylefile', 'environment' then
+ # tmp << "\\environment #{value}\n"
+ # when 'module' then
+ # tmp << "\\usemodule[#{value}]\n"
+ # when 'interface' then
+ # contextinterface = value
+ # when 'ctxfile' then
+ # setvariable('ctxfile', value)
+ # report("using source driven ctxfile #{value}")
+ # end
+ # end
+ # when /<[a-z]+/io then # beware of order, first pi test
+ # break
+ # end
+ # end
+ # xml.close
+ # end
+ # return tmp
+ # end
+
+ def extendvariable(name,value)
+ set = getvariable(name).split(',')
+ set << value
+ str = set.uniq.join(',')
+ setvariable(name,str)
+ end
+
def checkxmlfile(rawname)
- tmp = ''
if FileTest.file?(rawname) && (xml = File.open(rawname)) then
xml.each do |line|
case line
@@ -868,12 +936,14 @@ class TEX
case key
when 'control' then
setvariable(value,if rest.empty? then true else rest end)
- when 'mode', 'modes' then
- tmp << "\\enablemode[#{value}]\n"
- when 'stylefile', 'environment' then
- tmp << "\\environment #{value}\n"
- when 'module' then
- tmp << "\\usemodule[#{value}]\n"
+ when /^(mode)(s|)$/ then
+ extendvariable('modes',value)
+ when /^(stylefile|environment)(s|)$/ then
+ extendvariable('environments',value)
+ when /^(use|)(module)(s|)$/ then
+ extendvariable('usemodules',value)
+ when /^(filter)(s|)$/ then
+ extendvariable('filters',value)
when 'interface' then
contextinterface = value
when 'ctxfile' then
@@ -887,7 +957,6 @@ class TEX
end
xml.close
end
- return tmp
end
end
@@ -935,6 +1004,87 @@ class TEX
reportruntime
end
+ def processmpgraphic
+ getarrayvariable('files').each do |filename|
+ setvariable('filename',filename)
+ report("processing graphic '#{filename}'")
+ runtexmp(filename)
+ begin
+ data = IO.read(File.suffixed(filename,'log'))
+ basename = filename.sub(/\.mp$/, '')
+ if data =~ /output files* written\:\s*(.*)$/mois then
+ files, number, range, list = $1.split(/\s+/), 0, false, []
+ files.each do |fname|
+ if fname =~ /^.*\.(\d+)$/ then
+ if range then
+ (number+1 .. $1.to_i).each do |i|
+ list << i
+ end
+ range = false
+ else
+ number = $1.to_i
+ list << number
+ end
+ elsif fname =~ /\.\./ then
+ range = true
+ else
+ range = false
+ next
+ end
+ end
+ begin
+ if getvariable('combine') then
+ fullname = "#{basename}.#{number}"
+ File.open("texexec.tex",'w') do |f|
+ f << "\\setupoutput[pdftex]\n"
+ f << "\\setupcolors[state=start]\n"
+ f << "\\starttext\n"
+ list.each do |number|
+ f << "\\startTEXpage\n"
+ f << "\\convertMPtoPDF{#{fullname}}{1}{1}"
+ f << "\\stopTEXpage\n"
+ end
+ f << "\\stoptext\n"
+ end
+ report("converting graphic '#{fullname}'")
+ runtex("texexec.tex")
+ pdffile = File.suffixed(basename,'pdf')
+ File.silentrename("texexec.pdf",pdffile)
+ report ("#{basename}.* converted to #{pdffile}")
+ else
+ list.each do |number|
+ begin
+ fullname = "#{basename}.#{number}"
+ File.open("texexec.tex",'w') do |f|
+ f << "\\setupoutput[pdftex]\n"
+ f << "\\setupcolors[state=start]\n"
+ f << "\\starttext \\startTEXpage\n"
+ f << "\\convertMPtoPDF{#{fullname}}{1}{1}"
+ f << "\\stopTEXpage \\stoptext\n"
+ end
+ report("converting graphic '#{fullname}'")
+ runtex("texexec.tex")
+ if files.length>1 then
+ pdffile = File.suffixed(basename,number.to_s,'pdf')
+ else
+ pdffile = File.suffixed(basename,'pdf')
+ end
+ File.silentrename("texexec.pdf",pdffile)
+ report ("#{fullname} converted to #{pdffile}")
+ end
+ end
+ end
+ rescue
+ report ("error when converting #{fullname} (#{$!})")
+ end
+ end
+ rescue
+ report("error in converting #{filename}")
+ end
+ end
+ reportruntime
+ end
+
def processmpxtex
getarrayvariable('files').each do |filename|
setvariable('filename',filename)
@@ -1019,7 +1169,7 @@ class TEX
opt << "\\setuppapersize[#{$1.upcase}][#{$2.upcase}]\n"
else # ...*...
pf = str.upcase.split(/[x\*]/o)
- pf << pf[0] if pd.size == 1
+ pf << pf[0] if pf.size == 1
opt << "\\setuppapersize[#{pf[0]}][#{pf[1]}]\n"
end
end
@@ -1102,7 +1252,7 @@ class TEX
report("unable to write option file #{topname}")
end
rescue
- report("fatal error in writing option file #{topname}")
+ report("fatal error in writing option file #{topname} (#{$!})")
end
end
@@ -1182,7 +1332,7 @@ class TEX
if texengine && texformat && progname then
fixbackendvars(@@mappaths[texengine])
runcommand([quoted(texengine),prognameflag(progname),formatflag(texengine,texformat),tcxflag,runoptions(texengine),filename,texprocextras(texformat)])
- true
+ # true
else
false
end
@@ -1260,7 +1410,7 @@ class TEX
end
end
- # 1=tex 2=mptex 3=mpxtex
+ # 1=tex 2=mptex 3=mpxtex 4=mpgraphic
def runtexexec(filename=[], options=[], mode=nil)
begin
@@ -1278,6 +1428,7 @@ class TEX
when 1 then job.processtex
when 2 then job.processmptex
when 3 then job.processmpxtex
+ when 4 then job.processmpgraphic
end
job.inspect && Kpse.inspect if getvariable('verbose')
return true
@@ -1402,7 +1553,11 @@ class TEX
end
end
- jobsuffix = makestubfile(rawname,rawbase,forcexml) if dummyfile || forcexml
+ if dummyfile || forcexml then
+ jobsuffix = makestubfile(rawname,rawbase,forcexml)
+ checkxmlfile(rawname)
+ end
+
# preprocess files
@@ -1505,6 +1660,9 @@ class TEX
stoprunning = state.stable?
end
end
+ if not ok then
+ setvariable('error','error in tex file')
+ end
ok = runtexutil(rawbase) if (nofruns == 1) && getvariable('texutil')
if ok && finalrun && (nofruns > 1) then
makeoptionfile(rawbase,jobname,orisuffix,true,finalrun,4,texruns) unless getvariable('nooptionfile')
diff --git a/scripts/context/ruby/base/texutil.rb b/scripts/context/ruby/base/texutil.rb
index 3d25c3e97..b81604c17 100644
--- a/scripts/context/ruby/base/texutil.rb
+++ b/scripts/context/ruby/base/texutil.rb
@@ -468,7 +468,7 @@ class TeXUtil
def build(sorter)
@sortkey = sorter.normalize(sorter.tokenize(@sortkey))
- @sortkey = sorter.remap(sorter.simplify(@key.downcase))
+ @sortkey = sorter.remap(sorter.simplify(@key.downcase)) # ??
if @sortkey.empty? then
@sortkey = sorter.remap(@command.downcase)
end
@@ -550,6 +550,9 @@ class TeXUtil
class Register
+@@specialsymbol = "\000"
+@@specialbanner = "" # \\relax"
+
@@debug = false
@@debug = true
@@ -593,7 +596,12 @@ else
@entry, @key = cleanupsplit(@entry), cleanupsplit(@key)
end
@sortkey = sorter.simplify(@key)
+# special = @sortkey =~ /^([^a-zA-Z\\])/o
+special = @sortkey =~ /^([\`\~\!\@\#\$\%\^\&\*\(\)\_\-\+\=\{\}\[\]\:\;\"\'\|\<\,\>\.\?\/\d])/o
@sortkey = @sortkey.split(@@split).collect do |c| sorter.remap(c) end.join(@@split)
+if special then
+ @sortkey = "#{@@specialsymbol}#{@sortkey}"
+end
@sortkey = [
@sortkey.downcase,
@sortkey,
@@ -667,6 +675,8 @@ end
flushsavedline(handle)
if alpha =~ /^[a-zA-Z]$/o then
character = alpha.dup
+ elsif alpha == @@specialsymbol then
+ character = @@specialbanner
elsif alpha.length > 1 then
# character = "\\getvalue\{#{alpha}\}"
character = "\\#{alpha}"
diff --git a/scripts/context/ruby/ctxtools.rb b/scripts/context/ruby/ctxtools.rb
index b1e880682..420145db0 100644
--- a/scripts/context/ruby/ctxtools.rb
+++ b/scripts/context/ruby/ctxtools.rb
@@ -46,6 +46,8 @@
banner = ['CtxTools', 'version 1.3.3', '2004/2006', 'PRAGMA ADE/POD']
+# todo dirname
+
unless defined? ownpath
ownpath = $0.sub(/[\\\/][a-z0-9\-]*?\.rb/i,'')
$: << ownpath
@@ -448,7 +450,7 @@ class Commands
globbed = if recurse then "**/#{pat}.*" else "#{pat}.*" end
files.push(Dir.glob(globbed))
end
- report("purging#{if all then ' all' end} temporary files : #{pattern.join(' ')}")
+ report("purging#{if purgeall then ' all' end} temporary files : #{pattern.join(' ')}")
end
files.flatten!
files.sort!
@@ -528,7 +530,8 @@ class Commands
$forsuresuffixes = [
"tui", "tup", "ted", "tes", "top",
"log", "tmp", "run", "bck", "rlg",
- "mpt", "mpx", "mpd", "mpo", "ctl",
+ "mpt", "mpx", "mpd", "mpo", "mpb",
+ "ctl",
"tmp.md5", "tmp.out"
]
$texonlysuffixes = [
@@ -2316,6 +2319,13 @@ class Commands
report("fatal error, make sure that you have 'unzip' in your path")
return false
else
+ if System.unix? then
+ begin
+ system("chmod +x scripts/context/unix/stubs/*")
+ rescue
+ report("change x-permissions of 'scripts/context/unix/stubs/*' manually")
+ end
+ end
return true
end
else
diff --git a/scripts/context/ruby/fcd_start.rb b/scripts/context/ruby/fcd_start.rb
index 8ac48f79e..348ac75ba 100644
--- a/scripts/context/ruby/fcd_start.rb
+++ b/scripts/context/ruby/fcd_start.rb
@@ -256,6 +256,8 @@ class FastCD
@result = @list.grep(/\/#{@pattern}[^\/]*$/i)
end
end
+ else
+ puts(Dir.pwd.gsub(/\\/o, '/'))
end
rescue
end
@@ -403,31 +405,37 @@ class FastCD
end
+$stdout.sync = true
+
verbose, action, args = false, :find, Array.new
-usage = "fcd [--make|add|show|find] [--verbose] [pattern]"
+usage = "fcd [--add|clear|find|list|make|show|stub] [--verbose] [pattern]"
+version = "1.0.2"
+
+def quit(message)
+ puts(message)
+ exit
+end
ARGV.each do |a|
case a
- when '-v', '--verbose' then verbose = true
- when '-m', '--make' then action = :make
- when '-c', '--clear' then action = :clear
when '-a', '--add' then action = :add
- when '-s', '--show' then action = :show
- when '-l', '--list' then action = :show
+ when '-c', '--clear' then action = :clear
when '-f', '--find' then action = :find
+ when '-l', '--list' then action = :show
+ when '-m', '--make' then action = :make
+ when '-s', '--show' then action = :show
when '--stub' then action = :stub
- when '-h', '--help' then puts "usage: #{usage}" ; exit
- when /^\-\-.*/ then puts "unknown switch: #{a}" + "\n" + "usage: #{usage}" ; exit
+ when '-v', '--verbose' then verbose = true
+ when '--version' then quit("version: #{version}")
+ when '-h', '--help' then quit("usage: #{usage}")
+ when /^\-\-.*/ then quit("error: unknown switch #{a}, try --help")
else args << a
end
end
-$stdout.sync = true
-
fcd = FastCD.new(verbose)
-
-fcd.report("Fast Change Dir / version 1.0")
+fcd.report("Fast Change Dir / version #{version}")
case action
when :make then
diff --git a/scripts/context/ruby/pdftools.rb b/scripts/context/ruby/pdftools.rb
new file mode 100644
index 000000000..8a62a0487
--- /dev/null
+++ b/scripts/context/ruby/pdftools.rb
@@ -0,0 +1,816 @@
+#!/usr/bin/env ruby
+
+# program : pdftools
+# copyright : PRAGMA Advanced Document Engineering
+# version : 2003-2005
+# author : Hans Hagen
+#
+# project : ConTeXt / eXaMpLe
+# concept : Hans Hagen
+# info : j.hagen@xs4all.nl
+# www : www.pragma-ade.com
+
+# This script will harbor some handy manipulations on tex
+# related files.
+
+banner = ['PDFTools', 'version 1.2.1', '2003/2005', 'PRAGMA ADE/POD']
+
+unless defined? ownpath
+ ownpath = $0.sub(/[\\\/][a-z0-9\-]*?\.rb/i,'')
+ $: << ownpath
+end
+
+require 'base/switch'
+require 'base/logger'
+
+require 'ftools'
+
+class File
+
+ def File.deletefiles(*filenames)
+ filenames.flatten.each do |filename|
+ begin
+ delete(filename) if FileTest.file?(filename)
+ rescue
+ end
+ end
+ end
+
+ def File.needsupdate(oldname,newname)
+ begin
+ return File.stat(oldname).mtime != File.stat(newname).mtime
+ rescue
+ return true
+ end
+ end
+
+ def File.syncmtimes(oldname,newname)
+ begin
+ t = Time.now # i'm not sure if the time is frozen, so we do it here
+ File.utime(0,t,oldname,newname)
+ rescue
+ end
+ end
+
+ def File.replacesuffix(oldname,subpath='')
+ newname = File.expand_path(oldname.sub(/\.\w+?$/,'.pdf'))
+ File.join(File.dirname(newname),subpath,File.basename(newname))
+ end
+
+end
+
+class ImageMagick
+
+ def initialize
+
+ begin
+ version = `convert -version`
+ rescue
+ @binary = nil
+ ensure
+ if (version) && (! version.empty?) && (version =~ /ImageMagick/mo) && (version =~ /version/mio) then
+ @binary = 'convert'
+ else
+ @binary = 'imagemagick'
+ end
+ end
+
+ end
+
+ def process(arguments)
+ begin
+ @binary && system("#{@binary} #{arguments}")
+ rescue
+ false
+ end
+ end
+
+end
+
+class TexExec
+
+ def initialize
+ @binary = 'texmfstart texexec.pl --pdf --batch --silent --purge'
+ end
+
+ def process(arguments,once=true)
+ begin
+ if once then
+ @binary && system("#{@binary} --once #{arguments}")
+ else
+ @binary && system("#{@binary} #{arguments}")
+ end
+ rescue
+ false
+ end
+ end
+
+end
+
+class PdfImages
+
+ def initialize
+ @binary = "pdfimages"
+ end
+
+ def process(arguments)
+ begin
+ @binary && system("#{@binary} #{arguments}")
+ rescue
+ false
+ end
+ end
+
+end
+
+class ConvertImage
+
+ def initialize(command=nil)
+ @command = command
+ end
+
+ def convertimage(filename)
+
+ return if filename =~ /\.(pdf)$/io
+
+ retain = @command.option('retain')
+ subpath = @command.option('subpath')
+
+ if filename =~ /\s/ then
+ @command.report("skipping strange filename '#{filename}'")
+ else
+ newname = File.replacesuffix(filename,subpath)
+ # newname.gsub!(s/[^a-zA-Z0-9\_-\.]/o, '-')
+ begin
+ File.makedirs(File.dirname(newname))
+ rescue
+ end
+ if ! retain || File.needsupdate(filename,newname) then
+ imagemagick = ImageMagick.new
+ if imagemagick then
+ ok = imagemagick.process("-compress zip -quality 99 #{filename} #{newname}")
+ File.syncmtimes(oldname,newname) if retain
+ end
+ end
+ end
+ end
+
+end
+
+class DownsampleImage
+
+ def initialize(command=nil)
+ @command = command
+ end
+
+ def convertimage(filename)
+
+ return if filename =~ /\.(pdf)$/io
+
+ retain = @command.option('retain')
+ subpath = @command.option('subpath')
+
+ if @command.option('lowres') then
+ method = '4'
+ elsif @command.option('medres') || @command.option('normal') then
+ method = '5'
+ else
+ method = '4'
+ end
+
+ if filename =~ /\s/ then
+ @command.report("skipping strange filename '#{filename}'")
+ else
+ newname = File.replacesuffix(filename,subpath)
+ begin
+ File.makedirs(File.dirname(newname))
+ rescue
+ end
+ if ! retain || File.needsupdate(filename,newname) then
+ ok = system("texmfstart pstopdf.rb --method=#{method} #{filename} #{newname}")
+ File.syncmtimes(oldname,newname) if retain
+ end
+ end
+ end
+
+end
+
+class ColorImage
+
+ def initialize(command=nil,tmpname='pdftools')
+ @command = command
+ @tmpname = tmpname
+ @colorname = nil
+ @colorspec = nil
+ @colorspace = nil
+ end
+
+ def registercolor(spec='.5',name='c')
+ name = name || 'c'
+ spec = spec.split(',')
+ case spec.length
+ when 4
+ @colorname, @colorspec, @colorspace = name, spec.join('/'), 'cmyk'
+ when 3
+ @colorname, @colorspec, @colorspace = name, spec.join('/'), 'rgb'
+ when 1
+ @colorname, @colorspec, @colorspace = name, spec.join('/'), 'gray'
+ else
+ @colorname, @colorspec, @colorspace = nil, nil, nil
+ end
+ end
+
+ def convertimage(filename)
+
+ invert = @command.option('invert')
+ retain = @command.option('retain')
+ subpath = @command.option('subpath')
+
+ subpath += '/' unless subpath.empty?
+
+ if @colorname && ! @colorname.empty? && @colorspec && ! @colorspec.empty? then
+ basename = filename.sub(/\.\w+?$/,'')
+ oldname = filename
+ ppmname = @tmpname + '-000.ppm'
+ jpgname = @tmpname + '-000.jpg'
+ newname = File.expand_path(oldname)
+ newname = File.dirname(newname) + '/' + subpath + @colorname + '-' + File.basename(newname)
+ newname.sub!(/\.\w+?$/, '.pdf')
+ begin
+ File.makedirs(File.dirname(newname))
+ rescue
+ end
+ if ! retain || File.needsupdate(filename,newname) then
+ pdfimages = PdfImages.new
+ imagemagick = ImageMagick.new
+ if pdfimages && imagemagick then
+ File.deletefiles(ppmname,jpgname,newname)
+ if filename =~ /\.(pdf)$/io then
+ ok = pdfimages.process("-j -f 1 -l 1 #{filename} #{@tmpname}")
+ if ok then
+ if FileTest.file?(ppmname) then
+ inpname = ppmname
+ elsif FileTest.file?(jpgname) then
+ inpname = jpgname
+ else
+ ok = false
+ end
+ if ok then
+ switch = if ! invert then '-negate' else '' end
+ # make sure that we keep the format
+ tmpname = File.basename(inpname)
+ tmpname = tmpname.sub(/(.*)\..*?$/,@tmpname) # somehow sub! fails here
+ ok = imagemagick.process("-colorspace gray #{switch} #{inpname} #{tmpname}")
+ if ! ok || ! FileTest.file?(tmpname) then
+ # problems
+ else
+ ok = imagemagick.process("-colorspace #{switch} #{@colorspace} -colorize #{@colorspec} -compress zip #{tmpname} #{newname}")
+ if ! ok || ! FileTest.file?(newname) then
+ # unable to colorize image
+ else
+ # conversion done
+ end
+ end
+ end
+ end
+ else
+ # make sure that we keep the format
+ tmpname = File.basename(basename)
+ tmpname = tmpname.sub(/(.*)\..*?$/,@tmpname) # somehow sub! fails here
+ ok = imagemagick.process("-colorspace gray #{oldname} #{tmpname}")
+ if ! ok || ! FileTest.file?(tmpname) then
+ # unable to convert color to gray
+ else
+ ok = imagemagick.process("-colorspace #{@colorspace} -colorize #{@colorspec} -compress zip #{tmpname} #{newname}")
+ if ! ok || ! FileTest.file?(newname) then
+ # unable to colorize image
+ else
+ # conversion done
+ end
+ end
+ end
+ File.deletefiles(ppmname,jpgname,tmpname)
+ File.syncmtimes(filename,newname) if retain
+ end
+ end
+ end
+ end
+
+end
+
+class SpotColorImage
+
+ def initialize(command=nil, tmpname='pdftools')
+ @command = command
+ @tmpname = tmpname
+ @colorname = nil
+ @colorspec = nil
+ @colorspace = nil
+ @colorfile = nil
+ end
+
+ def registercolor(spec='.5',name='unknown')
+ name = name || 'unknown'
+ if spec =~ /^[\d\.\,]+$/ then
+ spec = spec.split(',')
+ case spec.length
+ when 4
+ @colorname, @colorspec, @colorspace = name, ["c=#{spec[0]}","m=#{spec[1]}","y=#{spec[2]}","k=#{spec[3]}"].join(','), 'cmyk'
+ when 3
+ @colorname, @colorspec, @colorspace = name, ["r=#{spec[0]}","g=#{spec[1]}","b=#{spec[2]}"].join(','), 'rgb'
+ when 1
+ @colorname, @colorspec, @colorspace = name, ["s=#{spec[0]}"].join(','), 'gray'
+ else
+ @colorname, @colorspec, @colorspace = nil, nil, nil
+ end
+ else
+ @colorname, @colorfile = name, spec
+ end
+ end
+
+ def convertgrayimage(filename)
+
+ invert = @command.option('invert')
+ retain = @command.option('retain')
+ subpath = @command.option('subpath')
+
+ subpath += '/' unless subpath.empty?
+
+ if @colorname && ! @colorname.empty? && ((@colorspec && ! @colorspec.empty?) || (@colorfile && ! @colorfile.empty?)) then
+ basename = filename.sub(/\.\w+?$/,'')
+ oldname = filename # png jpg pdf
+ newname = File.expand_path(oldname)
+ ppmname = @tmpname + '-000.ppm'
+ jpgname = @tmpname + '-000.jpg'
+ outname = @tmpname + '-000.pdf'
+ texname = @tmpname + '-temp.tex'
+ pdfname = @tmpname + '-temp.pdf'
+ newname = File.dirname(newname) + '/' + subpath + @colorname + '-' + File.basename(newname)
+ newname.sub!(/\.\w+?$/, '.pdf')
+ begin
+ File.makedirs(File.dirname(newname))
+ rescue
+ end
+ if ! retain || File.needsupdate(filename,newname) then
+ pdfimages = PdfImages.new
+ imagemagick = ImageMagick.new
+ texexec = TexExec.new
+ if pdfimages && imagemagick && texexec then
+ if filename =~ /\.(jpg|png|pdf)$/io then
+ @command.report("processing #{basename}")
+ File.deletefiles(ppmname,jpgname,newname)
+ switch = if ! invert then '-negate' else '' end
+ if filename =~ /\.(pdf)$/io then
+ ok = pdfimages.process("-j -f 1 -l 1 #{oldname} #{@tmpname}")
+ if ok then
+ if FileTest.file?(ppmname) then
+ inpname = ppmname
+ elsif FileTest.file?(jpgname) then
+ inpname = jpgname
+ else
+ ok = false
+ end
+ if ok then
+ ok = imagemagick.process("-colorspace gray #{switch} -compress zip #{inpname} #{outname}")
+ end
+ end
+ else
+ ok = imagemagick.process("-colorspace gray #{switch} -compress zip #{oldname} #{outname}")
+ end
+ if ok then
+ ok = false unless FileTest.file?(outname)
+ end
+ if ok then
+ if f = File.open(texname, 'w') then
+ f.puts(conversionfile(filename,outname,newname))
+ f.close
+ ok = texexec.process(texname)
+ else
+ ok = false
+ end
+ @command.report("error in processing #{newname}") unless ok
+ if FileTest.file?(pdfname) then
+ if f = File.open(pdfname,'r') then
+ f.binmode
+ begin
+ if g = File.open(newname,'w') then
+ g.binmode
+ data = f.read
+ # pdftex (direct) & imagemagick (indirect)
+ if data =~ /(\d+)\s+0\s+obj\s+\[\/Separation\s+\/#{@colorname}/mos then
+ @command.report("replacing separation color")
+ object = $1
+ data.gsub!(/(\/Type\s+\/XObject.*?)(\/ColorSpace\s*(\/DeviceGray|\/DeviceCMYK|\/DeviceRGB|\d+\s+\d+\s+R))/mois) do
+ $1 + "/ColorSpace #{object} 0 R".ljust($2.length)
+ end
+ elsif data =~ /(\d+)\s+0\s+obj\s+\[\/Indexed\s*\[/mos then
+ @command.report("replacing indexed color")
+ # todo: more precise check on color
+ object = $1
+ data.gsub!(/(\/Type\s+\/XObject.*?)(\/ColorSpace\s*(\/DeviceGray|\/DeviceCMYK|\/DeviceRGB|\d+\s+\d+\s+R))/mois) do
+ $1 + "/ColorSpace #{object} 0 R".ljust($2.length)
+ end
+ elsif data =~ /(\d+)\s+0\s+obj\s+\[\/Separation/mos then
+ @command.report("replacing separation color")
+ object = $1
+ data.gsub!(/(\/Type\s+\/XObject.*?)(\/ColorSpace\s*(\/DeviceGray|\/DeviceCMYK|\/DeviceRGB|\d+\s+\d+\s+R))/mois) do
+ $1 + "/ColorSpace #{object} 0 R".ljust($2.length)
+ end
+ end
+ g.write(data)
+ g.close
+ end
+ rescue
+ @command.report("error in converting #{newname}")
+ else
+ @command.report("#{newname} is converted")
+ end
+ f.close
+ end
+ else
+ @command.report("error in writing #{newname}")
+ end
+ else
+ @command.report("error in producing #{newname}")
+ end
+ File.deletefiles(ppmname,jpgname,outname)
+ # File.deletefiles(texname,pdfname)
+ File.syncmtimes(filename,newname) if retain
+ end
+ else
+ @command.report("error in locating binaries")
+ end
+ else
+ @command.report("#{newname} is not changed")
+ end
+ end
+ end
+
+ private
+
+ # % example colorfile:
+ #
+ # \definecolor [darkblue] [c=1,m=.38,y=0,k=.64] % pantone pms 2965 uncoated m
+ # \definecolor [darkyellow] [c=0,m=.28,y=1,k=.06] % pantone pms 124 uncoated m
+ #
+ # % \definecolor [darkblue-100] [darkblue] [p=1]
+ # % \definecolor [darkyellow-100] [darkyellow] [p=1]
+ #
+ # \definecolorcombination [pdftoolscolor] [darkblue=.12,darkyellow=.28] [c=.1,m=.1,y=.3,k=.1]
+
+ def conversionfile(originalname,filename,finalname)
+ tex = "\\setupcolors[state=start]\n"
+ if @colorfile then
+ tex += "\\readfile{#{@colorfile}}{}{}\n"
+ tex += "\\starttext\n"
+ # tex += "\\predefineindexcolor[pdftoolscolor]\n"
+ tex += "\\startTEXpage\n"
+ tex += "\\pdfimage{#{filename}}\n"
+ tex += "\\stopTEXpage\n"
+ tex += "\\stoptext\n"
+ else
+ tex += "\\definecolor[#{@colorname}][#{@colorspec}]\n"
+ tex += "\\definecolor[pdftoolscolor][#{@colorname}][p=1]\n"
+ tex += "\\starttext\n"
+ tex += "\\startTEXpage\n"
+ tex += "\\hbox{\\color[pdftoolscolor]{\\pdfimage{#{filename}}}}\n"
+ tex += "\\stopTEXpage\n"
+ tex += "\\stoptext\n"
+ end
+ tex += "\n"
+ tex += "% old: #{originalname}\n"
+ tex += "% new: #{finalname}\n"
+ return tex
+ end
+
+end
+
+module XML
+
+ def XML::version
+ "<?xml version='1.0'?>"
+ end
+
+ def XML::start(element, attributes='')
+ if attributes.empty? then
+ "<#{element}>"
+ else
+ "<#{element} #{attributes}>"
+ end
+ end
+
+ def XML::end(element)
+ "</#{element}>"
+ end
+
+ def XML::empty(element, attributes='')
+ if attributes && attributes.empty? then
+ "<#{element}/>"
+ else
+ "<#{element} #{attributes}/>"
+ end
+ end
+
+ def XML::element(element, attributes='', content='')
+ if content && ! content.empty? then
+ XML::start(element,attributes) + content + XML::end(element)
+ else
+ XML::empty(element,attributes)
+ end
+ end
+
+ def XML::box(tag, rect, type=1)
+ case type
+ when 1
+ if rect && ! rect.empty? then
+ rect = rect.split(' ')
+ XML::element("#{tag}box", '',
+ XML::element("llx", '', rect[0]) +
+ XML::element("lly", '', rect[1]) +
+ XML::element("ulx", '', rect[2]) +
+ XML::element("uly", '', rect[3]) )
+ else
+ XML::empty("#{tag}box")
+ end
+ when 2
+ if rect && ! rect.empty? then
+ rect = rect.split(' ')
+ XML::element("box", "type='#{tag}'",
+ XML::element("llx", '', rect[0]) +
+ XML::element("lly", '', rect[1]) +
+ XML::element("ulx", '', rect[2]) +
+ XML::element("uly", '', rect[3]) )
+ else
+ XML::empty("box", "type='#{tag}'")
+ end
+ when 3
+ if rect && ! rect.empty? then
+ rect = rect.split(' ')
+ XML::element("box", "type='#{tag}' llx='#{rect[0]}' lly='#{rect[1]}' ulx='#{rect[2]}' uly='#{rect[3]}'")
+ else
+ XML::empty("box", "type='#{tag}'")
+ end
+ else
+ ''
+ end
+ end
+
+ def XML::crlf
+ "\n"
+ end
+
+ def XML::skip(n=1)
+ ' '*n
+ end
+
+end
+
+class Commands
+
+ include CommandBase
+
+ # alias savedhelp :help
+
+ # def help
+ # savedhelp
+ # report("under construction (still separate tools)")
+ # end
+
+ # filename.pdf --spotimage --colorname=darkblue --colorspec=1,0.38,0,0.64
+
+ def spotimage
+
+ if ! @commandline.argument('first').empty? && files = findfiles() then
+ colorname = @commandline.option('colorname')
+ colorspec = @commandline.option('colorspec')
+ if colorname && ! colorname.empty? && colorspec && ! colorspec.empty? then
+ files.each do |filename|
+ s = SpotColorImage.new(self)
+ s.registercolor(colorspec,colorname)
+ s.convertgrayimage(filename)
+ end
+ else
+ report("provide --colorname=somename --colorspec=c,m,y,k")
+ end
+ else
+ report("provide filename (png, jpg, pdf)")
+ end
+
+ end
+
+ def colorimage
+
+ if ! @commandline.argument('first').empty? && files = findfiles() then
+ colorname = @commandline.option('colorname')
+ colorspec = @commandline.option('colorspec')
+ if colorspec && ! colorspec.empty? then
+ files.each do |filename|
+ s = ColorImage.new(self)
+ s.registercolor(colorspec,colorname) # name optional
+ s.convertimage(filename)
+ end
+ else
+ report("provide --colorspec=c,m,y,k")
+ end
+ else
+ report("provide filename")
+ end
+
+ end
+
+ def convertimage
+
+ if ! @commandline.argument('first').empty? && files = findfiles() then
+ files.each do |filename|
+ s = ConvertImage.new(self)
+ s.convertimage(filename)
+ end
+ else
+ report("provide filename")
+ end
+
+ end
+
+ def downsampleimage
+
+ if ! @commandline.argument('first').empty? && files = findfiles() then
+ files.each do |filename|
+ s = DownsampleImage.new(self)
+ s.convertimage(filename)
+ end
+ else
+ report("provide filename")
+ end
+
+ end
+
+ def info
+
+ if files = findfiles() then
+
+ print(XML.version + XML.crlf)
+ print(XML.start('pdfinfo', "xmlns='http://www.pragma-ade.com/schemas/pdfinfo.rng'") + XML.crlf)
+
+ files.each do |filename|
+
+ if filename =~ /\.pdf$/io then
+
+ begin
+ data = `pdfinfo -box #{filename}`.chomp.split("\n")
+ rescue
+ data = nil
+ end
+
+ if data then
+
+ pairs = Hash.new
+
+ data.each do |d|
+ if (d =~ /^\s*(.*?)\s*\:\s*(.*?)\s*$/mois) then
+ key, val = $1, $2
+ pairs[key.downcase.sub(/ /,'')] = val
+ end
+ end
+
+ print(XML.skip(1) + XML.start('pdffile', "filename='#{filename}'") + XML.crlf)
+
+ print(XML.skip(2) + XML.element('path', '', File.expand_path(filename)) + XML.crlf)
+
+ if pairs.key?('error') then
+
+ print(XML.skip(2) + XML.element('comment', '', pairs['error']) + XML.crlf)
+
+ else
+
+ print(XML.skip(2) + XML.element('version', '', pairs['pdfversion']) + XML.crlf)
+ print(XML.skip(2) + XML.element('pages', '', pairs['pages' ]) + XML.crlf)
+ print(XML.skip(2) + XML.element('title', '', pairs['title' ]) + XML.crlf)
+ print(XML.skip(2) + XML.element('subject', '', pairs['subject' ]) + XML.crlf)
+ print(XML.skip(2) + XML.element('author', '', pairs['author' ]) + XML.crlf)
+ print(XML.skip(2) + XML.element('producer', '', pairs['producer' ]) + XML.crlf)
+
+ if pairs.key?('creationdate') then
+ pairs['creationdate'].sub!(/(\d\d)\/(\d\d)\/(\d\d)/) do
+ '20' + $3 + '-' + $1 + '-' +$2
+ end
+ pairs['creationdate'].sub!(/(\d\d)\/(\d\d)\/(\d\d\d\d)/) do
+ $3 + '-' + $1 + '-' + $2
+ end
+ print(XML.skip(2) + XML.element('creationdate', '', pairs['creationdate']) + XML.crlf)
+ end
+
+ if pairs.key?('moddate') then
+ if pairs['moddate'] =~ /(\d\d\d\d)(\d\d)(\d\d)/ then
+ pairs['moddate'] = "#{$1}-#{$2}-#{$3}"
+ end
+ print(XML.skip(2) + XML.element('modificationdate', '', pairs['moddate']) + XML.crlf)
+ end
+
+ print(XML.skip(2) + XML.element('tagged', '', pairs['tagged' ]) + XML.crlf)
+ print(XML.skip(2) + XML.element('encrypted', '', pairs['encrypted']) + XML.crlf)
+ print(XML.skip(2) + XML.element('optimized', '', pairs['optimized']) + XML.crlf)
+
+ if pairs.key?('PageSize') then
+ print(XML.skip(2) + XML.element('width', '', pairs['pagesize'].sub(/\s*(.*?)\s+(.*?)\s+.*/, $1)) + XML.crlf)
+ print(XML.skip(2) + XML.element('height', '', pairs['pagesize'].sub(/\s*(.*?)\s+(.*?)\s+.*/, $2)) + XML.crlf)
+ end
+
+ if pairs.key?('FileSize') then
+ print(XML.skip(2) + XML.element('size', '', pairs['filesize'].sub(/\s*(.*?)\s+.*/, $1)) + XML.crlf)
+ end
+
+ print(XML.skip(2) + XML.box('media', pairs['mediabox']) + XML.crlf)
+ print(XML.skip(2) + XML.box('crop' , pairs['cropbox' ]) + XML.crlf)
+ print(XML.skip(2) + XML.box('bleed', pairs['bleedbox']) + XML.crlf)
+ print(XML.skip(2) + XML.box('trim' , pairs['trimBox' ]) + XML.crlf)
+ print(XML.skip(2) + XML.box('art' , pairs['artbox' ]) + XML.crlf)
+
+ end
+
+ print(XML.skip(1) + XML.end('pdffile') + XML.crlf)
+
+ end
+
+ end
+
+ end
+
+ print(XML.end('pdfinfo') + XML.crlf)
+
+ end
+
+ end
+
+ def countpages
+ filenames, n = findfiles('pdf'), 0
+ filenames.each do |filename|
+ if `pdfinfo #{filename}`.chomp =~ /^pages\s*\:\s*(\d+)/mois then
+ report("#{$1.rjust(4)} pages found in #{filename}")
+ n += $1.to_i
+ end
+ end
+ report("#{n.to_s.rjust(4)} pages in total")
+ end
+
+ def analyzefile
+ # needs an update
+ filenames = @commandline.arguments
+ filenames.each do |filename|
+ if filename && FileTest.file?(filename) && filename =~ /\.pdf/io then
+ filesize = FileTest.size(filename)
+ report("analyzing file : #{filename}")
+ report("file size : #{filesize}")
+ if pdf = File.open(filename) then
+ pdf.binmode
+ nofobject, nofxform, nofannot, noflink, nofwidget, nofnamed, nofscript, nofcross = 0, 0, 0, 0, 0, 0, 0, 0
+ while data = pdf.gets do
+ data.scan(/\d+\s+\d+\s+obj/o) do nofobject += 1 end
+ data.scan(/\/Type\s*\/XObject/o) do nofxform += 1 end
+ data.scan(/\/Type\s*\/Annot/o) do nofannot += 1 end
+ data.scan(/\/GoToR\s*\/F/o) do nofcross += 1 end
+ data.scan(/\/Subtype\s*\/Link/o) do noflink += 1 end
+ data.scan(/\/Subtype\s*\/Widget/o) do nofwidget += 1 end
+ data.scan(/\/S\s*\/Named/o) do nofnamed += 1 end
+ data.scan(/\/S\s*\/JavaScript/o) do nofscript += 1 end
+ end
+ pdf.close
+ report("objects : #{nofobject}")
+ report("xforms : #{nofxform}")
+ report("annotations : #{nofannot}")
+ report("links : #{noflink} (#{nofnamed} named / #{nofscript} scripts / #{nofcross} files)")
+ report("widgets : #{nofwidget}")
+ end
+ end
+ end
+ end
+
+end
+
+logger = Logger.new(banner.shift)
+commandline = CommandLine.new
+
+commandline.registeraction('spotimage' , 'filename --colorspec= --colorname= [--retain --invert --subpath=]')
+commandline.registeraction('colorimage', 'filename --colorspec= [--retain --invert --colorname= ]')
+commandline.registeraction('convertimage', 'filename [--retain --subpath]')
+commandline.registeraction('downsampleimage', 'filename [--retain --subpath --lowres --normal]')
+commandline.registeraction('info', 'filename')
+commandline.registeraction('countpages', 'pattern')
+
+commandline.registeraction('analyzefile' , 'filename')
+
+commandline.registeraction('help')
+commandline.registeraction('version')
+
+commandline.registervalue('colorname')
+commandline.registervalue('colorspec')
+commandline.registervalue('subpath')
+
+commandline.registerflag('lowres')
+commandline.registerflag('medres')
+commandline.registerflag('normal')
+commandline.registerflag('invert')
+commandline.registerflag('retain')
+
+commandline.expand
+
+Commands.new(commandline,logger,banner).send(commandline.action || 'help')
diff --git a/scripts/context/ruby/texexec.rb b/scripts/context/ruby/texexec.rb
index a7b870376..14bc15662 100644
--- a/scripts/context/ruby/texexec.rb
+++ b/scripts/context/ruby/texexec.rb
@@ -63,6 +63,7 @@ class Commands
prepare(job)
job.processtex
job.inspect && Kpse.inspect if @commandline.option('verbose')
+ exit 1 if job.error?
end
end
@@ -72,6 +73,7 @@ class Commands
prepare(job)
job.processmptex
job.inspect && Kpse.inspect if @commandline.option('verbose')
+ exit 1 if job.error?
end
end
@@ -81,6 +83,17 @@ class Commands
prepare(job)
job.processmpxtex
job.inspect && Kpse.inspect if @commandline.option('verbose')
+ exit 1 if job.error?
+ end
+ end
+
+ def mpgraphic
+ if job = TEX.new(logger) then
+ job.setvariable('files',@commandline.arguments)
+ prepare(job)
+ job.processmpgraphic
+ job.inspect && Kpse.inspect if @commandline.option('verbose')
+ exit 1 if job.error?
end
end
@@ -137,8 +150,8 @@ class Commands
files = @commandline.arguments.sort
if files.length > 0 then
if f = File.open(job.tempfilename('tex'),'w') then
- # will be replaced
- Kpse.runscript('texutil',files.join(' '),'--figures')
+ # will be replaced, does not work any more
+ Kpse.runscript('texutil.pl',files.join(' '),'--figures')
figures = @commandline.checkedoption('method', 'a').downcase
paperoffset = @commandline.checkedoption('paperoffset', '0pt')
backspace = @commandline.checkedoption('backspace', '1.5cm')
@@ -410,6 +423,8 @@ class Commands
end
end
+ # todo: make this styles
+
def combineoutput
if job = TEX.new(logger) then
prepare(job)
@@ -419,20 +434,24 @@ class Commands
if f = File.open(job.tempfilename('tex'),'w') then
paperoffset = @commandline.checkedoption('paperoffset', '0cm')
combination = @commandline.checkedoption('combination','2*2').split(/[\*x]/o)
- paperformat = @commandline.checkedoption('paperoffset', 'A4*A4').split(/[\*x]/o)
+ paperformat = @commandline.checkedoption('paperformat', 'A4*A4').split(/[\*x]/o)
+ bannerheight = @commandline.checkedoption('bannerheight', '')
nx, ny = combination[0] || '2', combination[1] || combination[0] || '2'
from, to = paperformat[0] || 'A4', paperformat[1] || paperformat[0] || 'A4'
f << "\\setuppapersize[#{from}][#{to}]\n"
f << "\\setuplayout\n"
- f << " [topspace=#{paperoffset},\n"
- f << " backspace=#{paperoffset},\n"
- f << " header=0pt,\n"
- f << " footer=1cm,\n"
- f << " width=middle,\n"
- f << " height=middle]\n"
+ f << " [topspace=#{paperoffset},backspace=#{paperoffset},\n"
+ f << " header=0pt,footer=0pt,\n"
+ f << " width=middle,height=middle]\n"
+ if bannerheight.empty? then
+ f << "\\setuplayout[footer=1cm]\n"
+ else
+ f << "\\definelayer[page][width=\\paperwidth,height=\\paperheight]\n"
+ f << "\\setupbackgrounds[page][background=page]\n"
+ end
if @commandline.option('nobanner') then
- f << "\\setuplayout\n"
- f << " [footer=0cm]\n"
+ f << "\\setuplayout[footer=0cm]\n"
+ f << "\\setupbackgrounds[page][background=]\n"
end
f << "\\setupexternalfigures\n"
f << " [directory=]\n"
@@ -442,8 +461,15 @@ class Commands
if (filename !~ /^texexec/io) && (filename !~ /^#{result}/) then
report("combination file: #{filename}")
cleanname = cleantexfilename(filename).downcase
- f << "\\setupfootertexts\n"
- f << " [\\tttf #{cleanname}\\quad\\quad\\currentdate\\quad\\quad\\pagenumber]\n"
+ bannerstring = "\\tttf #{cleanname}\\quad\\quad\\currentdate\\quad\\quad\\pagenumber"
+ if bannerheight.empty? then
+ f << "\\setupfootertexts\n"
+ f << " [#{bannerstring}]\n"
+ else
+ # for the moment we lack a better hook
+ f << "\\setuptexttexts\n"
+ f << " [{\\setlayerframed[page][preset=middlebottom][frame=off,height=#{bannerheight}]{#{bannerstring}}}]\n"
+ end
f << "\\combinepages[#{filename}][nx=#{nx},ny=#{ny}]\n"
f << "\\page\n"
end
@@ -545,11 +571,12 @@ end
logger = Logger.new(banner.shift)
commandline = CommandLine.new
-commandline.registeraction('make', 'make formats')
-commandline.registeraction('check', 'check versions')
-commandline.registeraction('process', 'process file')
-commandline.registeraction('mptex', 'process mp file')
-commandline.registeraction('mpxtex', 'process mpx file')
+commandline.registeraction('make', 'make formats')
+commandline.registeraction('check', 'check versions')
+commandline.registeraction('process', 'process file')
+commandline.registeraction('mptex', 'process mp file')
+commandline.registeraction('mpxtex', 'process mpx file')
+commandline.registeraction('mpgraphic', 'process mp file to stand-alone graphics')
commandline.registeraction('listing', 'list of file content')
commandline.registeraction('figures', 'generate overview of figures')
@@ -577,7 +604,7 @@ end
# so far for compatibility
@@extrastringvars = [
- 'pages', 'background', 'backspace', 'topspace', 'boxtype', 'tempdir',
+ 'pages', 'background', 'backspace', 'topspace', 'boxtype', 'tempdir','bannerheight',
'printformat', 'paperformat', 'method', 'scale', 'selection',
'combination', 'paperoffset', 'textwidth', 'addempty', 'logfile',
'startline', 'endline', 'startcolumn', 'endcolumn', 'scale'
diff --git a/scripts/context/ruby/texmfstart.rb b/scripts/context/ruby/texmfstart.rb
index 22c9e36d1..1f76d703f 100644
--- a/scripts/context/ruby/texmfstart.rb
+++ b/scripts/context/ruby/texmfstart.rb
@@ -2263,9 +2263,11 @@ def process(&block)
oldchecksum = "old"
end
end
- if oldchecksum != newchecksum then
+ if $verbose then
report("old checksum #{filename}: #{oldchecksum}")
report("new checksum #{filename}: #{newchecksum}")
+ end
+ if oldchecksum != newchecksum then
report("file is changed, processing started")
begin
File.open(checkname,'w') do |f|
@@ -2535,3 +2537,5 @@ def execute(arguments)
end
execute(ARGV)
+
+exit (if ($?.to_i rescue 0) > 0 then 1 else 0 end)
diff --git a/scripts/context/ruby/xmltools.rb b/scripts/context/ruby/xmltools.rb
index 97b572e19..8974fff23 100644
--- a/scripts/context/ruby/xmltools.rb
+++ b/scripts/context/ruby/xmltools.rb
@@ -229,7 +229,7 @@ class Commands
else
report("error in processing file #{file}")
end
- system("texmfstart texutil --purge")
+ system("texmfstart ctxtools --purge")
else
report("error in processing file #{file}")
end
@@ -359,8 +359,16 @@ class Commands
if attributes.key?(element) then
attributes[element].keys.asort.each do |attribute|
f.puts " <attribute name=#{attribute.xstring}>\n"
- attributes[element][attribute].keys.asort.each do |value|
- f.puts " <instance value=#{value.xstring} n=#{attributes[element][attribute][value].to_s.xstring}/>\n"
+ if attribute =~ /id$/o then
+ nn = 0
+ attributes[element][attribute].keys.asort.each do |value|
+ nn += attributes[element][attribute][value].to_i
+ end
+ f.puts " <instance value=#{"*".xstring} n=#{nn.to_s.xstring}/>\n"
+ else
+ attributes[element][attribute].keys.asort.each do |value|
+ f.puts " <instance value=#{value.xstring} n=#{attributes[element][attribute][value].to_s.xstring}/>\n"
+ end
end
f.puts " </attribute>\n"
end
@@ -375,7 +383,7 @@ class Commands
f.puts "</document>\n"
f.close
if process then
- system("texmfstart texexec --purgeall --pdf --use=xml-analyze #{result}")
+ system("texmfstart texexec --purge --pdf --use=xml-analyze #{result}")
end
else
report("unable to open file '#{result}'")
@@ -391,6 +399,105 @@ class Commands
end
end
+ def cleanup # todo, share loading/saving with previous
+
+ file = @commandline.argument('first')
+ force = @commandline.option('force')
+ verbose = @commandline.option('verbose')
+
+ if FileTest.file?(file) then
+ if data = IO.read(file) then
+ if data =~ /<?xml.*?version\=/ then
+ data = doxmlcleanup(data,verbose)
+ result = if force then file else file.gsub(/\..*?$/, '') + '.xlg' end
+ begin
+ if f = File.open(result,'w') then
+ f << data
+ f.close
+ end
+ rescue
+ report("unable to open file '#{result}'")
+ end
+ else
+ report("invalid xml file '#{file}'")
+ end
+ else
+ report("unable to load file '#{file}'")
+ end
+ else
+ report("unknown file '#{file}'")
+ end
+
+ end
+
+ def doxmlreport(str,verbose=false)
+ if verbose then
+ result = str
+ report(result)
+ return result
+ else
+ return str
+ end
+ end
+
+ def doxmlcleanup(data="",verbose=false)
+
+ # remove funny spaces (looks cleaner)
+ #
+ # data = "<whatever ></whatever ><whatever />"
+
+ data.gsub!(/\<(\/*\w+)\s*(\/*)>/o) do
+ "<#{$1}#{$2}>"
+ end
+
+ # remove funny ampersands
+ #
+ # data = "<x> B&W </x>"
+
+ data.gsub!(/\&([^\<\>\&]*?)\;/mo) do
+ "<entity name='#{$1}'/>"
+ end
+ data.gsub!(/\&/o) do
+ doxmlreport("&amp;",verbose)
+ end
+ data.gsub!(/\<entity name=\'(.*?)\'\/\>/o) do
+ doxmlreport("&#{$1};",verbose)
+ end
+
+ # remove funny < >
+ #
+ # data = "<x> < 5% </x>"
+
+ data.gsub!(/<([^>].*?)>/o) do
+ tag = $1
+ case tag
+ when /^\//o then
+ "<#{tag}>" # funny tag but ok
+ when /\/$/o then
+ "<#{tag}>" # funny tag but ok
+ when /</o then
+ doxmlreport("&lt;#{tag}>",verbose)
+ else
+ "<#{tag}>"
+ end
+ end
+
+ # remove funny < >
+ #
+ # data = "<x> > 5% </x>"
+
+ data.gsub!(/<([^>].*?)>([^\>\<]*?)>/o) do
+ doxmlreport("<#{$1}>#{$2}&gt;",verbose)
+ end
+
+ return data
+ end
+
+ # puts doxmlcleanup("<whatever ></whatever ><whatever />")
+ # puts doxmlcleanup("<x> B&W </x>")
+ # puts doxmlcleanup("<x> < 5% </x>")
+ # puts doxmlcleanup("<x> > 5% </x>")
+
end
logger = Logger.new(banner.shift)
@@ -399,6 +506,7 @@ commandline = CommandLine.new
commandline.registeraction('dir', 'generate directory listing')
commandline.registeraction('mmlpages','generate graphic from mathml')
commandline.registeraction('analyze', 'report entities and elements [--utf --process]')
+commandline.registeraction('cleanup', 'cleanup xml file [--force]')
# commandline.registeraction('dir', 'filename --pattern= --output= [--recurse --stripname --longname --url --root]')
# commandline.registeraction('mmlpages','filename [--eps --jpg --png --style= --mode=]')
@@ -424,6 +532,7 @@ commandline.registerflag('utf')
commandline.registerflag('process')
commandline.registervalue('style')
commandline.registervalue('modes')
+commandline.registervalue('verbose')
commandline.expand
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex
index 007629620..70e19b914 100644
--- a/tex/context/base/colo-ini.tex
+++ b/tex/context/base/colo-ini.tex
@@ -1360,19 +1360,22 @@
\ifx\initializemaintextcolor\undefined
-% \def\initializemaintextcolor
-% {\doifsomething\@@cltekstkleur
-% {\appendtoks\starttextcolor[\@@cltekstkleur]\to\everystarttext
-% \appendtoks\stoptextcolor \to\everystoptext
-% \let\initializemaintextcolor\relax}}
-
- % global ?
+ \let\@@clprevcolor\empty
\def\initializemaintextcolor
- {\doifelsenothing\@@cltextcolor
+ {% saveguard for setting text color to empty after
+ % it has been set
+ \doifnothing\@@cltextcolor
+ {\ifx\@@clprevcolor\empty\else
+ \let\@@cltextcolor\defaulttextcolor
+ \fi}%
+ \doifelsenothing\@@cltextcolor
{\let\maintextcolor\empty}
- {\let\maintextcolor\@@themaintextcolor
- \definecolor[\@@themaintextcolor][\@@cltextcolor]%
+ {\edef\@@clprevcolor{\@@cltextcolor}%
+ \let\maintextcolor\@@themaintextcolor
+ \doifelsenothing\@@cltextcolor % another saveguard
+ {\definecolor[\@@themaintextcolor][\defaulttextcolor]}%
+ {\definecolor[\@@themaintextcolor][\@@cltextcolor]}%
\doinitializemaintextcolor}}
\def\doinitializemaintextcolor
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 69ebcd593..c41d99953 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2006.06.09 13:05}
+\newcontextversion{2006.07.13 22:26}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
@@ -24,6 +24,9 @@
\unprotect
+% \setuplabeltext[\s!itemcount1={{I(},{)}}]
+% \def\labeledcountervalue#1{\labeltexts{#1}{\countervalue{#1}}}
+
\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex}
%D A nice example of a plugin:
@@ -849,11 +852,65 @@
{\expanded{\everyhbox{\the\everyhbox\noexpand\fastenableencoding{\currentencoding}}}%
\def\dealwithmathtextencoding{\let\characterencoding\nocharacterencoding}%
\dealwithmathtextencoding}
-
\appendtoks
\dealwithmathtextencoding
\to \everymathematics
+\def\dohandlemathtoken#1%
+ {\csname
+ \ifmmode
+ \ifcsname\@mt@\mathcollection:\outerencoding#1\endcsname
+ \@mt@\mathcollection:\outerencoding
+ \else\ifcsname\@mt@\mathcollection#1\endcsname
+ \@mt@\mathcollection
+ \else\ifcsname\@mt@\nomathcollection#1\endcsname
+ \@mt@\nomathcollection
+ \else\ifcsname\characterencoding#1\endcsname
+ \characterencoding
+ \else
+ \nocharacterencoding
+ \fi\fi\fi\fi
+ \else
+ \ifcsname\characterencoding#1\endcsname
+ \characterencoding
+ \else\ifcsname\nocharacterencoding#1\endcsname
+ \nocharacterencoding
+ \else\ifcsname\@mt@\mathcollection:\outerencoding#1\endcsname
+ \@mt@\mathcollection:\outerencoding
+ \else\ifcsname\@mt@\mathcollection#1\endcsname
+ \strippedcsname\mathematics\expandafter\endcsname\csname\@mt@\mathcollection
+ \else\ifcsname\@mt@\nomathcollection#1\endcsname
+ \strippedcsname\mathematics\expandafter\endcsname\csname\@mt@\nomathcollection
+ \else
+ \nocharacterencoding
+ \fi\fi\fi\fi\fi
+ \fi
+ #1\endcsname}
+
+\let\dohandlecommand\dohandlemathtoken
+
+\let\outerencoding\empty
+
+\def\checkoutermathencoding
+ {\ifx\outerencoding\empty
+ \ifx\outerencoding\s!default\else
+ \edef\outerencoding{\currentencoding}%
+ \fi
+ \fi}
+
+\prependtoks
+ \checkoutermathencoding
+\to \everymathematics
+
+% \startmathcollection[euler:texnansi]
+% \definemathsymbol [breve] [accent] [tf] ["15]
+% \stopmathcollection
+% \startmathcollection[euler:ec]
+% \definemathsymbol [breve] [accent] [tf] ["08]
+% \stopmathcollection
+%
+% $\breve e$
+
% \separatestring123 456\to\test [\test]
% \def\separatestring#1\to#2%
@@ -1558,6 +1615,16 @@
% \headsym{xx} test \par test
% \stopitemize
+% \def\removeunwantedspaces
+% {\ifhmode
+% \doloop{\ifdim\lastskip>\zeropoint\unskip\else\exitloop\fi}%
+% \fi}
+
+\def\removeunwantedspaces
+ {\ifhmode \ifdim\lastskip>\zeropoint
+ \unskip \@EAEAEA\removeunwantedspaces
+ \fi \fi}
+
% wait till bugfix in etex is widespead
%
% \beginETEX \lastnodetype
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 8deeb434c..2780c21b8 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{2006.06.09 13:05}
+\def\contextversion{2006.07.13 22:26}
%D For those who want to use this:
@@ -242,13 +242,14 @@
\input core-vis.tex
%input core-con.tex
\input core-rul.tex
+\input core-num.tex
+\input core-tsp.tex % splitter
\input core-tab.tex
\input core-nav.tex
\input core-ref.tex
\input core-obj.tex
\input core-buf.tex
\input core-lst.tex
-\input core-num.tex
\input core-itm.tex
\input core-des.tex
\input core-mat.tex
@@ -334,12 +335,14 @@
\input type-ini.tex
\input type-def.tex
+\input meta-tex.tex % we need fonts
\input prop-ini.tex
\input prop-lay.tex % needs core-ref.tex
\input prop-mis.tex
\input math-ini.tex % needs enco-ini.tex
+\input math-ext.tex
%D Now we're ready for more core modules.
diff --git a/tex/context/base/core-con.tex b/tex/context/base/core-con.tex
index ca2bb7a86..98837ec6d 100644
--- a/tex/context/base/core-con.tex
+++ b/tex/context/base/core-con.tex
@@ -20,6 +20,21 @@
%D one and a core one, but to keep things simple as well as
%D preserve the overview, I decided against splitting.
+\let\spr\firstofoneargument % separator
+\let\stp\firstofoneargument % stopper
+
+% cleaner, some day:
+%
+% \def\isolateseparators % etex only, even works with list separator overloading
+% {\unexpanded\def\spr##1{{##1}}%
+% \unexpanded\def\stp##1{{##1}}}
+
+% needed for arab :
+
+\def\isolateseparators % even works with list separator overloading
+ {\def\spr##1{{##1}}%
+ \def\stp##1{{##1}}}
+
%D \macros
%D {numbers}
%D
diff --git a/tex/context/base/core-des.tex b/tex/context/base/core-des.tex
index 2f5dafd31..195bb01b7 100644
--- a/tex/context/base/core-des.tex
+++ b/tex/context/base/core-des.tex
@@ -508,23 +508,23 @@
\setvalue{showdn\v!sub\c!number}%
{\getvalue{showdn\c!number}%
- \descriptionparameter\c!separator
+ \spr{\descriptionparameter\c!separator}%
\convertednumber[\v!sub\currentdescriptionnumber]}
\setvalue{showdn\v!sub\v!sub\c!number}%
{\getvalue{showdn\v!sub\c!number}%
- \descriptionparameter\c!separator
+ \spr{\descriptionparameter\c!separator}%
\convertednumber[\v!sub\v!sub\currentdescriptionnumber]}
\setvalue{showdn\v!sub\v!sub\v!sub\c!number}%
{\getvalue{showdn\v!sub\v!sub\c!number}%
- \descriptionparameter\c!separator
+ \spr{\descriptionparameter\c!separator}%
\convertednumber[\v!sub\v!sub\v!sub\currentdescriptionnumber]}
\def\domakednnumber
{\descriptionparameter\c!left
\strut\doshowdnnumber
- \descriptionparameter\c!stopper
+ % \descriptionparameter\c!stopper
\descriptionparameter\c!right}
\setvalue{\??dd\s!set\v!sub\s!sub\s!sub\c!number}#1%
@@ -706,7 +706,8 @@
{\getvalue{\??ds#1\c!width}}
{\doattributes
{\??ds#1}\c!headstyle\c!headcolor
- {\getvalue{\??ds#1\c!sample}\getvalue{\??ds#1\c!separator}}}
+ {\getvalue{\??ds#1\c!sample}%
+ \spr{\getvalue{\??ds#1\c!separator}}}}
{\getvalue{\??ds#1\c!distance}}%
\advance\!!widtha \getvalue{\??ds#1\c!distance}%
\setbox2\hbox to \!!widtha
@@ -715,7 +716,7 @@
{\strut
\getvalue{\??ds#1\c!text}%
\hss
- \getvalue{\??ds#1\c!separator}%
+ \spr{\getvalue{\??ds#1\c!separator}}%
\hskip\getvalue{\??ds#1\c!distance}}}%
\parindent\zeropoint
\hskip#2\!!widtha\indent\box2%
@@ -811,7 +812,7 @@
\c!conversion=, % to be upward compatible
\c!way=\v!by\v!text,
\c!sectionnumber=\v!yes,
- \c!separator=.,
+ \c!separator=\@@koseparator, % per 2006.06.23, was .
\c!stopper=,
\c!number=,
\c!command=]
diff --git a/tex/context/base/core-lst.tex b/tex/context/base/core-lst.tex
index 74a6e34d7..2d45282c2 100644
--- a/tex/context/base/core-lst.tex
+++ b/tex/context/base/core-lst.tex
@@ -404,7 +404,7 @@
{\let\splitlistsymbol\currentlistnumber}}% geen \edef ivm enz
\doif{\listparameter\c!label}\v!yes{\leftlabeltext\currentlist}%
\strut
- \def\numberseparator{\listparameter\c!separator}%
+ \def\numberseparator{\listparameter\c!separator}% overloaded, todo
\@EA\dohandlelistnumber\@EA{\splitlistsymbol}%
\listparameter\c!stopper
\doif{\listparameter\c!label}\v!yes{\rightlabeltext\currentlist}}
diff --git a/tex/context/base/core-mak.tex b/tex/context/base/core-mak.tex
index 68315ea57..761f83156 100644
--- a/tex/context/base/core-mak.tex
+++ b/tex/context/base/core-mak.tex
@@ -48,24 +48,6 @@
\def\doplacement
{\dodoubleempty\dodoplacement}
-% \def\dodoplacement[#1][#2]% correctie moet mooier
-% {\bgroup
-% \dowithnextbox
-% {\setlocalhsize
-% \getparameters[#1][#2]%
-% \getvalue{#1\c!voor}%
-% \doifvalue{#1\c!regelcorrectie}\v!aan \startbaselinecorrection
-% \doifinset{\getvalue{#1\c!marge}}{\v!standaard,\v!ja}\noindent
-% \hbox to \localhsize
-% {\getvalue{#1\c!links}%
-% \flushnextbox
-% \getvalue{#1\c!rechts}}%
-% \doifvalue{#1\c!dieptecorrectie}\v!aan\baselinecorrection
-% \doifvalue{#1\c!regelcorrectie }\v!aan\stopbaselinecorrection
-% \getvalue{#1\c!na}%
-% \egroup}
-% \vbox}
-
\def\dodoplacement[#1][#2]% correctie moet mooier
{\bgroup
\dowithnextboxcontent
diff --git a/tex/context/base/core-mat.tex b/tex/context/base/core-mat.tex
index b80c9cc09..2170c44c7 100644
--- a/tex/context/base/core-mat.tex
+++ b/tex/context/base/core-mat.tex
@@ -155,7 +155,8 @@
[\c!text=\v!formula,
\c!way=\@@fmway,
\c!blockway=\@@fmblockway,
- \c!location=\v!intext]
+ \c!location=\v!intext,
+ \c!conversion=\@@fmconversion]
\def\setupformulas
{\dodoubleargument\getparameters[\??fm]}
@@ -244,6 +245,7 @@
[\c!way=\@@nrway,
\c!blockway=,
\c!sectionnumber=\@@nrsectionnumber,
+ \c!conversion=\v!numbers,
\c!location=\v!right,
\c!left=(,
\c!right=),
@@ -441,9 +443,9 @@
%\forgetall % otherwise backgrounds fail
\ifdim\lastskip<\zeropoint\else
\par
- \ifvmode \ifdim\parskip>\zeropoint\relax
- \whitespace \vskip-\parskip % kind of forces and cancels again
- \fi \fi
+ \ifvmode \ifdim\parskip>\zeropoint\relax
+ \whitespace \vskip-\parskip % kind of forces and cancels again
+ \fi \fi
\fi
\doif\displaygridcorrection{-\v!top}{\kern-\strutht}% new, currently only option/default
\beforedisplayspace
@@ -700,7 +702,7 @@
\def\stopformula {\normalstopformula\egroup$\hss}%
#1%
\egroup
- \stopdisplaymath
+ \stopdisplaymath
\egroup}
\def\dispplaceformula[#1]#2$$#3$$%
diff --git a/tex/context/base/core-ntb.tex b/tex/context/base/core-ntb.tex
index 2e424c2b7..f50d785f8 100644
--- a/tex/context/base/core-ntb.tex
+++ b/tex/context/base/core-ntb.tex
@@ -61,14 +61,41 @@
%D However, the next alternative also takes care of preceding
%D and following white space.
+% \def\bTBLCELL % why not \doinhibitblank
+% {\inhibitblank\doconvertfont\tbltblstyle\empty\everypar{\delayedbegstrut}}
+
+% \def\eTBLCELL
+% {\ifhmode
+% \delayedendstrut
+% \par % added 13/4/2006
+% \else
+% \par
+% \ifdim\prevdepth<\zeropoint % =-1000pt ?
+% \vskip-\strutdp
+% \else
+% \removebottomthings
+% \fi
+% \fi}
+
+%D \startbuffer
+%D \bTABLE[left={(},right={)},top=\startnarrower,bottom=\stopnarrower]
+%D \bTR \bTD something \eTD \eTR
+%D \eTABLE
+%D
+%D \typebuffer \getbuffer
+
\def\bTBLCELL % why not \doinhibitblank
- {\inhibitblank\doconvertfont\tbltblstyle\empty\everypar{\delayedbegstrut}}
+ {\inhibitblank
+ \doconvertfont\tbltblstyle\empty
+ \everypar{\tbltblleft\delayedbegstrut}}
\def\eTBLCELL
{\ifhmode
\delayedendstrut
+ \tbltblright
\par % added 13/4/2006
\else
+ % not sure yet:\tbltblright
\par
\ifdim\prevdepth<\zeropoint % =-1000pt ?
\vskip-\strutdp
@@ -226,57 +253,15 @@
\let\setupTBLsection\relax
-% \def\setupTBLcell#1#2% cell over col over row
-% {\setupTBLsection % already forgotten
-% \getvalue{\@@tblprefix\v!each\v!each}%
-% \getvalue{\@@tblprefix\c!y\v!each}%
-% \getvalue{\@@tblprefix\c!x\v!each}%
-% \getvalue{\@@tblprefix\c!y\v!oddeven{#1}}%
-% \getvalue{\@@tblprefix\c!x\v!oddeven{#2}}%
-% \getvalue{\@@tblprefix\c!x\v!oddeven{#2}\c!y\v!oddeven{#1}}%
-% \ifnum#1=\plusone
-% \getvalue{\@@tblprefix\c!y\v!first}%
-% \executeifdefined{\@@tblprefix\c!x#2\c!y\v!first}\donothing
-% \fi
-% \ifnum#2=\plusone
-% \getvalue{\@@tblprefix\c!x\v!first}%
-% \executeifdefined{\@@tblprefix\c!x\v!first\c!y#1}\donothing
-% \fi
-% \ifnum#1=\maximumrow\relax
-% \getvalue{\@@tblprefix\c!y\v!last}%
-% \executeifdefined{\@@tblprefix\c!x#2\c!y\v!last}\donothing
-% \fi
-% \ifnum#2=\maximumcol\relax
-% \getvalue{\@@tblprefix\c!x\v!last}%
-% \executeifdefined{\@@tblprefix\c!x\v!last\c!y#1}\donothing
-% \fi
-% \ifnum#1=\maximumrow\relax\ifnum#2=\maximumcol\relax
-% \getvalue{\@@tblprefix\c!x\v!last\c!y\v!last}%
-% \fi\fi
-% \ifnum#1=\plusone \ifnum#2=\plusone
-% \getvalue{\@@tblprefix\c!x\v!first\c!y\v!first}%
-% \fi\fi
-% \ifnum#1>\noftblhdnxlines\else
-% \executeifdefined{\@@tblprefix\v!header\v!each}\donothing
-% \executeifdefined{\@@tblprefix\v!header#2}\donothing
-% \fi
-% \executeifdefined{\@@tblprefix\c!y#1}\donothing
-% \getvalue{\@@tbl\@@tbl\c!extras}\letvalue{\@@tbl\@@tbl\c!extras}\relax % new, see x-fo
-% \executeifdefined{\@@tblprefix\c!x#2}\donothing
-% \getvalue{\@@tbl\@@tbl\c!extras}\letvalue{\@@tbl\@@tbl\c!extras}\relax % new, see x-fo
-% \executeifdefined{\@@tblprefix\c!x#2\c!y#1}\donothing
-% \global\letcscsname\@@tblsplitafter\csname\@@tbl\@@tbl\c!after\endcsname
-% \relax}
-
\def\setupTBLcell#1#2% cell over col over row
{\setupTBLsection % already forgotten
-\edef\positiverow{\number#1}%
-\edef\positivecol{\number#2}%
-\scratchcounter-\maximumrow\advance\scratchcounter#1\advance\scratchcounter\minusone
-\edef\negativerow{\number\scratchcounter}%
-\scratchcounter-\maximumcol\advance\scratchcounter#2\advance\scratchcounter\minusone
-\edef\negativecol{\number\scratchcounter}%
+ \edef\positiverow{\number#1}%
+ \edef\positivecol{\number#2}%
+ \scratchcounter-\maximumrow\advance\scratchcounter#1\advance\scratchcounter\minusone
+ \edef\negativerow{\number\scratchcounter}%
+ \scratchcounter-\maximumcol\advance\scratchcounter#2\advance\scratchcounter\minusone
+ \edef\negativecol{\number\scratchcounter}%
\getvalue{\@@tblprefix\v!each\v!each}%
\getvalue{\@@tblprefix\c!y\v!each}%
\getvalue{\@@tblprefix\c!x\v!each}%
@@ -310,13 +295,13 @@
\executeifdefined{\@@tblprefix\v!header\positivecol}\donothing
\fi
\executeifdefined{\@@tblprefix\c!y\positiverow}\donothing
-\executeifdefined{\@@tblprefix\c!y\negativerow}\donothing
+ \executeifdefined{\@@tblprefix\c!y\negativerow}\donothing
\getvalue{\@@tbl\@@tbl\c!extras}\letvalue{\@@tbl\@@tbl\c!extras}\relax % new, see x-fo
\executeifdefined{\@@tblprefix\c!x\positivecol}\donothing
-\executeifdefined{\@@tblprefix\c!x\negativecol}\donothing
+ \executeifdefined{\@@tblprefix\c!x\negativecol}\donothing
\getvalue{\@@tbl\@@tbl\c!extras}\letvalue{\@@tbl\@@tbl\c!extras}\relax % new, see x-fo
\executeifdefined{\@@tblprefix\c!x\positivecol\c!y\positiverow}\donothing
-\executeifdefined{\@@tblprefix\c!x\negativecol\c!y\negativerow}\donothing
+ \executeifdefined{\@@tblprefix\c!x\negativecol\c!y\negativerow}\donothing
\global\letcscsname\@@tblsplitafter\csname\@@tbl\@@tbl\c!after\endcsname
\relax}
@@ -543,7 +528,8 @@
\processaction
[\tbltblsplit]
[ \v!yes=>\enableTBLbreaktrue,
- \v!repeat=>\enableTBLbreaktrue\multipleTBLheadstrue]%
+ \v!repeat=>\enableTBLbreaktrue\multipleTBLheadstrue,
+ \v!auto=>\ifinsidesplitfloat\enableTBLbreaktrue\fi]
\processaction
[\tbltblheader]
[\v!repeat=>\multipleTBLheadstrue]%
@@ -966,97 +952,100 @@
\donetrue
\fi\fi
\ifdone
- \executeifdefined{splittblbox\tbltblsplitmethod}\splittblboxa{#1}%
+ \executeifdefined{dosplittblbox\tbltblsplitmethod}\dosplittblbox{#1}%
\else
\notsplittblbox{#1}%
\fi}
\newbox\TABLEsplitbox % public, don't change
-% todo: mode: first|next (of niets)
+\let\extratblsplitheight\zeropoint % additional space taken by before/afterTABLEsplitbox
-\def\splittblboxa#1% spacing between rows gets lost in split
- {\setbox\TABLEsplitbox\vbox{#1}%
- \setbox8\vbox{\doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}}%
- \ifmultipleTBLheads
- \setbox2\vbox{}%
- \setbox4\vbox{}%
- \dorecurse\noftblheadlines
- {\setbox0\vsplit\TABLEsplitbox to \lineheight
- \setbox2\vbox{\unvcopy2\unvcopy0}}%
- \dorecurse\noftblnextlines
- {\setbox0\vsplit\TABLEsplitbox to \lineheight
- \setbox4\vbox{\unvcopy4\unvcopy0}}%
- \ifcase\noftblheadlines\else
- \ifdim\pagegoal<\maxdimen
- \dimen0\ht2
- \advance\dimen0\ht8
- \advance\dimen0\pagetotal\relax
- \ifdim\dimen0>\pagegoal
- \bgroup\page\egroup % make sure that local vars are kept
- \fi
- \fi
- \unvcopy2
- \ifcase\noftblnextlines\else
- \setbox2\box4
- \fi
- \fi
- \fi
- \donefalse
- \!!doneafalse
- \doloop
- {\setbox0\vsplit\TABLEsplitbox to \lineheight
- \if!!donea
- \ifdim\pagegoal<\maxdimen
- \setbox0\vbox{\unvbox0}%
- \ifdim\ht0>\zeropoint
- \dimen0\ht0
- \advance\dimen0\ht8
- \advance\dimen0\pagetotal\relax
- \ifdim\dimen0>\pagegoal
- \bgroup\page\egroup % make sure that local vars are kept
- \ifmultipleTBLheads
- \ifcase\noftblheadlines\else\unvcopy2\fi
- \fi
- \fi
- \fi
- \fi
- \fi
- \!!doneatrue
- \ifdone
- \doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}%
- \fi
- \unvbox0
- %\allowbreak
- \bgroup
- % todo: what if tblnextlines ?
- \scratchcounter\recurselevel
- \ifmultipleTBLheads
- \advance\scratchcounter\noftblheadlines
- \fi
- \setupTBLcell{\number\scratchcounter}1
- \ifx\@@tblsplitafter\relax
- \allowbreak
- \else
- \doifelsenothing\@@tblsplitafter
- \allowbreak
- {\scratchcounter\realpageno
- \@@tblsplitafter
- \ifmultipleTBLheads
- \ifnum\scratchcounter<\realpageno
- \ifcase\noftblheadlines\else\unvcopy2\fi
- \fi
- \fi}%
- \fi
- \egroup
- \ifvoid\TABLEsplitbox \exitloop \else \donetrue \fi}}
+% todo: mode: first|next (of niets)
-\let\extratblsplitheight\zeropoint % additional space taken by before/afterTABLEsplitbox
+% \def\dosplittblboxa#1% spacing between rows gets lost in split
+% {\setbox\TABLEsplitbox\vbox{#1}%
+% \setbox8\vbox{\doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}}%
+% \ifmultipleTBLheads
+% \setbox2\vbox{}%
+% \setbox4\vbox{}%
+% \dorecurse\noftblheadlines
+% {\setbox0\vsplit\TABLEsplitbox to \lineheight
+% \setbox2\vbox{\unvcopy2\unvcopy0}}%
+% \dorecurse\noftblnextlines
+% {\setbox0\vsplit\TABLEsplitbox to \lineheight
+% \setbox4\vbox{\unvcopy4\unvcopy0}}%
+% \ifcase\noftblheadlines\else
+% \ifdim\pagegoal<\maxdimen
+% \dimen0\ht2
+% \advance\dimen0\ht8
+% \advance\dimen0\pagetotal\relax
+% \ifdim\dimen0>\pagegoal
+% \bgroup\page\egroup % make sure that local vars are kept
+% \fi
+% \fi
+% \unvcopy2
+% \ifcase\noftblnextlines\else
+% \setbox2\box4
+% \fi
+% \fi
+% \fi
+% \donefalse
+% \!!doneafalse
+% \doloop
+% {\setbox0\vsplit\TABLEsplitbox to \lineheight
+% \if!!donea
+% \ifdim\pagegoal<\maxdimen
+% \setbox0\vbox{\unvbox0}%
+% \ifdim\ht0>\zeropoint
+% \dimen0\ht0
+% \advance\dimen0\ht8
+% \advance\dimen0\pagetotal\relax
+% \ifdim\dimen0>\pagegoal
+% \bgroup\page\egroup % make sure that local vars are kept
+% \ifmultipleTBLheads
+% \ifcase\noftblheadlines\else\unvcopy2\fi
+% \fi
+% \fi
+% \fi
+% \fi
+% \fi
+% \!!doneatrue
+% \ifdone
+% \doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}%
+% \fi
+% \unvbox0
+% %\allowbreak
+% \bgroup
+% % todo: what if tblnextlines ?
+% \scratchcounter\recurselevel
+% \ifmultipleTBLheads
+% \advance\scratchcounter\noftblheadlines
+% \fi
+% \setupTBLcell{\number\scratchcounter}1
+% \ifx\@@tblsplitafter\relax
+% \allowbreak
+% \else
+% \doifelsenothing\@@tblsplitafter
+% \allowbreak
+% {\scratchcounter\realpageno
+% \@@tblsplitafter
+% \ifmultipleTBLheads
+% \ifnum\scratchcounter<\realpageno
+% \ifcase\noftblheadlines\else\unvcopy2\fi
+% \fi
+% \fi}%
+% \fi
+% \egroup
+% \ifvoid\TABLEsplitbox \exitloop \else \donetrue \fi}}
-% \def\splittblboxb#1%
-% {\testpage[2]% quite save since a row is > 1 lineheight and we don't want one-liners
+% \def\dosplittblboxb#1%
+% {\scratchdimen-\extratblsplitheight
+% \advance\scratchdimen-\tbltblsplitoffset
+% \expanded{\testpage[2][\the\scratchdimen]}% quite save since a row is > 1 lineheight and we don't want one-liners
% \setbox\TABLEsplitbox\vbox{#1}%
% \setbox8\vbox{\doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}}%
+% \dimen8\ht8\advance\dimen8\dp8
% \ifmultipleTBLheads
% \setbox2\vbox{}%
% \setbox4\vbox{}%
@@ -1072,33 +1061,57 @@
% {\ifdim\pagegoal<\maxdimen
% \scratchdimen\pagegoal
% \advance\scratchdimen-\pagetotal
+% \!!donecfalse
% \else
% \scratchdimen\textheight
+% \!!donectrue
% \fi
-% \ifmultipleTBLheads
-% \ifcase\noftblheadlines\else
-% \advance\scratchdimen-\ht2
-% \fi
-% \fi
-% \advance\scratchdimen-\ht8
-% \getnoflines\scratchdimen
-% \ifdim\noflines\lineheight>\scratchdimen
-% \advance\scratchdimen-\lineheight
-% \fi
+% \advance\scratchdimen-\dimen8
% \advance\scratchdimen-\extratblsplitheight
+% \advance\scratchdimen-\tbltblsplitoffset
% \setbox\finaltblbox\vbox
% {\ifmultipleTBLheads
% \ifcase\noftblheadlines\else
-% \unvcopy2
-% \doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}%
+% \unvcopy2 \doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}%
% \fi
-% \fi
-% \setbox0\vsplit\TABLEsplitbox to\scratchdimen
-% \unvbox0}%
+% \fi}%
% \if!!donea\else\ifcase\noftblnextlines\else
% \setbox2\box4
% \fi\fi
% \!!doneatrue
+% % alternatively we could use a kind of balancing like splitter
+% % first to scratchdimen and then smaller etc; more code and copy -)
+% \!!counta\zerocount
+% \doloop
+% {\setbox\scratchbox\vsplit\TABLEsplitbox to \onepoint
+% \setbox\scratchbox\vbox{\unvbox\scratchbox}%
+% \bgroup
+% \advance\scratchdimen-\ht\scratchbox
+% \advance\scratchdimen-\dp\scratchbox
+% \advance\scratchdimen-\ht\finaltblbox
+% \advance\scratchdimen-\dp\finaltblbox\relax
+% \ifdim\scratchdimen>\zeropoint
+% \egroup
+% \setbox\finaltblbox\vbox
+% {\unvbox\finaltblbox
+% \unvbox\scratchbox}%
+% \ifvoid\TABLEsplitbox \exitloop \fi
+% \else\if!!donec
+% % we have text height available, but the (one) cell is too
+% % large to fit, so, in order to avoid loops/deadcycles we do:
+% \egroup
+% \setbox\finaltblbox\vbox
+% {\unvbox\finaltblbox
+% \unvbox\scratchbox}%
+% \exitloop
+% \else
+% \egroup
+% \setbox\TABLEsplitbox\vbox
+% {\unvbox\scratchbox
+% \ifvoid\TABLEsplitbox\else\unvbox\TABLEsplitbox\allowbreak\fi}%
+% \exitloop
+% \fi\fi}%
+% %
% \postprocessTABLEsplitbox\finaltblbox
% \ifvoid\TABLEsplitbox
% \beforeTABLEsplitbox
@@ -1107,116 +1120,42 @@
% \@@tblsplitafter
% \exitloop
% \else
-% % hack
-% \scratchdimen\pagegoal
-% \ifdim\scratchdimen<\maxdimen
+% % hack
+% \ifdim\pagegoal<\maxdimen
+% \scratchdimen\pagegoal
% \advance\scratchdimen \lineheight
% \global\pagegoal\scratchdimen
% \fi
% % brrr
-% \beforeTABLEsplitbox
-% \box\finaltblbox
-% \afterTABLEsplitbox
-% \@@tblsplitafter
+% \ifdim\ht\finaltblbox>\zeropoint
+% \beforeTABLEsplitbox
+% \box\finaltblbox
+% \afterTABLEsplitbox
+% \@@tblsplitafter
+% \fi
% \page
% \fi}}
-\def\splittblboxb#1%
- {\scratchdimen-\extratblsplitheight
- \advance\scratchdimen-\tbltblsplitoffset
- \expanded{\testpage[2][\the\scratchdimen]}% quite save since a row is > 1 lineheight and we don't want one-liners
- \setbox\TABLEsplitbox\vbox{#1}%
- \setbox8\vbox{\doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}}%
- \dimen8\ht8\advance\dimen8\dp8
+\def\dosplittblbox#1%
+ {\resettsplit
+ \def\tsplitminimumfreelines{2}%
+ \def\tsplitminimumfreespace{\dimexpr\extratblsplitheight+\tbltblsplitoffset\relax}%
+ \def\tsplitbeforeresult {\beforeTABLEsplitbox}%
+ \def\tsplitafterresult {\afterTABLEsplitbox}%
+ \def\tsplitafter {\@@tblsplitafter}%
+ \setbox\tsplitcontent\vbox{#1}% \the\tbltoks
\ifmultipleTBLheads
- \setbox2\vbox{}%
- \setbox4\vbox{}%
\dorecurse\noftblheadlines
- {\setbox0\vsplit\TABLEsplitbox to \lineheight
- \setbox2\vbox{\unvcopy2\unvcopy0}}%
+ {\setbox\scratchbox\vsplit\tsplitcontent to \lineheight
+ \setbox\tsplithead\vbox{\unvcopy\tsplithead\unvcopy\scratchbox}}%
\dorecurse\noftblnextlines
- {\setbox0\vsplit\TABLEsplitbox to \lineheight
- \setbox4\vbox{\unvcopy4\unvcopy0}}%
+ {\setbox\scratchbox\vsplit\tsplitcontent to \lineheight
+ \setbox\tsplitnext\vbox{\unvcopy\tsplitnext\unvcopy\scratchbox}}%
\fi
- \!!doneafalse
- \doloop
- {\ifdim\pagegoal<\maxdimen
- \scratchdimen\pagegoal
- \advance\scratchdimen-\pagetotal
- \!!donecfalse
- \else
- \scratchdimen\textheight
- \!!donectrue
- \fi
- \advance\scratchdimen-\dimen8
- \advance\scratchdimen-\extratblsplitheight
- \advance\scratchdimen-\tbltblsplitoffset
- \setbox\finaltblbox\vbox
- {\ifmultipleTBLheads
- \ifcase\noftblheadlines\else
- \unvcopy2 \doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}%
- \fi
- \fi}%
- \if!!donea\else\ifcase\noftblnextlines\else
- \setbox2\box4
- \fi\fi
- \!!doneatrue
- % alternatively we could use a kind of balancing like splitter
- % first to scratchdimen and then smaller etc; more code and copy -)
- \!!counta\zerocount
- \doloop
- {\setbox\scratchbox\vsplit\TABLEsplitbox to \onepoint
- \setbox\scratchbox\vbox{\unvbox\scratchbox}%
- \bgroup
- \advance\scratchdimen-\ht\scratchbox
- \advance\scratchdimen-\dp\scratchbox
- \advance\scratchdimen-\ht\finaltblbox
- \advance\scratchdimen-\dp\finaltblbox\relax
- \ifdim\scratchdimen>\zeropoint
- \egroup
- \setbox\finaltblbox\vbox
- {\unvbox\finaltblbox
- \unvbox\scratchbox}%
- \ifvoid\TABLEsplitbox \exitloop \fi
- \else\if!!donec
- % we have text height available, but the (one) cell is too
- % large to fit, so, in order to avoid loops/deadcycles we do:
- \egroup
- \setbox\finaltblbox\vbox
- {\unvbox\finaltblbox
- \unvbox\scratchbox}%
- \exitloop
- \else
- \egroup
- \setbox\TABLEsplitbox\vbox
- {\unvbox\scratchbox
- \ifvoid\TABLEsplitbox\else\unvbox\TABLEsplitbox\allowbreak\fi}%
- \exitloop
- \fi\fi}%
- %
- \postprocessTABLEsplitbox\finaltblbox
- \ifvoid\TABLEsplitbox
- \beforeTABLEsplitbox
- \box\finaltblbox
- \afterTABLEsplitbox
- \@@tblsplitafter
- \exitloop
- \else
- % hack
- \ifdim\pagegoal<\maxdimen
- \scratchdimen\pagegoal
- \advance\scratchdimen \lineheight
- \global\pagegoal\scratchdimen
- \fi
- % brrr
- \ifdim\ht\finaltblbox>\zeropoint
- \beforeTABLEsplitbox
- \box\finaltblbox
- \afterTABLEsplitbox
- \@@tblsplitafter
- \fi
- \page
- \fi}}
+ \doifsomething\tbltblspaceinbetween
+ {\def\tsplitinbetween{\blank[\tbltblspaceinbetween]}}%
+ \def\postprocesstsplit{\postprocessTABLEsplitbox{\box\tsplitresult}}%
+ \handletsplit}
% ! ! ! ! TODO: naast \postprocessTABLEsplitbox ook evt \postprocessTABLEbox voor niet split
@@ -1235,9 +1174,14 @@
{\iftraceTABLE\showtblwids{B#1}\fi
\!!dimena\hsize
\!!counta\zerocount
+% test, dunno yet
+\advance\!!dimena-\tbltblleftmargindistance
+\advance\!!dimena-\tbltblrightmargindistance
+\advance\!!dimena-\tbltblcolumndistance
\dorecurse\maximumcol
{\scratchdimen\gettblaut\recurselevel\relax
-% test: \advance\!!dimena-\gettbldis\recurselevel\relax
+% test, seems to work ok
+\advance\!!dimena-\gettbldis\recurselevel\relax
\ifdim\scratchdimen>\zeropoint\relax
\advance\!!dimena -\scratchdimen
\else
@@ -1498,12 +1442,14 @@
\c!spaceinbetween=,
\c!maxwidth=8em,
\c!textwidth=\hsize,
- \c!split=\v!no,
+ \c!split=\v!auto,
\c!splitoffset=0pt,
\c!distance=\zeropoint, % individual column
\c!columndistance=\zeropoint, % each column (whole table)
\c!leftmargindistance=\zeropoint, % whole table
\c!rightmargindistance=\zeropoint,% whole table
+ \c!left=,
+ \c!right=,
\c!splitmethod=a]
%D We have already prepared the previous macros for nesting,
diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex
index f3224d94d..0876ba13d 100644
--- a/tex/context/base/core-ref.tex
+++ b/tex/context/base/core-ref.tex
@@ -198,8 +198,9 @@
\the\everyreference
\makesectionformat
\writereference{#2}
- {\sectionformat\sectionseparator\sectionseparator\noexpand\pagenumber}
- {\noexpand\realfolio}{#3}%
+ {\sectionformat\sectionseparator\sectionseparator\noexpand\pagenumber}%
+ {\noexpand\realfolio}%
+ {#3}%
\egroup}
\def\rawpagereference#1#2%
@@ -207,15 +208,18 @@
\the\everyreference
\makesectionformat
\writereference{#2}
- {\sectionformat\sectionseparator\sectionseparator\noexpand\pagenumber}
- {\noexpand\realfolio}{}%
+ {\sectionformat\sectionseparator\sectionseparator\noexpand\pagenumber}%
+ {\noexpand\realfolio}%
+ {}%
\egroup}
\def\rawtextreference#1#2#3%
{\bgroup
\the\everyreference
\writereference{#2}
- {}{\noexpand\realfolio}{#3}%
+ {}%
+ {\noexpand\realfolio}%
+ {#3}%
\egroup}
diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex
index a192c6526..ebc743af1 100644
--- a/tex/context/base/core-reg.tex
+++ b/tex/context/base/core-reg.tex
@@ -423,12 +423,13 @@
\def\doregistercharacter[#1]#2%
{\global\firstregisterentrytrue
- \doifelsevalue{\??id#1\c!indicator}\v!yes
- {\executeifdefined
- {\strippedcsname\doregistercharacter\getvalue{\??id#1\c!alternative}}%
- \doregistercharactera
- [#1]{#2}}
- {\noregistercharacter[#1]{#2}}}
+ \doifsomething{#2}
+ {\doifelsevalue{\??id#1\c!indicator}\v!yes
+ {\executeifdefined
+ {\strippedcsname\doregistercharacter\getvalue{\??id#1\c!alternative}}%
+ \doregistercharactera
+ [#1]{#2}}
+ {\noregistercharacter[#1]{#2}}}}
\def\noregistercharacter[#1]#2%
{\getvalue{\??id#1\c!before}%
@@ -465,8 +466,9 @@
% {\pagereference[#1:#2]}}
\def\doregisterreference[#1]#2%
- {\doifvalue{\??id#1\c!referencing}\v!on
- {\pagereference[#1:\strippedcsname#2]}}
+ {\doifsomething{#2}
+ {\doifvalue{\??id#1\c!referencing}\v!on
+ {\pagereference[#1:\strippedcsname#2]}}}
\def\dosetpageregisterletter#1#2%
{\gdef\c!entryreference
diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex
index c7c480c1b..83d1800d8 100644
--- a/tex/context/base/core-rul.tex
+++ b/tex/context/base/core-rul.tex
@@ -641,7 +641,7 @@
\def\copylocalframed[#1]#2[#3]%
{\copyparameters[#1][#3]%
- [\c!width,\c!height,\c!offset,\c!empty,\c!rulethickness,%
+ [\c!width,\c!height,\c!autowidth,\c!offset,\c!empty,\c!rulethickness,%
\c!radius,\c!corner,\c!depth,\c!frame,\c!framecolor,%
\c!foregroundstyle,\c!foregroundcolor,\c!lines,\c!orientation,%
\c!topframe,\c!bottomframe,\c!leftframe,\c!rightframe,%
@@ -741,6 +741,8 @@
\edef\@@locallocation {\framedparameter\c!location}%
\edef\@@localorientation{\framedparameter\c!orientation}%
%
+ \edef\@@localautowidth {\framedparameter\c!autowidth}%
+ %
\ifx\@@localframing\v!overlay % no frame, no offset, no framewidth
\boxhasframefalse
\let\localoffset\v!overlay
@@ -1035,14 +1037,21 @@
{\dontshowcomposition
\@@stopframedorientation
\ifboxhasformat
- \ifx\localwidth\v!fit
+ \ifx\@@localautowidth\v!force
\ifreshapeframebox\doreshapeframedbox\fi
\boxhaswidthfalse
- \else\ifx\localwidth\v!fixed
- \boxhaswidthfalse
\else
- \resetshapeframebox
- \fi\fi
+ \ifx\localwidth\v!fit
+ \ifx\@@localautowidth\v!yes
+ \ifreshapeframebox\doreshapeframedbox\fi
+ \fi
+ \boxhaswidthfalse
+ \else\ifx\localwidth\v!fixed
+ \boxhaswidthfalse
+ \else
+ \resetshapeframebox
+ \fi\fi
+ \fi
\else
\resetshapeframebox
\fi
@@ -1490,10 +1499,38 @@
%D or free widths and heights. Each combination gets its own
%D macro.
+%D The following code handles one-liners: \type{align={line,flushright}}.
+%D Beware, since we entered a group and either or not grab the next
+%D bgroup token, we need to finish the group in the oneliner mode.
+
+\ifx\raggedoneliner\undefined \chardef\raggedoneliner\zerocount \fi
+
+\def\doformatonelinerbox % beware: assumes explicit preceding bgroup
+ {\ifcase\raggedoneliner
+ \expandafter\nodoformatonelinerbox
+ \else
+ \expandafter\dodoformatonelinerbox
+ \fi}
+
+\def\dodoformatonelinerbox
+ {\dowithnextboxcontent
+ {\ignorespaces}
+ {\hbox to \hsize
+ {\ifcase\raggedstatus\or\hss\or\hss\fi
+ \unhbox\nextbox \removeunwantedspaces
+ \ifcase\raggedstatus\or \or\hss\or\hss\fi}%
+ \egroup}
+ \hbox}
+
+\def\nodoformatonelinerbox % grabs {
+ {\let\next=}
+
+%D The handlers:
+
\def\doformatboxSomeFormat
{\vbox to \!!heighta
\bgroup
- \let\postprocessframebox\relax
+ \let\postprocessframebox\relax
\forgetall
\oninterlineskip
\hsize\!!widtha
@@ -1503,16 +1540,15 @@
\dobeforeframedbox
\bgroup
\localbegstrut
- \@@handleoneliner
\aftergroup\localendstrut
\aftergroup\doafterframedbox
\aftergroup\egroup
- \let\next=}
+ \doformatonelinerbox}
\def\doformatboxNoFormat
{\vbox to \!!heighta
\bgroup
- \let\postprocessframebox\relax
+ \let\postprocessframebox\relax
\forgetall
\oninterlineskip
\hsize\!!widtha
@@ -1522,11 +1558,10 @@
\vss
\bgroup
\localbegstrut
- \@@handleoneliner
\aftergroup\localendstrut
\aftergroup\vss
\aftergroup\egroup
- \let\next=}
+ \doformatonelinerbox}
\def\doformatboxHeight
{\vbox to \!!heighta
@@ -1542,8 +1577,7 @@
\aftergroup\vss
\aftergroup\egroup
\localbegstrut
- \@@handleoneliner
- \let\next=}
+ \doformatonelinerbox}
\def\doformatboxWidth
{\vbox
@@ -1557,11 +1591,10 @@
\dobeforeframedbox
\bgroup
\localbegstrut
- \@@handleoneliner
\aftergroup\localendstrut
\aftergroup\doafterframedbox
\aftergroup\egroup
- \let\next=}
+ \doformatonelinerbox}
\def\doformatboxVSize
{\vbox to \!!heighta
@@ -1578,8 +1611,7 @@
\bgroup
\aftergroup\egroup
\localstrut
- \@@handleoneliner
- \let\next=}
+ \doformatonelinerbox}
\def\doformatboxHSize
{\hbox to \!!widtha
@@ -1589,11 +1621,10 @@
\doframedsetups
\hss
\localstrut
- \@@handleoneliner
\bgroup
\aftergroup\hss
\aftergroup\egroup
- \let\next=}
+ \doformatonelinerbox}
\def\doformatboxNoSize
{\hbox
@@ -1601,8 +1632,7 @@
\let\postprocessframebox\relax
\doframedsetups
\localstrut
- \@@handleoneliner
- \let\next=}
+ \doformatonelinerbox}
\let\doframedsetups\relax
@@ -3349,6 +3379,7 @@
\c!autostrut=\v!yes,
\c!location=\v!normal,
\c!orientation=,
+ \c!autowidth=\v!yes,
\c!setups=]
\setupscreens
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex
index 30ceeed2e..b94ceee70 100644
--- a/tex/context/base/core-sec.tex
+++ b/tex/context/base/core-sec.tex
@@ -79,25 +79,25 @@
% and postprocessed on demand
\def\numberseparator {.} % reasonable default
-\def\sectionseparator{:} % was : but is now -
+\def\sectionseparator{-} % was : but is now -
-\def\@@filterfirstpart [#1::#2]{#1}
-\def\@@filtersecondpart [#1::#2]{#2}
+\def\@@filterfirstpart [#1--#2]{#1}
+\def\@@filtersecondpart [#1--#2]{#2}
-\def\@@filterblockpart [#1::#2::#3]{#1}
-\def\@@filternumberpart [#1::#2::#3]{#2}
-\def\@@filterpagepart [#1::#2::#3]{#3}
-\def\@@filterblocknumberpart[#1::#2::#3]{#1::#2}
+\def\@@filterblockpart [#1--#2--#3]{#1}
+\def\@@filternumberpart [#1--#2--#3]{#2}
+\def\@@filterpagepart [#1--#2--#3]{#3}
+\def\@@filterblocknumberpart[#1--#2--#3]{#1--#2}
-\def\@@filterheadpart[#1]{\@EA\@@dofilterheadpart\@EA[#1:0]}
-\def\@@filtertailpart[#1]{\@EA\@@dofiltertailpart\@EA[#1:0]}
+\def\@@filterheadpart[#1]{\@EA\@@dofilterheadpart\@EA[#1-0]}
+\def\@@filtertailpart[#1]{\@EA\@@dofiltertailpart\@EA[#1-0]}
-\def\@@dofilterheadpart[#1:#2]{#1}
-\def\@@dofiltertailpart[#1:#2]{#2}
+\def\@@dofilterheadpart[#1-#2]{#1}
+\def\@@dofiltertailpart[#1-#2]{#2}
-\def\@@filterlevelpart[#1::#2::#3]{\@@dofilterlevelpart[#2:0:0:0:0]}
+\def\@@filterlevelpart[#1--#2--#3]{\@@dofilterlevelpart[#2-0-0-0-0]}
-\def\@@dofilterlevelpart[#1:0:0:0:#2]{#1}
+\def\@@dofilterlevelpart[#1-0-0-0-#2]{#1}
\def\gobbleuntilrelax#1\relax{}
@@ -174,6 +174,8 @@
\def\rawsectionnumber#1%
{\countervalue{\??se#1}}
+\def\precedingseparator{\@@koseparator} % brrr
+
\def\domakeprecedingsectionnumber[#1]% will become ugly after speed up
{\bgroup % added
\globallet\precedingsectionnumber\empty
@@ -189,7 +191,8 @@
\doifnot\currentsection\zerosection
{\doifnot{\@@sectionvalue\currentsection}{0}
{\xdef\precedingsectionnumber%
- {\getvalue{\currentsection\c!number}.}}}%
+ {\getvalue{\currentsection\c!number}%
+ \spr{\precedingseparator}}}}%
\fi}%
\fi
\egroup}
@@ -219,29 +222,21 @@
{\precedingsectionnumber\convertednumber[#1]}%
\egroup}
-% \def\preparethenumber#1#2#3% {\??id#1} \number \result
-% {\doifelsevaluenothing{#1\c!separator}
-% {\let\numberseparator\empty
-% \let#3#2}
-% {% was \unexpanded \edef, but we need it unexpanded !
-% \edef\numberseparator{\getvalue{#1\c!separator}}%
-% \edef#3{\@EA\separatednumber\@EA{#2}\getvalue{#1\c!stopper}}}} % hm, etex
-
\def\preparethenumber#1#2#3% {\??id#1} \number \result
{\doifelsevaluenothing{#1\c!separator}
{\let\numberseparator\empty
\let#3#2}
{% was \unexpanded \edef, but we need it unexpanded !
- \edef\numberseparator{\getvalue{#1\c!separator}}%
+ \edef\numberseparator{\spr{\getvalue{#1\c!separator}}}%
\doifelsenothing{\executeifdefined{#1\c!suffix}\empty}
{\edef#3%
{\@EA\separatednumber\@EA{#2}%
- \getvalue{#1\c!stopper}}}
+ }}%\stp{\getvalue{#1\c!stopper}}}}
{\edef#3%
{\@EA\separatednumber\@EA{#2}%
- \getvalue{#1\c!separator}%
+ \spr{\getvalue{#1\c!separator}}%
\getvalue{#1\c!suffix}%
- \getvalue{#1\c!stopper}}}}}
+ \stp{\getvalue{#1\c!stopper}}}}}}
\def\sectionnumberonly[#1]%
{\makesectionnumber[#1]%
@@ -268,19 +263,19 @@
\makecounter{\??se\v!text}
\letvalueempty{\??se\v!text\c!before}
-\letvalueempty{\??se\v!text\c!after }
+\letvalueempty{\??se\v!text\c!after }
\setvalue {\v!text\c!number}{0}
\letvalueempty{\v!text\s!format}
\letvalueempty{\??sk\v!text}
-\letvalueempty{\??sk }
+\letvalueempty{\??sk }
-\letvalue{\??by }\v!text
-\letvalue{\??by\v!text }\v!text
-\letvalue{\??by\v!all }\v!text
-\letvalue{\??by\v!by }\v!text
-\letvalue{\??by\v!by\v!text }\v!text
+\letvalue{\??by }\v!text
+\letvalue{\??by\v!text }\v!text
+\letvalue{\??by\v!all }\v!text
+\letvalue{\??by\v!by }\v!text
+\letvalue{\??by\v!by\v!text}\v!text
\letvalue{\??by\v!by\v!all }\v!text
\letvalue{\??by\v!by\v!page}\v!text % see footnotes
@@ -294,16 +289,6 @@
{\dodosetupsection[#1]}%
{\dodosetupsection[\sectionofhead{#1}]}}
-% \def\dosetupsection[#1][#2][#3]%
-% {\ifthirdargument
-% \getparameters[\??se#1#2][#3]%
-% \else
-% \getparameters[\??se#1][#2]%
-% \fi
-% \doifelsevalue{\??se#1\c!previousnumber}\v!yes
-% {\setvalue{#1\c!number}{\@@longsectionnumber {#1}}}
-% {\setvalue{#1\c!number}{\@@shortsectionnumber{#1}}}}
-
\def\dodosetupsection[#1][#2][#3]%
{\doifdefined{\??se#1}
{\ifthirdargument
@@ -333,29 +318,6 @@
\def\decouplemarking[#1]%
{\couplemarking[#1][]}
-% \def\definesection[#1]%
-% {\doifundefined{\??se#1}
-% {\doifelsenothing\firstsection
-% {\def\firstsection{#1}%
-% \setevalue{\??se#1\c!before}{\v!text}%
-% \setevalue{\??se\v!text\c!after}{#1}}
-% {\setevalue{\??se\commalistelement\c!after}{#1}%
-% \setevalue{\??se#1\c!before}{\lastsection}%
-% \setevalue{\??se\lastsection\c!after}{#1}}%
-% \advance\nofsections \plusone
-% \setevalue{\??se#1\c!level}{\the\nofsections}%
-% \letvalue{\??se#1\c!after}\empty
-% \setvalue{\e!next#1}{\@@nextsectionnumber{#1}}%
-% \setvalue{#1\c!number}{\@@longsectionnumber{#1}}%
-% \setvalue{#1\s!format}{\@@longformatnumber{#1}}%
-% \setevalue{\??by#1}{#1}%
-% \setevalue{\??by\v!by#1}{#1}%
-% \makecounter{\??se#1}%
-% \edef\lastsection{#1}%
-% \setvalue{\??sk#1}{#1}%
-% \letvalue{\??se#1\c!marking}\empty
-% \setupsection[#1][\c!previousnumber=\v!yes]}}%
-
\def\definesection[#1]%
{\doifundefined{\??se#1}
{\doifelsenothing\firstsection
@@ -395,12 +357,6 @@
\fi
\fi}
-% \def\@@setsectionnumber#1#2%
-% {\letgvalueempty{\??se#1\s!start}% signal i.p.v. boolean
-% \setcounter{\??se#1}{#2}%
-% \ifconditional\@@resetsubheadnumbers\resetsectioncounters{#1}\fi
-% \checkpagecounter}
-
\def\@@setsectionnumber#1#2%
{\letgvalueempty{\??se#1\s!start}% signal i.p.v. boolean
\setcounter{\??se#1}{#2}%
@@ -408,12 +364,6 @@
\resetsectioncounters{#1}%
\checkpagecounter}
-% \def\@@nextsectionnumber#1%
-% {\letgvalueempty{\??se#1\s!start}% signal i.p.v. boolean
-% \pluscounter{\??se#1}%
-% \ifconditional\@@resetsubheadnumbers\resetsectioncounters{#1}\fi
-% \checkpagecounter}
-
\def\@@nextsectionnumber#1% patched by GB
{\letgvalueempty{\??se#1\s!start}% signal i.p.v. boolean
\ifnum\countervalue{\??se\v!last#1}>\zerocount
@@ -428,24 +378,8 @@
\def\@@sectionvalue#1% % nog niet overal doorgevoerd
{\countervalue{\??se#1}} % zoeken op \??se
-% \def\@@sectionconversion#1%
-% {\getvalue{\??cv\getvalue{\??se#1\@@sectionblock\c!conversion}}}
-
% suited for chinese too:
-% \def\@@sectionconversion#1#2% a doublure with \@@shortsectionnumber
-% {\ifnum#2=0 0\else % else troubles with \uchar
-% \@EA\ifx\csname\??se#1\@@sectionblock\c!conversion\endcsname\relax
-% \@EA\ifx\csname\??se#1\c!conversion\endcsname\relax
-% #2%
-% \else
-% \getvalue{\??cv\getvalue{\??se#1\c!conversion}}{#2}%
-% \fi
-% \else
-% \getvalue{\??cv\getvalue{\??se#1\@@sectionblock\c!conversion}}{#2}%
-% \fi
-% \fi}
-
\def\@@sectionconversion#1#2% a doublure with \@@shortsectionnumber
{\ifnum#2=0 0\else % else troubles with \uchar
\@EA\ifx\csname\??se#1\@@sectionblock\c!conversion\endcsname\relax
@@ -459,8 +393,11 @@
\fi
\fi}
+% \def\@@sectionlevel#1%
+% {\ifundefined{\??se#1\c!level}0\else\getvalue{\??se#1\c!level}\fi}
+
\def\@@sectionlevel#1%
- {\ifundefined{\??se#1\c!level}0\else\getvalue{\??se#1\c!level}\fi}
+ {\executeifdefined{\??se#1\c!level}0}
% Omdat een markering kan worden herdefinieerd moeten we
% eerst testen of er wel een keten||afhankelijkheid is.
@@ -1183,6 +1120,8 @@
{\expanded{\setupalign[\getvalue{\??ko#1\c!align}]}}%
\doifvaluesomething{\??ko#1\c!tolerance} % wordt al expanded in spa
{\expanded{\setuptolerance[\getvalue{\??ko#1\c!tolerance}]}}%
+ \doifvalue{\??ko#1\c!strut}\v!no % wordt al expanded in spa
+ {\setnostrut}% new
\def\\{\crlf\strut\ignorespaces}}
\def\localkopsetup{\localheadsetup} % kan tzt weg
@@ -1273,33 +1212,6 @@
\setupheadnumber[#1][\foundsectionnumber]%
\setupheadnumber[#1][-1]}
-% \def\setsomeheadconversion#1#2%
-% {\someheadconversionfalse
-% \doifelsevalue{\??ko#1\c!eigennummer}\v!ja
-% {\def\someheadconversion{#2}}
-% {\bepaalkopnummer[#1]%
-% \@EA\ifx\csname\??se\@@sectie\@@sectionblock\c!kopconversie\endcsname\relax
-% \@EA\ifx\csname\??se\@@sectie\c!kopconversie\endcsname\relax
-% \def\someheadconversion{#2}%
-% \else
-% \@EA\ifx\csname\??se\@@sectie\c!kopconversie\endcsname\empty
-% \def\someheadconversion{#2}%
-% \else
-% \someheadconversiontrue
-% \def\someheadconversion%
-% {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\c!kopconversie}}{#2}}%
-% \fi
-% \fi
-% \else
-% \@EA\ifx\csname\??se\@@sectie\@@sectionblock\c!kopconversie\endcsname\empty
-% \def\someheadconversion{#2}%
-% \else
-% \someheadconversiontrue
-% \def\someheadconversion%
-% {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\@@sectionblock\c!kopconversie}}{#2}}%
-% \fi
-% \fi}}
-%
% deal with eigennummer
\def\setsomeheadconversion#1#2%
@@ -1405,7 +1317,7 @@
{\def\currenthead{#1}% dus #1 overal vervangen
\let\finalsectionnumber\dofinalsectionnumber % overloaded ungrouped -)
\unexpanded\def\\{\space}%
- \def\numberseparator{\getvalue{\??ko\currenthead\c!separator}}%
+ \edef\numberseparator{\spr{\getvalue{\??ko\currenthead\c!separator}}}%
\flushingcolumnfloatsfalse % {number} can be \finalsectionnumber
\someheadconversionfalse
\let\fullsectionnumber\limitedfullsectionnumber
@@ -2144,9 +2056,11 @@
{\vbox
{\localheadsetup
\begstrut % use one \strut here!
+ \dontleavehmode % in case there is no strut, else side effects with llap
\ifheadnumbercontent
- \llap{\hbox to 5em{\hfill{#1}%
- \hskip\localheadskip\hskip\leftmargindistance}}%
+ \llap{\hbox to 5em{\hfill{#1}\hskip\localheadskip\hskip\leftmargindistance}}% introduces whitespace
+ % maybe better:
+ % \inleftmargin{\hbox{\hss{#1}\hskip\localheadskip}}%
\fi
{#2}}}
@@ -2170,7 +2084,7 @@
\def\placeheadlohi#1#2#3%
{\ifheadnumbercontent
\setbox0\hbox{#2}
- \setbox2#1{\localheadsetup\advance\hsize-\wd0\relax#3}%
+ \setbox2=#1{\localheadsetup\advance\hsize-\wd0\relax#3}%
\hbox{\box0\hskip\numberheaddistance\box2}%
\else
#1{\localheadsetup\noindent#3}%
@@ -2228,6 +2142,7 @@
\c!aligntitle=\@@koaligntitle,
\c!tolerance=\@@kotolerance,
\c!indentnext=\@@koindentnext,
+ \c!strut=\@@kostrut,
\c!hang=\@@kohang,
\c!file=,
\c!expansion=,
@@ -2246,7 +2161,7 @@
% new per 20/03/3002 (o-pbu-l) / was too confusing
% \c!numberstyle,\c!textstyle,\c!expansion,
% again too confusing
- \c!align,\c!aligntitle,\c!tolerance,\c!grid,\c!hang,
+ \c!align,\c!aligntitle,\c!tolerance,\c!grid,\c!hang,\c!strut,
\c!numbercommand,\c!textcommand,\c!margintext,\c!margin]}}%
\getparameters[\??ko#1][#2]%
\doifsomething{\getvalue{\??ko#1\c!section}}
@@ -2270,7 +2185,7 @@
% new per 20/03/3002 (o-pbu-l) / was too confusing
% \c!numberstyle,\c!textstyle,\c!expansion,
% again too confusing
- \c!align,\c!aligntitle,\c!tolerance,\c!grid,\c!hang,
+ \c!align,\c!aligntitle,\c!tolerance,\c!grid,\c!hang,\c!strut,
\c!numbercommand,\c!textcommand,\c!margintext,\c!margin]%
\getparameters[\??ko#1][\c!expansion=]% iig een value, rather fuzzy
\definemarking[#1][#2]%
@@ -2331,6 +2246,7 @@
\c!align=,
\c!aligntitle=,
\c!tolerance=,
+ \c!strut=,
\c!indentnext=\v!no,
\c!margin=\zeropoint,
\c!hang=\v!none,
diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex
index 4e53a6dcf..b5d743b8f 100644
--- a/tex/context/base/core-spa.tex
+++ b/tex/context/base/core-spa.tex
@@ -2271,30 +2271,33 @@
% \edef\strutdepth{\the\strutdimen}%
% \dosetstrut}
+% interesting, strudepth is 4.05064pt vs 4.05066pt depending on grid
+% nasty rounding problem
+
\def\setstrut
{% height
\strutdimen\normallineheight
-\ifdim\minimumstrutheight>\zeropoint
- \strutdimen\minimumstrutheight
-\else
- \strutdimen\strutheightfactor\strutdimen
-\fi
+ \ifdim\minimumstrutheight>\zeropoint
+ \strutdimen\minimumstrutheight
+ \else
+ \strutdimen\strutheightfactor\strutdimen
+ \fi
\strutdimen\spacingfactor\strutdimen
\edef\strutheight{\the\strutdimen}%
% depth
\strutdimen\normallineheight
\ifgridsnapping
-\ifdim\minimumstrutdepth>\zeropoint
- \strutdimen\minimumstrutdepth
-\else
- \advance\strutdimen-\strutheight
-\fi
+ \ifdim\minimumstrutdepth>\zeropoint
+ \strutdimen\minimumstrutdepth
+ \else
+ \advance\strutdimen-\strutheight
+ \fi
\else
-\ifdim\minimumstrutdepth>\zeropoint
- \strutdimen\minimumstrutdepth
-\else
- \strutdimen\strutdepthfactor\strutdimen
-\fi
+ \ifdim\minimumstrutdepth>\zeropoint
+ \strutdimen\minimumstrutdepth
+ \else
+ \strutdimen\strutdepthfactor\strutdimen
+ \fi
\strutdimen\spacingfactor\strutdimen
\fi
\edef\strutdepth{\the\strutdimen}%
@@ -2456,7 +2459,8 @@
{\setbox\strutbox\copy\nostrutbox
\let\strut\empty
\let\endstrut\empty
- \let\begstrut\empty}
+ \let\begstrut\empty
+ \let\crlfplaceholder\empty}
% unsave:
%
@@ -2639,17 +2643,19 @@
\adjdemerits \zerocount}
\def\setdefaultpenalties
- {\setups[\systemsetupsprefix\s!default]}
+ {\directsetup{\systemsetupsprefix\s!default}}
-\startsetups [\systemsetupsprefix\v!reset]
+\startsetups [\systemsetupsprefix\s!reset]
\resetpenalties\widowpenalties
\resetpenalties\clubpenalties
\resetpenalties\interlinepenalties
\stopsetups
+% we use \directsetup because it's faster and we know there is no csl
+
\startsetups [\systemsetupsprefix\s!default]
- \setups[\systemsetupsprefix\s!reset]
+ \directsetup{\systemsetupsprefix\s!reset}
\widowpenalty\defaultwidowpenalty
\clubpenalty \defaultclubpenalty
@@ -2658,7 +2664,7 @@
\startsetups [\v!grid] [\systemsetupsprefix\s!default]
- \setups[\systemsetupsprefix\v!reset]
+ \directsetup{\systemsetupsprefix\s!reset}
\widowpenalty\defaultgridwidowpenalty
\clubpenalty \defaultgridclubpenalty
@@ -2669,7 +2675,7 @@
\startsetups [\systemsetupsprefix\v!strict]
- \setups[\v!reset]
+ \directsetup{\systemsetupsprefix\s!reset}
\setpenalties\widowpenalties2\maxdimen
\setpenalties\clubpenalties 2\maxdimen
@@ -2915,33 +2921,44 @@
{\getvalue{\@@ragged@@command\v!left}}
{\getvalue{\@@ragged@@command\v!right}}}
+% compare:
+%
+% \framed[width=4cm,align=no] {\hfil xxx}
+% \framed[width=4cm,align=disable]{\hfil xxx}
+
+\setvalue{\@@ragged@@command\v!disable}% for one liners
+ {\appendtoks\raggedright\parfillskip\zeropoint\to\everyraggedcommand}
+
\chardef\raggedoneliner\zerocount
\setvalue{\@@ragged@@command\v!line}%
{\chardef\raggedoneliner\plusone}
-\def\@@startraggedoneliner
- {\ifcase\raggedoneliner\else
- \dontleavehmode\hbox\bgroup
- \ifcase\raggedstatus\or\hss\or\hss\fi
- \ignorespaces
- \bgroup
- \aftergroup\removeunwantedspaces
- \fi}
+%D Unofficial, may disappear. Now handled directly in the
+%D core-rul module.
-\def\@@stopraggedoneliner
- {\ifcase\raggedoneliner\else
- \egroup
- \ifcase\raggedstatus\or\hss\or\or\hss\fi
- \egroup
- \ignorespaces
- \fi}
+% \def\@@startraggedoneliner
+% {\ifcase\raggedoneliner\else
+% \dontleavehmode\hbox to \hsize \bgroup % hsize added, else useless
+% \ifcase\raggedstatus\or\hss\or\hss\fi
+% \ignorespaces
+% \bgroup
+% \aftergroup\removeunwantedspaces
+% \fi}
-\def\@@handleoneliner
- {\ifcase\raggedoneliner\else
- \@@startraggedoneliner
- \aftergroup\@@stopraggedoneliner
- \fi}
+% \def\@@stopraggedoneliner
+% {\ifcase\raggedoneliner\else
+% \egroup
+% \ifcase\raggedstatus\or\or\hss\or\hss\fi
+% \egroup
+% \ignorespaces % ? ? ?
+% \fi}
+
+% \def\@@handleoneliner
+% {\ifcase\raggedoneliner\else
+% \@@startraggedoneliner
+% \aftergroup\@@stopraggedoneliner
+% \fi}
% Nodig i.v.m. inspringen eerste alineas
@@ -3346,13 +3363,13 @@
%
% \def\setraggedparagraphmode#1#2% combineren met \ifrightpage
% {\ifinpagebody
-% \ifdubbelzijdig
+% \ifdoublesided
% \ifodd\realpageno\relax#1\else#2\fi
% \else
% #2\relax
% \fi
% \else\ifinner
-% \ifdubbelzijdig
+% \ifdoublesided
% \gettwopassdata\s!paragraph
% \iftwopassdatafound
% \ifodd\twopassdata\relax#1\else#2\fi
@@ -3370,7 +3387,7 @@
% \def\doifrightpageelse % watch out: other default ! ! !
% {\ifinpagebody
% % optimalisation ?
-% \ifdubbelzijdig
+% \ifdoublesided
% \ifodd\realpageno\relax
% \twopassdatafoundtrue \else \twopassdatafoundfalse
% \fi
@@ -3378,7 +3395,7 @@
% \twopassdatafoundtrue
% \fi
% \else
-% \ifdubbelzijdig
+% \ifdoublesided
% \gettwopassdata\s!paragraph
% \iftwopassdatafound
% \ifodd\twopassdata\relax
@@ -3400,7 +3417,7 @@
% \fi}
%
% \def\signalrightpage
-% {\ifdubbelzijdig \ifinpagebody \else
+% {\ifdoublesided \ifinpagebody \else
% \doparagraphreference
% \fi \fi}
@@ -3412,7 +3429,7 @@
\chardef \frozenpagestate \zerocount
\def\dotrackpagestate#1#2%
- {\ifdubbelzijdig \ifinpagebody \else
+ {\ifdoublesided \ifinpagebody \else
\doforcedtrackpagestate{#1}{#2}%
\fi \fi}
@@ -3432,14 +3449,14 @@
\pagestatemismatchfalse
\let\realpagestateno\realfolio
\ifinpagebody
- \ifdubbelzijdig
+ \ifdoublesided
\ifodd\realpageno\relax
\twopassdatafoundtrue \else \twopassdatafoundfalse
\fi
\else
\twopassdatafoundtrue
\fi
- \else\ifdubbelzijdig
+ \else\ifdoublesided
\findtwopassdata{#1}{#2:}%
\iftwopassdatafound
\let\realpagestateno\twopassdata
diff --git a/tex/context/base/core-tab.tex b/tex/context/base/core-tab.tex
index c23619cb2..e14dc12dd 100644
--- a/tex/context/base/core-tab.tex
+++ b/tex/context/base/core-tab.tex
@@ -305,16 +305,6 @@
\newif \ifTABLEgraydone % gray line executed
\newtoks \TABLEgraytoks % gray line specification
-%D A third major extension, besides spacing and color support,
-%D concerns splitting tables over pages. We don't give
-%D examples here, because its a waste of space.
-
-\newdimen\TABLEheight % These can be \newskimens
-\newdimen\TABLEmaxheight % given a few \relax's when
-\newdimen\TABLEheadheight % testing them with \ifdim.
-\newdimen\TABLEtailheight
-\newdimen\TABLEcaptionheight
-
\newif\ifTABLEinbreak
%D Nog vervangen:
@@ -371,39 +361,6 @@
\newif\ifForgetTableBarAndQuote \ForgetTableBarAndQuotetrue
-% Old crappy code (live has changed):
-%
-% \bgroup
-%
-% \catcode`\|=\@@active
-% \catcode`\"=\@@active
-%
-% \gdef\pushouterbarandquote
-% {\ifForgetTableBarAndQuote
-% \ifnum\catcode`\|=\@@active \else
-% \catcode`\|=\@@active
-% \def|{\ifmmode\vert\else\char`\|\fi}%
-% \fi
-% \let\outertablebar=|%
-% \ifnum\catcode`\"=\@@active \else
-% \catcode`\"=\@@active
-% \def"{\char`\"}%
-% \fi
-% \let\outertablequote="%
-% \fi}
-%
-% \gdef\popouterbarandquote
-% {\ifForgetTableBarAndQuote
-% \let|\outertablebar
-% \let"\outertablequote
-% \else
-% \redefinetablebarandquote
-% \fi}
-%
-% \egroup
-%
-% probably better (untested):
-
\bgroup
\catcode`\|=\@@active
@@ -500,7 +457,7 @@
%D \ReadFormatKeys}
%D \stoptyping
-\newdimen\TABLEparheight
+% \newdimen\TABLEparheight
\def\BeginTableParBox#1%
{\setbox\scratchbox\vtop\bgroup % \setbox added
@@ -526,10 +483,10 @@
\else % of paragraphs
\egroup
\fi
- \getboxheight\scratchdimen\of\box\scratchbox\relax% compensate for
- \ifdim\scratchdimen>\TABLEparheight % funny depth of
- \global\TABLEparheight\scratchdimen % multi-line box
- \fi % i.e. vtop
+% \getboxheight\scratchdimen\of\box\scratchbox\relax% compensate for
+% \ifdim\scratchdimen>\TABLEparheight % funny depth of
+% \global\TABLEparheight\scratchdimen % multi-line box
+% \fi % i.e. vtop
\box\scratchbox}
% We also need to patch away the interfering math switch:
@@ -852,26 +809,6 @@
\let\TABLEbeforebar\empty
\let\TABLEafterbar \empty
-% \def\!ttInsertVrule
-% {\hfil
-% \TABLEbeforebar % added
-% \startglobalTABLEcolor % added
-% \vrule \!thWidth
-% \ifnum\!tgCode=\plusone
-% \ifx\!tgValue\empty
-% \LineThicknessFactor
-% \else
-% \!tgValue
-% \fi
-% \LineThicknessUnit
-% \else
-% \!tgValue
-% \fi
-% \stopglobalTABLEcolor % added
-% \TABLEafterbar % added
-% \hfil
-% &}
-
\def\@VLn{1}
\def\@VLd{.125em}
@@ -957,7 +894,7 @@
\def\!ttuse#1%
{\ifnum#1>\plusone
\omit
-\global\TABLEdivisionfalse
+ \global\TABLEdivisionfalse
\scratchcounter\currentTABLEcolumn % added
\advance\scratchcounter #1% % added
\advance\scratchcounter \minusone % added
@@ -1025,16 +962,31 @@
%D
%D \showsetup{starttable}
+\newconditional\tablerepeathead
+\newconditional\tablerepeattail
+
\def\starttable
{\bgroup
- \doifelsenothing\@@tiframe
- {\ifinsidefloat\else\startbaselinecorrection\fi}
- {\startframedcontent[\@@tiframe]}%
- \postponefootnotes
- \firststagestartTABLE}
+ \doif\@@tisplit\v!auto
+ {\ifinsidesplitfloat\let\@@tisplit\v!yes\fi}%
+ \doifelse\@@tisplit\v!yes
+ {\def\stoptable{\stoptables}%
+ \setfalse\tablerepeathead
+ \setfalse\tablerepeattail
+ \starttables}
+ {\doifelse\@@tisplit\v!repeat
+ {\def\stoptable{\stoptables}%
+ \settrue\tablerepeathead
+ \settrue\tablerepeattail
+ \starttables}
+ {\doifelsenothing\@@tiframe
+ {\ifinsidefloat\else\startbaselinecorrection\fi}
+ {\startframedcontent[\@@tiframe]}%
+ \postponefootnotes
+ \firststagestartTABLE}}}
\def\stoptable
- {\TABLEtail
+ {\insertTABLEtail
\globalletempty\@@TABLEhead
\globalletempty\@@TABLEtail
\finishTABLE
@@ -1078,17 +1030,6 @@
%D The implementation of the definition macro is not that
%D complicated:
-%\def\dodefinetabletemplate[#1][#2]%
-% {\setgvalue{\c!Table#1}{\complexsecondstagestartTABLE[#2]}%
-% \egroup}
-%
-%\def\definetabletemplate%
-% {\bgroup
-% \catcode`\|=\@@other
-% \dodoubleargument\dodefinetabletemplate}
-
-% \TABLEnoalign{\page}\TABLEhead is valid
-
\def\douseTABLEtemplate#1#2#3%
{\gdef\TABLEhead{\getvalue{@@TABLEhead#2}}%
\gdef\TABLEtail{\getvalue{@@TABLEtail#3}}%
@@ -1129,35 +1070,36 @@
%D The second half of the next macro prepares table
%D splitting.
-% \def\complexsecondstagestartTABLE#1[#2]%
-% {\convertargument|\to\asciiA
-% \convertargument#2\to\asciiB
-% \doifinstringelse{\asciiA}{\asciiB}
-% {\gdef\restartTABLE{\thirdstagestartTABLE{#2}}}
-% {\doifdefinedelse{\c!Table#2}
-% {\gdef\restartTABLE{\getvalue{\c!Table#2}}}
-% {\gdef\restartTABLE{\getvalue{#2}}}}%
-% \prepareTABLEsplitting
-% \restartTABLE
-% \TABLEhead}
+\def\insertTABLEhead
+ {\TABLEnoalign{\global\settrue \preventTABLEbreak \global\setfalse\someTABLEhead}%
+ \TABLEhead
+ \TABLEnoalign{\global\setfalse\preventTABLEbreak}}
+
+\def\insertTABLEtail
+ {\TABLEnoalign{\global\settrue \preventTABLEbreak \global\setfalse\someTABLEtail}%
+ \TABLEtail
+ \TABLEnoalign{\global\setfalse\preventTABLEbreak}}
+
+\def\dorestartTABLE#1%
+ {\gdef\restartTABLE{#1}%
+ \restartTABLE
+ \insertTABLEhead
+ \ifsplittables \ifconditional \tablerepeattail
+ \TABLEnoalign{\goodbreak}%
+ \insertTABLEtail
+ \TABLEnoalign{\goodbreak}%
+ \fi \fi}
\def\complexsecondstagestartTABLE#1[#2]%
{\convertargument|\to\asciiA
\convertargument#2\to\asciiB
+ \global\setfalse\someTABLEhead
+ \global\setfalse\someTABLEtail
\doifinstringelse\asciiA\asciiB
- {\gdef\restartTABLE
- {\gdef\restartTABLE{\thirdstagestartTABLE{#2}}%
- \prepareTABLEsplitting
- \restartTABLE
- \TABLEhead}}
+ {\gdef\restartTABLE{\dorestartTABLE{\thirdstagestartTABLE{#2}}}}
{\doifdefinedelse{\c!Table#2}
- {\gdef\restartTABLE
- {\getvalue{\c!Table#2}}}
- {\gdef\restartTABLE
- {\gdef\restartTABLE{\getvalue{#2}}%
- \prepareTABLEsplitting
- \restartTABLE
- \TABLEhead}}}%
+ {\gdef\restartTABLE{\getvalue{\c!Table#2}}}
+ {\gdef\restartTABLE{\dorestartTABLE{\getvalue{#2}}}}}%
\restartTABLE}
%D The third stage involves a lot of (re)sets, which we will
@@ -1212,45 +1154,6 @@
\global\intablefalse
\egroup}
-%D The preparation for split columns concerns some
-%D calculations. Although not explicitly needed, one can
-%D predefine a tablehead as well as a tail. Each table fragment
-%D is preceded by such a head and ends with a tail. This means
-%D that, in order to determine the available height, we have to
-%D take the head and tail into account. Because we want to
-%D support captions too, we will also reserve some space for
-%D those later on.
-
-\def\prepareTABLEsplitting
- {\global\TABLEheight\zeropoint
- \ifsplittables
- \ifx\TABLEhead\empty
- \global\TABLEheadheight\zeropoint
- \else
- \setbox0\vbox
- \bgroup
- \def\doEndOfTableLine##1##2##3{\normalTABLElineformat##2##3}%
- \restartTABLE\TABLEhead
- \finishTABLE
- \global\TABLEheadheight\ht0
- \fi
- \ifx\TABLEtail\empty
- \global\TABLEtailheight\zeropoint
- \else
- \setbox0\vbox
- \bgroup
- \def\doEndOfTableLine##1##2##3{\normalTABLElineformat##2##3}%
- \restartTABLE\TABLEtail
- \finishTABLE
- \global\TABLEtailheight\ht0
- \fi
- \else
- \global\TABLEheadheight\zeropoint
- \global\TABLEtailheight\zeropoint
- \fi
- \global\TABLEheight\zeropoint
- \calculatemaxTABLEheight\docalculatemaxTABLEheight}
-
%D \macros
%D {starttables}
%D
@@ -1272,27 +1175,45 @@
%D \stoptables
%D \stoptyping
+\newbox\tablecontentbox
+
\def\starttables
{\bgroup
- \ifinsidefloat\else
- \baselinecorrection
- \flushnotes
- \topbaselinecorrection
- \fi
- \forgetall
- \globallet\absmaxTABLEheight\zeropoint
\splittablestrue
+ \flushnotes
+ \setbox\tablecontentbox\vbox\bgroup
+ \forgetall
\global\TABLEinbreakfalse
\firststagestartTABLE}
\def\stoptables
- {\TABLEtail
+ {\ifconditional\tablerepeattail\else\insertTABLEtail\fi
\finishTABLE
+ \egroup
+ \dosplittablebox\tablecontentbox
+ \flushnotes
+ \egroup}
+
+\newdimen\TABLEcaptionheight % obsolete
+
+\def\dosplittablebox#1%
+ {\resettsplit
+ \def\tsplitminimumfreelines{2}%
+ \def\tsplitminimumfreespace{\TABLEcaptionheight}%
+ \setbox\tsplitcontent\box#1%
+ \ifconditional\tablerepeathead \ifconditional\someTABLEhead
+ \setbox\tsplithead\vsplit\tsplitcontent to \lineheight
+ \setbox\tsplithead\vbox{\unvbox\tsplithead}%
+ \fi \fi
+ \ifconditional\tablerepeattail \ifconditional\someTABLEtail
+ \setbox\tsplittail\vsplit\tsplitcontent to \lineheight
+ \setbox\tsplittail\vbox{\unvbox\tsplittail}%
+ \fi \fi
\ifinsidefloat\else
- \flushnotes
- \botbaselinecorrection
+ \def\tsplitbeforeresult{\startbaselinecorrection}%
+ \def\tsplitafterresult {\stopbaselinecorrection}%
\fi
- \egroup}
+ \handletsplit}
%D When the table in the previous example is split across
%D pages, only the first gets a head. We could have said
@@ -1344,90 +1265,21 @@
\def\setTABLEhead{\dodoubleempty\dosetTABLEhead}
\def\setTABLEtail{\dodoubleempty\dosetTABLEtail}
-\def\dosetTABLEhead[#1][#2]#3\end{\setvalue{@@TABLEhead#1}{#3}}
-\def\dosetTABLEtail[#1][#2]#3\end{\setvalue{@@TABLEtail#1}{#3}}
+\newconditional\preventTABLEbreak
+\newconditional\someTABLEhead
+
+\def\dosetTABLEhead[#1][#2]#3\end{\setvalue{@@TABLEhead#1}{\TABLEnoalign{\global\settrue\someTABLEhead}#3}}
+\def\dosetTABLEtail[#1][#2]#3\end{\setvalue{@@TABLEtail#1}{\TABLEnoalign{\global\settrue\someTABLEtail}#3}}
%D Redudant \type{\HL}'s are removed automatically, so
%D mid||lines can be used without problems.
-%D When calculating the available height of a split table, we
-%D try to handle multi||column mode as good as possible. This
-%D algoritm evolved during the development of the split option
-%D and will probably be improved bit by bit.
-
-\def\docalculatemaxTABLEheight
- {\ifinsidecolumns
- \getcolumnstatus\column\scratchcounter\total\dimen0\goal\dimen2\\%
- \else
- \ifdim\pagegoal<\maxdimen
- \dimen0\pagetotal
- \dimen2\pagegoal
- \else
- \dimen0\zeropoint
- \dimen2\textheight
- \fi
- \fi
- \advance\dimen2 -\dimen0
- \global\TABLEmaxheight\dimen2
- \global\advance\TABLEmaxheight -\strutdp
- \ifdim\prevdepth<\maxdimen\ifdim\prevdepth>\zeropoint
- \global\advance\TABLEmaxheight -\strutdp
- \global\advance\TABLEmaxheight -\parskip
- \fi\fi}
-
-\def\nocalculatemaxTABLEheight
- {\ifinsidecolumns
- \getcolumnstatus\column\scratchcounter\total\dimen0\goal\dimen2\\%
- \else
- \dimen0\zeropoint
- \dimen2\textheight
- \fi
- \advance\dimen2 -\dimen0
- \global\TABLEmaxheight\dimen2
- \global\advance\TABLEmaxheight -\strutdp}
-
-\def\calculatemaxTABLEheight#1%
- {\ifsplittables
- #1\relax
- \ifdim\TABLEmaxheight<3\baselineskip \relax % instelbaar maken
- \ifinsidecolumns
- \nobreak
- \kern\dimen2
- \goodbreak
- \else
- \goodbreak % \page
- \fi
- \removeTABLEtopskip
- \nocalculatemaxTABLEheight
- \fi
- \ifdim\TABLEmaxheight<\absmaxTABLEheight % forces equal columns
- \global\TABLEmaxheight\absmaxTABLEheight
- \else
- \xdef\absmaxTABLEheight{\the\TABLEmaxheight}%
- \fi
- \global\TABLEheight\zeropoint
- \else
- \global\TABLEmaxheight\maxdimen
- \fi}
-
-%D When splitting tables, we have to remove the top skip when
-%D we're in the main vertical list, else we remove whatever
-%D skip \TEX\ adds.
-
-\def\removeTABLEtopskip
- {\ifinsidefloat
- \verticalstrut\kern-\struttotal
- \else
- \hbox{}\kern-\topskip
- \fi}
-
%D We need an alternative for the normal complex or simple
%D commands, because assignments in these system commands
%D conflict with \type{\noalign}. This alternative is about
%D as efficient as possible.
\def\complexorsimpleTable#1#2%
-% {\getvalue{\if[\noexpand#2\s!complex\else\s!simple\fi\c!Table#1}#2}
{\csname\if[\noexpand#2\s!complex\else\s!simple\fi\c!Table#1\endcsname#2}
%D The next one is used in \type{\VL} cum suis and honours
@@ -1702,57 +1554,8 @@
%D we repeat the table head.
\def\handleTABLEbreak#1#2%
- {\ifsplittables
- \setbox0\hbox{\AugmentedTableStrut{#1}{#2}}%
- \getboxheight\dimen0\of\box0\relax
- \ifdim\TABLEparheight>\dimen0 % new
- \advance\dimen0-\lineheight % newer
- \ifdim\dimen0<\zeropoint % newer
- \dimen2\zeropoint % newer
- \fi % newer
- \advance\dimen0 \TABLEparheight % new
- \global\TABLEparheight\zeropoint % new
- \fi % new
- \ifTABLEgrayline \else
- \global\advance\TABLEheight\dimen0
- \fi
- \ifTABLEinbreak
- \globalletempty\beforeTABLEline
- \gdef\afterTABLEline{\TABLEnoalign{\nobreak}}%
- \else
- \dimen2=\TABLEheight
- \advance\dimen2 \strutdp
- \advance\dimen2 \TABLEtailheight
- \advance\dimen2 \TABLEcaptionheight
- \advance\dimen2 \lineheight % we're ahead
- \ifdim\dimen2>\TABLEmaxheight
- \gdef\beforeTABLEline
- {\setTABLEforce\TABLEforcelastrow}%
- \gdef\afterTABLEline
- {\TABLEnoalign
- {\nobreak
- \global\TABLEinbreaktrue}%
- \TABLEtail
- \TABLEnoalign
- {\goodbreak
- \calculatemaxTABLEheight\nocalculatemaxTABLEheight
- \removeTABLEtopskip
- \setTABLEaction\TABLEunknown
- \setTABLEforce \TABLEunknown}%
- \TABLEhead
- \TABLEnoalign
- {\nobreak
- \global\TABLEinbreakfalse
- \setTABLEforce\TABLEforcefirstrow}}%
- \else
- \globalletempty\beforeTABLEline
- \gdef\afterTABLEline{\TABLEnoalign{\nobreak}}%
- \fi
- \fi
- \else
- \globalletempty\beforeTABLEline
- \gdef\afterTABLEline{\TABLEnoalign{\nobreak}}%
- \fi}
+ {\globalletempty\beforeTABLEline
+ \gdef\afterTABLEline{\TABLEnoalign{\ifconditional\preventTABLEbreak\nobreak\else\goodbreak\fi}}}
%D When tables are split, the spacing before and after a
%D horizontal rule is corrected according to what we expect.
@@ -1770,7 +1573,6 @@
->%
\fi
\color[#1]{\string#3}%
- \ifsplittables\space\the\TABLEmaxheight/\the\TABLEheight\fi
\ifx\TABLEgraylineerror\empty
\space\TABLEgraylinestatus
\else
@@ -2027,7 +1829,6 @@
{\TABLEnoalign
{\nobreak
\setbox0\vbox{\blank[\@@tiNL]}%
- \global\advance\TABLEheight \ht0
\vskip\ht0
\nobreak}}
@@ -2167,8 +1968,7 @@
\setTABLEaction\TABLErule}}
\def\accountTABLElinewidth
- {\scratchdimen\LineThicknessUnit
- \global\advance\TABLEheight \@@tiHLheight\scratchdimen}
+ {\scratchdimen\LineThicknessUnit}
%D \startitemize[3*ruim]
%D \sym{\type{\BC}}
@@ -2649,7 +2449,8 @@
\c!commands=,
\c!background=\v!screen,
\c!backgroundscreen=\@@rsscreen,
- \c!backgroundcolor=]
+ \c!backgroundcolor=,
+ \c!split=\v!auto]
\def\ifintabel{\ifintable} % upward compatible
diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex
index 4c2f238da..a3d245066 100644
--- a/tex/context/base/core-tbl.tex
+++ b/tex/context/base/core-tbl.tex
@@ -755,27 +755,35 @@
\chardef\tabulatepass=0
+\def\tabulateparameter#1{\csname\??tt\currenttabulate#1\endcsname}
+
\def\dofinalstarttabulate[#1][#2][#3]% identifier sub preamble
{\edef\currenttabulate{#1::#2}%
\ifinsidefloat \else
\whitespace
- \getvalue{\??tt\currenttabulate\c!before}%
+ \tabulateparameter\c!before
\fi
\bgroup
\resetcharacteralign
% todo: spacing around tabulate when bodyfont is set
% expansion en test needed ?
+ \splittabulatefalse
+ \processaction
+ [\tabulateparameter\c!split]
+ [ \v!yes=>\splittabulatetrue,
+ % \v!repeat=>\splittabulatetrue, % todo, default yes
+ \v!auto=>\ifinsidesplitfloat\splittabulatetrue\fi]%
\doifelsevalue{\??tt\currenttabulate\c!split}\v!yes
- \splittabulatetrue\splittabulatefalse
+
\doifvaluesomething{\??tt\currenttabulate\c!bodyfont}
{\expanded{\switchtobodyfont
- [\getvalue{\??tt\currenttabulate\c!bodyfont}]}}%
+ [\tabulateparameter\c!bodyfont]}}%
\postponefootnotes % new, to be tested / will be configurable
\chardef\tabulatepass\plusone
\widowpenalty\zerocount % otherwise lines are not broken
\clubpenalty \zerocount % but overlap in funny ways
\the\everytabulate
- \getvalue{\??tt\currenttabulate\c!inner}%
+ \tabulateparameter\c!inner
\scratchdimen\leftskip
\advance\scratchdimen \hangindent
\doifvalue{\??tt\currenttabulate\c!indenting}\v!yes
@@ -817,7 +825,7 @@
\newif\iftabulatefirstflushed
\def\tabulateEQ
- {\iftabulatefirstflushed\else\getvalue{\??tt\currenttabulate EQ}\fi
+ {\iftabulatefirstflushed\else\tabulateparameter{EQ}\fi
\global\tabulateequalfalse}
% \def\tabulatenormalcolumn#1%
@@ -856,7 +864,7 @@
\let\factor\!!plusone
\scratchskip\strutdp
\ExpandFirstAfter\processallactionsinset
- [\getvalue{\??tt\currenttabulate\c!distance}]
+ [\tabulateparameter\c!distance]
[ \v!blank=>\scratchskip\bigskipamount,
\v!depth=>\scratchskip\strutdp,
\v!small=>\def\factor{.25},
@@ -869,18 +877,10 @@
\ifconditional\tabulatesomeamble\kern\else\vskip\fi\scratchdimen % new
\egroup}
-% \def\dotabulaterule
-% {\color
-% [\getvalue{\??tt\currenttabulate\c!lijnkleur}]
-% {\scratchdimen\getvalue{\??tt\currenttabulate\c!lijndikte}%
-% \hrule\!!height.5\scratchdimen\!!depth.5\scratchdimen\relax
-% \doifvalue{\??tt\currenttabulate\c!afstand}\v!grid
-% {\kern-\scratchdimen}}} % experimental tm-prikkels
-
\def\dodotabulaterule#1%
{\color
- [\getvalue{\??tt\currenttabulate\c!rulecolor}]
- {\scratchdimen\getvalue{\??tt\currenttabulate\c!rulethickness}#1}}
+ [\tabulateparameter\c!rulecolor]
+ {\scratchdimen\tabulateparameter\c!rulethickness#1}}
\def\dotabulaterule
{\dodotabulaterule
@@ -891,7 +891,7 @@
\def\dotabulatelinerule
{\multispan\totaltabulatecolumns % \multispan is a plain macro
% for the moment this one
- \strut\hskip\getvalue{\??tt\currenttabulate\c!margin}%
+ \strut\hskip\tabulateparameter\c!margin
% neg values are ok !
\hskip\tabulateindent % new august 2003
\dodotabulaterule
@@ -955,12 +955,12 @@
\chardef\tabulaterepeathead\zerocount
\def\processtabulate[|#1|]% in the process of optimizing
- {\tabulateunit\getvalue{\??tt\currenttabulate\c!unit}%
+ {\tabulateunit\tabulateparameter\c!unit
\checkfulltabulatecontent
\globallet\tabulateruledepth \!!zeropoint
\globallet\tabulateruleheight\!!zeropoint
\ExpandFirstAfter\processaction % use \setalignmentswitch instead
- [\getvalue{\??tt\currenttabulate\c!align}]
+ [\tabulateparameter\c!align]
[ \v!normal=>\def\@@tabulatealign{0},% = default value
\v!right=>\def\@@tabulatealign{1},% chardefs gebruiken
\v!left=>\def\@@tabulatealign{2},%
@@ -977,9 +977,16 @@
\global\tabulatepwidth\zeropoint
\global\tabulateequalfalse
\resettabulatepheight
- \ifinsidefloat \else
+ \ifinsidesplitfloat
+ \donetrue
+ \else\ifinsidefloat
+ \donefalse
+ \else
+ \donetrue
+ \fi\fi
+ \ifdone
\processaction
- [\getvalue{\??tt\currenttabulate\c!header}]
+ [\tabulateparameter\c!header]
[\v!repeat=>\chardef\tabulaterepeathead\plusone,
\v!text=>\chardef\tabulaterepeathead\plustwo]%
\fi
@@ -1033,9 +1040,9 @@
\global\let\flushtabulated\empty
\let\savedbar|\let|\nexttabulate
\tabskip\zeropoint
- \ifdim\getvalue{\??tt\currenttabulate\c!margin}>\zeropoint
+ \ifdim\tabulateparameter\c!margin>\zeropoint
\!!toksa{&\flushtabulateindent\strut##%
- \tabskip\getvalue{\??tt\currenttabulate\c!margin}\strut
+ \tabskip\tabulateparameter\c!margin\strut
&##\tabskip\zeropoint}%
\else
\!!toksa{&\flushtabulateindent\strut##%
@@ -1248,7 +1255,7 @@
\ifnum\noftabulatelines>\plusone
\ifnum\noftabulatelines<\minusnoftabulatelines
\vskip\topskip\allowbreak\vskip-\topskip
- \vskip-\getvalue{\??tt\currenttabulate\c!rulethickness}%
+ \vskip-\tabulateparameter\c!rulethickness
\dotabulaterule
\fi
\fi
@@ -1267,7 +1274,11 @@
\chardef\tabulatepass\plustwo
%
\ifcase\tabulaterepeathead
- \startframedcontent[\getvalue{\??tt\currenttabulate\c!frame}]%
+ \ifinsidesplitfloat
+ \setbox\tabulatebox\vbox \bgroup
+ \else
+ \startframedcontent[\tabulateparameter\c!frame]%
+ \fi
\else
\setbox\tabulatebox\vbox \bgroup
\fi
@@ -1278,14 +1289,18 @@
{\vskip-\strutdp}% experimental tm-prikkels
%
\ifcase\tabulaterepeathead
- \stopframedcontent
+ \ifinsidesplitfloat
+ \egroup \splittabulatebox\tabulatebox
+ \else
+ \stopframedcontent
+ \fi
\else
\egroup \splittabulatebox\tabulatebox
\fi
%
\egroup
\ifinsidefloat \else
- \getvalue{\??tt\currenttabulate\c!after}%
+ \tabulateparameter\c!after
\fi
\egroup}
@@ -1304,47 +1319,69 @@
% \NC test \NC \input tufte \relax \NC \NR
% \stoptabulate
+% \def\splittabulatebox#1% #1 <> 0/2 / derived from the one in core-ntb.tex
+% {\ifinsidefloat
+% \unvbox#1%
+% \else
+% \ifcase\tabulaterepeathead\or
+% \setbox2\copy#1%
+% \setbox2\vsplit2 to \lineheight
+% \setbox2\vbox{\unvbox2}%
+% \fi
+% \doloop
+% {\setbox0\vsplit#1 to \onepoint % \lineheight
+% \ifdim\pagegoal<\maxdimen
+% \donetrue
+% \else\ifdim\pagetotal=\zeropoint
+% \donetrue
+% \else
+% \donefalse
+% \fi\fi
+% \ifdone
+% \setbox0\vbox{\unvbox0}%
+% \dimen0\pagetotal
+% \advance\dimen0\dp0
+% \advance\dimen0\ht0
+% \ifdim\dimen0>\pagegoal
+% \bgroup \page \egroup % make sure that local vars are kept
+% \ifcase\tabulaterepeathead\or
+% \unvcopy2
+% \or
+% \hbox{\strut\tabulateparameter\c!title}%
+% \fi
+% \fi
+% \fi
+% % test this on icare checklists / quite hacky ! ! !
+% \ifdim\ht0>\tabulateparameter\c!rulethickness\else
+% \kern-2\ht0 % brrrr
+% \fi
+% %
+% \unvbox0
+% \allowbreak
+% \ifvoid#1 \exitloop \fi}%
+% \fi}
+
\def\splittabulatebox#1% #1 <> 0/2 / derived from the one in core-ntb.tex
- {\ifinsidefloat
+ {\ifinsidesplitfloat
+ \dosplittabulatebox#1%
+ \else\ifinsidefloat
\unvbox#1%
\else
- \ifcase\tabulaterepeathead\or
- \setbox2\copy#1%
- \setbox2\vsplit2 to \lineheight
- \setbox2\vbox{\unvbox2}%
- \fi
- \doloop
- {\setbox0\vsplit#1 to \onepoint % \lineheight
- \ifdim\pagegoal<\maxdimen
- \donetrue
- \else\ifdim\pagetotal=\zeropoint
- \donetrue
- \else
- \donefalse
- \fi\fi
- \ifdone
- \setbox0\vbox{\unvbox0}%
- \dimen0\pagetotal
- \advance\dimen0\dp0
- \advance\dimen0\ht0
- \ifdim\dimen0>\pagegoal
- \bgroup \page \egroup % make sure that local vars are kept
- \ifcase\tabulaterepeathead\or
- \unvcopy2
- \or
- \hbox{\strut\getvalue{\??tt\currenttabulate\c!title}}%
- \fi
- \fi
- \fi
- % test this on icare checklists / quite hacky ! ! !
- \ifdim\ht0>\getvalue{\??tt\currenttabulate\c!rulethickness}\else
- \kern-2\ht0 % brrrr
- \fi
- %
- \unvbox0
- \allowbreak
- \ifvoid#1 \exitloop \fi}%
- \fi}
+ \dosplittabulatebox#1%
+ \fi\fi}
+
+\def\dosplittabulatebox#1%
+ {\resettsplit
+ \def\tsplitminimumfreelines{2}%
+ \def\tsplitminimumfreespace{0pt}%
+ \setbox\tsplitcontent\box#1%
+ \ifcase\tabulaterepeathead\or
+ \setbox\tsplithead\vsplit\tsplitcontent to \lineheight
+ \setbox\tsplithead\vbox{\unvbox\tsplithead}%
+ \or
+ \setbox\tsplithead\vbox{\hbox{\strut\tabulateparameter\c!title}}%
+ \fi
+ \handletsplit}
%D \starttyping
%D \setuptabulate[split=no,rule=line]
@@ -1425,7 +1462,7 @@
\c!distance={\v!depth,\v!medium},
\c!align=\v!normal,
\c!margin=\!!zeropoint,
- \c!split=\v!yes,
+ \c!split=\v!auto,
\c!header=\v!yes,
\c!title=,
\c!indenting=\v!no]
diff --git a/tex/context/base/core-tsp.tex b/tex/context/base/core-tsp.tex
new file mode 100644
index 000000000..4568a38a1
--- /dev/null
+++ b/tex/context/base/core-tsp.tex
@@ -0,0 +1,451 @@
+%D \module
+%D [ file=core-tsp,
+%D version=2000.10.20,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Splitting Tables,
+%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 OTR Macros / Floating Bodies}
+
+\beginTEX
+ \expandafter \endinput
+\endTEX
+
+%D The code in this file is move here from other places.
+
+\unprotect
+
+% only to be used with single tokens (will be prim)
+
+\ifx\htdp\undefined
+ \def\htdp#1{\dimexpr\ht#1+\dp#1\relax}
+\fi
+
+%D Although the name resembles floats, and therefore this should be
+%D a page module, we decided to make it core functionality because the
+%D table code depends on it. Othrwise there would be too much
+%D overloading afterwards involved. Actually, the float part is rather
+%D generic and not that related to floats.
+
+% \splitfloat [settings] {\placetable[optional args]{test}} {content}
+
+\definenumber
+ [\??si]
+ [\c!way=\v!by\v!text,
+ \c!conversion=\@@siconversion]
+
+\def\setupfloatsplitting
+ {\dodoubleargument\getparameters[\??si]}
+
+\newif\ifinsidesplitfloat % will become chardef
+
+\newtoks \everysplitfloatsetup
+
+\def\splitfloat
+ {\dosingleempty\dosplitfloat}
+
+% \def\dosplitfloat[#1]#2% nog dubbele refs
+% {\ifinsidecolumns % tzt ook nog figuren splitten
+% % not yet supported
+% \else
+% \bgroup
+% \insidefloattrue
+% \insidesplitfloattrue
+% \getparameters[\??si][#1]%
+% \resetnumber[\??si]%
+% \def\floatcaptionsuffix{\convertednumber[\??si]}%
+% % \TABLEcaptionheight\@@silines\lineheight% brrr
+% % todo: auto == \getnoflines\captionheight
+% \let\extrasplitfloatlines\@@silines
+% \the\everysplitfloatsetup
+% \simplifypagebreak % \page becomes \goodbreak, no fails misserably
+% % todo: a preceding float does not count yet
+% % so we need a better predictor
+% \dowithnextbox
+% {\forgetall
+% \dontcomplain
+% \chardef\nodelocationmode\zerocount
+% \doloop
+% {\setbox2\vsplit\nextbox to \lineheight
+% \setbox2\vbox{\unvbox2}
+% \ifdim\ht2>\lineheight
+% \incrementnumber[\??si]%
+% \ifcase\rawnumber[\??si]\or \ifdim\nextboxht=\zeropoint
+% \let\floatcaptionsuffix\empty
+% \fi \fi
+% \bgroup
+% #2{\unvbox2}
+% \egroup
+% \ifdim\nextboxht>\zeropoint
+% \page
+% \decrementnumber[\floatcaptionnumber]%
+% \fi
+% \fi
+% \ifdim\nextboxht>\zeropoint
+% \page
+% \else
+% \expandafter\exitloop
+% \fi}%
+% \egroup}
+% \vbox
+% \fi}
+
+\ifx\floatcaptionsuffix\undefined \else
+ \let\floatcaptionsuffix\empty % will become \splitfloatcaptionsuffix
+\fi
+
+\def\extrasplitfloatlines{0}
+
+\def\dosplitfloat[#1]#2% nog dubbele refs
+ {\bgroup
+ \insidefloattrue
+ \insidesplitfloattrue
+ \getparameters[\??si][#1]%
+ \resetnumber[\??si]%
+ \def\floatcaptionsuffix{\convertednumber[\??si]}%
+ \let\extrasplitfloatlines\@@silines
+ \the\everysplitfloatsetup
+ \def\splitfloatcommand{#2}%
+ \global\settrue \onlyonesplitofffloat
+ \global\setfalse\somenextplitofffloat
+ \dopushsavedfloats
+ \@@sibefore
+ \let\next} % \bgroup
+
+\settrue \onlyonesplitofffloat
+\setfalse\somenextplitofffloat
+
+%D When \type {inbetween} is made empty instead of the
+%D default \type {\page}, we will get delayed flushing
+%D and text may continue below the graphic.
+%D
+%D \starttyping
+%D \dorecurse{2}{\input tufte }
+%D
+%D \splitfloat[lines=auto,inbetween=]
+%D {\placetable{\dorecurse{5}{test\recurselevel\endgraf}}}
+%D {\bTABLE[split=yes]
+%D \bTR \bTD 11 \eTD \bTD \input tufte \eTD \eTR
+%D \bTR \bTD 12 \eTD \bTD \input zapf \eTD \eTR
+%D \bTR \bTD 13 \eTD \bTD \input bryson \eTD \eTR
+%D \bTR \bTD 14 \eTD \bTD test \eTD \eTR
+%D \bTR \bTD 21 \eTD \bTD \input tufte \eTD \eTR
+%D \bTR \bTD 22 \eTD \bTD \input zapf \eTD \eTR
+%D \bTR \bTD 23 \eTD \bTD \input bryson \eTD \eTR
+%D \bTR \bTD 24 \eTD \bTD test \eTD \eTR
+%D \bTR \bTD 31 \eTD \bTD \input tufte \eTD \eTR
+%D \bTR \bTD 32 \eTD \bTD \input zapf \eTD \eTR
+%D \bTR \bTD 33 \eTD \bTD \input bryson \eTD \eTR
+%D \bTR \bTD 34 \eTD \bTD test \eTD \eTR
+%D \eTABLE}
+%D
+%D \dorecurse{10}{\input tufte }
+%D \stoptyping
+
+\def\dodowithsplitofffloat
+ {\dowithnextbox
+ {\forgetall
+ \dontcomplain
+ \chardef\nodelocationmode\zerocount % bypass auto-renumbering
+ \incrementnumber[\??si]%
+ \ifcase\rawnumber[\??si]\or \ifconditional\onlyonesplitofffloat
+ \let\floatcaptionsuffix\empty
+ \fi \fi
+ \bgroup
+ \ifconditional\somenextplitofffloat
+ \settrue\retainfloatnumber
+ \else
+ \setfalse\retainfloatnumber
+ \fi
+ \splitfloatcommand{\box\nextbox}%
+ \egroup
+ \ifconditional\somenextplitofffloat
+ \doifelsenothing\@@siinbetween
+ {\ifconditional\tsplitfirstdone\else\page\fi}
+ \@@siinbetween
+ \else
+ \@@siafter
+ \dopopsavedfloats
+ \doflushsavedfloats
+ \fi
+ \global\settrue\tsplitfirstdone}%
+ \vbox}
+
+\def\nodowithsplitofffloat
+ {\dowithnextbox
+ {\forgetall
+ \dontcomplain
+ \box\nextbox % maybe an option to unvbox
+ \global\settrue\tsplitfirstdone}%
+ \vbox}
+
+\def\dochecksplitofffloat#1% box
+ {\ifinsidesplitfloat
+ \ifdim\ht#1=\zeropoint
+ \global\setfalse\somenextplitofffloat
+ \else
+ \global\settrue \somenextplitofffloat
+ \global\setfalse\onlyonesplitofffloat
+ \fi
+ \fi}
+
+\def\analyzesplitfloatcaption#1% depend son page-flt
+ {\doif\extrasplitfloatlines\v!auto
+ {\bgroup
+ \settrue\retainfloatnumber
+ \chardef\nodelocationmode\zerocount
+ \forcelocalfloats
+ \setuplocalfloats[\c!before=,\c!after=,\c!inbetween=]%
+ \splitfloatcommand{\hbox to \wd#1{\strut}}% dummy line
+ \setbox\scratchbox\vbox{\flushlocalfloats}%
+ \getnoflines{\ht\scratchbox}%
+ \resetlocalfloats
+ \advance\noflines\minusone % compensate dummy line
+ \expanded{\egroup\noexpand\edef\noexpand\extrasplitfloatlines{\the\noflines}}}}
+
+% \def\analyzesplitfloatcaption#1%
+% {\edef\extrasplitfloatlines{11}}
+
+\def\dowithsplitofffloat % nextbox
+ {\ifinsidesplitfloat
+ \expandafter\dodowithsplitofffloat
+ \else
+ \expandafter\nodowithsplitofffloat
+ \fi}
+
+\def\doifnotinsidesplitfloat
+ {\ifinsidesplitfloat\expandafter\gobbleoneargument\fi}
+
+%D Some defaults:
+
+\setupfloatsplitting
+ [\c!conversion=\v!character, % \v!romannumerals
+ \c!lines=3,
+ \c!before=,
+ \c!inbetween=\page,
+ \c!after=]
+
+%D Table splitter, on top of previous code:
+
+\newbox\tsplitcontent
+\newbox\tsplitresult
+\newbox\tsplithead
+\newbox\tsplitnext
+\newbox\tsplittail
+
+\def\resettsplit
+ {\def\tsplitminimumfreelines{0}%
+ \def\tsplitminimumfreespace{0pt}%
+ \setbox\tsplitcontent \vbox{}%
+ \setbox\tsplitresult \vbox{}%
+ \setbox\tsplithead \vbox{}%
+ \setbox\tsplitnext \vbox{}%
+ \setbox\tsplittail \vbox{}%
+ \let\tsplitbeforeresult\donothing
+ \let\tsplitafterresult \donothing
+ \let\tsplitinbetween \donothing
+ \let\tsplitbefore \donothing
+ \let\tsplitafter \donothing
+ \let\postprocesstsplit \donothing}
+
+\resettsplit
+
+% todo: keep tail to rest, so we need a lookahead
+
+\newconditional\tsplitfirstdone
+
+\def\handletsplit
+ {\analyzesplitfloatcaption\tsplitcontent
+ \global\setfalse\tsplitfirstdone
+ \testpage
+ [\tsplitminimumfreelines]
+ [\dimexpr\tsplitminimumfreespace+\extrasplitfloatlines\lineheight\relax]%
+ \setbox\scratchbox\vbox{\tsplitinbetween}%
+ \edef\tsplitinbetweenheight{\the\htdp\scratchbox}% etex
+ \!!doneafalse
+ \doloop
+ {\ifinsidecolumns
+ % brrr, assumes empty columns
+ \global\setfalse\tsplitfirstdone
+ \scratchdimen\textheight
+ \!!donectrue
+ \else
+ \ifconditional\tsplitfirstdone
+ \scratchdimen\textheight
+ \!!donectrue
+ \else\ifdim\pagegoal<\maxdimen
+ \scratchdimen\dimexpr\pagegoal-\pagetotal\relax
+ \!!donecfalse
+ \else
+ \scratchdimen\textheight
+ \!!donectrue
+ \fi\fi
+ \fi
+ \scratchdimen\dimexpr\scratchdimen-\tsplitinbetweenheight-\tsplitminimumfreespace-\extrasplitfloatlines\lineheight\relax
+ \ifdim\htdp\tsplittail>\zeropoint
+ \advance\scratchdimen-\htdp\tsplittail
+ \fi
+ \setbox\tsplitresult\vbox
+ {\ifdim\ht\tsplithead>\zeropoint
+ \unvcopy\tsplithead
+ \tsplitinbetween
+ \fi}%
+ \if!!donea\else\ifdim\ht\tsplitnext>\zeropoint
+ \setbox\tsplithead\box\tsplitnext
+ \fi\fi
+ \!!doneatrue
+ \ifdim\ht\tsplitresult>\zeropoint
+ \!!donedtrue % table head
+ \else
+ \!!donedfalse % no tablehead
+ \fi
+ \doloop
+ {\setbox\scratchbox\vsplit\tsplitcontent to \onepoint % \lineheight
+ \setbox\scratchbox\vbox{\unvbox\scratchbox}%
+ \ifdim\dimexpr\scratchdimen-\htdp\scratchbox-\htdp\tsplitresult\relax>\zeropoint
+ \setbox\tsplitresult\vbox{\unvbox\tsplitresult\unvbox\scratchbox}%
+ \ifvoid\tsplitcontent \exitloop \fi
+ \else\if!!doned
+ % we only have a tablehead so far
+ \setbox\tsplitresult\vbox{\unvbox\tsplitresult\unvbox\scratchbox}%
+ \exitloop
+ \else\if!!donec
+ % we have text height available, but the (one) cell is too
+ % large to fit, so, in order to avoid loops/deadcycles we do:
+ \setbox\tsplitresult\vbox{\unvbox\tsplitresult\unvbox\scratchbox}%
+ \exitloop
+ \else
+ \setbox\tsplitcontent\vbox
+ {\unvbox\scratchbox
+ \ifvoid\tsplitcontent\else\unvbox\tsplitcontent\fi}%
+ \exitloop
+ \fi\fi\fi
+ \!!donedfalse
+ \!!donecfalse}%
+ \postprocesstsplit
+ \dochecksplitofffloat\tsplitcontent
+ \ifvoid\tsplitcontent
+ \setbox\tsplitresult\vbox{\unvbox\tsplitresult\unvcopy\tsplittail}%
+ \dowithsplitofffloat{\tsplitbeforeresult\box\tsplitresult\tsplitafterresult}%
+ \doifnotinsidesplitfloat\tsplitafter
+ \endgraf
+ \exitloop
+ \else
+ % hack
+ \ifdim\pagegoal<\maxdimen
+ \global\pagegoal\dimexpr\pagegoal+\lineheight\relax % etex
+ \fi
+ % brrr
+ \ifdim\ht\tsplitresult>\zeropoint
+ \setbox\tsplitresult\vbox{\unvbox\tsplitresult\unvcopy\tsplittail}%
+ \dowithsplitofffloat{\tsplitbeforeresult\box\tsplitresult\tsplitafterresult}%
+ \doifnotinsidesplitfloat\tsplitafter
+ \endgraf
+ \fi
+ \ifinsidecolumns
+ \doifnotinsidesplitfloat\goodbreak
+ \else
+ \doifnotinsidesplitfloat\page
+ \fi
+ \fi}}
+
+\protect \endinput
+
+% test cases
+
+% \setupTABLE[split=repeat]
+%
+% \input tufte \endgraf
+% \splitfloat[lines=11]
+% {\placetable{\dorecurse{10}{test\recurselevel\endgraf}}}
+% {\bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE}
+% \input tufte \page
+%
+% \input tufte \endgraf
+% \splitfloat[lines=0]
+% {}
+% {\bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE}
+% \input tufte \endgraf \page
+%
+% \input tufte \endgraf
+% \bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE
+% \input tufte \page
+
+% \setuptabulate[split=yes]
+%
+% \input tufte \endgraf
+% \splitfloat[lines=11]
+% {\placetable{\dorecurse{10}{test\recurselevel\endgraf}}}
+% {\starttabulate\dorecurse{200}{\NC test \NC test \NC \NR}\stoptabulate}
+% \input tufte \page
+%
+% \input tufte \endgraf
+% \splitfloat[lines=0]
+% {}
+% {\starttabulate\dorecurse{200}{\NC test \NC test \NC \NR}\stoptabulate}
+% \input tufte \page
+%
+% \input tufte \endgraf
+% \starttabulate\dorecurse{200}{\NC test \NC test \NC \NR}\stoptabulate
+% \input tufte \page
+
+% \setuptables[split=yes]
+%
+% \newtoks\TestToks
+%
+% \TestToks\emptytoks
+% \appendtoks\starttablehead\to\TestToks
+% \dorecurse{3}{\appendtoks\VL head \VL head \VL \SR\to\TestToks}
+% \appendtoks\stoptablehead\to\TestToks
+% \appendtoks\starttabletail\to\TestToks
+% \dorecurse{3}{\appendtoks\VL tail \VL tail \VL \SR\to\TestToks}
+% \appendtoks\stoptabletail\to\TestToks
+% \appendtoks\starttables[|c|c|]\to\TestToks
+% \dorecurse{100}{\appendtoks\VL test \VL test \VL \SR\to\TestToks}
+% \appendtoks\stoptables\to\TestToks
+%
+% \input tufte \endgraf
+% \splitfloat[lines=auto] % [lines=11]
+% {\placetable{\dorecurse{10}{test\recurselevel\endgraf}}}
+% {\the\TestToks}
+% \input tufte \page
+%
+% \input tufte \endgraf
+% \splitfloat[lines=0]
+% {}
+% {\the\TestToks}
+% \input tufte \page
+%
+% \input tufte \endgraf
+% \the\TestToks
+% \input tufte \page
+%
+% multiple floats
+%
+% \starttext
+% \dorecurse{3}{\input tufte } \endgraf
+% \dorecurse{5}{\placefigure{}{\framed[height=.5\textheight]{}}}
+% \splitfloat[lines=auto,inbetween=]
+% {\placetable{\dorecurse{5}{test\recurselevel\endgraf}}}
+% {\bTABLE[split=yes]
+% \bTR \bTD 11 \eTD \bTD \input tufte \eTD \eTR
+% \bTR \bTD 12 \eTD \bTD \input zapf \eTD \eTR
+% \bTR \bTD 13 \eTD \bTD \input bryson \eTD \eTR
+% \bTR \bTD 14 \eTD \bTD test \eTD \eTR
+% \bTR \bTD 21 \eTD \bTD \input tufte \eTD \eTR
+% \bTR \bTD 22 \eTD \bTD \input zapf \eTD \eTR
+% \bTR \bTD 23 \eTD \bTD \input bryson \eTD \eTR
+% \bTR \bTD 24 \eTD \bTD test \eTD \eTR
+% \bTR \bTD 31 \eTD \bTD \input tufte \eTD \eTR
+% \bTR \bTD 32 \eTD \bTD \input zapf \eTD \eTR
+% \bTR \bTD 33 \eTD \bTD \input bryson \eTD \eTR
+% \bTR \bTD 34 \eTD \bTD test \eTD \eTR
+% \eTABLE}
+% \dorecurse{10}{\input tufte }
+% \stoptext
diff --git a/tex/context/base/core-uti.tex b/tex/context/base/core-uti.tex
index 680de0f7a..66b5b46df 100644
--- a/tex/context/base/core-uti.tex
+++ b/tex/context/base/core-uti.tex
@@ -31,6 +31,7 @@
\edef\utilityversion{1998.07.07} % was: 1996.03.15 % status variables
\edef\utilityversion{1998.12.20} % was: 1998.07.07 % index attributes
\edef\utilityversion{2003.07.19} % was: 1998.12.20 % object pages
+\edef\utilityversion{2006.06.23} % was: 2003.07.19 % -- instead of :
% Bepaalde commando's worden als string weggeschreven. Deze
% zijn aan het eind van deze file gedefinieerd.
@@ -56,10 +57,10 @@
{\checksectionseparator}
{\@@utilityerrormessage\resetutilities\endinput}}
-\def\checksectionseparator % catches backward compatibility conflict
- {\doifnot\sectionseparator:\endinput} % this dependency may go in a few years
+\def\checksectionseparator % catches backward compatibility conflict
+ {}% \doifnot\sectionseparator:\endinput} % this dependency may go in a few years
-\def\dosplitofffoliopart[#1::#2::#3]{#3}
+\def\dosplitofffoliopart[#1--#2--#3]{#3}
\def\thisissectionseparator#1%
{\bgroup
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex
index 75c59605b..f6c1b9904 100644
--- a/tex/context/base/font-ini.tex
+++ b/tex/context/base/font-ini.tex
@@ -1048,21 +1048,21 @@
\def\dodosetmathfamily#1#2%
{\@EA\ifx \csname\fontclass\fontbody\c!mm\fontfamily\fontsize\endcsname\relax
- \@EA\ifx \csname\fontclass\fontbody\c!mm\fontfamily\endcsname \relax
- \@EA\ifx \csname\fontclass\fontbody\backfamily\fontsize\endcsname \relax
- \@EA\ifx \csname\fontclass\fontbody\backfamily\endcsname \relax
+ \@EA\ifx \csname\fontclass\fontbody\c!mm\fontfamily \endcsname\relax
+ \@EA\ifx \csname\fontclass\fontbody \backfamily\fontsize\endcsname\relax
+ \@EA\ifx \csname\fontclass\fontbody \backfamily \endcsname\relax
\@EA\ifx \csname \fontbody\c!mm\fontfamily\fontsize\endcsname\relax
- \@EA\ifx \csname \fontbody\c!mm\fontfamily\endcsname \relax
- \@EA\ifx \csname \fontbody\backfamily\fontsize\endcsname \relax
- \@EA\ifx \csname \fontbody\backfamily\endcsname \relax
- \autofontsizetrue \nullfont \else
- \autofontsizetrue \csname \fontbody\backfamily\endcsname \fi \else
- \autofontsizefalse \csname \fontbody\backfamily\fontsize\endcsname \fi \else
- \autofontsizetrue \csname \fontbody\c!mm\fontfamily\endcsname \fi \else
+ \@EA\ifx \csname \fontbody\c!mm\fontfamily \endcsname\relax
+ \@EA\ifx \csname \fontbody \backfamily\fontsize\endcsname\relax
+ \@EA\ifx \csname \fontbody \backfamily \endcsname\relax
+ \autofontsizetrue \nullfont \else
+ \autofontsizetrue \csname \fontbody \backfamily \endcsname\fi \else
+ \autofontsizefalse \csname \fontbody \backfamily\fontsize\endcsname\fi \else
+ \autofontsizetrue \csname \fontbody\c!mm\fontfamily \endcsname\fi \else
\autofontsizefalse \csname \fontbody\c!mm\fontfamily\fontsize\endcsname\fi \else
- \autofontsizetrue \csname\fontclass\fontbody\backfamily\endcsname \fi \else
- \autofontsizefalse \csname\fontclass\fontbody\backfamily\fontsize\endcsname \fi \else
- \autofontsizetrue \csname\fontclass\fontbody\c!mm\fontfamily\endcsname \fi \else
+ \autofontsizetrue \csname\fontclass\fontbody \backfamily \endcsname\fi \else
+ \autofontsizefalse \csname\fontclass\fontbody \backfamily\fontsize\endcsname\fi \else
+ \autofontsizetrue \csname\fontclass\fontbody\c!mm\fontfamily \endcsname\fi \else
\autofontsizefalse \csname\fontclass\fontbody\c!mm\fontfamily\fontsize\endcsname\fi
#1#2\font}
@@ -1103,12 +1103,12 @@
\def\dodosetmathfamilyA#1#2%
{\ifcsname \fontbody\c!mm\fontfamily\fontsize\endcsname \autofontsizefalse
\csname \fontbody\c!mm\fontfamily\fontsize\endcsname \else
- \ifcsname \fontbody\c!mm\fontfamily\endcsname \autofontsizetrue
- \csname \fontbody\c!mm\fontfamily\endcsname \else
- \ifcsname \fontbody\backfamily\fontsize\endcsname \autofontsizefalse
- \csname \fontbody\backfamily\fontsize\endcsname \else
- \ifcsname \fontbody\backfamily\endcsname \autofontsizetrue
- \csname \fontbody\backfamily\endcsname \else
+ \ifcsname \fontbody\c!mm\fontfamily \endcsname \autofontsizetrue
+ \csname \fontbody\c!mm\fontfamily \endcsname \else
+ \ifcsname \fontbody \backfamily\fontsize\endcsname \autofontsizefalse
+ \csname \fontbody \backfamily\fontsize\endcsname \else
+ \ifcsname \fontbody \backfamily \endcsname \autofontsizetrue
+ \csname \fontbody \backfamily \endcsname \else
\nullfont \autofontsizetrue
\fi\fi\fi\fi
#1#2\font}
@@ -1116,12 +1116,12 @@
\def\dodosetmathfamilyB#1#2%
{\ifcsname\fontclass\fontbody\c!mm\fontfamily\fontsize\endcsname \autofontsizefalse
\csname\fontclass\fontbody\c!mm\fontfamily\fontsize\endcsname \else
- \ifcsname\fontclass\fontbody\c!mm\fontfamily\endcsname \autofontsizetrue
- \csname\fontclass\fontbody\c!mm\fontfamily\endcsname \else
- \ifcsname\fontclass\fontbody\backfamily\fontsize\endcsname \autofontsizefalse
- \csname\fontclass\fontbody\backfamily\fontsize\endcsname \else
- \ifcsname\fontclass\fontbody\backfamily\endcsname \autofontsizetrue
- \csname\fontclass\fontbody\backfamily\endcsname \else
+ \ifcsname\fontclass\fontbody\c!mm\fontfamily \endcsname \autofontsizetrue
+ \csname\fontclass\fontbody\c!mm\fontfamily \endcsname \else
+ \ifcsname\fontclass\fontbody \backfamily\fontsize\endcsname \autofontsizefalse
+ \csname\fontclass\fontbody \backfamily\fontsize\endcsname \else
+ \ifcsname\fontclass\fontbody \backfamily \endcsname \autofontsizetrue
+ \csname\fontclass\fontbody \backfamily \endcsname \else
\dodosetmathfamilyA#1#2%
\fi\fi\fi\fi
#1#2\font}
@@ -1610,6 +1610,9 @@
%
% \testfeatureonce{5000}{\definefontsynonym[somefont][somename]} \end
+
+\def\classfont#1#2{#1#2} % \definefont[whatever][\classfont{xx}{yy} at 10pt]
+
\def\definefontsynonym[#1]#2[#3]%
{\edef\@@fontfile{#3}%
\@EA\let\csname\??ff\fontclass#1\endcsname\@@fontfile
@@ -4320,15 +4323,30 @@
\let\thedefinedfont\relax
-\def\symbolicscaledfont#1#2%
- {\scaledfont\fontbody
- \scaledfont#1\scaledfont
- \font\thedefinedfont\truefontname{\glyphfontfile{#2}} at
+% \def\symbolicscaledfont#1#2%
+% {\scaledfont\fontbody
+% \scaledfont#1\scaledfont
+% \font\thedefinedfont\truefontname{\glyphfontfile{#2}} at
+% \currentfontbodyscale\scaledfont
+% \thedefinedfont}
+%
+% \unexpanded\def\symbolicfont
+% {\symbolicscaledfont\plusone}
+%
+% even more control (needed for mthsqrt etc)
+
+\def\symbolicsizedfont#1#2#3%
+ {\scaledfont#1%
+ \scaledfont#2\scaledfont
+ \font\thedefinedfont\truefontname{\glyphfontfile{#3}} at
\currentfontbodyscale\scaledfont
\thedefinedfont}
+\def\symbolicscaledfont
+ {\symbolicsizedfont\fontbody}
+
\unexpanded\def\symbolicfont
- {\symbolicscaledfont\plusone}
+ {\symbolicsizedfont\fontbody\plusone}
\unexpanded\def\getglyph#1#2% slow, faster, much faster
%{{\definefont[\s!dummy][\glyphfontfile{#1} sa \currentfontscale]\dummy#2}}
diff --git a/tex/context/base/lang-all.xml b/tex/context/base/lang-all.xml
index 0d5ea936b..486ef5d08 100644
--- a/tex/context/base/lang-all.xml
+++ b/tex/context/base/lang-all.xml
@@ -11,7 +11,7 @@
<year>1991</year>
<owner>Julio Sanchez (jsanchez@gmv.es)</owner>
<comment>These patterns have been derived from "On Word Division in Spanish"
- Jos'e A. Ma~nas</comment>
+ Jos'e A. Ma~nas</comment>
</copyright>
<copyright>
<year>1997</year>
diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex
index 469e90c53..a031a32ed 100644
--- a/tex/context/base/lang-ini.tex
+++ b/tex/context/base/lang-ini.tex
@@ -95,7 +95,7 @@
\stopmessages
\startmessages norwegian library: linguals
- title: språk
+ title: sprøk
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=--)
diff --git a/tex/context/base/lang-ita.tex b/tex/context/base/lang-ita.tex
index 776078118..950f87344 100644
--- a/tex/context/base/lang-ita.tex
+++ b/tex/context/base/lang-ita.tex
@@ -23,7 +23,7 @@
%D
%D \starttabulate[|lB|l|]
%D \NC Italian \NC Giuseppe Bilotta \NC \NR
-%D \NC Rumanian \NC Dan Seracu \NC \NR
+%D \NC Romanian \NC Dan Seracu \NC \NR
%D \NC Portuguese \NC Pedro F. M. Mendon\c a \NC \NR
%D \stoptabulate
diff --git a/tex/context/base/m-database.tex b/tex/context/base/m-database.tex
index a657e38c3..b707a8ecc 100644
--- a/tex/context/base/m-database.tex
+++ b/tex/context/base/m-database.tex
@@ -3,15 +3,15 @@
%D version=2006.04.23,
%D title=\CONTEXT\ Modules,
%D subtitle=Database Thingies,
-%D author=Hans Hagen,
+%D author=Hans Hagen\& Taco Hoekwater,
%D date=\currentdate,
%D copyright=PRAGMA
+%D ]
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-
\unprotect
% % % to be added to mult-* files
@@ -19,26 +19,100 @@
% % % todo: \dontcollectseparatedlist via k/v
\definesystemvariable{ls}
-\def\c!first{first}
-\def\c!last {last}
+
+\def\c!first {first}
+\def\c!last {last}
+\def\c!quotechar {quotechar}
+
+\let\@NX\noexpand
+
+%D {processquotedlist}
+%D
+%D An even more general list processing macro is the
+%D following one:
+%D
+%D \starttyping
+%D \processquotedlist{beginsym}{endsym}{separator}\docommando list
+%D \stoptyping
+%D
+%D This one supports arbitrary open and close symbols as well
+%D as user defined separators.
+%D
+%D \starttyping
+%D \processquotedlist(){,}{"}\docommando(a=>b=>c=>d)
+%D \stoptyping
+
+\def\processquotedlist#1#2#3#4#5%
+ {\def\csvquotechar{#4}%
+ \edef\doconvertcsvquoteditem#4##1#4##2%
+ {\@NX\ifx##2#3%
+ \let\@NX\next\@NX\doconvertcsvlist
+ \def\@NX\arg{#3}%
+ \edef\@NX\temp{##1}%
+ \@NX\expanded{\@NX#5{\@NX\temp}}%
+ \@NX\else
+ \let\@NX\next\@NX\redoconvertcsvquoteditem
+ \def\@NX\arg{##1\@NX\csvquotechar}%
+ \@NX\fi
+ \@NX\expandafter\@NX\next\@NX\arg}%
+ \edef\redoconvertcsvquoteditem##1#4##2%
+ {\@NX\ifx##2#3%
+ \let\@NX\next\@NX\doconvertcsvlist
+ \def\@NX\arg{#3}%
+ \edef\@NX\temp{##1}%
+ \@NX\expanded{\@NX#5{\@NX\temp}}%
+ \@NX\else
+ \let\@NX\next\@NX\redoconvertcsvquoteditem
+ \def\@NX\arg{##1\@NX\csvquotechar}%
+ \@NX\fi
+ \@NX\expandafter\@NX\next\@NX\arg}%
+ \edef\doconvertcsvitem##1#3%
+ {\edef\@NX\temp{##1}%
+ \@NX\expanded{\@NX#5{\@NX\temp}}%
+ \@NX\doconvertcsvlist#3}%
+ \edef\doconvertcsvlist#3##1%
+ {\@NX\ifx##1\@NX#2%
+ \let\@NX\next \@NX\gobbleoneargument
+ \@NX\else\@NX\ifx##1#4%
+ \let\@NX\next \@NX\doconvertcsvquoteditem
+ \@NX\else
+ \let\@NX\next \@NX\doconvertcsvitem
+ \@NX\fi\@NX\fi \@NX\next##1}%
+ \doconvertcsvitem}
+
+\gdef\doprocessseparatedquoteditem#1%
+ {\appendseparatedlistparameter\c!left%
+ \appendseparatedlistcontent{#1}%
+ \appendseparatedlistparameter\c!right}
+
% % % so far
-% \long\def\processseplist#1#2#3\end
-% {\def\doprocessseplist####1####2\end
-% {\ifx\end####1%
-% \expandafter\gobbleoneargument
+% \def\dodefineprocessseplist#1#2% separator \docommand
+% {\def\dodoprocessseplist##1##2#1%
+% {\ifx\relax##1%
+% \expandafter\nodoprocessseplist
+% \else\ifx##1#1%
+% #2{}%
+% #2{##2}%
+% \expandafter\expandafter\expandafter\dodoprocessseplist
% \else
-% #2{####1####2}%
-% \fi
-% \doprocessseplist}%
-% \dodoprocessseplist#3\end}
+% #2{##1##2}%
+% \expandafter\expandafter\expandafter\dodoprocessseplist
+% \fi\fi}%
+% \def\doprocessseplist##1\relax
+% {\dodoprocessseplist##1#1\relax#1\relax\relax\end}}
+%
+% a version more robust with regard to {a a} b c d situations
+
+\def\edef@relax{\relax}
\def\dodefineprocessseplist#1#2% separator \docommand
{\def\dodoprocessseplist##1##2#1%
- {\ifx\relax##1%
+ {\edef\!!stringa{##1}%
+ \ifx\edef@relax\!!stringa
\expandafter\nodoprocessseplist
- \else\ifx##1#1%
+ \else\ifx\!!stringa#1%
#2{}%
#2{##2}%
\expandafter\expandafter\expandafter\dodoprocessseplist
@@ -46,13 +120,13 @@
#2{##1##2}%
\expandafter\expandafter\expandafter\dodoprocessseplist
\fi\fi}%
- \def\doprocessseplist##1\relax
- {\dodoprocessseplist##1#1\relax#1\relax\relax\end}}
+ \def\doprocessseplist##1\relax
+ {\dodoprocessseplist##1#1\relax#1\relax\relax\end}}
\def\nodoprocessseplist#1\end
{}
-\long\def\processseplist#1#2#3\relax
+\long\def\processseplist#1#2#3\relax raw version
{\dodefineprocessseplist{#1}{#2}%
\dodoprocessseplist#3#1\relax#1\relax\relax\end}
@@ -98,90 +172,128 @@
\chardef\separatedlistmode\zerocount
-\bgroup \obeylines
+\def\setcurrentlistseparator
+ {\edef\currentlistseparator
+ {\executeifdefined
+ {\??ls::\csname\??ls\currentseparatedlist\c!separator\endcsname}%
+ {\csname\??ls\currentseparatedlist\c!separator\endcsname}}%
+ \doifvalue{\??ls\currentseparatedlist\c!separator}{tab}
+ {\catcode`\^^I=12\relax}%
+ \ifx\currentlistseparator\empty\def\currentlistseparator{,}\fi}
+
+\bgroup \catcode`\^^I=12
+ \setgvalue{\??ls::tab}{ }
+ \setgvalue{\??ls::space}{ }
+ \setgvalue{\??ls::comma}{,}
+\egroup
-\gdef\doprocessseparatedfileline%
- {\ifeof\scratchread%
- \ifcase\separatedlistmode\appendseparatedlistparameter\c!after\fi%
- \immediate\closein\scratchread%
- \expandafter\flushseparatedlistdata%
- \else\ifx\line\empty%
+\def\doprocessseparatedfileline
+ {\ifeof\scratchread
+ \ifcase\separatedlistmode\appendseparatedlistparameter\c!after\fi
+ \immediate\closein\scratchread
+ \expandafter\flushseparatedlistdata
+ \else\ifx\line\empty
% skip, can be comment
- \read\scratchread to\line%
- \@EA\dodoprocessseparatedfileline%
+ \read\scratchread to\line
+ \@EA\dodoprocessseparatedfileline
\else
\appendseparatedlistparameter{\ifcase\separatedlistmode\c!first\else\c!command\fi}%
- \expandafter\doprocessseplist\line\relax%
- \ifcase\separatedlistmode\appendseparatedlistparameter\c!last\fi%
- \read\scratchread to\line%
- \@EAEAEA\dodoprocessseparatedfileline%
+ \ifx\currentlistquotechar\empty%
+ \expandafter\doprocessseplist\line\relax
+ \else
+ \expanded{\processquotedlist{}{\noexpand\end}%
+ {\currentlistseparator}{\currentlistquotechar}%
+ \noexpand\doprocessseparatedquoteditem \line\currentlistseparator\noexpand\end}%
+ \fi
+ \ifcase\separatedlistmode\appendseparatedlistparameter\c!last\fi
+ \read\scratchread to\line
+ \@EAEAEA\dodoprocessseparatedfileline
\fi\fi}
-\gdef\dodoprocessseparatedfileline%
+\def\dodoprocessseparatedfileline
{\doprocessseparatedfileline}
-\gdef\doprocessseparatedfile[#1][#2]%
- {\bgroup%
+\def\doprocessseparatedfile[#1][#2]%
+ {\bgroup
\edef\currentseparatedlist{#1}%
\doifdefined{\??ls\currentseparatedlist\c!command}{\chardef\separatedlistmode\plusone}%
- \edef\currentlistseparator{\csname\??ls\currentseparatedlist\c!separator\endcsname}%
- \ifx\currentlistseparator\empty\def\currentlistseparator{,}\fi%
- \expandafter\dodefineprocessseplist\expandafter{\currentlistseparator}\doprocessseparateditem%
- \initializeseparatedlistdata%
+ \setcurrentlistseparator
+ \edef\currentlistquotechar{\csname\??ls\currentseparatedlist\c!quotechar\endcsname}%
+ \expandafter\dodefineprocessseplist\expandafter{\currentlistseparator}\doprocessseparateditem
+ \initializeseparatedlistdata
\directsetup{\currentseparatedlist:\executeifdefined{\??ls\currentseparatedlist\c!setups}\s!default}%
- \ifcase\separatedlistmode\appendseparatedlistparameter\c!before\fi%
- \endlinechar\minusone%
- \ignorelines%
+ \ifcase\separatedlistmode\appendseparatedlistparameter\c!before\fi
+ \endlinechar\minusone
+ \ignorelines
\catcode`\#\@@comment
- \immediate\openin\scratchread=#2\relax% todo: \doopenin
- \read\scratchread to\line%
+ \immediate\openin\scratchread=#2\relax % todo: \doopenin
+ \read\scratchread to\line
\doprocessseparatedfileline}
-\gdef\dostartseparatedlist#1[#2]%
- {\bgroup%
+\def\dostartseparatedlist#1[#2]%
+ {\bgroup
\edef\currentseparatedlist{#2}%
\doifdefined{\??ls\currentseparatedlist\c!command}{\chardef\separatedlistmode\plusone}%
- \obeylines%
- \let#1\relax%
+ \obeylines
+ \let#1\relax
\def\separateslistend{#1}%
- \edef\currentlistseparator{\csname\??ls\currentseparatedlist\c!separator\endcsname}%
- \ifx\currentlistseparator\empty\def\currentlistseparator{,}\fi%
- \expandafter\dodefineprocessseplist\expandafter{\currentlistseparator}\doprocessseparateditem%
+ \setcurrentlistseparator
+ \edef\currentlistquotechar{\csname\??ls\currentseparatedlist\c!quotechar\endcsname}%
+ \expandafter\dodefineprocessseplist\expandafter{\currentlistseparator}\doprocessseparateditem
\directsetup{\currentseparatedlist:\executeifdefined{\??ls\currentseparatedlist\c!setups}\s!default}%
- \initializeseparatedlistdata%
- \ifcase\separatedlistmode\appendseparatedlistparameter\c!before\fi%
+ \initializeseparatedlistdata
+ \ifcase\separatedlistmode\appendseparatedlistparameter\c!before\fi
\dodostartseparatedlist}
-\gdef\dodostartseparatedlist#1
- {\doprocessseparatedline}
-
-\gdef\doprocessseparatedline#1
+\def\redoprocessseparatedline#1%
{\def\!!stringa{#1}%
- \ifx\!!stringa\separateslistend%
- \ifcase\separatedlistmode\appendseparatedlistparameter\c!after\fi%
- \expandafter\flushseparatedlistdata%
+ \ifx\!!stringa\separateslistend
+ \ifcase\separatedlistmode\appendseparatedlistparameter\c!after\fi
+ \expandafter\flushseparatedlistdata
\else%
\appendseparatedlistparameter{\ifcase\separatedlistmode\c!first\else\c!command\fi}%
- \expandafter\doprocessseplist#1\relax%
- \ifcase\separatedlistmode\appendseparatedlistparameter\c!last\fi%
- \expandafter\dodoprocessseparatedline%
+ \ifx\currentlistquotechar\empty%
+ \doprocessseplist#1\relax
+ \else%
+ \convertargument#1\to\csvdata%
+ \expanded{\processquotedlist{}{\noexpand\end}%
+ {\currentlistseparator}{\currentlistquotechar}%
+ \noexpand\doprocessseparatedquoteditem \csvdata\currentlistseparator\noexpand\end}%
+ \fi
+ \ifcase\separatedlistmode\appendseparatedlistparameter\c!last\fi
+ \expandafter\dodoprocessseparatedline
\fi}
-\gdef\dodoprocessseparatedline%
+\def\doprocessseparatedline
+ {\doifnextcharelse\bgroup\xdoprocessseparatedline\ydoprocessseparatedline}
+
+\def\dodoprocessseparatedline
{\doprocessseparatedline}
-\gdef\doprocessseparateditem#1%
+\def\doprocessseparateditem#1%
{\ifcase\separatedlistmode
- \appendseparatedlistparameter\c!left%
+ \appendseparatedlistparameter\c!left
\appendseparatedlistcontent{#1}%
\appendseparatedlistparameter\c!right
\else
\appendseparatedlistcontent{{#1}}%
\fi}
+
+\bgroup \obeylines
+
+ \gdef\dodostartseparatedlist#1
+ {\doprocessseparatedline}
+
+ \gdef\xdoprocessseparatedline#1#2
+ {\redoprocessseparatedline{{{#1}}#2}}
+
+ \gdef\ydoprocessseparatedline#1
+ {\redoprocessseparatedline{#1}}
+
\egroup
-\startsetups CVS:unix
+\startsetups CSV:unix
\catcode`\#=\@@comment
\stopsetups
@@ -193,6 +305,7 @@
\getparameters
[\??ls#1]
[\c!separator=,
+ \c!quotechar=,
\c!first=,
\c!left=,
\c!before=,
@@ -202,63 +315,70 @@
% \c!command=,
#2]}
+\def\setupseparatedlist
+ {\dodoubleempty\dosetupseparatedlist}
+
+\def\dosetupseparatedlist[#1]% [#2]
+ {\getparameter[\??ls#1]} % [#2]
+
\def\startseparatedlist[#1]%
{\dostartseparatedlist\stopseparatedlist[#1]}
\def\processseparatedfile
{\dodoubleargument\doprocessseparatedfile}
-\protect \endinput
+\protect \doifnotmode{demo}{\endinput}
\defineseparatedlist
- [CVS]
+ [CSV]
[separator={,},
first=\bTR,last=\eTR,
left=\bTD,right=\eTD,
before=\bTABLE,after=\eTABLE]
-\startseparatedlist[CVS]
+\startseparatedlist[CSV]
a,b,c
d,e,f
\stopseparatedlist
-\startCVS
+\startCSV
a,b,c
d,e,f
-\stopCVS
+\stopCSV
\defineseparatedlist
- [CVS]
+ [CSV]
[separator={,},
+ quotechar={"},
first=\NC,last=\NR,
left=,right=\NC,
before={\starttabulate[|l|l|l|]},after=\stoptabulate]
-\startCVS
-a,b,c
-d,e,f
-\stopCVS
+\startCSV
+a,b,"c,d"
+d,"""",f
+\stopCSV
\defineseparatedlist
- [CVS]
+ [CSV]
[separator={ },
first=\NC,last=\NR,
left=,right=\NC,
before={\starttabulate[|l|l|l|]},after=\stoptabulate]
-\startCVS
+\startCSV
a b c
d e f
-\stopCVS
+\stopCSV
\defineseparatedlist
- [CVS]
+ [CSV]
[setups=unix,
first=\NC,last=\NR,
left=,right=\NC,
before={\starttabulate[|l|l|l|]},after=\stoptabulate]
-% \startsetups CVS:unix
+% \startsetups CSV:unix
% \catcode`\#=\@@comment
% \stopsetups
@@ -267,10 +387,10 @@ d e f
% # 4,5,6
% 4,5,6
-\processseparatedfile[CVS][test.dat]
+\processseparatedfile[CSV][test.dat]
\defineseparatedlist
- [CVSX]
+ [CSVX]
[command=\Whatever,
separator={,},
first=\bTR,last=\eTR,
@@ -279,7 +399,7 @@ d e f
\def\Whatever#1#2#3{[#1][#2][#3]\endgraf}
-\startseparatedlist[CVSX]
+\startseparatedlist[CSVX]
a,b,c
d,e,f
\stopseparatedlist
diff --git a/tex/context/base/m-r.tex b/tex/context/base/m-r.tex
index fe208cf75..244b62c36 100644
--- a/tex/context/base/m-r.tex
+++ b/tex/context/base/m-r.tex
@@ -84,35 +84,62 @@
\def\stopRhidden
{\doifmode{*\v!first}\runR}
+% \def\runR % " " needed to preserve < >
+% {\executesystemcommand{texmfstart
+% --ifchanged=\Rfile\space --direct R
+% "-q --save --restore < \Rfile\space > \Rfile.out"}}
+
\def\runR
{\executesystemcommand{texmfstart
-% --ifchanged=\Rfile\space bin:R
--ifchanged=\Rfile\space --direct R
- "-q --save --restore < \Rfile\space > \Rfile.out"}}
+ CMD BATCH -q --save --restore \Rfile\space \Rfile.out}}
\protect \doifnotmode{demo}{\endinput}
% Johan's test file:
+\usemodule[r]
+
+\def\R{R}
+
+\setupcolors[state=start]
+
+\setuptyping
+ [Rtype]
+ [color=darkgreen]
+
\starttext
+First a test of whether the workspace is persistent:
+bla
+
\startR
a <- "bla"
b <- "blabla"
ls()
\stopR
-bla bla
+One \R run ends, another begins.
+
+\startR
+ls()
+\stopR
+
+Now follows a hidden \R run which cleans the R workspace
\startRhidden
rm(list=ls())
save.image()
\stopRhidden
-more bla
+What is in the workspace now?
\startR
ls()
+\stopR
+
+Then a small test of generating a graphic, in this case a pdf
+\startR
ushape <- c(rexp(500000), 12-rexp(500000))
pdf("ushape.pdf")
par(mfrow=c(1,2))
@@ -121,7 +148,12 @@ plot(density(ushape), main="Density")
dev.off()
\stopR
-\input tufte \par \input knuth
+The graphic \type{ushape.pdf} can be included in the standard \CONTEXT\ way
+\startbuffer
+\placefigure{An ugly distribution}{\externalfigure[ushape]}
+\stopbuffer
+\typebuffer
+\getbuffer
\startR
x <- rnorm(900)
@@ -135,25 +167,50 @@ xyplot(y~x|f)
dev.off()
\stopR
-\placefigure{}{\externalfigure[lattice]}
-\placefigure{}{\externalfigure[ushape]}
+With \type{Sweave} lattice graphics calls must be enclosed in
+\type{print()} statements but that is not necessary here.
-\input tufte
+\startbuffer
+\placefigure[here]{Lattice graphics}{\externalfigure[lattice]}
+\stopbuffer
+\typebuffer
+\getbuffer
+A test string with nasty characters. In \R, the result of a statement
+is not printed by default. Enclosing the statement in parentheses,
+however causes the parser to see only the value of the statement and
+applying the \type{print()} method.
\startR
-(test <- ".*\\\\ []{}=?!+%#|<|>@$")
+(test <- ".*\\\\ [[{[{]{[{[{}\]\}=?!+%#|<|>@$")
cat(test)
\stopR
-\input bryson \par \input knuth
+A combination
+\startbuffer
+\placefigure{A combination of two previously used graphics}{
+\startcombination[2*1]
+ {\externalfigure[ushape][width=.4\textwidth]}{The first graphic, rescaled}
+ {\externalfigure[lattice][width=.4\textwidth]}{The second graphic, rescaled}}
+\stopcombination
+\stopbuffer
+\typebuffer
+\getbuffer
+
+Testing a function definition.
\startR
a.df <- data.frame(a=1:2, b=rnorm(2))
a.df$a
testfunction <- function(a=NULL, ...) {
- for(i in 1:length(a)) {
- gsub(a[[i]], "([a-r]|[A-R])", "bla")}
- print(a)}
+ for(i in 1:length(a)) {
+ gsub(a[[i]], "([a-r]|[A-R])", "bla")}
+ print(a)}
+\stopR
+
+What is in the workspace now?
+
+\startR
+ls()
\stopR
\stoptext
diff --git a/tex/context/base/m-streams.tex b/tex/context/base/m-streams.tex
index fd93f2655..181c82d33 100644
--- a/tex/context/base/m-streams.tex
+++ b/tex/context/base/m-streams.tex
@@ -1,3 +1,16 @@
+%D \module
+%D [ file=m-streams,
+%D version=2006.03.21,
+%D title=\CONTEXT\ Modules,
+%D subtitle=Streams,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=PRAGMA]
+%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 First we implement a simple left||right synchronization
%D mechanism, which we may perfect and extend over time.
@@ -107,6 +120,18 @@
{\outputstreambox[\currentstreamlayer]}%
\stopsetups
+\startsetups streamlayer:default:copy
+ \setlayer
+ [\currentstreamlayer]
+ [\c!preset=\v!left\v!top]
+ {\outputstreamcopy[\currentstreamlayer]}%
+\stopsetups
+
+
+\startsetups streamlayer:default:reset
+ \outputstreambox[\currentstreamlayer]
+\stopsetups
+
\startsetups streamlayer:default:flush
\tightlayer[\currentstreamlayer]
\stopsetups
@@ -268,7 +293,6 @@
%D \stoptext
%D \stoptyping
-
\def\starttextstreamlayer
{\startstreamlayer}
diff --git a/tex/context/base/m-tryout.tex b/tex/context/base/m-tryout.tex
index ef6c502ba..89ffc4678 100644
--- a/tex/context/base/m-tryout.tex
+++ b/tex/context/base/m-tryout.tex
@@ -24,6 +24,10 @@
\startmode[activecolon]
+\endinput
+
+% this is now default
+
\gdef\sectionseparator{-}
\gdef\@@filterfirstpart [#1--#2]{#1}
diff --git a/tex/context/base/m-units.tex b/tex/context/base/m-units.tex
index 89dd71e77..0a42862f1 100644
--- a/tex/context/base/m-units.tex
+++ b/tex/context/base/m-units.tex
@@ -646,7 +646,7 @@
\setuplabeltext
[\s!en]
[u:vac=alternating current,
- u:vdc=different current]
+ u:vdc=direct current]
\setuplabeltext
[\s!de]
diff --git a/tex/context/base/math-cow.tex b/tex/context/base/math-cow.tex
new file mode 100644
index 000000000..016221f2d
--- /dev/null
+++ b/tex/context/base/math-cow.tex
@@ -0,0 +1,30 @@
+%D \module
+%D [ file=math-cow,
+%D version=2006.06.23,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Cow Math,
+%D author={Hans Hagen \& Taco Hoekwater},
+%D date=\currentdate,
+%D copyright=\PRAGMA]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+\let\COWsqrt\mthsqrt
+\let\COWfrac\mthfrac
+
+\startmathcollection [cow]
+ % todo
+\stopmathcollection
+
+\startrawmathcollection[cow]
+ \definemathcommand [frac] {\COWfrac}
+ \definemathcommand [sqrt] {\COWsqrt}
+ %definemathcommand [r@@t] {\COWroot}
+ %definemathcommand [matrix] {\COWmatrix}
+\stoprawmathcollection
+
+\protect \endinput
diff --git a/tex/context/base/math-eul.tex b/tex/context/base/math-eul.tex
index f89b54125..6acc33356 100644
--- a/tex/context/base/math-eul.tex
+++ b/tex/context/base/math-eul.tex
@@ -89,59 +89,59 @@
\startmathcollection [eul]
% Ugh. no way around this to keep it compact in the font defs.
-\definemathcharacter [a] [nothing] [mr] ["61]
-\definemathcharacter [b] [nothing] [mr] ["62]
-\definemathcharacter [c] [nothing] [mr] ["63]
-\definemathcharacter [d] [nothing] [mr] ["64]
-\definemathcharacter [e] [nothing] [mr] ["65]
-\definemathcharacter [f] [nothing] [mr] ["66]
-\definemathcharacter [g] [nothing] [mr] ["67]
-\definemathcharacter [h] [nothing] [mr] ["68]
-\definemathcharacter [i] [nothing] [mr] ["69]
-\definemathcharacter [j] [nothing] [mr] ["6A]
-\definemathcharacter [k] [nothing] [mr] ["6B]
-\definemathcharacter [l] [nothing] [mr] ["6C]
-\definemathcharacter [m] [nothing] [mr] ["6D]
-\definemathcharacter [n] [nothing] [mr] ["6E]
-\definemathcharacter [o] [nothing] [mr] ["6F]
-\definemathcharacter [p] [nothing] [mr] ["70]
-\definemathcharacter [q] [nothing] [mr] ["71]
-\definemathcharacter [r] [nothing] [mr] ["72]
-\definemathcharacter [s] [nothing] [mr] ["73]
-\definemathcharacter [t] [nothing] [mr] ["74]
-\definemathcharacter [u] [nothing] [mr] ["75]
-\definemathcharacter [v] [nothing] [mr] ["76]
-\definemathcharacter [w] [nothing] [mr] ["77]
-\definemathcharacter [x] [nothing] [mr] ["78]
-\definemathcharacter [y] [nothing] [mr] ["79]
-\definemathcharacter [z] [nothing] [mr] ["7A]
-
-\definemathcharacter [A] [nothing] [mr] ["41]
-\definemathcharacter [B] [nothing] [mr] ["42]
-\definemathcharacter [C] [nothing] [mr] ["43]
-\definemathcharacter [D] [nothing] [mr] ["44]
-\definemathcharacter [E] [nothing] [mr] ["45]
-\definemathcharacter [F] [nothing] [mr] ["46]
-\definemathcharacter [G] [nothing] [mr] ["47]
-\definemathcharacter [H] [nothing] [mr] ["48]
-\definemathcharacter [I] [nothing] [mr] ["49]
-\definemathcharacter [J] [nothing] [mr] ["4A]
-\definemathcharacter [K] [nothing] [mr] ["4B]
-\definemathcharacter [L] [nothing] [mr] ["4C]
-\definemathcharacter [M] [nothing] [mr] ["4D]
-\definemathcharacter [N] [nothing] [mr] ["4E]
-\definemathcharacter [O] [nothing] [mr] ["4F]
-\definemathcharacter [P] [nothing] [mr] ["50]
-\definemathcharacter [Q] [nothing] [mr] ["51]
-\definemathcharacter [R] [nothing] [mr] ["52]
-\definemathcharacter [S] [nothing] [mr] ["53]
-\definemathcharacter [T] [nothing] [mr] ["54]
-\definemathcharacter [U] [nothing] [mr] ["55]
-\definemathcharacter [V] [nothing] [mr] ["56]
-\definemathcharacter [W] [nothing] [mr] ["57]
-\definemathcharacter [X] [nothing] [mr] ["58]
-\definemathcharacter [Y] [nothing] [mr] ["59]
-\definemathcharacter [Z] [nothing] [mr] ["5A]
+\definemathcharacter [a] [alpha] [mr] ["61]
+\definemathcharacter [b] [alpha] [mr] ["62]
+\definemathcharacter [c] [alpha] [mr] ["63]
+\definemathcharacter [d] [alpha] [mr] ["64]
+\definemathcharacter [e] [alpha] [mr] ["65]
+\definemathcharacter [f] [alpha] [mr] ["66]
+\definemathcharacter [g] [alpha] [mr] ["67]
+\definemathcharacter [h] [alpha] [mr] ["68]
+\definemathcharacter [i] [alpha] [mr] ["69]
+\definemathcharacter [j] [alpha] [mr] ["6A]
+\definemathcharacter [k] [alpha] [mr] ["6B]
+\definemathcharacter [l] [alpha] [mr] ["6C]
+\definemathcharacter [m] [alpha] [mr] ["6D]
+\definemathcharacter [n] [alpha] [mr] ["6E]
+\definemathcharacter [o] [alpha] [mr] ["6F]
+\definemathcharacter [p] [alpha] [mr] ["70]
+\definemathcharacter [q] [alpha] [mr] ["71]
+\definemathcharacter [r] [alpha] [mr] ["72]
+\definemathcharacter [s] [alpha] [mr] ["73]
+\definemathcharacter [t] [alpha] [mr] ["74]
+\definemathcharacter [u] [alpha] [mr] ["75]
+\definemathcharacter [v] [alpha] [mr] ["76]
+\definemathcharacter [w] [alpha] [mr] ["77]
+\definemathcharacter [x] [alpha] [mr] ["78]
+\definemathcharacter [y] [alpha] [mr] ["79]
+\definemathcharacter [z] [alpha] [mr] ["7A]
+
+\definemathcharacter [A] [alpha] [mr] ["41]
+\definemathcharacter [B] [alpha] [mr] ["42]
+\definemathcharacter [C] [alpha] [mr] ["43]
+\definemathcharacter [D] [alpha] [mr] ["44]
+\definemathcharacter [E] [alpha] [mr] ["45]
+\definemathcharacter [F] [alpha] [mr] ["46]
+\definemathcharacter [G] [alpha] [mr] ["47]
+\definemathcharacter [H] [alpha] [mr] ["48]
+\definemathcharacter [I] [alpha] [mr] ["49]
+\definemathcharacter [J] [alpha] [mr] ["4A]
+\definemathcharacter [K] [alpha] [mr] ["4B]
+\definemathcharacter [L] [alpha] [mr] ["4C]
+\definemathcharacter [M] [alpha] [mr] ["4D]
+\definemathcharacter [N] [alpha] [mr] ["4E]
+\definemathcharacter [O] [alpha] [mr] ["4F]
+\definemathcharacter [P] [alpha] [mr] ["50]
+\definemathcharacter [Q] [alpha] [mr] ["51]
+\definemathcharacter [R] [alpha] [mr] ["52]
+\definemathcharacter [S] [alpha] [mr] ["53]
+\definemathcharacter [T] [alpha] [mr] ["54]
+\definemathcharacter [U] [alpha] [mr] ["55]
+\definemathcharacter [V] [alpha] [mr] ["56]
+\definemathcharacter [W] [alpha] [mr] ["57]
+\definemathcharacter [X] [alpha] [mr] ["58]
+\definemathcharacter [Y] [alpha] [mr] ["59]
+\definemathcharacter [Z] [alpha] [mr] ["5A]
\stopmathcollection
diff --git a/tex/context/base/math-ext.tex b/tex/context/base/math-ext.tex
new file mode 100644
index 000000000..1091cd5ff
--- /dev/null
+++ b/tex/context/base/math-ext.tex
@@ -0,0 +1,199 @@
+%D \module
+%D [ file=math-ext,
+%D version=2006.01.14,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Extra Macros,
+%D author={Hans Hagen \& Taco Hoekwater \& Adity Mahajan},
+%D date=\currentdate,
+%D copyright=\PRAGMA]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+%D These will be generalized!
+
+\def\exmthfont#1{\symbolicsizedfont#1\plusone{MathExtension}}
+
+\def\domthfrac#1#2#3#4%
+ {\begingroup
+ \mathsurround\zeropoint
+ \setbox0\hbox{$#1 #3$}%
+ \setbox2\hbox{$#1 #4$}%
+ \dimen0\wd0
+ \ifdim\wd2>\dimen0 \dimen0\wd2 \fi
+ \setbox4\hbox to \dimen0{\exmthfont#2\char"77\leaders\hbox{\char"75}\hss\char"76}%
+ \mathord{\vcenter{{\offinterlineskip
+ \hbox to \dimen0{\hss\box0\hss}%
+ \kern \ht4%
+ \hbox to \dimen0{\hss\copy4\hss}%
+ \kern \ht4%
+ \hbox to \dimen0{\hss\box2\hss}}}}%
+ \endgroup}
+
+\def\domthsqrt#1#2#3%
+ {\begingroup
+ \mathsurround\zeropoint
+ \setbox0\hbox{$#1 #3$}%
+ \dimen0\wd0
+ \setbox4\hbox to \dimen0{\exmthfont#2\leaders\hbox{\char"75}\hfill\char"76}%
+ \setbox2\hbox{\exmthfont#2\char"70}%
+ \ifdim\dimexpr\dp0+\ht0+\ht2\relax>\dp2 \setbox2\hbox{\exmthfont#2\char"71}\fi
+ \ifdim\dimexpr\dp0+\ht0+\ht2\relax>\dp2 \setbox2\hbox{\exmthfont#2\char"72}\fi
+ \ifdim\dimexpr\dp0+\ht0+\ht2\relax>\dp2 \setbox2\hbox{\exmthfont#2\char"73}\fi
+ \ifdim\dimexpr\dp0+\ht0+\ht2\relax>\dp2 \setbox2\hbox{\exmthfont#2\char"74}\fi
+ \mathord{\vcenter{\hbox{%
+ \raise\dimexpr\dp2-.5\ht2\relax\hbox{\copy2\rlap{\copy4}}%
+ \raise\dp0 \copy0}}}%
+ \endgroup}
+
+\def\mthfrac#1#2{\mathchoice
+ {\domthfrac\displaystyle \textface {#1}{#2}}
+ {\domthfrac\textstyle \textface {#1}{#2}}
+ {\domthfrac\scriptstyle \scriptface {#1}{#2}}
+ {\domthfrac\scriptscriptstyle\scriptscriptface{#1}{#2}}}
+
+\def\mthsqrt#1{\mathchoice
+ {\domthsqrt\displaystyle \textface {#1}}
+ {\domthsqrt\textstyle \textface {#1}}
+ {\domthsqrt\scriptstyle \scriptface {#1}}
+ {\domthsqrt\scriptscriptstyle\scriptscriptface{#1}}}
+
+% temp here
+
+\def\mtharrfactor{1}
+\def\mtharrextra {0}
+
+\def\domthxarr#1#2#3#4#5% hm, looks like we do a double mathrel
+ {\begingroup
+ \def\mtharrfactor{1}%
+ \def\mtharrextra {0}%
+ \processaction[#1] % will be sped up
+ [ \v!none=>\def\mtharrfactor{0},
+ \v!small=>\def\mtharrextra{10},
+ \v!medium=>\def\mtharrextra{15},
+ \v!big=>\def\mtharrextra{20},
+ \v!normal=>,
+ \v!default=>,
+ \v!unknown=>\doifnumberelse{#1}{\def\mtharrextra{#1}}\donothing]%
+ \mathsurround\zeropoint
+ \muskip0=\thirdoffourarguments #2mu
+ \muskip2=\fourthoffourarguments #2mu
+ \muskip4=\firstoffourarguments #2mu
+ \muskip6=\secondoffourarguments #2mu
+ \muskip0=\mtharrfactor\muskip0 \advance\muskip0 \mtharrextra mu
+ \muskip2=\mtharrfactor\muskip2 \advance\muskip2 \mtharrextra mu
+ \setbox0\hbox{$\scriptstyle
+ \mkern\muskip4\relax
+ \mkern\muskip0\relax
+ #5\relax
+ \mkern\muskip2\relax
+ \mkern\muskip6\relax
+ $}%
+ \setbox4\hbox{#3}%
+ \dimen0\wd0
+ \ifdim\wd4>\dimen0 \dimen0\wd4 \fi
+ \setbox2\hbox{$\scriptstyle
+ \mkern\muskip4\relax
+ \mkern\muskip0\relax
+ #4\relax
+ \mkern\muskip2\relax
+ \mkern\muskip6\relax
+ $}%
+ \ifdim\wd2>\dimen0 \dimen0\wd2 \fi
+ \setbox4\hbox to \dimen0{#3}%
+ \mathrel{\mathop{\hbox to \dimen0{\hss\copy4\hss}}\limits^{\box0}_{\box2}}
+ \endgroup}
+
+\let\domthxarrsingle\domthxarr
+
+\def\domthxarrdouble#1#2#3#4#5#6#7% opt l r sp rs top bot
+ {\mathrel
+ {\scratchdimen.22ex\relax
+ \setbox0\hbox{$\domthxarr{#1}{#2}{#4}{\phantom{#6}}{#7}$}%
+ \setbox2\hbox{$\domthxarr{#1}{#3}{#5}{#6}{\phantom{#7}}$}%
+ \raise\scratchdimen\box0
+ \kern-\wd2
+ \lower\scratchdimen\box2}}
+
+\def\definematharrow
+ {\doquadrupleargument\dodefinematharrow}
+
+\def\dodefinematharrow[#1][#2][#3][#4]% name type[none|both] template command
+ {\iffourthargument
+ \executeifdefined{dodefine#2arrow}\gobblethreearguments{#1}{#3}{#4}%
+ \else\ifthirdargument
+ \dodefinebotharrow{#1}{#2}{#3}%
+ \fi\fi}
+
+\def\dodefinebotharrow#1#2#3%
+ {\setvalue{#1}{\dotripleempty\xmtharrow[#2][#3]}}
+
+\def\xmtharrow[#1][#2][#3]% #3 == optional arg
+ {\def\doxmtharrow{\dodoxmtharrow[#1,\empty,\empty][#2,\empty,\empty][#3]}% {##1}{##2}
+ \dodoublegroupempty\doxmtharrow}
+
+\def\dodoxmtharrow[#1,#2,#3][#4,#5,#6][#7]#8#9% [3] is the optional arg
+ {\ifx#2\empty
+ \mathrel{\domthxarrsingle{#7}{#1}{#4}{#8}{#9}}%
+ \else
+ \mathrel{\domthxarrdouble{#7}{#1}{#2}{#4}{#5}{#8}{#9}}%
+ \fi}
+
+% Adapted from amsmath.
+
+\def\mtharrowfill#1#2#3%
+ {$\m@th\thickmuskip0mu\medmuskip\thickmuskip\thinmuskip\thickmuskip
+ \relax#1\mkern-7mu%
+ \cleaders\hbox{$\mkern-2mu#2\mkern-2mu$}\hfill
+ \mkern-7mu#3$}
+
+% Maybe redefine leftarrowfill and rightarrowfill using arrowfill
+
+\def\rightarrowfill {\mtharrowfill \relbar \relbar \rightarrow }
+\def\leftarrowfill {\mtharrowfill \leftarrow \relbar \relbar }
+\def\equalfill {\mtharrowfill \Relbar \Relbar \Relbar }
+\def\Rightarrowfill {\mtharrowfill \Relbar \Relbar \Rightarrow }
+\def\Leftarrowfill {\mtharrowfill \Leftarrow \Relbar \Relbar }
+\def\Leftrightarrowfill {\mtharrowfill \Leftarrow \Relbar \Rightarrow }
+\def\leftrightarrowfill {\mtharrowfill \leftarrow \relbar \rightarrow }
+\def\mapstofill {\mtharrowfill{\mapstochar\relbar}\relbar \rightarrow }
+\def\twoheadrightarrowfill{\mtharrowfill \relbar \relbar \twoheadrightarrow}
+\def\twoheadleftarrowfill {\mtharrowfill \twoheadleftarrow \relbar \relbar }
+\def\rightharpoondownfill {\mtharrowfill \relbar \relbar \rightharpoondown }
+\def\rightharpoonupfill {\mtharrowfill \relbar \relbar \rightharpoonup }
+\def\leftharpoondownfill {\mtharrowfill \leftharpoondown \relbar \relbar }
+\def\leftharpoonupfill {\mtharrowfill \leftharpoonup \relbar \relbar }
+
+% From amsmath.sty, extarrows.sty, extpfel.sty and mathtools.sty(ams)
+
+\definematharrow [xrightarrow] [0359] [\rightarrowfill]
+\definematharrow [xleftarrow] [3095] [\leftarrowfill]
+\definematharrow [xequal] [0099] [\equalfill]
+\definematharrow [xRightarrow] [0359] [\Rightarrowfill]
+\definematharrow [xLeftarrow] [3095] [\Leftarrowfill]
+\definematharrow [xLeftrightarrow] [0099] [\Leftrightarrowfill]
+\definematharrow [xleftrightarrow] [0099] [\leftrightarrowfill]
+\definematharrow [xmapsto] [0599] [\mapstofill]
+\definematharrow [xtwoheadrightarrow] [5009] [\twoheadrightarrowfill]
+\definematharrow [xtwoheadleftarrow] [0590] [\twoheadleftarrowfill]
+\definematharrow [xrightharpoondown] [0359] [\rightharpoondownfill]
+\definematharrow [xrightharpoonup] [0359] [\rightharpoonupfill]
+\definematharrow [xleftharpoondown] [3095] [\leftharpoondownfill]
+\definematharrow [xleftharpoonup] [3095] [\leftharpoonupfill]
+
+\definematharrow [xleftrightharpoons] [3095,0359] [\leftharpoonupfill,\rightharpoondownfill]
+\definematharrow [xrightleftharpoons] [3095,0359] [\rightharpoonupfill,\leftharpoondownfill]
+
+% \startformula \xrightarrow{}{stuff on top}\stopformula
+% \startformula \xrightarrow{stuff below}{}\stopformula
+% \startformula \xrightarrow{stuff below}{stuff on top}\stopformula
+
+% \startformula \xleftarrow [none]{stuff below}{stuff on top}\stopformula
+% \startformula \xleftarrow [small]{stuff below}{stuff on top}\stopformula
+% \startformula \xleftarrow [medium]{stuff below}{stuff on top}\stopformula
+% \startformula \xleftarrow [big]{stuff below}{stuff on top}\stopformula
+
+\protect \endinput
diff --git a/tex/context/base/meta-ini.tex b/tex/context/base/meta-ini.tex
index 38c3ec3bd..0fa99aa5c 100644
--- a/tex/context/base/meta-ini.tex
+++ b/tex/context/base/meta-ini.tex
@@ -1015,6 +1015,57 @@
%D \ruledhbox{\flushlayer[mp]}
%D \stoptyping
+%D \macros
+%D {startstaticMPfigure,useMPstaticfigure}
+%D
+%D Static figures are processed only when there has been
+%D something changed. Here is Aditya Mahajan's testcase:
+%D
+%D \startbuffer
+%D \startstaticMPfigure{circle}
+%D fill fullcircle scaled 1cm withcolor blue;
+%D \stopstaticMPfigure
+%D
+%D \startstaticMPfigure{axis}
+%D drawarrow (0,0)--(2cm,0) ;
+%D drawarrow (0,0)--(0,2cm) ;
+%D label.llft(textext("(0,0)") ,origin) ;
+%D \stopstaticMPfigure
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\def\usestaticMPfigure[#1]%
+ {\dodoubleempty\externalfigure[\jobname-#1.pdf]}
+
+\def\startstaticMPfigure
+ {\begingroup
+ \obeyMPlines
+ \dostartstaticMPfigure}
+
+\def\dostartstaticMPfigure#1#2\stopstaticMPfigure
+ {\startstaticMPgraphic{\jobname-#1}#2\stopstaticMPgraphic
+ \doifmode{*\v!first}{\executesystemcommand
+ {texmfstart --ifchanged=\MPgraphicfile.mp texexec --mpgraphic \MPgraphicfile.mp}}%
+ \endgroup}
+
+% faster, but more tricky
+%
+% \def\startstaticMPfigure
+% {\doifmodeelse{*\v!first}
+% {\begingroup
+% \obeyMPlines
+% \dostartstaticMPfigure}
+% {\gobbleuntil\stopstaticMPfigure}}
+%
+% \def\dostartstaticMPfigure#1#2\stopstaticMPfigure
+% {\startMPstaticgraphic{\jobname-#1}#2\stopMPstaticgraphic
+% \executesystemcommand
+% {texmfstart --ifchanged=\MPgraphicfile.mp texexec --mpgraphic \MPgraphicfile.mp}%
+% % dirty trick, don't register, so no second main run of texexec:
+% \global\advance\nofMPgraphics \minusone
+% \endgroup}}
+
%D New:
% \appendtoks \closeMPgraphicfiles \to \everystoptext
diff --git a/tex/context/base/meta-pdf.tex b/tex/context/base/meta-pdf.tex
index 1c76075a9..49dc4df38 100644
--- a/tex/context/base/meta-pdf.tex
+++ b/tex/context/base/meta-pdf.tex
@@ -14,10 +14,12 @@
%D In due time this file will replace \type {supp-pdf} and
%D \type {supp-mpe}.
-\input supp-pdf
-\input supp-mpe
+% \input supp-pdf
+% \input supp-mpe
+%
+% \endinput
-\endinput
+% we're going to experiment a bit with new code
%D To be tested: texopt.rb on this file.
@@ -703,53 +705,89 @@
\let\MPfshowcommand\empty
+% \def\dohandleMPfshow
+% {\bgroup
+% \setbox\scratchbox\hbox
+% {\obeyMPspecials
+% \let\ \relax % mp breaks long lines and appends a \
+% \edef\size{\gMPa\nofMParguments}%
+% \ifx\size\PSnfont % round font size (to pt)
+% \advance\nofMParguments \minusone
+% \expandafter\scratchdimen\gMPa\nofMParguments\onepoint\relax
+% \ifdim\scratchdimen<\onepoint
+% \def\size{1pt}%
+% \else
+% \advance\scratchdimen .5\onepoint
+% \def\size##1.##2\relax{\def\size{##1pt}}%
+% \expandafter\size\the\scratchdimen\relax
+% \fi
+% \else
+% \edef\size{\size bp}%
+% \fi
+% \advance\nofMParguments \minusone
+% %\font\temp=\gMPa\nofMParguments\space at \size
+% \let\temp\relax % to be sure
+% \setMPfshowfont{\gMPa\nofMParguments}\size
+% \advance\nofMParguments \minusone
+% \temp
+% \MPfshowcommand
+% {\ifnum\nofMParguments=\plusone
+% \def\do(##1){##1}%
+% \dogMPa1%
+% \else
+% % we need to catch ( a ) (a a a) (\123 \123 \123) etc
+% \scratchcounter\plusone
+% \def\dodo##1% Andreas Fieger's bug: (\304...)
+% {\edef\!!stringa{##1\empty\empty}% and another one: ( 11) -> \ifx 11
+% \ifx\!!stringa\MPspacechar\MPspacechar\else\expandafter##1\fi}%
+% \def\do(##1{\dodo{##1}}%
+% \dogMPa\scratchcounter\MPspacechar
+% \let\do\relax
+% \loop
+% \advance\scratchcounter \plusone
+% \ifnum\scratchcounter<\nofMParguments\relax
+% \gMPa\scratchcounter\MPspacechar
+% \repeat
+% \def\do##1){\dodo{##1}}%
+% \dogMPa\scratchcounter
+% \fi
+% \unskip}}%
+% %
+% % this fails in some versions of pdftex
+% %
+% % \dimen0=\lastMPmoveY bp
+% % \advance\dimen0 by \ht0
+% % \ScaledPointsToBigPoints{\number\dimen0}\lastMPmoveY
+% % \PDFcode{n q 1 0 0 1 \lastMPmoveX\space\lastMPmoveY\space cm}%
+% % \dimen0=\ht0
+% % \advance\dimen0 by \dp0
+% % \box0
+% % \vskip-\dimen0
+% % \PDFcode{Q}%
+% % \egroup}
+% %
+% \setbox\scratchbox\hbox
+% {\hskip\lastMPmoveX\onebasepoint\raise\lastMPmoveY\onebasepoint\box\scratchbox}%
+% \ht\scratchbox\zeropoint
+% \dp\scratchbox\zeropoint
+% \wd\scratchbox\zeropoint
+% \box\scratchbox
+% \egroup}
+%
+% \let\handleMPfshow\dohandleMPfshow % so we can overload this one later
+%
+% we will support plug-ins:
+
\def\dohandleMPfshow
- {\bgroup
- \setbox\scratchbox\hbox
+ {\setbox\scratchbox\hbox
{\obeyMPspecials
- \let\ \relax % mp breaks long lines and appends a \
- \edef\size{\gMPa\nofMParguments}%
- \ifx\size\PSnfont % round font size (to pt)
- \advance\nofMParguments \minusone
- \expandafter\scratchdimen\gMPa\nofMParguments\onepoint\relax
- \ifdim\scratchdimen<\onepoint
- \def\size{1pt}%
- \else
- \advance\scratchdimen .5\onepoint
- \def\size##1.##2\relax{\def\size{##1pt}}%
- \expandafter\size\the\scratchdimen\relax
- \fi
- \else
- \edef\size{\size bp}%
- \fi
- \advance\nofMParguments \minusone
- %\font\temp=\gMPa\nofMParguments\space at \size
- \let\temp\relax % to be sure
- \setMPfshowfont{\gMPa\nofMParguments}\size
- \advance\nofMParguments \minusone
- \temp
- \MPfshowcommand
- {\ifnum\nofMParguments=\plusone
- \def\do(##1){##1}%
- \dogMPa1%
- \else
- % we need to catch ( a ) (a a a) (\123 \123 \123) etc
- \scratchcounter\plusone
- \def\dodo##1% Andreas Fieger's bug: (\304...)
- {\edef\!!stringa{##1\empty\empty}% and another one: ( 11) -> \ifx 11
- \ifx\!!stringa\MPspacechar\MPspacechar\else\expandafter##1\fi}%
- \def\do(##1{\dodo{##1}}%
- \dogMPa\scratchcounter\MPspacechar
- \let\do\relax
- \loop
- \advance\scratchcounter \plusone
- \ifnum\scratchcounter<\nofMParguments\relax
- \gMPa\scratchcounter\MPspacechar
- \repeat
- \def\do##1){\dodo{##1}}%
- \dogMPa\scratchcounter
- \fi
- \unskip}}%
+ \edef\MPtextsize{\gMPa\nofMParguments}%
+ \def\do(##1){##1}%
+ \edef\MPtextdata{\dogMPa1}% beware, stack can have more
+ \handleMPtext}%
+ \setbox\scratchbox\hbox
+ {\hskip\lastMPmoveX\onebasepoint\raise\lastMPmoveY\onebasepoint
+ \box\scratchbox}%
%
% this fails in some versions of pdftex
%
@@ -764,15 +802,68 @@
% \PDFcode{Q}%
% \egroup}
%
- \setbox\scratchbox\hbox
- {\hskip\lastMPmoveX\onebasepoint\raise\lastMPmoveY\onebasepoint\box\scratchbox}%
\ht\scratchbox\zeropoint
\dp\scratchbox\zeropoint
\wd\scratchbox\zeropoint
- \box\scratchbox
- \egroup}
+ \box\scratchbox}
+
+\def\handleMPtext {\handleMPtextnormal} % so we can overload this one later
+\def\handleMPfshow{\dohandleMPfshow } % so we can overload this one later
+
+\def\handleMPtext
+ {\ifnum\nofMParguments>\plusthree
+ \handleMPtextnormal
+ \else
+ \convertcommand\MPtextdata\to\MPtextdata
+ \expanded{\splitstring\MPtextdata}\at::::\to\MPtexttag\and\MPtextnumber
+ \executeifdefined{handleMPtext\MPtexttag}\handleMPtextnormal
+ \fi}
+
+% elsewhere we will implement \handleMPtextmptxt
-\let\handleMPfshow\dohandleMPfshow % so we can overload this one later
+\def\handleMPtextnormal
+ {\let\ \relax % mp breaks long lines and appends a \
+ \ifx\MPtextsize\PSnfont % round font size (to pt)
+ \advance\nofMParguments \minusone
+ \expandafter\scratchdimen\gMPa\nofMParguments\onepoint\relax
+ \ifdim\scratchdimen<\onepoint
+ \def\MPtextsize{1pt}%
+ \else
+ \advance\scratchdimen .5\onepoint
+ \def\MPtextsize##1.##2\relax{\def\MPtextsize{##1pt}}%
+ \expandafter\MPtextsize\the\scratchdimen\relax
+ \fi
+ \else
+ \edef\MPtextsize{\MPtextsize bp}%
+ \fi
+ \advance\nofMParguments \minusone
+ \font\temp=\gMPa\nofMParguments\space at \MPtextsize
+ \let\temp\relax % to be sure
+ \setMPfshowfont{\gMPa\nofMParguments}\MPtextsize
+ \advance\nofMParguments \minusone
+ \temp
+ \MPfshowcommand
+ {\ifnum\nofMParguments=\plusone
+ \def\do(##1){##1}%
+ \dogMPa1%
+ \else
+ % we need to catch ( a ) (a a a) (\123 \123 \123) etc
+ \scratchcounter\plusone
+ \def\dodo##1% Andreas Fieger's bug: (\304...)
+ {\edef\!!stringa{##1\empty\empty}% and another one: ( 11) -> \ifx 11
+ \ifx\!!stringa\MPspacechar\MPspacechar\else\expandafter##1\fi}%
+ \def\do(##1{\dodo{##1}}%
+ \dogMPa\scratchcounter\MPspacechar
+ \let\do\relax
+ \loop
+ \advance\scratchcounter \plusone
+ \ifnum\scratchcounter<\nofMParguments\relax
+ \gMPa\scratchcounter\MPspacechar
+ \repeat
+ \def\do##1){\dodo{##1}}%
+ \dogMPa\scratchcounter
+ \fi
+ \unskip}}
%D You could consider the following definition to be the most
%D natural one.
diff --git a/tex/context/base/meta-tex.tex b/tex/context/base/meta-tex.tex
new file mode 100644
index 000000000..8008ae6c4
--- /dev/null
+++ b/tex/context/base/meta-tex.tex
@@ -0,0 +1,205 @@
+%D \module
+%D [ file=meta-tex,
+%D version=2006.06.07,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=\METAPOST\ fast text insertion,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=\PRAGMA]
+%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 Many thanks to Fabrice Popineau and Taco Hoekwater in helping me
+%D figure out some aspects of the text inclusion method implemented
+%D here. The following code is derived from a more advanced (and to
+%D be used) mechanism where \TEX, \METAPOST\ and \LUA\ play together.
+
+%D Much of this mechanism was written with running live DVD's of
+%D the Dave Matthews band in the background (or the corner of my
+%D screen).
+
+\unprotect
+
+\newwrite\TeXtextwrite
+
+\def\openTeXtexts {\immediate\openout \TeXtextwrite=\currentTeXtext.mpb\relax}
+\def\closeTeXtexts{\immediate\closeout\TeXtextwrite}
+
+\def\currentTeXtext{\jobname-mpgraph}
+
+\initializeboxstack\currentTeXtext
+
+\newtoks\collectedmptexts
+
+\long\def\startTeXtexts#1\stopTeXtexts
+ {\global\collectedmptexts\expandafter{\the\collectedmptexts#1}}
+
+\def\dostartTeXtexts
+ {\global\setfalse\TeXtextdone
+ \startnointerference
+ \the\everyMPTEXgraphic
+ \openTeXtexts
+ \ifrunMPgraphics
+ \initializeboxstack\currentTeXtext
+ \else
+ \global\let\openTeXtexts\relax
+ \global\let\finishTeXtexts\closeTeXtexts
+ \fi}
+
+\def\dostopTeXtexts
+ {\ifrunMPgraphics
+ \closeTeXtexts
+ \fi
+ \stopnointerference}
+
+\let\finishTeXtexts\relax
+
+\appendtoks
+ \finishTeXtexts
+\to \everystoptext
+
+\newconditional\TeXtextdone
+
+% \long\def\TeXtext#1%
+% {\dowithnextboxcontent
+% {\setnormalcatcodes}
+% {\global\settrue\TeXtextdone
+% \immediate\write\TeXtextwrite{savetxt(#1,\the\wd\nextbox,\the\ht\nextbox,\the\dp\nextbox);}%
+% \savebox\currentTeXtext{#1}{\box\nextbox}}
+% \hbox}
+
+\long\def\TeXtext
+ {\dosingleempty\doTeXtext}
+
+\long\def\doTeXtext[#1]#2#3%
+ {\begingroup
+ \setbox\nextbox\hbox
+ {\setnormalcatcodes
+ \newlinechar=`\^^M
+ \everyeof\emptytoks
+ %\def\ascii{#3}%
+ %\scantokens\expandafter{\ascii}}%
+ \scantokens{#3}}%
+ \global\settrue\TeXtextdone
+ \edef\currenttextxt{\number#2}%
+ \executeifdefined{textext::#1}{\getvalue{textext::depth}}%
+ \savebox\currentTeXtext\currenttextxt{\box\nextbox}%
+ \endgroup}
+
+\setvalue{textext::depth}{\immediate\write\TeXtextwrite{savetxt(\currenttextxt,\the\nextboxwd,\the\nextboxht,\the\nextboxdp) shifted (0,-\the\nextboxdp);}}
+\setvalue{textext::nodepth}{\immediate\write\TeXtextwrite{savetxt(\currenttextxt,\the\nextboxwd,\the\nextboxht,\the\nextboxdp);}}
+
+\setvalue{textext::d}{\getvalue{textext::depth}}
+\setvalue{textext::n}{\getvalue{textext::nodepth}}
+
+\newbox\mptextbox
+
+\definefontsynonym[MPtxtfont][texnansi-lmtt10] \loadmapfile[lm-texnansi.map]
+
+\definefont[localMPtxtfont][MPtxtfont at 10bp]
+
+\ifx\getTeXtext\undefined
+
+ % this took a while to figure out
+
+ % \def\getTeXtext
+ % {\localMPtxtfont
+ % \setbox\mptextbox\hbox{\foundbox\currentTeXtext{\number\nofTeXtexts}}%
+ % \setbox\scratchbox\hbox{\MPtextdata}%
+ % \edef\mpwd{\the\dimexpr\MPtextsize\dimexpr\wd\scratchbox/10\relax\relax}%
+ % \edef\mpht{\the\dimexpr\MPtextsize\dimexpr\ht\scratchbox/10\relax\relax}%
+ % \setbox\mptextbox\hbox{\raise\dp\mptextbox\box\mptextbox}%
+ % \dp\mptextbox\zeropoint
+ % \scale[\c!width=\mpwd,\c!height=\mpht]{\box\mptextbox}}%
+
+ \def\getTeXtext
+ {\localMPtxtfont
+ \setbox\mptextbox\hbox{\foundbox\currentTeXtext{\number\nofTeXtexts}}%
+ \setbox\scratchbox\hbox{\MPtextdata}%
+ \edef\mpwd{\the\dimexpr\MPtextsize\dimexpr\wd\scratchbox/10\relax\relax}%
+ \edef\mpht{\the\dimexpr\MPtextsize\dimexpr\ht\scratchbox/10\relax\relax}%
+ \setbox\mptextbox\hbox{\raise\dp\mptextbox\box\mptextbox}%
+ \dp\mptextbox\zeropoint
+ \scale[\c!width=\mpwd,\c!height=\mpht]{\box\mptextbox}}
+
+\fi
+
+\setvalue{handleMPtext00001}% only height in tag (00001)
+ {\setbox\scratchbox\hbox
+ {\obeyMPspecials
+ \edef\nofTeXtexts{\number\MPtextnumber}%
+ \getTeXtext}%
+ \setbox\scratchbox\hbox
+ {\hskip\lastMPmoveX\onebasepoint\raise\lastMPmoveY\onebasepoint
+ \box\scratchbox}%
+ \ht\scratchbox\zeropoint
+ \dp\scratchbox\zeropoint
+ \wd\scratchbox\zeropoint
+ \box\scratchbox}
+
+\startMPextensions
+ string txtfile ; txtfile := "\currentTeXtext.mpb" ;
+ string txtfont ; txtfont := "\truefontname{MPtxtfont}" ;
+ string txtpref ; txtpref := "00001::::" ;
+\stopMPextensions
+
+% \long\def\filtersometxt#1\sometxt#2#3#4%
+% {\ifx#3\empty
+% \else
+% \increment\txtcounter
+% \TeXtext\txtcounter{#2}%
+% \expandafter\filtersometxt
+% \fi#3#4}
+
+\long\def\dodofiltersometxt#1#2#3%
+ {\ifx#2\empty
+ \else
+ \increment\txtcounter
+ \TeXtext\txtcounter{#1}%
+ \expandafter\filtersometxt
+ \fi#2#3}
+
+\long\def\redofiltersometxt[#1]#2%
+ {\increment\txtcounter
+ \TeXtext[#1]\txtcounter{#2}%
+ \filtersometxt}
+
+\long\def\filtersometxt#1\sometxt
+ {\doifnextcharelse[\redofiltersometxt\dodofiltersometxt}
+
+% \filtersometxt abc\sometxt{def};hij\sometxt{klm};\sometxt{}\empty\relax
+
+\long\def\flushTeXtexts#1%
+ {\newcounter\txtcounter
+ \dostartTeXtexts
+ \the\collectedmptexts
+ \filtersometxt#1\sometxt{}\empty\relax
+ \dostopTeXtexts
+ \ifconditional\TeXtextdone
+ \immediate\write\MPwrite{loadtxts ; txtnext := 0 ;}%
+ \global\collectedmptexts\emptytoks
+ \fi
+ \newcounter\txtcounter}
+
+% \long\def\sometxt#1{sometxt(nexttxt)} % to be used in mp definitions, no ; here
+
+\long\def\sometxt #1#{\dosometxt} % grab optional [args]
+\long\def\dosometxt#1{sometxt(nexttxt)} % to be used in mp definitions, no ; here
+
+% we redefine the writer:
+
+\long\def\writecheckedMPgraphic#1%
+ {\ifforceMPTEXgraphic
+ \global\MPTEXgraphictrue
+ \else
+ \global\MPTEXgraphicfalse
+ \edef\ascii{#1}\convertcommand\ascii\to\MPascii
+ \the\MPTEXgraphicchecks\relax % \relax is end condition!
+ \fi
+ \flushMPTEXgraphic% % verbatimtex etc
+ \flushTeXtexts{#1}% added
+ \writeMPgraphic{#1}} % potential optimization: pass \ascii
+
+\protect \endinput
diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex
index ec2e1ac11..84c956e26 100644
--- a/tex/context/base/mult-con.tex
+++ b/tex/context/base/mult-con.tex
@@ -13,10 +13,6 @@
%D In this rather large definition file we are going to tell
%D \CONTEXT\ which constants, variables and elements we use.
-%D
-%D The German translations were provided by Tobias Burnus,
-%D the Czech ones by Tom Hudec, the Italian ones by Giuseppe
-%D Bilotta.
\writestatus{loading}{Context Multilingual Macros / Constants}
@@ -756,6 +752,10 @@ subsubsubsubsubsubject: subsubsubsubsubonderwerp subsubsubsubsub
breite sirka
ampiezza latime
largeur
+ autowidth: autobreedte autowidth
+ autobreite autosirka
+ autoampiezza autolatime
+ autolargeur
maxwidth: maxbreedte maxwidth
maxbreite maxsirka
ampiezzamax latimemaxima
@@ -2966,7 +2966,7 @@ subsubsubsubsubsubject: subsubsubsubsubonderwerp subsubsubsubsub
random: willekeurig random
zufaellig nahodny
casuale aleator
- aléatoire
+ aleatoire
white: wit white
weiss bily
bianco alb
diff --git a/tex/context/base/mult-ini.tex b/tex/context/base/mult-ini.tex
index 1e3f378df..667a9352e 100644
--- a/tex/context/base/mult-ini.tex
+++ b/tex/context/base/mult-ini.tex
@@ -17,13 +17,15 @@
%D supported:
%D
%D \starttabulate[|l|l|c|c|]
-%D \NC\bf language\NC\bf translator \NC\bf messages\NC\bf interface\NC\NR
-%D \NC dutch \NC Hans Hagen \NC yes \NC yes \NC\NR
-%D \NC english \NC Hans Hagen \NC yes \NC yes \NC\NR
-%D \NC german \NC Tobias Burnus \NC yes \NC yes \NC\NR
-%D \NC czech \NC Tom Hudec \NC yes \NC yes \NC\NR
-%D \NC italian \NC Giuseppe Bilotta \NC yes \NC yes \NC\NR
-%D \NC norwegian \NC Hans Fredrik Nordhaug\NC yes \NC no \NC\NR
+%D \NC\bf language\NC\bf translator \NC\bf messages\NC \bf interface\NC\NR
+%D \NC dutch \NC Hans Hagen \NC yes \NC yes \NC\NR
+%D \NC english \NC Hans Hagen \& SPQR \NC yes \NC yes \NC\NR
+%D \NC german \NC Tobias Burnus \NC yes \NC yes \NC\NR
+%D \NC czech \NC Tom Hudec \NC yes \NC yes \NC\NR
+%D \NC italian \NC Giuseppe Bilotta \NC yes \NC yes \NC\NR
+%D \NC french \NC Renaud Aubin \NC yes \NC yes \NC\NR
+%D \NC romanian \NC .... \NC yes \NC yes \NC\NR
+%D \NC norwegian \NC Hans Fredrik Nordhaug \NC yes \NC no \NC\NR
%D \stoptabulate
\writestatus{loading}{Context Multilingual Macros / Initialization}
diff --git a/tex/context/base/page-bck.tex b/tex/context/base/page-bck.tex
index 9dcc920ad..2054be5fb 100644
--- a/tex/context/base/page-bck.tex
+++ b/tex/context/base/page-bck.tex
@@ -225,7 +225,7 @@
% \def\setbackgroundboxes
% {\showmessage\m!layouts8\empty
% \setbackgroundbox\leftbackground\relax
-% \ifdubbelzijdig
+% \ifdoublesided
% \setbackgroundbox\rightbackground\doswapmargins
% \fi
% \doifnot\@@mastatus\v!herhaal{\global\newbackgroundfalse}}
@@ -590,19 +590,35 @@
\resetglobal \expandafter\gobbleoneargument
\fi}
+% \def\doaddlocalbackground#1%
+% {\edef\next
+% {\noexpand\redoglobal\wd#1\the\wd#1%
+% \noexpand\redoglobal\ht#1\the\ht#1%
+% \noexpand\dodoglobal\dp#1\the\dp#1}%
+% \dodoglobal\setbox#1\hbox
+% {\fastlocalframed
+% [\??ma\v!local]
+% [\c!component=local,\c!frame=\v!off,\c!offset=\v!overlay,\c!setups=,%
+% \c!width=\wd#1,\c!height=\ht#1,% no \c!depth=\dp#1 in cont-exp.tex, to be checked !
+% \c!background=\localbackground]%
+% {\registerMPlocaltextarea{\box#1}}}%
+% \next
+% \doglobal\increment\localpositionnumber\relax} % afterwards !
+
\def\doaddlocalbackground#1%
{\edef\next
{\noexpand\redoglobal\wd#1\the\wd#1%
\noexpand\redoglobal\ht#1\the\ht#1%
- \noexpand\dodoglobal\dp#1\the\dp#1}%
- \dodoglobal\setbox#1\hbox
+ \noexpand\redoglobal\dp#1\the\dp#1}%
+ \redoglobal\setbox#1\hbox
{\fastlocalframed
[\??ma\v!local]
[\c!component=local,\c!frame=\v!off,\c!offset=\v!overlay,\c!setups=,%
- \c!width=\wd#1,hoogte=\ht#1,% no diepte=\dp#1 in cont-exp.tex, to be checked !
+ \c!width=\wd#1,\c!height=\ht#1,% no \c!depth=\dp#1 in cont-exp.tex, to be checked !
\c!background=\localbackground]%
{\registerMPlocaltextarea{\box#1}}}%
\next
+ \resetglobal
\doglobal\increment\localpositionnumber\relax} % afterwards !
% Test how previous macro behaves with depth:
diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex
index 30a337443..eb1311512 100644
--- a/tex/context/base/page-flt.tex
+++ b/tex/context/base/page-flt.tex
@@ -13,9 +13,6 @@
\writestatus{loading}{Context OTR Macros / Floating Bodies}
-%D This module is currently a mess, due to splitting float
-%D handlers over specific otr's. Consider it work in progress.
-
%D Some of the sidefloat settings should move to page-sid; now it's quite
%D fuzzy the way the variables are set/reset.
@@ -412,7 +409,7 @@
%\to \everyinsidefloat
%\def\doifrightpagefloatelse % watch out: other default ! ! !
-% {\ifdubbelzijdig
+% {\ifdoublesided
% \ifodd\purenumber\twopassfloatdata\space
% \@EAEAEA\firstoftwoarguments
% \else
@@ -423,8 +420,8 @@
% \fi}
\def\doifrightpagefloatelse
- {\ifdubbelzijdig
- \ifenkelzijdig
+ {\ifdoublesided
+ \ifsinglesided
\@EAEAEA\firstoftwoarguments
\else
\@EAEAEA\doifoddfloatpageelse
@@ -819,10 +816,14 @@
{\checkfloatracer{\v!float#1}% will go
\tagnodelocation{\v!float#1}}}
+\newconditional\retainfloatnumber
+
\def\preparefloatnumber#1%
- {\doifelse\@@bknumbering\v!nocheck
+ {\xdef\floatcaptionnumber{#1}%
+ \doifelse\@@bknumbering\v!nocheck
{\incrementnumber[#1]%
- \makesectionnumber[#1]}
+ \makesectionnumber[#1]%
+ \ifconditional\retainfloatnumber\decrementnumber[#1]\fi}
{\ifinsidecolumns
\chardef\nodelocationmode\zerocount
% to be perfected:
@@ -831,6 +832,7 @@
\ifcase\nodelocationmode
\incrementnumber[#1]%
\makesectionnumber[#1]%
+ \ifconditional\retainfloatnumber\decrementnumber[#1]\fi
\else
% force check, so that we get a proper way-sync and
% can use the accumulated number
@@ -995,6 +997,8 @@
\global\somefloatwaitingtrue
\dosavefloatinfo}
+% better (todo): \savednofsavedfloats
+
\def\dosavefloatstatus
{\global\setbox\savedfloatlist\copy\floatlist
\global\setbox\savedfloatbox \copy\floatbox
@@ -1008,6 +1012,45 @@
\ifx\doflushfloats\undefined \let\doflushfloats\relax \fi
\ifx\flushfloatbox\undefined \let\flushfloatbox\relax \fi
+% needed in the splitter:
+
+\newcount\savedsavednoffloats
+
+\let\dopopsavedfloats\relax
+
+\def\dopushsavedfloats
+ {\global\setbox\savedfloatlist\box\floatlist
+ \global\savedsavednoffloats\savednoffloats
+ \global\savednoffloats\savednoffloats
+ \global\somefloatwaitingfalse
+ \gdef\dopopsavedfloats
+ {\global\advance\savednoffloats\savedsavednoffloats
+ \global\setbox\floatlist\vbox\bgroup
+ \ifvoid\floatlist \else\unvbox\floatlist \fi
+ \ifvoid\savedfloatlist\else\unvbox\savedfloatlist\fi
+ \egroup
+ \global\ifcase\savednoffloats
+ \somefloatwaitingfalse\else\somefloatwaitingtrue\fi
+ \globallet\dopopsavedfloats\relax}}
+
+\def\doflushsavedfloats % simplified \OTRONEdodoflushfloats
+ {\doloop
+ {\ifsomefloatwaiting
+ \dogetfloat
+ \dofloatflushedinfo
+ \docheckiffloatfits
+ \ifroomforfloat
+ \doplacefloatbox
+ \else
+ \doreversesavefloat
+ \exitloop
+ \fi
+ \else
+ \exitloop
+ \fi}}
+
+% top and bottom
+
\newif\iftopofinsert
\newif\iftestfloatbox
\newif\ifcenterfloatbox \centerfloatboxtrue
@@ -1317,35 +1360,6 @@
\def\setfloatcaption % \dosetfloatcaption already in use
{\dodoubleempty\dodosetfloatcaption} % beware, name clash
-% \def\dodosetfloatcaption[#1][#2]#3% to do namespace for number/ascii
-% {\ifnofloatnumber % also handle trialtypesetting
-% \letgvalue{@fl@r@#1}\relax
-% \letgvalue{@fl@t@#1}\relax
-% \else
-% \incrementnumber[#1]%
-% \makesectionnumber[#1]%
-% % \globallet\flcomposedsectionnumber\composedsectionnumber % beware, not unique should be done on a per class base
-% \letgvalue{@fl@n@#1}\composedsectionnumber
-% % indirect macro can be more efficient
-% \setgvalue{@fl@r@#1}%
-% {\dofloatreference
-% \redofloatorder{#1}%
-% % \dowritetolist{#1}{\flcomposedsectionnumber}{#3}{#1}%
-% \dowritetolist{#1}{\getvalue{@fl@n@#1}}{#3}{#1}%
-% \doglobal\convertargument#3\to\flasciititle % \asciititle is global
-% % \doifsomething{#2}{\rawreference\s!flt{#2}{{\flcomposedsectionnumber}{\flasciititle}}}%
-% \doifsomething{#2}{\rawreference\s!flt{#2}{{\getvalue{@fl@n@#1}}{\flasciititle}}}%
-% \letgvalue{@fl@r@#1}\relax}% nils
-% \setgvalue{@fl@t@#1}%
-% % {\preparethenumber{\??kj#1}\flcomposedsectionnumber\preparednumber
-% {\preparethenumber{\??kj#1}{\getvalue{@fl@n@#1}}\preparednumber
-% \doattributes{\??kj#1}\c!style\c!color
-% {\doattributes{\??kj#1}\c!headstyle\c!headcolor
-% {\labeltexts{#1}{\preparednumber}}%
-% \doattributes{\??kj#1}\c!textstyle\c!textcolor
-% {\dotfskip{\getvalue{\??kj#1\c!distance}}#3}}}%
-% \fi}
-
\def\dodosetfloatcaption[#1][#2]#3% to do namespace for number/ascii
{\ifnofloatnumber % also handle trialtypesetting
\letgvalue{@fl@r@#1}\relax
@@ -1396,7 +1410,7 @@
{\noindent
% \xdef\lastcaptiontag{\strut#2\floatcaptionsuffix}%
\xdef\lastcaptiontag{\strut#2}%
- \xdef\floatcaptionnumber{#1}%
+% \xdef\floatcaptionnumber{#1}%
\dostartattributes{\??kj#1}\c!style\c!color\empty
\ifnofloatnumber
\else
@@ -2195,89 +2209,6 @@
\dostartbuffer[pbuf-\nofpostponedblocks]%
[\e!start\v!postponing][\e!stop\v!postponing]}
-\definenumber
- [\??si]
- [\c!way=\v!by\v!text,
- \c!conversion=\@@siconversion]
-
-\def\setupfloatsplitting
- {\dodoubleargument\getparameters[\??si]}
-
-% ook (continued)
-
-\newif\ifinsidesplitfloat % will become chardef
-
-\def\dosplitfloat[#1]#2% nog dubbele refs
- {\ifinsidecolumns % tzt ook nog figuren splitten
- % not yet supported
- \else
- \bgroup
- \insidefloattrue
- \insidesplitfloattrue
- \getparameters[\??si][#1]%
- \resetnumber[\??si]%
- \def\floatcaptionsuffix{\convertednumber[\??si]}%
- % \TABLEcaptionheight\@@silines\lineheight% brrr
-% todo: auto == \getnoflines\captionheight
-\let\extrasplitfloatlines\@@silines
-\the\everysplitfloatsetup
- \simplifypagebreak % \page becomes \goodbreak
-% todo: a preceding float does not count yet
-% so we need a better predictor
- \dowithnextbox
- {\forgetall
- \dontcomplain
-\chardef\nodelocationmode\zerocount
- \doloop
- {\setbox2\vsplit\nextbox to \lineheight
- \setbox2\vbox{\unvbox2}
- \ifdim\ht2>\lineheight
- \incrementnumber[\??si]%
- \ifcase\rawnumber[\??si]\or \ifdim\nextboxht=\zeropoint
- \let\floatcaptionsuffix\empty
- \fi \fi
- \bgroup
- #2{\unvbox2}
- \egroup
- \ifdim\nextboxht>\zeropoint
- \page
- \fi
- \fi
- \ifdim\nextboxht>\zeropoint
-\decrementnumber[\floatcaptionnumber]
-%\setupnumber[\floatcaptionnumber][\c!state=\v!stop]%
- \else
- \expandafter\exitloop
- \fi}%
- \egroup}
- \vbox
- \fi}
-
-\def\splitfloat
- {\dosingleempty\dosplitfloat}
-
-\newtoks \everysplitfloatsetup
-
-% will move to core-tab
-
-\appendtoks
- \TABLEcaptionheight\extrasplitfloatlines\lineheight
-\to \everysplitfloatsetup
-
-% will move to core-ntb
-
-\appendtoks
- \def\extratblsplitheight{\extrasplitfloatlines\lineheight}%
-\to \everysplitfloatsetup
-
-% todo in core-tbl
-
-\appendtoks
- % set extra
-\to \everysplitfloatsetup
-
-% \splitfloat [settings] {\placetable[optional args]{test}} {content}
-
\def\dooutput{\sidefloatoutput} % redefinition of \dooutput
\setupmarginblocks
@@ -2376,10 +2307,6 @@
\c!local=,
\c!default=\v!figure,
\c!numbering=\v!yes]
-
-\setupfloatsplitting
- [\c!conversion=\v!character, % \v!romannumerals
- \c!lines=3]
% float strategy, replaces some of the above macros
diff --git a/tex/context/base/page-imp.tex b/tex/context/base/page-imp.tex
index bb8247e63..b64a543cf 100644
--- a/tex/context/base/page-imp.tex
+++ b/tex/context/base/page-imp.tex
@@ -922,7 +922,7 @@
\def\dofilterpage#1#2%
{\hbox to \textwidth
- {\ifdubbelzijdig\ifdim\@@ipwidth>\zeropoint\relax\ifodd\realpageno\else
+ {\ifdoublesided\ifdim\@@ipwidth>\zeropoint\relax\ifodd\realpageno\else
\hfill
\def\dowithfigure{\hskip-\@@ipwidth}%
\fi\fi\fi
diff --git a/tex/context/base/page-ini.tex b/tex/context/base/page-ini.tex
index ee62d92bb..b7cbfc9c3 100644
--- a/tex/context/base/page-ini.tex
+++ b/tex/context/base/page-ini.tex
@@ -938,7 +938,7 @@
\def\eject {\par\ifvmode\penalty\ejectpenalty\fi\resetpagebreak} % == {\par\break} % plain
\def\supereject {\par\ifvmode\penalty\superpenalty\fi\resetpagebreak} % also plain
-\def\doejectpage {\par\ifvmode\ifdim\pagetotal>\pagegoal\else\normalvfil\fi\fi}
+\def\doejectpage {\par\ifvmode\ifdim\pagetotal>\pagegoal\else\normalvfil\fi\fi} % pg set to \textheight
\def\ejectpage {\doejectpage\eject}
\def\superejectpage{\doejectpage\supereject}
@@ -1570,6 +1570,9 @@
\def\simplifypagebreak
{\def\dopagebreak[##1]{\goodbreak}}
+\def\disablepagebreaks
+ {\def\dopagebreak[##1]{}}
+
\def\executepagebreakhandler#1%
{\edef\@@pagespecification{#1}%
\doifdefinedelse{\??pe:\@@pagespecification}
@@ -1701,7 +1704,7 @@
\gotonextpageX % will become \gotonextpage
\doifbothsidesoverruled
\orsideone
- \resetcurrentsectionmarks
+ \resetcurrentsectionmarks % sic
\ejectdummypage
\orsidetwo
\od}
@@ -1712,7 +1715,7 @@
\doifbothsidesoverruled
\orsideone
\orsidetwo
- \resetcurrentsectionmarks
+ \resetcurrentsectionmarks % sic
\ejectdummypage
\od}
@@ -1725,7 +1728,7 @@
\doifoddpageelse\donothing{\resetcurrentsectionmarks\ejectdummypage}}
\installpagebreakhandler \v!quadruple % not yet ok inside columnsets
- {\ifdubbelzijdig
+ {\ifdoublesided
\!!counta\realpageno
\!!countb\realpageno
\divide\!!counta 4
@@ -1753,7 +1756,7 @@
\installpagebreakhandler \v!lastpage % handy for backpage preceded by empty pages
{\executepagebreakhandler\v!yes
- \ifdubbelzijdig
+ \ifdoublesided
\executepagebreakhandler\v!left
\executepagebreakhandler\v!empty
\executepagebreakhandler\v!empty
diff --git a/tex/context/base/page-lay.tex b/tex/context/base/page-lay.tex
index 89768922b..20d9e6686 100644
--- a/tex/context/base/page-lay.tex
+++ b/tex/context/base/page-lay.tex
@@ -863,7 +863,7 @@
\def\orientpagebodybox#1#2#3%
{\ifnum#2#3>\zerocount
\setbox#1\vbox
- {\edef\somerotation{\ifdubbelzijdig\ifodd\realpageno#2\else#3\fi\else#2\fi}%
+ {\edef\somerotation{\ifdoublesided\ifodd\realpageno#2\else#3\fi\else#2\fi}%
\dorotatebox\somerotation\hbox{\box#1}}%
\fi}
@@ -940,8 +940,8 @@
\ifnum\verticalcutmarks >2 \chardef\colormarkoffset4 \fi
#1{#2}}
-\newif\ifdubbelzijdig \dubbelzijdigfalse
-\newif\ifenkelzijdig \enkelzijdigtrue
+\newif\ifdoublesided \doublesidedfalse
+\newif\ifsinglesided \singlesidedtrue
% NOG EENS NAGAAN WANNEER NU GLOBAL EN WANNEER NIET
@@ -1036,15 +1036,15 @@
% what are those \relax'es doing there?
\def\doifbothsidesoverruled#1\orsideone#2\orsidetwo#3\od
- {\ifdubbelzijdig
+ {\ifdoublesided
\doifoddpageelse{#2}{#3}\relax
\else
#1\relax
\fi}
\def\doifbothsides#1\orsideone#2\orsidetwo#3\od
- {\ifdubbelzijdig
- \ifenkelzijdig
+ {\ifdoublesided
+ \ifsinglesided
#1\relax
\else
\doifoddpageelse{#2}{#3}\relax
@@ -1084,8 +1084,8 @@
\the\everyswapmargins}
\def\rightorleftpageaction
- {\ifdubbelzijdig
- \ifenkelzijdig
+ {\ifdoublesided
+ \ifsinglesided
\@EAEAEA\firstoftwoarguments
\else
\@EAEAEA\doifoddpageelse
diff --git a/tex/context/base/page-log.tex b/tex/context/base/page-log.tex
index d124fdd3d..53984eefd 100644
--- a/tex/context/base/page-log.tex
+++ b/tex/context/base/page-log.tex
@@ -135,7 +135,7 @@
\def\setlogoboxes
{\showmessage\m!layouts7\empty
\dosetlogobox\leftlogos\relax
- \ifdubbelzijdig
+ \ifdoublesided
\dosetlogobox\rightlogos\doswapmargins
\fi}
diff --git a/tex/context/base/page-lyr.tex b/tex/context/base/page-lyr.tex
index 48ea1e3c2..e92f12052 100644
--- a/tex/context/base/page-lyr.tex
+++ b/tex/context/base/page-lyr.tex
@@ -435,6 +435,8 @@
%D efficient in \ETEX\ since there testing for an undefined
%D macro does not takes hash space.
+% todo: setups before flush, handy hook
+
\unexpanded\def\flushlayer[#1]%
{\doifelsevalue{\??ll#1\c!state}\v!next
{\global\letvalue{\??ll#1\c!state}\v!start} % dangerous, stack-built-up
diff --git a/tex/context/base/page-mak.tex b/tex/context/base/page-mak.tex
index 70530ba87..807d77fc0 100644
--- a/tex/context/base/page-mak.tex
+++ b/tex/context/base/page-mak.tex
@@ -167,13 +167,20 @@
\def\doshipoutmakeup
{\globalpushmacro\@@pnstate % new
\makeupparameter\c!before
- \vbox{\hbox{\color[\makeupparameter\c!color]{\box\makeupbox}}}%
+ \setbox\makeupbox\vbox{\hbox{\color[\makeupparameter\c!color]{\box\makeupbox}}}%
+ % \ifgridsnapping
+ % new per 22/6/2006
+ \ifdim\ht\makeupbox>\vsize
+ \ht\makeupbox\vsize
+ \fi
+ % \fi
+ \box\makeupbox
\setuppagenumber[\c!state=\makeupparameter\c!pagestate]%
\setupmakeuplayout
\page
\makeupparameter\c!after
\relax % voor fi
- \ifdubbelzijdig \ifodd\realpageno\else
+ \ifdoublesided \ifodd\realpageno\else
\processaction
[\makeupparameter\c!doublesided]
[ \v!yes=>\null
diff --git a/tex/context/base/page-mar.tex b/tex/context/base/page-mar.tex
index d05ece78c..6a251f0d0 100644
--- a/tex/context/base/page-mar.tex
+++ b/tex/context/base/page-mar.tex
@@ -574,7 +574,7 @@
\v!right=>\let\next\dorightmarginblock, % no swapping
\v!inner=>\def\next{\doinmarginswapped\dorightmarginblock\doleftmarginblock },
\v!outer=>\def\next{\doinmarginswapped\doleftmarginblock \dorightmarginblock},
- \s!unknown=>\ifdubbelzijdig
+ \s!unknown=>\ifdoublesided
\doifcommonelse{+,-}{#4}
{\def\next{\doinmarginswapped\dorightmarginblock\doleftmarginblock }}
{\def\next{\doinmarginswapped\doleftmarginblock \dorightmarginblock}}%
diff --git a/tex/context/base/page-num.tex b/tex/context/base/page-num.tex
index a684eb7ef..b5a90fe6b 100644
--- a/tex/context/base/page-num.tex
+++ b/tex/context/base/page-num.tex
@@ -346,7 +346,7 @@
{\checknumber[\s!page]}
% \getpagestatus
-% \ifrightpage als odd/enkelzijdig
+% \ifrightpage als odd/singlesided
\newif\ifrightpage \rightpagetrue
@@ -365,7 +365,7 @@
\writepagref}
\def\getpagestatus % hierboven gebruiken
- {\ifdubbelzijdig
+ {\ifdoublesided
\gettwopassdata\s!page
\iftwopassdatafound \else
\let\twopassdata\realpageno
@@ -402,8 +402,8 @@
\v!right=>\dododosetpagenumberlocation{\v!text\c!righttext},
\v!inleft=>\dododosetpagenumberlocation{\v!margin\c!lefttext},
\v!inright=>\dododosetpagenumberlocation{\v!margin\c!righttext},
- \v!inmargin=>\dododosetpagenumberlocation{\v!margin\ifdubbelzijdig\c!margintext\else\c!righttext\fi},
- \v!margin=>\dododosetpagenumberlocation{\v!margin\ifdubbelzijdig\c!margintext\else\c!righttext\fi},
+ \v!inmargin=>\dododosetpagenumberlocation{\v!margin\ifdoublesided\c!margintext\else\c!righttext\fi},
+ \v!margin=>\dododosetpagenumberlocation{\v!margin\ifdoublesided\c!margintext\else\c!righttext\fi},
\v!atmargin=>\dododosetpagenumberlocation{\v!text\c!marginedgetext},
\v!marginedge=>\dododosetpagenumberlocation{\v!text\c!marginedgetext}]%
\ifdone \else
@@ -419,14 +419,14 @@
\def\dosetuppagenumbering[#1]%
{\getparameters[\??nm][#1]%
\preparepageprefix\??nm
- \enkelzijdigfalse
- \dubbelzijdigfalse
+ \singlesidedfalse
+ \doublesidedfalse
\ExpandFirstAfter\processallactionsinset
[\@@nmalternative]
- [ \v!singlesided=>\enkelzijdigtrue,
- \v!doublesided=>\dubbelzijdigtrue]%
+ [ \v!singlesided=>\singlesidedtrue,
+ \v!doublesided=>\doublesidedtrue]%
\ifx\trackingmarginnotestrue\undefined\else
- \ifdubbelzijdig
+ \ifdoublesided
\trackingmarginnotestrue
\else
\trackingmarginnotesfalse
diff --git a/tex/context/base/page-one.tex b/tex/context/base/page-one.tex
index a52196c59..b1931dd1e 100644
--- a/tex/context/base/page-one.tex
+++ b/tex/context/base/page-one.tex
@@ -125,16 +125,48 @@
#1%
\fi}
+% \chardef\kindofpagetextareas\plusone
+
+\def\doOTRONEregisteredtextareaA#1%
+ {\ifregistertextareas
+ \xypos{pbd:\realfolio:b}% we could save bytes by only saving the y
+ \endgraf
+ \begingroup
+ \scratchdimen\MPy{pbd:\realfolio:b}%
+ \advance\scratchdimen-\MPy{pbd:\realfolio:e}%
+ \setbox\scratchbox\null
+ \wd\scratchbox\makeupwidth
+ \ht\scratchbox\scratchdimen
+ \vsmash{\registeredtextarea00\scratchbox}%
+ \endgroup
+ #1%
+ \endgraf
+ \xypos{pbd:\realfolio:e}%
+ \else
+ #1%
+ \fi}
+
+\def\doOTRONEregisteredtextareaB#1%
+ {\ifregistertextareas
+ \setbox0\vbox{#1}%
+ \wd0\makeupwidth % somehow a space creeps in
+ \vbox{\registeredtextarea000}%
+ \else
+ #1%
+ \fi}
+
\let\OTRONEregisteredtextareaA\firstofoneargument
\let\OTRONEregisteredtextareaB\firstofoneargument
\def\OTRONEdopagecontents#1#2% \box<n> \unvbox<n>
{\bgroup % niet breedte zetten, kan fractie zijn!
\ifcase\kindofpagetextareas
- \or % partial page
- \let\OTRONEregisteredtextareaA\OTRONEregisteredtextarea
- \or % whole page
- \let\OTRONEregisteredtextareaB\OTRONEregisteredtextarea
+ \or % partial page (experimental)
+ \let\OTRONEregisteredtextareaA\doOTRONEregisteredtextareaA
+ \or % whole page (default)
+ \let\OTRONEregisteredtextareaB\doOTRONEregisteredtextareaB
+ \or % partial page (only works well with no stretch!)
+ \let\OTRONEregisteredtextareaA\doOTRONEregisteredtextareaB
\fi
\setbox0\vbox \ifbottomnotes to \textheight \fi
{\edef\currentpagedepth{\the\dp#2}% still to be derived from #1
@@ -309,16 +341,6 @@
\OTRONEdosetbotinserts
\fi}
-% \def\OTRONEdotopinsertions
-% {\ifvoid\topins\else
-% \ifgridsnapping
-% \box\topins % not \topsnaptogrid{\box\topins}%
-% \else
-% \unvbox\topins
-% \fi
-% \fi
-% \global\topinserted\zeropoint}
-
\def\OTRONEdotopinsertions
{\ifvoid\topins\else
\ifgridsnapping
@@ -359,16 +381,6 @@
\fi \fi
\snaptogrid\hbox{\iftestfloatbox\ruledhbox\fi{\copy\floatbox}}}
-% \def\OTRONEdodoflushfloats % moet nog beter: als precies passend, niet onder baseline
-% {\ifsomefloatwaiting
-% \bgroup % \box\floatbox can be in use!
-% \dogetfloat
-% \doplacefloatbox
-% \egroup
-% \dofloatflushedinfo
-% \expandafter\OTRONEdodoflushfloats
-% \fi}
-
\def\OTRONEdodoflushfloats % much in common with OTRSET
{\ifsomefloatwaiting
\ifpackflushedfloats
@@ -424,52 +436,6 @@
\expandafter\OTRONEdodoflushfloats
\fi}
-% \def\OTRONEdocheckiffloatfits % vervangen ivm downward comp
-% {\ifnofloatpermitted
-% \global\roomforfloatfalse
-% \else
-% \dimen0 \pagetotal
-% \advance\dimen0 \ht\floatbox
-% \advance\dimen0 \dp\floatbox
-% \advance\dimen0 \floattopskip
-% % \advance\dimen0 -\pageshrink % toegevoegd
-% %\message{c:\the\mofcolumns,t:\the\pagetotal,g:\the\pagegoal}%\wait
-% \ifdim\dimen0>\pagegoal
-% \global\roomforfloatfalse
-% \else
-% \global\roomforfloattrue
-% \fi
-% \fi}
-
-% \def\OTRONEdocheckiffloatfits % vervangen ivm downward comp
-% {\ifnofloatpermitted
-% \global\roomforfloatfalse
-% \else
-% \dimen0 \pagetotal
-% \advance\dimen0 \ht\floatbox
-% \advance\dimen0 \dp\floatbox
-% \advance\dimen0 \floattopskip
-% \advance\dimen0 -\pageshrink % toegevoegd
-% %\message{c:\the\mofcolumns,t:\the\pagetotal,g:\the\pagegoal}%\wait
-% \dimen2\pagegoal
-% \relax % needed
-% \ifcase\textfloatmethod
-% % method 0 : raw
-% \or
-% % method 1 : safe
-% \dimen2 .99\pagegoal
-% \or
-% % method 2 : tight
-% \advance\dimen0 -\onepoint
-% \fi
-% \relax % really needed ! ! ! !
-% \ifdim\dimen0>\dimen2
-% \global\roomforfloatfalse
-% \else
-% \global\roomforfloattrue
-% \fi
-% \fi}
-
\def\OTRONEdocheckiffloatfits % vervangen ivm downward comp
{\ifnofloatpermitted
\global\roomforfloatfalse
diff --git a/tex/context/base/page-run.tex b/tex/context/base/page-run.tex
index b44662d3c..302a1b5a0 100644
--- a/tex/context/base/page-run.tex
+++ b/tex/context/base/page-run.tex
@@ -32,7 +32,7 @@
[\c!offset=\v!overlay,\c!strut=\v!no,
\c!width=\paperwidth,\c!height=\paperheight]
{\ss ABC\par DEF}}%
- \dubbelzijdigfalse
+ \doublesidedfalse
\def\cutmarklength{.5em}%
\addpagecutmarks0%
\replicatepagebox0%
diff --git a/tex/context/base/page-set.tex b/tex/context/base/page-set.tex
index 1c31f6a10..9c553167b 100644
--- a/tex/context/base/page-set.tex
+++ b/tex/context/base/page-set.tex
@@ -2711,7 +2711,7 @@
\advance\!!widthb -\!!countc\textwidth
\ifodd\realpageno \else % tricky, assumes that we keep there
\ifcase\!!countc\else
- % nog niet ok voor enkel/dubbelzijdig
+ % nog niet ok voor enkel/doublesided
\advance\!!widtha \namedlayoutparameter\v!even\c!backspace
\advance\!!widtha \namedlayoutparameter\v!odd \c!backspace
\advance\!!widthb \namedlayoutparameter\v!even\c!backspace
diff --git a/tex/context/base/page-spr.tex b/tex/context/base/page-spr.tex
index c90e9cf0f..53d508752 100644
--- a/tex/context/base/page-spr.tex
+++ b/tex/context/base/page-spr.tex
@@ -60,7 +60,7 @@
\def\startspread
{\bgroup
- \ifdubbelzijdig
+ \ifdoublesided
\page[\v!left]%
%\setsystemmode{spread}%
\inspreadtrue
diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex
index 63861acf8..54e5d6f97 100644
--- a/tex/context/base/s-abr-01.tex
+++ b/tex/context/base/s-abr-01.tex
@@ -82,8 +82,8 @@
\logo [FREEBSD] {FreeBSD}
\logo [FOXET] {foXet}
\logo [FTP] {ftp}
-\logo [GHOSTSCRIPT]{Ghost\-Script}
-\logo [GHOSTVIEW] {Ghost\-View}
+\logo [GHOSTSCRIPT]{Ghost\-script}
+\logo [GHOSTVIEW] {Ghost\-view}
\logo [GIF] {gif}
\logo [GNU] {gnu}
\logo [GS] {Ghost\-Script}
@@ -198,7 +198,7 @@
\logo [TUGNEWS] {Tug\-News}
\logo [TUG] {tug}
\logo [UNICODE] {Uni\-code}
-\logo [UNIX] {unix}
+\logo [UNIX] {Unix}
\logo [URI] {uri}
\logo [URL] {url}
\logo [USA] {usa}
diff --git a/tex/context/base/s-pre-30.tex b/tex/context/base/s-pre-30.tex
index 2f983e51b..2a3899c92 100644
--- a/tex/context/base/s-pre-30.tex
+++ b/tex/context/base/s-pre-30.tex
@@ -196,6 +196,19 @@
\page
\stopsetups
+\startsetups show-usage-lines
+ \subject{usage}
+ \typebuffer
+ \startstreamlayer[resultstream]
+ \subject{result}
+ \startlines
+ \getbuffer
+ \stoplines
+ \stopstreamlayer
+ \placestreamlayer[resultstream]
+ \page
+\stopsetups
+
\startsetups show-contents
\startcolumns[n=3]
\placelist[section][criterium=text]
diff --git a/tex/context/base/s-pre-50.tex b/tex/context/base/s-pre-50.tex
index 0332001ab..782f6aea1 100644
--- a/tex/context/base/s-pre-50.tex
+++ b/tex/context/base/s-pre-50.tex
@@ -8,29 +8,29 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
%D When my mailbox started to overflow with messages about
%D problems with the presentation step mechanism, I looked up
%D old presentaton, hacked a bit and cooked up an alternative
-%D that is less dependent on \PDF\ trickery.
+%D that is less dependent on \PDF\ trickery.
%D
-%D Consider it a cheap trick and prelude to a couple of new
-%D presentation styles. (At the time of writing this, I
-%D still have some 10 of those styles to clean up and
-%D document.) You can give it a try:
+%D Consider it a cheap trick and prelude to a couple of new
+%D presentation styles. (At the time of writing this, I
+%D still have some 10 of those styles to clean up and
+%D document.) You can give it a try:
%D
-%D \starttyping
-%D texexec --pdf --mode=demo s-pre-50
-%D \stoptyping
+%D \starttyping
+%D texexec --pdf --mode=demo s-pre-50
+%D \stoptyping
% Basic definitions.
\defineframedtext
[horizontal]
[width=\textwidth,
- frame=off,
+ frame=off,
strut=no,
height=fit,
align={right,lohi},
@@ -50,7 +50,7 @@
\setupcollector
[contribution]
[voffset=-.25\bodyfontsize]
-
+
\setupframedtexts
[horizontal]
[background=color,
@@ -59,7 +59,7 @@
\stopmode
-%D Structure and trick.
+%D Structure and trick.
\def\StartSteps
{\checkutilities}
@@ -74,7 +74,7 @@
\flushcollector[contribution]
\page}
-%D Trick.
+%D Trick. Nowadays we can use streams.
\installoutput\FlushStep
{\StartStep\unvbox\normalpagebox\StopStep}
diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex
index cab3f0bec..83ab14df0 100644
--- a/tex/context/base/supp-lan.tex
+++ b/tex/context/base/supp-lan.tex
@@ -1475,27 +1475,27 @@
\flushurl\splitbefore\#%
\else\ifnum\catcode`#1=4
\flushurl\splitbefore\&%
- \else\if#1\lettertilde
+ \else\expandafter\if\string#1\lettertilde
\flushurl\splitbefore\~%
- \else\if#1\letterpercent
+ \else\expandafter\if\string#1\letterpercent
\flushurl\splitbefore\%%
- \else\if#1\letterunderscore
+ \else\expandafter\if\string#1\letterunderscore
\flushurl\splitbefore\_%
- \else\if#1\letterquestionmark
+ \else\expandafter\if\string#1\letterquestionmark
\flushurl\splitafter\letterquestionmark
- \else\if#1\letterat
+ \else\expandafter\if\string#1\letterat
\flushurl\splitafter\letterat
- \else\if#1\letterslash
+ \else\expandafter\if\string#1\letterslash
\edef\savedurl{\savedurl\letterslash}%
- \else\if#1+%
+ \else\expandafter\if\string#1+%
\flushurl\splitafter+%
- \else\if#1:%
+ \else\expandafter\if\string#1:%
\flushurl\splitafter:%
- \else\if#1.%
+ \else\expandafter\if\string#1.%
\flushurl\splitafter.%
- \else\if#1(%
+ \else\expandafter\if\string#1(%
\flushurl\splitbefore(%
- \else\if#1)%
+ \else\expandafter\if\string#1)%
\flushurl\splitafter)%
\else
\ifx\savedurl\empty\else
@@ -1503,12 +1503,12 @@
\let\savedurl\empty
\fi
\ifcase\urlhyphenmethod
- #1%
+ \string#1%
\else
\ifnum\scratchcounter>\plusthree % so, \http: will not break
- \edef\savedurl{#1}%
+ \edef\savedurl{\string#1}%
\else
- #1%
+ \string#1%
\fi
\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
@@ -1522,6 +1522,12 @@
% \hsize1pt\gotoURL{http://www.physik.fu-berlin.de/SomeVeryVeryVeryLongDirectory/And/AQuiteLongFileName.html}
% \stoptext
+% \useencoding[ffr]
+% \mainlanguage[fr]
+% \starttext
+% \hyphenatedurl{http://somewhere.to/go}
+% \stoptext
+
%D When Joop Susan asked (on the \CONTEXT\ mailing list) how
%D to handle url's passed as argument, the following solutions
%D came to my mind:
diff --git a/tex/context/base/supp-mis.tex b/tex/context/base/supp-mis.tex
index 9ab55142f..d2105e34c 100644
--- a/tex/context/base/supp-mis.tex
+++ b/tex/context/base/supp-mis.tex
@@ -20,18 +20,36 @@
%D Because \LATEX\ has no safe package loading mechanism, we
%D need to take care of possible interference.
+% \def\StartLatexHack
+% {\edef\StopLatexHack
+% {\catcode`\noexpand/=\the\catcode`/
+% \catcode`\noexpand-=\the\catcode`-
+% \catcode`\noexpand:=\the\catcode`:
+% \catcode`\noexpand;=\the\catcode`;
+% \catcode`\noexpand"=\the\catcode`"
+% \catcode`\noexpand<=\the\catcode`<
+% \catcode`\noexpand>=\the\catcode`>}%
+% \catcode`/=12 \catcode`-=12
+% \catcode`:=12 \catcode`;=12
+% \catcode`"=12 \catcode`<=12 \catcode`>=12 }
+
+%D Adapted conform request from morten.hoegholm@latex-project.org,
+%D i.e. untested by me; using strings makes Babel more happy.
+
\def\StartLatexHack
{\edef\StopLatexHack
- {\catcode`\noexpand/=\the\catcode`/
- \catcode`\noexpand-=\the\catcode`-
- \catcode`\noexpand:=\the\catcode`:
- \catcode`\noexpand;=\the\catcode`;
- \catcode`\noexpand"=\the\catcode`"
- \catcode`\noexpand<=\the\catcode`<
- \catcode`\noexpand>=\the\catcode`>}%
- \catcode`/=12 \catcode`-=12
- \catcode`:=12 \catcode`;=12
- \catcode`"=12 \catcode`<=12 \catcode`>=12 }
+ {\catcode\string`\noexpand/=\the\catcode\string`/
+ \catcode\string`\noexpand-=\the\catcode\string`-
+ \catcode\string`\noexpand:=\the\catcode\string`:
+ \catcode\string`\noexpand;=\the\catcode\string`;
+ \catcode\string`\noexpand"=\the\catcode\string`"
+ \catcode\string`\noexpand<=\the\catcode\string`<
+ \catcode\string`\noexpand>=\the\catcode\string`>
+ \catcode\string`\noexpand`=\the\catcode\string``}%
+ \catcode\string`/=12 \catcode\string`-=12
+ \catcode\string`:=12 \catcode\string`;=12
+ \catcode\string`"=12 \catcode\string`<=12
+ \catcode\string`>=12 \catcode\string``=12 }
%D This hack is needed especially for \LATEX\ users who use
%D the Babel package. The Germans have active \type {"}'s, the
diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex
index b89483a5c..9005b5736 100644
--- a/tex/context/base/supp-mps.tex
+++ b/tex/context/base/supp-mps.tex
@@ -1000,7 +1000,7 @@
\deallocateMPslot\currentMPgraphic
\egroup}
-\long\def\startuseMPgraphic#1%
+\long\def\startuseMPgraphic
{\blabelgroup
\obeyMPlines
\dostartuseMPgraphic}
@@ -1009,7 +1009,7 @@
{\long\setgvalue{\@@MPG#1}{\handleuseMPgraphic{#1}{#2}}%
\elabelgroup}
-\long\def\startusableMPgraphic#1%
+\long\def\startusableMPgraphic
{\blabelgroup
\obeyMPlines
\dostartusableMPgraphic}
@@ -1111,8 +1111,7 @@
\def\MPOSTbatchswitch {-int=batchmode}
\def\MPOSTnonstopswitch {-int=nonstopmode}
-% \def\MPOSTformatswitch {-progname=mpost -mem=}
- \def\MPOSTformatswitch {-mem=}
+ \def\MPOSTformatswitch {-progname=metafun -mem=}
\def\MPOSTdriver {dvips}
\def\executeMPOST#1% direct call
@@ -1962,7 +1961,24 @@
\let\stopMPcode \relax % so that we can use it in \expanded
-%D Special for \XETEX\ (problem with newlines):
+%D \macros
+%D {startstaticMPgraphic}
+%D
+%D Dedicated to Aditya Mahajan. See meta-ini for usage.
+
+\long\def\startstaticMPgraphic#1#2\stopstaticMPgraphic
+ {\setMPrandomseedfalse
+ \def\MPgraphicfile{#1}% no \jobname here
+ \let\allocateMPslot \gobbleoneargument
+ \let\deallocateMPslot\gobbleoneargument
+ \let\runMPgraphic \gobbleoneargument
+ \runMPgraphicstrue
+ \currentMPgraphic\plusone % hack, else no close
+ \startMPgraphic#2\stopMPgraphic}
+
+%D Special for \XETEX\ (problem with newlines). This will go
+%D away once the version supporting \type {--8bit} is
+%D widespread.
\beginXETEX
\let\obeyMPlines\relax
diff --git a/tex/context/base/symb-cow.tex b/tex/context/base/symb-cow.tex
new file mode 100644
index 000000000..427e0af32
--- /dev/null
+++ b/tex/context/base/symb-cow.tex
@@ -0,0 +1,104 @@
+%D \module
+%D [ file=symb-cow,
+%D version=2006.06.23,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Cow Symbols,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=\PRAGMA]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\loadmapfile[koeieletters.map]
+
+\definefontsynonym [Cows] [koeielett]
+\definefontsynonym [CowsContour] [koeielett-contour]
+\definefontsynonym [CowsLogo] [koeielogos]
+\definefontsynonym [CowsLogoContour] [koeielogos-contour]
+
+\definecolor [lsky] [r=.6,g=.6,b=1]
+\definecolor [dsky] [r=.1,g=.1,b=1]
+\definecolor [lground] [r=.3,g=.9,b=.3]
+\definecolor [dground] [r=0,g=.5,b=0]
+\definecolor [cspots] [r=.33,g=.1,b=0]
+
+\definecolor [tlsky] [t=.5,a=1,r=.6,g=.6,b=1]
+\definecolor [tdsky] [t=.5,a=1,r=.1,g=.1,b=1]
+\definecolor [tlground] [t=.5,a=1,r=.3,g=.9,b=.3]
+\definecolor [tdground] [t=.5,a=1,r=0,g=.5,b=0]
+\definecolor [tcspots] [t=.5,a=1,r=.33,g=.1,b=0]
+
+\definepalet
+ [cow]
+ [normal=lground,
+ contour=dground]
+
+\def\ScaledCowOverlay#1#2%
+ {\dontleavehmode\hbox
+ {\color[cow:contour]{\hsmash{\definedfont[CowsContour sa #1]#2}}%
+ \color[cow:normal] {\definedfont[Cows sa #1]#2}}}
+
+\def\CowOverlay#1%
+ {\dontleavehmode\hbox
+ {\color[cow:contour]{\hsmash{\getglyph{CowsContour}{#1}}}%
+ \color[cow:normal] {\getglyph{Cows} {#1}}}}
+
+\def\CowContour#1%
+ {\dontleavehmode\hbox
+ {\color[cow:contour]{\hsmash{\getglyph{CowsLogoContour}{#1}}}%
+ \color[cow:normal] {\getglyph{CowsLogo} {#1}}}}
+
+\def\CowLogo#1%
+ {\getglyph{CowsLogo}{\char#1\relax}}
+
+\startsymbolset[cownormal]
+
+\definesymbol[CowPragma] [\CowLogo{1}]
+\definesymbol[CowConTeXt] [\CowLogo{2}]
+\definesymbol[CowConTeXtComplete][\CowLogo{3}]
+\definesymbol[CowConTeXtShadow] [\CowLogo{4}]
+\definesymbol[CowConTeXtContour] [\CowLogo{5}]
+\definesymbol[CowConTeXtOutline] [\CowLogo{6}]
+\definesymbol[CowConTeXtDots] [\CowLogo{7}]
+\definesymbol[CowMP] [\CowLogo{8}]
+\definesymbol[CowMPComplete] [\CowLogo{9}]
+\definesymbol[CowTeX] [\CowLogo{10}]
+\definesymbol[CowTeXComplete] [\CowLogo{11}]
+\definesymbol[CowBoo] [\CowLogo{12}]
+\definesymbol[CowCow] [\CowLogo{13}]
+\definesymbol[CowExampleComplete][\CowLogo{14}]
+\definesymbol[CowFoxetComplete] [\CowLogo{15}]
+\definesymbol[CowMetafun] [\CowLogo{16}]
+\definesymbol[CowMetafunComplete][\CowLogo{17}]
+\definesymbol[CowTEX] [\CowLogo{18}]
+\definesymbol[CowWiki] [\CowLogo{19}]
+
+\stopsymbolset
+
+\startsymbolset[cowcontour]
+
+\definesymbol[CowPragma] [\CowContour{1}]
+\definesymbol[CowConTeXt] [\CowContour{2}]
+\definesymbol[CowConTeXtComplete][\CowContour{3}]
+\definesymbol[CowConTeXtShadow] [\CowContour{4}]
+\definesymbol[CowConTeXtContour] [\CowContour{5}]
+\definesymbol[CowConTeXtOutline] [\CowContour{6}]
+\definesymbol[CowConTeXtDots] [\CowContour{7}]
+\definesymbol[CowMP] [\CowContour{8}]
+\definesymbol[CowMPComplete] [\CowContour{9}]
+\definesymbol[CowTeX] [\CowContour{10}]
+\definesymbol[CowTeXComplete] [\CowContour{11}]
+\definesymbol[CowBoo] [\CowContour{12}]
+\definesymbol[CowCow] [\CowContour{13}]
+\definesymbol[CowExampleComplete][\CowContour{14}]
+\definesymbol[CowFoxetComplete] [\CowContour{15}]
+\definesymbol[CowMetafun] [\CowContour{16}]
+\definesymbol[CowMetafunComplete][\CowContour{17}]
+\definesymbol[CowTEX] [\CowContour{18}]
+\definesymbol[CowWiki] [\CowContour{19}]
+
+\stopsymbolset
+
+\endinput
diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex
index 9d4d9fd2e..a2beceac9 100644
--- a/tex/context/base/syst-gen.tex
+++ b/tex/context/base/syst-gen.tex
@@ -405,7 +405,9 @@
%D \type{\unprotect}, one can use \type{\@EA} as equivalent
%D of \type{\expandafter}.
-\let\@EA =\expandafter
+\let\@NX\noexpand
+\let\@EA\expandafter
+
\def\@EAEA {\expandafter\expandafter}
\def\@EAEAEA{\expandafter\expandafter\expandafter}
@@ -3818,10 +3820,10 @@
\processcommalist[##1]\dodododoublewithset}}%
#1\dododoublewithset}%
-\def\dodoubleemptywithset%
+\def\dodoubleemptywithset
{\dodoublewithset\dodoubleempty}
-\def\dodoubleargumentwithset%
+\def\dodoubleargumentwithset
{\dodoublewithset\dodoubleargument}
\def\dotriplewithset#1#2%
diff --git a/tex/context/base/type-cow.tex b/tex/context/base/type-cow.tex
new file mode 100644
index 000000000..027f6b6b7
--- /dev/null
+++ b/tex/context/base/type-cow.tex
@@ -0,0 +1,83 @@
+%D \module
+%D [ file=type-cow,
+%D version=2006.06.23,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=Cow Fonts,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=PRAGMA]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The cow fonts are a project of Duane Bibby, Hans Hagen and Taco
+%D Hoekwater.
+
+\starttypescriptcollection[cow]
+
+\starttypescript [math,serif] [cow,sheep] [default]
+ \setups[font:fallback:serif]
+ \usemathcollection[cow]
+ \loadmapfile[koeieletters.map]
+ \definefontsynonym [Serif] [Cows] [encoding=\typescriptthree]
+ \definefontsynonym [SerifContour] [CowsContour] [encoding=\typescriptthree]
+ \definefontsynonym [SerifLogo] [CowsLogo] [encoding=\typescriptthree]
+ \definefontsynonym [SerifLogoContour][CowsLogoContour] [encoding=\typescriptthree]
+ \definefontsynonym [MathRoman] [CowsMathRoman] [encoding=\typescriptthree]
+ \definefontsynonym [MathItalic] [CowsMathItalic] [encoding=\typescriptthree]
+ \definefontsynonym [MathSymbol] [CowsMathSymbol] [encoding=\typescriptthree]
+ \definefontsynonym [MathExtension] [CowsMathExtensions][encoding=\typescriptthree]
+\stoptypescript
+
+\starttypescript [math,serif] [sheep] [default]
+ \setups[font:fallback:serif]
+ \usemathcollection[cow]
+ \loadmapfile[koeieletters.map]
+ \definefontsynonym [Serif] [Sheep] [encoding=\typescriptthree]
+ \definefontsynonym [SerifContour] [SheepContour] [encoding=\typescriptthree]
+ \definefontsynonym [SerifLogo] [SheepLogo] [encoding=\typescriptthree]
+ \definefontsynonym [SerifLogoContour][SheepLogoContour] [encoding=\typescriptthree]
+ \definefontsynonym [MathRoman] [SheepMathRoman] [encoding=\typescriptthree]
+ \definefontsynonym [MathItalic] [SheepMathItalic] [encoding=\typescriptthree]
+ \definefontsynonym [MathSymbol] [SheepMathSymbol] [encoding=\typescriptthree]
+ \definefontsynonym [MathExtension] [SheepMathExtensions][encoding=\typescriptthree]
+\stoptypescript
+
+\starttypescript [all] [cow,sheep] [default]
+ \definefontsynonym [Cows] [koeielett]
+ \definefontsynonym [CowsContour] [koeielett-contour]
+ \definefontsynonym [CowsLogo] [koeielogos]
+ \definefontsynonym [CowsLogoContour] [koeielogos-contour]
+ \definefontsynonym [CowsMathRoman] [koeielett]
+ \definefontsynonym [CowsMathItalic] [koeieletter-mi]
+ \definefontsynonym [CowsMathSymbol] [koeieletter-sy]
+ \definefontsynonym [CowsMathExtensions][koeieletter-ex]
+\stoptypescript
+
+\starttypescript [all] [sheep] [default]
+ \definefontsynonym [Sheep] [koeielett]
+ \definefontsynonym [SheepContour] [koeielett-contour]
+ \definefontsynonym [SheepLogo] [koeielogos]
+ \definefontsynonym [SheepLogoContour] [koeielogos-contour]
+ \definefontsynonym [SheepMathRoman] [koeielettx]
+ \definefontsynonym [SheepMathItalic] [koeieletter-mi]
+ \definefontsynonym [SheepMathSymbol] [koeieletter-syx]
+ \definefontsynonym [SheepMathExtensions][koeieletter-ex]
+\stoptypescript
+
+\starttypescript [cow] [default]
+ \definetypeface [cow] [ss][serif][cow] [default][encoding=default]
+ \definetypeface [cow] [mm][math] [cow] [default][encoding=default]
+ \definetypeface [cow] [tt][mono] [modern][default][encoding=default,rscale=.85]
+\stoptypescript
+
+\starttypescript [sheep] [default]
+ \definetypeface [sheep][ss][serif][sheep] [default][encoding=default]
+ \definetypeface [sheep][mm][math] [sheep] [default][encoding=default]
+ \definetypeface [sheep][tt][mono] [modern][default][encoding=default,rscale=.85]
+\stoptypescript
+
+\stoptypescriptcollection
+
+\endinput
diff --git a/tex/context/base/type-gyr.tex b/tex/context/base/type-gyr.tex
new file mode 100644
index 000000000..b5063201d
--- /dev/null
+++ b/tex/context/base/type-gyr.tex
@@ -0,0 +1,36 @@
+%D \module
+%D [ file=type-gyr,
+%D version=2006.06.28,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=TeXGyre Collection,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=PRAGMA]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\starttypescriptcollection[gyre]
+
+% TeXGyrePagella
+%
+% qplr TeXGyrePagella-Regular
+% qplri TeXGyrePagella-Italic
+% qplb TeXGyrePagella-Bold
+% qplbi TeXGyrePagella-BoldItalic
+
+\starttypescript [serif] [palatino] [texnansi,ec,8r,t5,qx]
+ \loadmapfile[\typescriptthree-qpl.map]
+
+ \definefontsynonym [Palatino] [\typescriptthree-qplr] [encoding=\typescriptthree]
+ \definefontsynonym [Palatino-Italic] [\typescriptthree-qplri] [encoding=\typescriptthree]
+ \definefontsynonym [Palatino-Bold] [\typescriptthree-qplb] [encoding=\typescriptthree]
+ \definefontsynonym [Palatino-BoldItalic] [\typescriptthree-qplbi] [encoding=\typescriptthree]
+
+ \definefontsynonym [Palatino-Slanted] [Palatino-Italic]
+ \definefontsynonym [Palatino-BoldSlanted] [Palatino-BoldItalic]
+ \definefontsynonym [Palatino-Caps] [Palatino]
+\stoptypescript
+
+\stoptypescriptcollection
diff --git a/tex/context/base/type-syn.tex b/tex/context/base/type-syn.tex
index e5967d2f0..0470622fb 100644
--- a/tex/context/base/type-syn.tex
+++ b/tex/context/base/type-syn.tex
@@ -510,6 +510,26 @@
\definefontsynonym [SansBoldItalic] [Iwona-CapsHeavyItalic] [encoding=\typescriptthree]
\stoptypescript
+\starttypescript [sans] [iwona-heavy] [name]
+ \setups[font:fallback:sans]
+ \definefontsynonym [Sans] [Iwona-Heavy] [encoding=\typescriptthree]
+ \definefontsynonym [SansItalic] [Iwona-HeavyItalic] [encoding=\typescriptthree]
+ \definefontsynonym [SansBold] [Iwona-Heavy] [encoding=\typescriptthree]
+ \definefontsynonym [SansBoldItalic] [Iwona-HeavyItalic] [encoding=\typescriptthree]
+ \definefontsynonym [SansCaps] [Iwona-CapsHeavy] [encoding=\typescriptthree]
+ \definefontsynonym [SansItalicCaps] [Iwona-CapsHeavyItalic] [encoding=\typescriptthree]
+ \definefontsynonym [SansBoldCaps] [Iwona-CapsHeavy] [encoding=\typescriptthree]
+ \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsHeavyItalic] [encoding=\typescriptthree]
+\stoptypescript
+
+\starttypescript [sans] [iwona-heavy-caps] [name]
+ \setups[font:fallback:sans]
+ \definefontsynonym [SansCaps] [Iwona-CapsHeavy] [encoding=\typescriptthree]
+ \definefontsynonym [SansItalicCaps] [Iwona-CapsHeavyItalic] [encoding=\typescriptthree]
+ \definefontsynonym [SansBoldCaps] [Iwona-CapsHeavy] [encoding=\typescriptthree]
+ \definefontsynonym [SansBoldItalicCaps] [Iwona-CapsHeavyItalic] [encoding=\typescriptthree]
+\stoptypescript
+
\starttypescript [sans] [iwona-light-cond] [name]
\setups[font:fallback:sans]
\definefontsynonym [Sans] [Iwona-CondLight] [encoding=\typescriptthree]
diff --git a/tex/context/base/verb-c.tex b/tex/context/base/verb-c.tex
index a7a041c7e..d2f708a8d 100644
--- a/tex/context/base/verb-c.tex
+++ b/tex/context/base/verb-c.tex
@@ -39,7 +39,7 @@
\ifcontinueCsinglelinecomment
\continueCsinglelinecommentfalse
\else
- \egroup
+ \tttf
\endofpretty
\global\inCsinglelinecommentfalse
\global\inCcommentfalse
@@ -200,7 +200,7 @@
\next{#1}#2}
\gdef\Cstartcomment#1#2%
- {\beginofpretty[\!!prettyfourthree]\bgroup\ttsl\getpretties{#1}{#2}}
+ {\beginofpretty[\!!prettyfourthree]\ttsl\getpretties{#1}{#2}}
\gdef\dodoCtypefourthree% #1%
{\endCtypesix
@@ -215,7 +215,7 @@
\else
\global\inCcommenttrue
\global\inCsinglelinecommenttrue
- \def\next{\beginofpretty[\!!prettyfourthree]\bgroup\ttsl\getpretties{#1}{#2}}%
+ \def\next{\beginofpretty[\!!prettyfourthree]\ttsl\getpretties{#1}{#2}}%
\expandafter\next
\fi}
@@ -235,7 +235,7 @@
\expandafter#2%
\else\ifnum\prettytype=43
\getpretties{#1}{#2}%
- \egroup
+ \tttf
\endofpretty
\global\inCcommentfalse
\global\inCmultilinecommentfalse
@@ -265,7 +265,7 @@
\endCtypesix
\global\inCcommenttrue
\global\inCsinglelinecommenttrue
- \def\next{\beginofpretty[\!!prettyfourthree]\bgroup\ttsl\getpretty{#1}}%
+ \def\next{\beginofpretty[\!!prettyfourthree]\ttsl\getpretty{#1}}%
\expandafter\next
\fi\fi\fi}
@@ -481,3 +481,4 @@
[\c!icommand=\tttf]
\protect \endinput
+
diff --git a/tex/context/base/x-fe.tex b/tex/context/base/x-fe.tex
index 6e24417ac..8562b1d52 100644
--- a/tex/context/base/x-fe.tex
+++ b/tex/context/base/x-fe.tex
@@ -104,7 +104,7 @@
\defineXMLargument
[fe:trace]
[attribute=,option=]
- {\showXMLinh{\XMLop{attribute}}%
+ {\showXMLinh[\XMLop{attribute}]%
\XMLval{fe:trace}{\XMLop{option}}{}}
\mapXMLvalue
diff --git a/tex/context/base/x-set-11.tex b/tex/context/base/x-set-11.tex
index 37de793bc..537148b43 100644
--- a/tex/context/base/x-set-11.tex
+++ b/tex/context/base/x-set-11.tex
@@ -400,7 +400,7 @@
{\showSETUPrecord}
\def\showSETUPrecord
- {\getvalue{startsetuptext}
+ {\getvalue{\e!start setuptext}
\tttf
\nohyphens
\veryraggedright
@@ -439,7 +439,7 @@
\egroup
\stopXMLmapping}
\stopXMLmapping
- \getvalue{stopsetuptext}}
+ \getvalue{\e!stop setuptext}}
\defineXMLenvironmentsave [cd:sequence] \ignorespaces \ignorespaces
\defineXMLenvironmentsave [cd:arguments] \ignorespaces \ignorespaces
@@ -785,9 +785,14 @@
\stopXMLmapping
-\def\loadsetups
+\def\loadsetups{\complexorsimple\loadsetups}
+
+\def\simpleloadsetups
+ {\complexloadsetups[cont-en.xml]}
+
+\def\complexloadsetups[#1]%
{\startXMLmapping[zero]
- \processXMLfilegrouped{cont-en.xml}
+ \processXMLfilegrouped{#1}
\stopXMLmapping}
\protect \endinput
diff --git a/tex/context/base/x-set-12.tex b/tex/context/base/x-set-12.tex
index d7ff8fd18..93055b860 100644
--- a/tex/context/base/x-set-12.tex
+++ b/tex/context/base/x-set-12.tex
@@ -32,7 +32,6 @@
\definecolor[TitleColor][r=.15,g=.20,b=.25]
\definecolor[TitleColor][r=.15,g=.25,b=.20]
-
\startinterface dutch \definecolor[LocalColor][r=.75,g=.25,b=.25] \stopinterface
\startinterface english \definecolor[LocalColor][r=.25,g=.75,b=.25] \stopinterface
\startinterface german \definecolor[LocalColor][r=.25,g=.25,b=.75] \stopinterface
@@ -150,22 +149,17 @@
\setuplayout
[titlepage]
-\startmakeup[\v!standard]
- \dontcomplain
- \startcolor[TitleColor]
- \definedfont[RegularBold at 100pt]\setstrut
- \setupalign[\v!left]
- \strut Con\TeX t \par
- \definedfont[RegularBold at 50pt]\setstrut
+\startsetups text:commands
\startinterface dutch \strut commando's \par \stopinterface
\startinterface english \strut commands \par \stopinterface
\startinterface german \strut befehle \par \stopinterface
- \startinterface french \strut ....... \par \stopinterface
- \startinterface czech \strut prikaz\'y \par \stopinterface
+ \startinterface french \strut commandes \par \stopinterface
+ \startinterface czech \strut p\v{r}ikazy \par \stopinterface
\startinterface italian \strut comandi \par \stopinterface
\startinterface romanian \strut comenzile \par \stopinterface
- \vfill
- \definedfont[RegularBold at 150pt]\setstrut
+\stopsetups
+
+\startsetups text:uppercase
\startinterface dutch NL\stopinterface
\startinterface english EN\stopinterface
\startinterface german DE\stopinterface
@@ -173,6 +167,29 @@
\startinterface czech CZ\stopinterface
\startinterface italian IT\stopinterface
\startinterface romanian RO\stopinterface
+\stopsetups
+
+\startsetups text:lowercase
+ \startinterface dutch \strut nl / nederlands \par \stopinterface
+ \startinterface english \strut en / english \par \stopinterface
+ \startinterface german \strut de / deutsch \par \stopinterface
+ \startinterface french \strut fr / fran\c{c}ais \par \stopinterface
+ \startinterface czech \strut cz / \v{c}esk\'y \par \stopinterface
+ \startinterface italian \strut it / italiano \par \stopinterface
+ \startinterface romanian \strut ro / rom\^{a}n\u{a} \par \stopinterface
+\stopsetups
+
+\startmakeup[\v!standard]
+ \dontcomplain
+ \startcolor[TitleColor]
+ \definedfont[RegularBold at 100pt]\setstrut
+ \setupalign[\v!left]
+ \strut Con\TeX t \par
+ \definedfont[RegularBold at 50pt]\setstrut
+ \setups[text:commands]
+ \vfill
+ \definedfont[RegularBold at 150pt]\setstrut
+ \setups[text:uppercase]
\stopcolor
\stopmakeup
@@ -189,22 +206,10 @@
\setupalign[\v!left]
\strut Con\TeX t \par
\definedfont[RegularBold at 50pt]\setstrut
- \startinterface dutch \strut commando's \par \stopinterface
- \startinterface english \strut commands \par \stopinterface
- \startinterface german \strut befehle \par \stopinterface
- \startinterface french \strut ....... \par \stopinterface
- \startinterface czech \strut prikaz\'y \par \stopinterface
- \startinterface italian \strut comandi \par \stopinterface
- \startinterface romanian \strut comenzile \par \stopinterface
+ \setups[text:commands]
\vfill
\definedfont[RegularBold at 24pt]\setupinterlinespace
- \startinterface dutch \strut nl / nederlands \par \stopinterface
- \startinterface english \strut en / english \par \stopinterface
- \startinterface german \strut de / deutsch \par \stopinterface
- \startinterface french \strut fr / fran\,c ais \par \stopinterface
- \startinterface czech \strut cz / \^cesk\'y \par \stopinterface
- \startinterface italian \strut it / italiano \par \stopinterface
- \startinterface romanian \strut ro / rom\^{a}n\u{a} \par \stopinterface
+ \setups[text:lowercase]
\par \strut \currentdate \par
\stopcolor
\stopmakeup
diff --git a/tex/context/base/xtag-run.tex b/tex/context/base/xtag-run.tex
index 6d1d3078d..face9f0b0 100644
--- a/tex/context/base/xtag-run.tex
+++ b/tex/context/base/xtag-run.tex
@@ -172,7 +172,7 @@
{\def\docommando##1{#1[##1]#2#3\letvalue{\@@XMLshow:##1}\empty}%
\processcommalist[#4]\docommando}
-\gdef\showXMLinh[#1]%
+\gdef\showXMLign[#1]%
{\setXMLshow\defineXMLignore \relax\relax[#1]%
\setXMLshow\defineXMLsingular \relax\relax[#1]}
@@ -305,7 +305,7 @@
\fi}%
\egroup}
-\gdef\showXMLinh#1%
+\gdef\showXMLinh[#1]%
{\doifsomething{#1}
{\bgroup\infofont[%
\dorecurse\XMLdepth
diff --git a/tex/context/bib/bibl-ams.tex b/tex/context/bib/bibl-ams.tex
index 1c5a9fd1c..ddfe927c3 100644
--- a/tex/context/bib/bibl-ams.tex
+++ b/tex/context/bib/bibl-ams.tex
@@ -45,7 +45,7 @@
\c!right={)}]
\setupcite
- [key,serial,page,short,type,doi,url]
+ [key,serial,authornum,page,short,type,doi,url]
[\c!andtext={ and },
\c!otherstext={ et al.},
\c!pubsep={, },
diff --git a/tex/context/bib/bibl-apa-de.tex b/tex/context/bib/bibl-apa-de.tex
index 71996926d..8ab1f48ff 100644
--- a/tex/context/bib/bibl-apa-de.tex
+++ b/tex/context/bib/bibl-apa-de.tex
@@ -47,7 +47,7 @@
\c!right={)}]
\setupcite
- [key,serial,page,short,type,doi,url]
+ [key,serial,authornum,page,short,type,doi,url]
[\c!andtext={ und },
\c!otherstext={ et al.},
\c!pubsep={, },
diff --git a/tex/context/bib/bibl-apa-fr.tex b/tex/context/bib/bibl-apa-fr.tex
index 68eac13c2..d2a1efb8a 100644
--- a/tex/context/bib/bibl-apa-fr.tex
+++ b/tex/context/bib/bibl-apa-fr.tex
@@ -45,7 +45,7 @@
\c!right={)}]
\setupcite
- [key,serial,page,short,type,doi,url]
+ [key,serial,authornum,page,short,type,doi,url]
[\c!andtext={ et },
\c!otherstext={ et al.},
\c!pubsep={, },
diff --git a/tex/context/bib/bibl-apa.tex b/tex/context/bib/bibl-apa.tex
index c3d11911a..8e2e9e842 100644
--- a/tex/context/bib/bibl-apa.tex
+++ b/tex/context/bib/bibl-apa.tex
@@ -45,7 +45,7 @@
\c!right={)}]
\setupcite
- [key,serial,page,short,type,doi,url]
+ [key,serial,authornum,page,short,type,doi,url]
[\c!andtext={ and },
\c!otherstext={ et al.},
\c!pubsep={, },
@@ -66,6 +66,7 @@
\c!left={[},
\c!right={]}]
+
\setuppublications[%
\c!sorttype=,
\c!criterium=,
@@ -386,4 +387,4 @@
\insertnote{ }{.}{}%
}
-\protect \ No newline at end of file
+\protect
diff --git a/tex/context/bib/bibl-aps.tex b/tex/context/bib/bibl-aps.tex
index 6d9e8db12..39d3bd7d4 100644
--- a/tex/context/bib/bibl-aps.tex
+++ b/tex/context/bib/bibl-aps.tex
@@ -45,7 +45,7 @@
\c!right={)}]
\setupcite
- [key,serial,page,short,type,doi,url]
+ [key,serial,authornum,page,short,type,doi,url]
[\c!andtext={ and },
\c!otherstext={ et al.},
\c!pubsep={, },
diff --git a/tex/context/bib/bibl-num-fr.tex b/tex/context/bib/bibl-num-fr.tex
index ca634a3da..c4271fb7f 100644
--- a/tex/context/bib/bibl-num-fr.tex
+++ b/tex/context/bib/bibl-num-fr.tex
@@ -49,7 +49,7 @@
\c!right={)}]
\setupcite
- [key,serial,page,short,type,doi,url]
+ [key,serial,authornum,page,short,type,doi,url]
[\c!andtext={ et },
\c!otherstext={ et al.},
\c!pubsep={, },
diff --git a/tex/context/bib/bibl-num.tex b/tex/context/bib/bibl-num.tex
index ff7cfe7a5..45d527f77 100644
--- a/tex/context/bib/bibl-num.tex
+++ b/tex/context/bib/bibl-num.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=bibl-num,
-%D version=2005.12.31,
+%D version=2006.07.01,
%D title=Numeric bibliography style,
%D subtitle=Publications,
%D author={Taco Hoekwater},
@@ -49,7 +49,7 @@
\c!right={)}]
\setupcite
- [key,serial,page,short,type,doi,url]
+ [key,serial,authornum,page,short,type,doi,url]
[\c!andtext={ and },
\c!otherstext={ et al.},
\c!pubsep={, },
@@ -184,7 +184,7 @@
{}%
\insertpublisher
{ }%
- {\insertedition{, }{ edition}{}
+ {\insertedition{, }{ edition}{}%
\insertpubyear{, }{.}{.}}%
{\insertedition{, }{ edition}{}%
\insertpubyear{, }{.}{.}}%
@@ -318,7 +318,7 @@
\insertchap{\unskip, }{ }{ }%
\insertpages
{\unskip, pages~}
- {\insertcity{, }{}{}
+ {\insertcity{, }{}{}%
\insertpubyear{\unskip, }{. }{. }}%
{\unskip
\insertpubyear{\unskip, }{. }{. }}%
diff --git a/tex/context/bib/bibl-ssa.tex b/tex/context/bib/bibl-ssa.tex
index 2e3341328..b93bd1b68 100644
--- a/tex/context/bib/bibl-ssa.tex
+++ b/tex/context/bib/bibl-ssa.tex
@@ -46,7 +46,7 @@
\c!right={)}]
\setupcite
- [key,serial,page,short,type,doi,url]
+ [key,serial,authornum,page,short,type,doi,url]
[\c!andtext={ and },
\c!otherstext={ et al.},
\c!pubsep={, },
diff --git a/tex/context/bib/t-bib.tex b/tex/context/bib/t-bib.tex
index dbb5df612..719991255 100644
--- a/tex/context/bib/t-bib.tex
+++ b/tex/context/bib/t-bib.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=t-bib,
-%D version=2006.04.11,
+%D version=2006.07.12,
%D title=\CONTEXT\ Publication Module,
%D subtitle=Publications,
%D author=Taco Hoekwater,
@@ -49,6 +49,33 @@
%D \item Destroy interactivity in labels of the publication list (13/03/2006)
%D \item fix multi-cite list compression (11/4/2006)
%D \item fix \type{\getcitedata} (11/4/2006)
+%D \item magic for chapter bibs (18-25/4/2006)
+%D \item language setting (25/4/2006)
+%D \item use \type{\hyphenatedurl} for \type{\inserturl} (25/4/2006)
+%D \item Add \type{\docitation} to \type{\nocite}(26/4/2006)
+%D \item patents can have numbers, added to bst files (26/4/2006)
+%D \item \type{\docitation} needs a \type{\iftrialtypesetting} (27/4/2006)
+%D \item \type{\filllocalpublist}'s loop is bound by definedness, not resolvedness (27/4/2006)
+%D \item \type{\setuppublications[monthconversion=]} added (15/5/2006)
+%D \item use \type{\undefinedreference} instead of bare question marks (15/5/2006)
+%D \item add grouping around \type{\placepublications} commands (16/5/2006)
+%D \item fix a bug in \type{\cite{<item>}} (17/5/2006)
+%D \item support \type{\cite[authornum]} (18/5/2006)
+%D \item make \type{\cite} unexpandable (20/6/2006)
+%D \item allow hyperlinks in author\&year combo's
+%D (cite list compression has to be off) (20/6/2006)
+%D \item fix duplicate labels for per-chapter style (20/6/2006)
+%D \item allow \type{\setupcite[interaction=(start|stop)]}
+%D \item fix the item number in the publication list with 'numbering=yes' (22/6/2006)
+%D \item make the default criterium for \type{\placepublications} be \type{previous} (23/6/2006)
+%D \item fix \type{\normalauthor} and \type{\normalshortauthor} spacing (29/6/2006)
+%D \item do not typeset empty arguments to \type{\typesetapublication} (29/6/2006)
+%D \item add \type{symbol=none} to \type{\setuplist} in unnumbered
+%D mode to prevent typesetting of bare numbers (29/6/2006)
+%D \item remove two incorrect spaces from bibl-num.tex (1/7/2006)
+%D \item reset font styles within \type{\cite}, so that font switches
+%D in \type{left} stay in effect (12/7/2006)
+%D \item guard added against loading bbl files multiple times (13/7/2006)
%D \stopitemize
%D
%D \subject{WISHLIST}
@@ -66,6 +93,7 @@
\definesystemvariable {pv} % PublicationVariable
\definesystemvariable {pb} % PuBlication
+
\definemessageconstant {bib}
\definefileconstant {bibextension} {bbl}
@@ -148,11 +176,11 @@
\stopvariables
+\def\biblistname{pubs} % for compatibility
+
%D how to load the references. There is some new stuff here
%D to support Idris' (incorrect :-)) use of projects
-\def\biblistname{pubs}
-
\let\preloadbiblist\relax
@@ -186,26 +214,24 @@
%
\fi \fi \fi
-\expanded{\definelist[\biblistname]}
+\definelist[pubs]
+\setuplist[pubs][\c!width=]
+
%D The text string for the publication list header
-\setupheadtext[en][\biblistname=References]
-\setupheadtext[nl][\biblistname=Literatuur]
-\setupheadtext[de][\biblistname=Literatur]
-\setupheadtext[it][\biblistname=Bibliografia]
-\setupheadtext[sl][\biblistname=Literatura]
-\setupheadtext[fr][\biblistname=Bibliographie]
+\setupheadtext[en][pubs=References]
+\setupheadtext[nl][pubs=Literatuur]
+\setupheadtext[de][pubs=Literatur]
+\setupheadtext[it][pubs=Bibliografia]
+\setupheadtext[sl][pubs=Literatura]
+\setupheadtext[fr][pubs=Bibliographie]
%D \macros{bibdoif,bibdoifnot,bibdoifelse}
%D
%D Here are a few small helpers that are used a lot
%D in all the typesetting commands
%D (\type{\insert...}) we will encounter later.
-%D
-%D TH: Hans, don't replace these! It is vital that
-%D there is a precisly one level of expansion of
-%D the argument.
\long\def\bibdoifelse#1%
{\@EA\def\@EA\!!stringa\@EA{#1}%
@@ -312,9 +338,10 @@
[\??pb]
[\c!alternative=,#1]%
\doifsomething\@@pbalternative
- {\readsysfile{bibl-\@@pbalternative.tex}
- {\showmessage\m!bib{6}{bibl-\@@pbalternative}\let\@@pbalternative\empty}
- {\showmessage\m!bib{1}{bibl-\@@pbalternative}\let\@@pbalternative\empty}}%
+ {\readsysfile
+ {bibl-\@@pbalternative.tex}
+ {\showmessage\m!bib{6}{bibl-\@@pbalternative}\let\@@pbalternative\empty}
+ {\showmessage\m!bib{1}{bibl-\@@pbalternative}\let\@@pbalternative\empty}}%
\getparameters
[\??pb]
[#1]%
@@ -359,9 +386,11 @@
{\usereferences[#1]\processcommalist[#1]\dousepublications}
\def\dousepublications#1%
- {\readfile{#1.\f!bibextension}
- {\showmessage\m!bib{4}{#1.\f!bibextension}}
- {\showmessage\m!bib{2}{#1.\f!bibextension}}}
+ {\doonlyonce
+ {#1.\f!bibextension}
+ {\readfile{#1.\f!bibextension}
+ {\showmessage\m!bib{4}{#1.\f!bibextension}}
+ {\showmessage\m!bib{2}{#1.\f!bibextension}}}}
%D \macros{setuppublicationlist}
%D
@@ -380,15 +409,14 @@
{\dosingleempty\dosetuppublicationlist}
\def\dosetuppublicationlist[#1]%
- {\getparameters
- [@@pvdata]
- [\c!samplesize={AA99},\c!totalnumber={99},#1]% for sample & totalnumber & firstnamesep etc.
+ {\getparameters[\??pv data][#1]%
\setuplist
- [\biblistname]
- [\c!alternative=a,\c!interaction=,\c!pagenumber=\v!no,#1]}
+ [pubs]
+ [\c!samplesize={AA99},\c!totalnumber={99},
+ \c!alternative=a,\c!interaction=,\c!pagenumber=\v!no,#1]}
\def\setuppublicationlayout[#1]#2%
- {\setvalue{@@pvdata#1}{#2\unskip}}
+ {\setvalue{\??pv data#1}{#2\unskip}}
%D \macros{bibalternative}
%D
@@ -428,18 +456,27 @@
}}
\def\bibcommandlist
- {arttitle, title, journal, notes, volume, issue, pubname, city,
- country, bibtype, organization, series, thekey, edition, month,
- pubyear, note, annotate, pages, keyword, keywords, comment,
- abstract, names, size, issn, isbn, chapter, eprint, doi,
- howpublished, biburl, lastchecked,
- % ieee
- nationality, assignee, bibnumber, day, dayfiled, monthfiled,
- yearfiled, revision}
+ {abstract, annotate, arttitle, assignee, bibnumber, bibtype, biburl, chapter, city,
+ comment, country, day, dayfiled, doi, edition, eprint, howpublished, isbn, issn,
+ issue, journal, keyword, keywords, lastchecked, month, monthfiled, names, nationality,
+ note, notes, organization, pages, pubname, pubyear, revision, series, size, thekey,
+ title, volume, yearfiled}
\processcommacommand[\bibcommandlist]\simplebibdef
+\def\insertbiburl#1#2#3%
+ {{\bibdoifelse{\@@pb@biburl}%
+ {\edef\ascii{\@EA\detokenize\@EA{\@@pb@biburl}}%
+ #1\@EA\hyphenatedurl\@EA{\ascii}#2}{#3}}}
+
+\def\insertmonth#1#2#3%
+ {\bibdoifelse{\@@pb@month}%
+ {#1\doifnumberelse{\@@pb@month}%
+ {\doifconversiondefinedelse\@@pbmonthconversion
+ {\convertnumber\@@pbmonthconversion{\@@pb@month}}{\@@pb@month}}%
+ {\@@pb@month}#2}{#3}}
+
\let\inserturl \insertbiburl % for backward compat.
\let\inserttype\insertbibtype % for backward compat.
@@ -487,8 +524,6 @@
%D \specialbibinsert{author}{\author@num}{<before>}{<after>}{<not>}
%D \stoptyping
-% hh: use a context counter instead, more options
-
\def\complexbibdef#1%
{\@EA\newcounter\csname #1@num\endcsname
\@EA\def\csname bib@#1\endcsname[##1]##2[##3]##4##5%
@@ -526,7 +561,7 @@
\def\specialbibinsert#1#2#3#4#5%
{\bgroup
\ifnum#2>\zerocount
- \letcscsname\tempa\csname @@pvdata#1\endcsname
+ \letcscsname\tempa\csname \??pv data#1\endcsname
\def\tempb{\@EA\tempa}%
\etallimitcounter =0\bibalternative{#1etallimit}\relax
\etaldisplaycounter=0\bibalternative{#1etaldisplay}\relax
@@ -594,14 +629,14 @@
\def\normalauthor#1#2#3#4#5%
{\bibdoif{#1}{#1\bibalternative\c!firstnamesep}%
\bibdoif{#2}{#2\bibalternative\c!vonsep}%
- #3\bibalternative\c!surnamesep
- \bibdoif{#5}{#5\unskip}}
+ #3%
+ \bibdoif{#5}{\bibalternative\c!surnamesep#5\unskip}}
\def\normalshortauthor#1#2#3#4#5%
{\bibdoif{#4}{#4\bibalternative\c!firstnamesep}%
\bibdoif{#2}{#2\bibalternative\c!vonsep}%
- #3\bibalternative\c!surnamesep
- \bibdoif{#5}{#5\unskip}}
+ #3%
+ \bibdoif{#5}{\bibalternative\c!surnamesep#5\unskip}}
\def\invertedauthor#1#2#3#4#5%
{\bibdoif{#2}{#2\bibalternative\c!vonsep}%
@@ -698,68 +733,186 @@
\newif\ifinpublist
-\let\@@pvdatawidth\empty
+% from Hans
+
+\def\ignoresectionconversion
+ {\let\@@sectionconversion\secondoftwoarguments}
+
+\let\normaldosetfilterlevel\dosetfilterlevel
+
+\def\patcheddosetfilterlevel#1#2% beware: this one is \let
+ {\bgroup
+ \ignoresectionconversion
+ \edef\askedlevel{#1}%
+ \edef\askedfilter{#2}%
+% \message{ASKD: \meaning\askedlevel}%
+% \message{PREV: \meaning\v!previous}%
+ \ifx\askedlevel\v!current
+ \dosetcurrentlevel\askedlevel
+ \else\ifx\askedlevel\v!previous
+ \dosetpreviouslevel\askedlevel
+ \else\ifx\askedlevel\v!all
+ \global\chardef\alltoclevels\plusone
+ \else\ifx\askedlevel\v!text
+ \global\chardef\alltoclevels\plusone
+ \else
+ \edef\byaskedlevel{\csname\??by\askedlevel\endcsname}%
+ \ifx\byaskedlevel\v!text
+ \dosettextlevel\askedlevel
+ \else
+ \dosetotherlevel\askedlevel
+ \fi
+ \fi\fi\fi\fi
+ % experiment
+ \ifx\askedfilter\empty \else
+ \xdef\currentlevel{\currentlevel\sectionseparator\askedfilter}%
+ \fi
+ \egroup}
+
+
+\unless\ifcsname currentlocationrefence\endcsname
-\def\preinitializepubslist
- {\let\bibcounter\!!zerocount
+\let\currentlocationreference\empty
+
+\def\dogetreferenceelements#1#2#3#4#5%
+ {\chardef\currentreferencetype=\ifx#1\relax0\else#1\fi\relax
+ \ifnum\currentreferencetype<2
+ \edef\currentpagereference{#2}%
+ \let \currentdatareference\empty
+ \edef\currentlocationreference{#2}%
+ \ifx\currentpagereference \empty
+ \let\currentfolioreference\folio
+ \else
+ \def \currentpagereference {\referencepagenumber[#2]}%
+ \edef\currentfolioreference{\dosplitofffoliopart[#2]}%
+ \fi
+ \edef\currentrealreference{#3}%
+ \settextreferences#4\end
+ \ifnum0#5<\crossreferencenumber
+ \forwardreferencetrue
+ \else
+ \forwardreferencefalse
+ \fi
+ \else
+ \let \currentlocationreference\empty
+ \edef\currentrealreference {#3}%
+ \def \currentdatareference {#2}%
+ \let \currentfolioreference\folio
+ \settextreferences#4\end
+ \forwardreferencefalse
+ \fi
+ \ifodd\currentreferencetype
+ \realreferencepagefalse
+ \else
+ \docheckrealreferencepage\currentrealreference
+ \ifrealreferencepage \else
+ \docheckrealreferencepage\currentdatareference
+ \fi
+ \fi}
+
+\fi
+
+\def\filllocalpublist%
+ {\let\dosetfilterlevel\patcheddosetfilterlevel
+ \dosettoclevel\??li{pubs}%
+ \let\dosetfilterlevel\normaldosetfilterlevel
+ \global\let\glocalpublist\empty
+ \doloop
+ {\doifdefinedelse
+ {\r!cross cite-\jobname-\recurselevel}
+ {\doifreferencefoundelse
+ {cite-\jobname-\recurselevel}
+ {\@EA\doifreglevelelse\@EA[\currentlocationreference]
+ {\@EA\doglobal\@EA\addtocommalist\@EA
+ {\currenttextreference}\glocalpublist}{}}
+ {}}%
+ {\exitloop}}%
+ \let\localpublist\glocalpublist}
+
+%
+\def\typesetpubslist
+ {\dobeginoflist
+ \edef\askedlevel{\csname \??li pubs\c!criterium\endcsname}%
+ \ifx\askedlevel\v!all
+ \def\bibrefprefix{}%
+ \else %
+ \preparebibrefprefix
+ \fi
\ifsortbycite
- \processcommacommand[\publist]\sortwritepublist
- \glet\publist\empty
+ \filllocalpublist
\iftypesetall
- \processcommacommand[\allrefs]\writepublist
+ \let\localallrefs\allrefs
+ \processcommacommand[\localpublist]\typesetapublication
+ \def\removefromallrefs##1%
+ {\removefromcommalist{##1}\localallrefs }%
+ \processcommacommand[\localpublist]\removefromallrefs
+ \processcommacommand[\localallrefs]\typesetapublication
+ \else
+ \processcommacommand[\localpublist]\typesetapublication
\fi
\else
\iftypesetall
- \processcommacommand[\allrefs]\writepublist
+ \processcommacommand[\allrefs]\typesetapublication
\else
- \processcommacommand[\allrefs]\writereferredpublist
+ %
+ \filllocalpublist
+ \processcommacommand[\allrefs]\maybetypesetapublication
\fi
- \fi}
+ \fi
+ \doendoflist }
+
+\newif\ifinpublist
+\def\maybetypesetapublication#1%
+ {\global\inpublistfalse
+ \def\test{#1}%
+ \def\runtest##1%
+ {\def\tempa{##1}\ifx \test\tempa \global\inpublisttrue \fi}%
+ \processcommacommand[\localpublist]\runtest
+ \ifinpublist \typesetapublication{#1}\fi}
\def\initializepubslist
{\edef\@@pbnumbering{\@@pbnumbering}%
\ifautohang
\ifx\@@pbnumbering\v!short
- \setbox\scratchbox\hbox{\@@pbnumbercommand{\csname @@pvdata\c!samplesize\endcsname}}%
+ \setbox\scratchbox\hbox{\@@pbnumbercommand{\getvalue{\??li pubs\c!samplesize}}}%
\else\iftypesetall
- \setbox\scratchbox\hbox{\@@pbnumbercommand{\csname @@pvdata\c!totalnumber\endcsname}}%
+ \setbox\scratchbox\hbox{\@@pbnumbercommand{\getvalue{\??li pubs\c!totalnumber}}}%
\else
\setbox\scratchbox\hbox{\@@pbnumbercommand{\numreferred}}%
\fi\fi
\edef\samplewidth{\the\wd\scratchbox}%
- \setuplist[\biblistname][\c!width=\samplewidth,\c!distance=0pt]%
+ \setuplist[pubs][\c!width=\samplewidth,\c!distance=0pt]%
\def\@@pblimitednumber##1{\hbox to \samplewidth{\@@pbnumbercommand{##1}}}%
\else
\doifemptyelse
- {\@@pvdatawidth}
+ {\getvalue{\??li pubs\c!width}}
{\def\@@pblimitednumber##1{\hbox{\@@pbnumbercommand{##1}}}}%
- {\def\@@pblimitednumber##1{\hbox to \@@pvdatawidth{\@@pbnumbercommand{##1}}}}%
+ {\def\@@pblimitednumber##1{\hbox to \getvalue{\??li pubs\c!width}{\@@pbnumbercommand{##1}}}}%
\fi
\ifx\@@pbnumbering\v!no
- \setuplist[\biblistname][\c!numbercommand=,\c!textcommand=\outdented]
+ \setuplist[pubs][\c!numbercommand=,\c!symbol=\v!none,\c!textcommand=\outdented]
\else
- \setuplist[\biblistname][\c!numbercommand=\@@pblimitednumber]%
+ \setuplist[pubs][\c!numbercommand=\@@pblimitednumber]%
\fi
\forgetall % bugfix 2005/03/18
}
+
\def\outdented#1% move to supp-box ?
{\hskip -\hangindent #1}
+
%D The full list of publications
\def\completepublications
{\dosingleempty\docompletepublications}
\def\docompletepublications[#1]%
- {\preinitializepubslist
- \ifcase\bibcounter\else
- \initializepubslist
- \let\bibcounter\!!zerocount
- \inpublisttrue
- \completelist[\biblistname][\c!criterium=\v!current,#1]%
- \inpublistfalse
- \fi}
+ {%\getparameters[\??pv data][#1]%
+ \begingroup
+ \setuplist[pubs][\c!criterium=\v!previous,#1]
+ \expanded{\systemsuppliedtitle[pubs]{\noexpand\headtext{pubs}}}%
+ \dodoplacepublications }
%D And the portion with the entries only.
@@ -767,49 +920,28 @@
{\dosingleempty\doplacepublications}
\def\doplacepublications[#1]%
- {\preinitializepubslist
- \ifcase\bibcounter\else
- \initializepubslist
- \let\bibcounter\!!zerocount
- \inpublisttrue
- \placelist[\biblistname][\c!criterium=\v!current,#1]%
- \inpublistfalse
- \fi}
-
-\def\dowritebiblist#1#2%
- {\makepbkvalue{#2}%
- \edef\pbnumbercommand{\@@pbinumbercommand{#1}}%
- \@EA\dodowritebiblist\@EA{\pbnumbercommand}{\typesetapublication{#2}}}
-
-\def\dodowritebiblist
- {\writetolist[\biblistname]}
+ {%\getparameters[\??pv data][#1]
+ \begingroup
+ \setuplist[pubs][\c!criterium=\v!previous,#1]
+ \dodoplacepublications }%
-\def\writepublist#1%
- {\doifnotempty{#1}
- {\increment\bibcounter
- \@EA\dowritebiblist\@EA{\bibcounter}{#1}}}
+\def\dodoplacepublications%
+ {\initializepubslist
+ \global\let\bibcounter\!!zerocount
+ \inpublisttrue
+ \typesetpubslist
+ \inpublistfalse
+ \endgroup }
-\def\writereferredpublist#1%
- {\doifnotempty{#1}
- {\doifreferredelse{#1}
- {\increment\bibcounter
- \@EA\dowritebiblist\@EA{\bibcounter}{#1}}{}}}
-
-\def\sortwritepublist#1%
- {\doifnotempty{#1}
- {\removefromcommalist{#1}\allrefs
- \increment\bibcounter
- \@EA\dowritebiblist\@EA{\bibcounter}{#1}}}
%D \subsubject{What's in a publication}
%D
-\unexpanded\def\typesetapublication
- {\doglobal\increment\bibcounter
- \dotypesetapublication}
-
-%D quick hack to make sure stuff isn't typeset twice:
-
+\unexpanded\def\typesetapublication#1%
+ {\doifsomething{#1}{\doglobal\increment\bibcounter
+ \dodolistelement{pubs}{}{\bibcounter}%
+ {\expanded{\reference[\bibrefprefix#1]{\bibcounter}}%
+ \strut \dotypesetapublication{#1}\strut }{}{}}}
\def\dotypesetapublication#1%
{\bgroup
@@ -819,22 +951,10 @@
\processcommalist [artauthor,author,editor]\clearbibitemtwo
\processcommacommand[\bibcommandlist]\bibitemdefs
\processcommalist [artauthor,author,editor,crossref]\bibitemdefs
- \ifinpublist
- \@EA\ifx\csname #1-is-typeset\endcsname \relax
- \setgvalue{#1-is-typeset}{1}%
- \expanded{\reference[#1]{\bibcounter}}%
- \getvalue{pbdd-#1}%
- \strut \ifcsname pbdt-#1\endcsname \bibalternative{\getvalue{pbdt-#1}}\fi\strut
- \else
- \endgraf
- \setbox0=\lastbox \unskip
- \fi
- \else
- \getvalue{pbdd-#1}% execute data
- %\bibalternative{\getvalue{pbdt-#1}}% do typesetting
- \ifcsname pbdt-#1\endcsname \bibalternative{\getvalue{pbdt-#1}}\fi
- \fi
- \egroup}
+ \let\biblanguage\empty
+ \getvalue{pbdd-#1}%
+ \ifcsname pbdt-#1\endcsname \bibalternative{\getvalue{pbdt-#1}}\fi
+ \egroup }
%D An afterthought
@@ -847,7 +967,14 @@
%D This is the result of bibtex's `language' field.
-\def\lang#1{}
+\def\setbiblanguage#1#2{\setvalue{\??pb @lang@#1}{#2}}
+
+\def\lang#1%
+ {\def\biblanguage{#1}%
+ \ifcsname \??pb @lang@#1\endcsname
+ \expanded{\language[\getvalue{\??pb @lang@#1}]}%
+ \fi \ignorespaces}
+
%D \subject{Citations}
@@ -857,7 +984,7 @@
%D \type{\cite} commands with a braced argument (these might appear
%D in included data from the \type{.bib} file).
-\def\cite
+\unexpanded\def\cite
{\doifnextcharelse{[}
{\dodocite}
{\dobibref}}
@@ -873,54 +1000,60 @@
\stopstrictinspectnextcharacter
\docite[#1][#2]}
-\def\docite#1[#2]#3[#4]%
+\def\docite[#1][#2]%
{\begingroup
+ \setupinteraction[\c!style=]%
+ \edef\temp{#2}%
+ \ifx\empty\temp \secondargumentfalse
+ \else \secondargumenttrue \fi
\ifsecondargument
- \doifassignmentelse
- {#2}%
- {\getparameters[LO][\c!alternative=,\c!extras=,#2]%
+ \processcommalist[#2]\docitation
+ \doifassignmentelse
+ {#1}%
+ {\getparameters[LO][\c!alternative=,\c!extras=,#1]%
\edef\@@currentalternative{\LOalternative}%
\ifx\@@currentalternative\empty
\edef\@@currentalternative{\@@citedefault}%
\fi
\ifx\LOextras\empty
- \setupcite[\@@currentalternative][#2]%
+ \setupcite[\@@currentalternative][#1]%
\else
\expandafter\ifx\csname LOright\endcsname \relax
\edef\LOextras{{\LOextras\bibalternative\c!right}}%
\else
\edef\LOextras{{\LOextras\LOright}}%
\fi
- \expanded{\setupcite[\@@currentalternative][#2,\c!right=\LOextras]}%
+ \expanded{\setupcite[\@@currentalternative][#1,\c!right=\LOextras]}%
\fi
}%
- {\def\@@currentalternative{#2}}%
+ {\def\@@currentalternative{#1}}%
\expanded{%
\processaction[\csname @@pv\@@currentalternative compress\endcsname]}
[ \v!yes=>\bibcitecompresstrue,
\v!no=>\bibcitecompressfalse,
\s!default=>\bibcitecompresstrue,
\s!unknown=>\bibcitecompresstrue]%
- \getvalue{bib\@@currentalternative ref}[#4]%
+ \getvalue{bib\@@currentalternative ref}[#2]%
\else
+ \processcommalist[#1]\docitation
\expanded{\processaction[\csname @@pv\@@citedefault compress\endcsname]}
[ \v!yes=>\bibcitecompresstrue,
\v!no=>\bibcitecompressfalse,
\s!default=>\bibcitecompresstrue,
\s!unknown=>\bibcitecompresstrue]%
\edef\@@currentalternative{\@@citedefault}%
- \getvalue{bib\@@citedefault ref}[#2]%
+ \getvalue{bib\@@citedefault ref}[#1]%
\fi
\endgroup}
%D \macros{nocite}
\def\nocite[#1]%
- {\processcommalist[#1]\addthisref}
+ {\processcommalist[#1]\addthisref
+ \processcommalist[#1]\docitation }
%D \macros{setupcite}
-
\def\setupcite{\dodoubleempty\dosetupcite}
\def\dosetupcite[#1][#2]%
@@ -952,6 +1085,17 @@
\processcommalist [artauthor,author,editor,crossref]\bibitemdefs
\getvalue{pbdd-#1}}
+%D This new version writes a reference out to the tui file for every
+%D \type{\cite}. This will allow backlinking
+
+\newcounter\citationnumber
+
+\def\docitation#1{%
+ \iftrialtypesetting \else
+ \doglobal\increment\citationnumber
+ \expanded{\rawreference{}{cite-\jobname-\citationnumber}{#1}}%
+ \fi}
+
%D \macros{numreferred,doifreferredelse,addthisref,publist}
%D
@@ -967,10 +1111,11 @@
\long\def\doifreferredelse#1{\doifdefinedelse{pbr-#1}}
\def\addthisref#1%
- {\doifundefined{pbr-#1}
- {\setgvalue{pbr-#1}{a}%
+ {\doifundefinedelse{pbr-#1}
+ {\setxvalue{pbr-#1}{\citationnumber}%
\doglobal\increment\numreferred
- \appended\gdef\publist{,#1}}}
+ \ifx\publist\empty \gdef\publist{#1}\else\appended\gdef\publist{,#1}\fi}
+ {\setxvalue{pbr-#1}{\getvalue{pbr-#1},\citationnumber}}}
\let\publist\empty
@@ -1009,8 +1154,6 @@
%D
%D In `normal' \TeX, of course there are expansion problems again.
-\def\gobbledef#1{\def#1##1{##1}}
-
\def\ixbibauthoryear#1#2#3#4%
{\bgroup
\gdef\ixlastcommand {#4}%
@@ -1043,7 +1186,7 @@
\edef\wantednumber{\the\scratchcounter}%
\getfromcommacommand[\thebibyears][\wantednumber]%
\@EA\def\@EA\currentbibyear\@EA{\commalistelement}%
- \def\@currentbibauthor{#1}% brr
+ \setcurrentbibauthor{#1}%
\ifnum\scratchcounter=\plusone
\ixfirstcommand
\else\ifnum \scratchcounter=\commalistsize\relax
@@ -1052,23 +1195,25 @@
\ixsecondcommand
\fi\fi}
-\def\currentbibauthor%
- {\getcommacommandsize[\@currentbibauthor]%
+\def\setcurrentbibauthor#1%
+ {\getcommacommandsize[#1]%
\ifcase\commalistsize
% anonymous?
+ \def\currentbibauthor{}%
\or
- \@currentbibauthor
+ \def\currentbibauthor{#1}%
\or
- \expanded{\docurrentbibauthor\@currentbibauthor}%
+ \expanded{\docurrentbibauthor#1}%
\else
% this can't happen/
+ \def\currentbibauthor{}%
\fi }
\def\docurrentbibauthor#1,#2%
{\doifemptyelse{#2}
- {#1\bibalternative{otherstext}}
- {#1\bibalternative{andtext}#2}}
+ {\def\currentbibauthor{#1\bibalternative{otherstext}}}
+ {\def\currentbibauthor{#1\bibalternative{andtext}#2}}}
%D This is not the one Hans made for me, because I need a global
%D edef, and the \type{\robustdoifinsetelse} doesn't listen to
@@ -1164,7 +1309,6 @@
\def\findmatchingyear
{\edef\wantednumber{\the\bibitemwanted}%
-% \message{year needed: \wantednumber (\thebibyears)}%
\getfromcommacommand[\thebibyears][\wantednumber]%
\ifx\commalistelement\empty
\edef\myyear{{\myyear}}%
@@ -1172,46 +1316,156 @@
\edef\myyear{{\commalistelement, \myyear}}%
\fi
\edef\newcommalistelement{\myyear}%
-% \message{bibyears \wantednumber = \newcommalistelement}%
\doglobal\replaceincommalist \thebibyears \wantednumber}
+
+%D \macros{preparebibrefprefix}
+%D
+%D The reference list only writes bare references when the criterium
+%D is `all'. Otherwise, a prefix is added to make sure that pdfTeX
+%D does not encounter duplicate named references. On the generation
+%D side, this is not a big problem. \type{\preparebibrefprefix}
+%D creates a suitable string to prepend if a prefix is needed.
+
+\def\preparebibrefprefix
+ {\let\dosetfilterlevel\patcheddosetfilterlevel
+ \dosettoclevel\??li{pubs}%
+ \let\dosetfilterlevel\normaldosetfilterlevel
+ \edef\bibrefprefix{\@@sectiontype\currentlevel\sectionseparator}}%
+
+%D \macros{preparebibreflist}
+%D
+%D But this optional prefixing is a bit of a problem on the
+%D other side. We would like to do \type{\goto{}[article-full]}
+%D but can't do it like that, because the actual label may be
+%D \type{1:2:0:3:4:article-full]} or so. The problem is solved
+%D by building a commalist that looks like this:
+%D \starttyping
+%D \def\bibreflist%
+%D {1:2:0:3:4:article-full,
+%D 1:2:0:3:article-full,
+%D 1:2:0:article-full,
+%D 1:2:article-full,
+%D 1:article-full,
+%D article-full}
+%D \stoptyping
+
+\def\preparebibreflist#1%
+ {\let\bibreflist\empty
+ \def\storeitem##1%
+ {\ifx\bibreflist\empty
+ \edef\prefix{##1\sectionseparator}%
+ \edef\bibreflist{\prefix#1,#1}%
+ \else
+ \edef\prefix{\prefix##1\sectionseparator}%
+ \edef\bibreflist{\prefix#1,\bibreflist}%
+ \fi}%
+ \expanded{\processseparatedlist[\bibrefprefix][\sectionseparator]}\storeitem }
+
+%D \macros{gotobiblink,inbiblink,atbiblink}
+%D
+%D The final task is looping over that list until a match is found.
+
+\newif\ifbibreffound
+
+\def\gotobiblink#1[#2]%
+ {\bgroup
+ \preparebibrefprefix
+ \preparebibreflist{#2}%
+ \global\bibreffoundfalse
+ \def\setuplink##1%
+ {\ifbibreffound\else
+ \doifreferencefoundelse
+ {##1}
+ {\global\bibreffoundtrue \goto{#1}[##1]}%
+ {}\fi}%
+ \processcommacommand[\bibreflist]\setuplink
+ \ifbibreffound \else \unknownreference{#2}\fi
+ \egroup }
+
+\def\atbiblink[#1]%
+ {\bgroup
+ \preparebibrefprefix
+ \preparebibreflist{#1}%
+ \global\bibreffoundfalse
+ \def\setuplink##1%
+ {\ifbibreffound\else
+ \doifreferencefoundelse
+ {##1}
+ {\global\bibreffoundtrue \at[##1]}%
+ {}\fi}%
+ \processcommacommand[\bibreflist]\setuplink
+ \ifbibreffound \else \unknownreference{#1}\fi
+ \egroup }
+
+\def\inbiblink[#1]%
+ {\bgroup
+ \preparebibrefprefix
+ \preparebibreflist{#1}%
+ \global\bibreffoundfalse
+ \def\setuplink##1%
+ {\ifbibreffound\else
+ \doifreferencefoundelse
+ {##1}
+ {\global\bibreffoundtrue \in[##1]}%
+ {}\fi}%
+ \processcommacommand[\bibreflist]\setuplink
+ \ifbibreffound \else \unknownreference{#1}\fi
+ \egroup }
+
%D \macros{bibauthoryearref,bibauthoryearsref,bibauthorref,bibyearref}
%D
%D Now that all the hard work has been done, these are simple.
%D \type{\ixbibauthoryearref} stores the data in the macros
%D \type{\currentbibauthor} and \type{\currentbibyear}.
+\def\ifbibinteractionelse%
+ {\edef\test{\bibalternative\c!interaction}%
+ \ifx\test\v!stop
+ \expandafter\secondoftwoarguments
+ \else
+ \expandafter\firstoftwoarguments
+ \fi}
+
+\def\bibmaybeinteractive#1#2%
+ {\ifbibcitecompress #2\else
+ \ifbibinteractionelse{\gotobiblink{#2}[#1]}{#2}\fi }
+
\def\bibauthoryearref[#1]%
{\ixbibauthoryear{#1}%
- {{\currentbibauthor}\bibalternative\c!inbetween
- \bibalternative\v!left{\currentbibyear}\bibalternative\v!right}
- {\bibalternative\c!pubsep{\currentbibauthor}\bibalternative\c!inbetween
- \bibalternative\v!left {\currentbibyear}\bibalternative\v!right}
- {\bibalternative\c!lastpubsep{\currentbibauthor}\bibalternative\c!inbetween
- \bibalternative\v!left {\currentbibyear}\bibalternative\v!right}}
+ {\bibmaybeinteractive{#1}{{\currentbibauthor}\bibalternative\c!inbetween
+ \bibalternative\v!left{\currentbibyear}\bibalternative\v!right}}
+ {\bibalternative\c!pubsep
+ \bibmaybeinteractive{#1}{{\currentbibauthor}\bibalternative\c!inbetween
+ \bibalternative\v!left {\currentbibyear}\bibalternative\v!right}}
+ {\bibalternative\c!lastpubsep
+ \bibmaybeinteractive{#1}{{\currentbibauthor}\bibalternative\c!inbetween
+ \bibalternative\v!left {\currentbibyear}\bibalternative\v!right}}}
\def\bibauthoryearsref[#1]%
{\bibalternative\v!left
\ixbibauthoryear{#1}
- {{\currentbibauthor}\bibalternative\c!inbetween{\currentbibyear}}
- {\bibalternative\c!pubsep {\currentbibauthor}\bibalternative\c!inbetween{\currentbibyear}}%
- {\bibalternative\c!lastpubsep{\currentbibauthor}\bibalternative\c!inbetween{\currentbibyear}}%
+ {\bibmaybeinteractive{#1}{{\currentbibauthor}\bibalternative\c!inbetween{\currentbibyear}}}
+ {\bibalternative\c!pubsep
+ \bibmaybeinteractive{#1}{{\currentbibauthor}\bibalternative\c!inbetween{\currentbibyear}}}
+ {\bibalternative\c!lastpubsep
+ \bibmaybeinteractive{#1}{{\currentbibauthor}\bibalternative\c!inbetween{\currentbibyear}}}%
\bibalternative\v!right}
\def\bibauthorref[#1]%
{\bibalternative\v!left
\ixbibauthoryear{#1}%
- {{\currentbibauthor}}
- {\bibalternative\c!pubsep {\currentbibauthor}}
- {\bibalternative\c!lastpubsep{\currentbibauthor}}%
+ {\bibmaybeinteractive{#1}{{\currentbibauthor}}}
+ {\bibalternative\c!pubsep \bibmaybeinteractive{#1}{{\currentbibauthor}}}
+ {\bibalternative\c!lastpubsep\bibmaybeinteractive{#1}{{\currentbibauthor}}}%
\bibalternative\v!right}
\def\bibyearref[#1]%
{\bibalternative\v!left
\ixbibauthoryear{#1}%
- {{\currentbibyear}}
- {\bibalternative\c!pubsep {\currentbibyear}}
- {\bibalternative\c!lastpubsep{\currentbibyear}}%
+ {\bibmaybeinteractive{#1}{{\currentbibyear}}}
+ {\bibalternative\c!pubsep \bibmaybeinteractive{#1}{{\currentbibyear}}}
+ {\bibalternative\c!lastpubsep\bibmaybeinteractive{#1}{{\currentbibyear}}}%
\bibalternative\v!right}
%D ML problems:
@@ -1234,7 +1488,8 @@
\def\dobibshortref#1%
{\addthisref{#1}\refsep
- \doifbibreferencefoundelse{#1}{\goto{\getvalue{pbds-#1}}[#1]}{??}}
+ \doifbibreferencefoundelse{#1}{\gotobiblink{\getvalue{pbds-#1}}[#1]}
+ {\unknownreference{#1}}}
\def\bibserialref[#1]%
@@ -1244,7 +1499,8 @@
\def\dobibserialref#1%
{\addthisref{#1}\refsep
- \doifbibreferencefoundelse{#1}{\getvalue{pbdn-#1}}{??}}
+ \doifbibreferencefoundelse{#1}{\gotobiblink{\getvalue{pbdn-#1}}[#1]}
+ {\unknownreference{#1}}}
\def\bibkeyref[#1]%
{\bibalternative\v!left
@@ -1252,9 +1508,12 @@
\bibalternative\v!right}
\def\dobibkeyref#1%
- {\addthisref{#1}\refsep#1}
+ {\addthisref{#1}\refsep\gotobiblink{#1}[#1]}
-\def\gotoDOI#1#2{\useURL[bibfoo#1][http://dx.doi.org/#2]\goto{\url[bibfoo#1]}[url(bibfoo#1)]}
+\def\gotoDOI#1#2%
+ {\ifbibinteractionelse
+ {\useURL[bibfoo#1][http://dx.doi.org/#2]\goto{\url[bibfoo#1]}[url(bibfoo#1)]}
+ {\hyphenatedurl{#2}}}
\def\bibdoiref[#1]%
{\bibalternative\v!left
@@ -1263,7 +1522,8 @@
\def\dobibdoiref#1%
{\addthisref{#1}\refsep
- \doifbibreferencefoundelse{#1}{\expanded{\gotoDOI{#1}{\getvalue{pbdo-#1}}}}{??}}
+ \doifbibreferencefoundelse{#1}{\expanded{\gotoDOI{#1}{\getvalue{pbdo-#1}}}}
+ {\unknownreference{#1}}}
\def\biburlref[#1]%
@@ -1271,11 +1531,15 @@
\firstreftrue\processcommalist[#1]\dobiburlref
\bibalternative\v!right}
-\def\gotoURL#1#2{\useURL[bibfoo#1][#2]\goto{\url[bibfoo#1]}[url(bibfoo#1)]}
+\def\gotoURL#1#2%
+ {\ifbibinteractionelse
+ {\useURL[bibfoo#1][#2]\goto{\url[bibfoo#1]}[url(bibfoo#1)]}
+ {\hyphenatedurl{#2}}}
\def\dobiburlref#1%
{\addthisref{#1}\refsep
- \doifbibreferencefoundelse{#1}{\expanded{\gotoURL{#1}{\getvalue{pbdu-#1}}}}{??}}
+ \doifbibreferencefoundelse{#1}{\expanded{\gotoURL{#1}{\getvalue{pbdu-#1}}}}
+ {\unknownreference{#1}}}
\def\bibtyperef[#1]%
{\bibalternative\v!left
@@ -1284,7 +1548,8 @@
\def\dobibtyperef#1%
{\addthisref{#1}\refsep
- \doifbibreferencefoundelse{#1}{\getvalue{pbdt-#1}}{??}}
+ \doifbibreferencefoundelse{#1}{\gotobiblink{\getvalue{pbdt-#1}}[#1]}
+ {\unknownreference{#1}}}
\def\bibpageref[#1]%
{\bibalternative\v!left
@@ -1292,7 +1557,8 @@
\bibalternative\v!right}
\def\dobibpageref#1%
- {\addthisref{#1}\refsep\at[#1]}
+ {\addthisref{#1}\refsep
+ \ifbibinteractionelse{\atbiblink[#1]}{{\referencingfalse\at[#1]}}}
\def\bibdataref[#1]%
{\bibalternative\v!left
@@ -1301,7 +1567,8 @@
\def\dobibdata#1%
{\addthisref{#1}\refsep
- \doifbibreferencefoundelse{#1}{\dotypesetapublication{#1}}{??}}
+ \doifbibreferencefoundelse{#1}{\dotypesetapublication{#1}}
+ {\unknownreference{#1}}}
\let\bibnoneref\nocite
@@ -1345,22 +1612,41 @@
\fi
\bibalternative\v!right}
-\def\dosimplebibnumref #1{\refsep\in[#1]}
+\def\dosimplebibnumref #1%
+ {\refsep\ifbibinteractionelse{\inbiblink[#1]}{{\referencingfalse\in[#1]}}}
+
\def\verysimplebibnumref#1{\doverysimplebibnumref#1}
\def\doverysimplebibnumref#1#2%
{\refsep
- \ifcase#1\relax ??\else
+ \ifcase#1\relax \unknownreference{#1}\else
\def\tempa{#2}\ifx\empty\tempa#1\else#1\bibalternative\c!inbetween#2\fi
\fi}
-%D And some defaults are loaded from bibl-apa:
+%D By request from Sanjoy. This makes it easier to implement
+%D \type{\citeasnoun}.
+
+\def\bibauthornumref[#1]%
+ {\getcommalistsize[#1]
+ \global\bibitemcounter\commalistsize
+ \firstreftrue
+ \processcommalist[#1]\dobibauthornumref }
-% hh: shouldn't those bibl files be made international ?
+\def\dobibauthornumref#1%
+ {\addthisref{#1}\refsep
+ \doifbibreferencefoundelse{#1}
+ {\getvalue{pbda-#1}%
+ \bibalternative\c!inbetween
+ \bibalternative\v!left
+ \ifbibinteractionelse{\inbiblink[#1]}{{\referencingfalse\in[#1]}}%
+ \bibalternative\v!right}
+ {\unknownreference{#1}}}
+
+%D And some defaults are loaded from bibl-apa:
\setuppublications
- [\c!alternative=apa]
+ [\v!month\v!conversion=,\c!alternative=apa]
\preloadbiblist
-\protect \endinput
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/bib/t-bibltx.tex b/tex/context/bib/t-bibltx.tex
new file mode 100644
index 000000000..cb9e787ad
--- /dev/null
+++ b/tex/context/bib/t-bibltx.tex
@@ -0,0 +1,75 @@
+%D \module
+%D [ file=t-bibltx,
+%D version=2005.01.04,
+%D title=\CONTEXT\ Publication Module,
+%D subtitle=Publications,
+%D author={Taco Hoekwater},
+%D date=\currentdate,
+%D copyright={Public Domain}]
+%C
+%C Donated to the public domain.
+
+%D \macros{newcommand}
+%D
+%D Just about all databases define something that uses
+%D \type {\newcommand}. This fake version does not cover
+%D everything \type {\newcommand} does, but it should be
+%D enough for simple definitions like the ones found in
+%D \BIBTEX\ files.
+
+\unprotect
+
+\def\@star@or@long#1%
+ {\doifnextcharelse*{\afterassignment#1\let\next=}{#1}}
+
+\def\newcommand
+ {\@star@or@long\new@command}
+
+\def\new@command#1%
+ {\@testopt{\@newcommand#1}0}
+
+\def\@newcommand#1[#2]%
+ {\doifnextcharelse[{\@xargdef#1[#2]}{\@argdef#1[#2]}}
+
+\long\def\@argdef#1[#2]#3%
+ {\@yargdef#1\@ne{#2}{#3}}
+
+\long\def\@xargdef#1[#2][#3]#4%
+ {\@EA\def\@EA#1\@EA{\@EA\do@testopt\@EA#1\csname\string#1\endcsname{#3}}%
+ \@EA\@yargdef\csname\string#1\endcsname\tw@{#2}{#4}}
+
+\def\@testopt#1#2%
+ {\doifnextcharelse[{#1}{#1[#2]}}
+
+\def\do@testopt#1%
+ {\expandafter\@testopt}
+
+\long\def\@yargdef#1#2#3%
+ {\!!counta#3\relax
+ \advance \!!counta \@ne
+ \let\@hash@\relax
+ \edef\!!tempa{\ifx#2\tw@ [\@hash@1]\fi}%
+ \!!countb #2%
+ \loop
+ \ifnum\!!countb <\!!counta
+ \edef\!!tempa{\!!tempa\@hash@\the\!!countb}%
+ \advance\!!countb \@ne
+ \repeat
+ \let\@hash@##%
+ \long\@EA\def\@EA#1\!!tempa}
+
+\long\def\@reargdef#1[#2]%
+ {\@yargdef#1\@ne{#2}}
+
+%D Something like the following is needed to support the
+%D average \LATEX-based \BIBTEX\ databases.
+%D
+%D \starttyping
+%D \let\textsc\kap
+%D \def\emph#1{{\em#1}}
+%D \let\sf\ss
+%D \stoptyping
+%D
+%D But we happily leave that to the user.
+
+\protect \endinput
diff --git a/tex/context/interface/cont-cz.xml b/tex/context/interface/cont-cz.xml
index ce881ea6d..4d2b4fb34 100644
--- a/tex/context/interface/cont-cz.xml
+++ b/tex/context/interface/cont-cz.xml
@@ -1615,6 +1615,11 @@
<cd:constant type="lokalne"/>
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="autosirka">
+ <cd:constant type="ano"/>
+ <cd:constant type="ne"/>
+ <cd:constant type="sila"/>
+ </cd:parameter>
<cd:parameter name="offset">
<cd:constant type="zadny"/>
<cd:constant type="prekryv"/>
@@ -5247,6 +5252,14 @@
<cd:parameter name="oddelovac">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="konverze">
+ <cd:constant type="cisla"/>
+ <cd:constant type="pismena"/>
+ <cd:constant type="Pismena"/>
+ <cd:constant type="rimskecislice"/>
+ <cd:constant type="Rimskecislice"/>
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
diff --git a/tex/context/interface/cont-de.xml b/tex/context/interface/cont-de.xml
index 0859070b7..a316ab0a6 100644
--- a/tex/context/interface/cont-de.xml
+++ b/tex/context/interface/cont-de.xml
@@ -1615,6 +1615,11 @@
<cd:constant type="lokal"/>
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="autobreite">
+ <cd:constant type="ja"/>
+ <cd:constant type="nein"/>
+ <cd:constant type="zwinge"/>
+ </cd:parameter>
<cd:parameter name="offset">
<cd:constant type="kein"/>
<cd:constant type="overlay"/>
@@ -5247,6 +5252,14 @@
<cd:parameter name="seperator">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="konversion">
+ <cd:constant type="ziffern"/>
+ <cd:constant type="buchstaben"/>
+ <cd:constant type="Buchstaben"/>
+ <cd:constant type="roemischezahlen"/>
+ <cd:constant type="Roemischezahlen"/>
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
diff --git a/tex/context/interface/cont-en.xml b/tex/context/interface/cont-en.xml
index f118229aa..2b39cefa2 100644
--- a/tex/context/interface/cont-en.xml
+++ b/tex/context/interface/cont-en.xml
@@ -1615,6 +1615,11 @@
<cd:constant type="local"/>
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="autowidth">
+ <cd:constant type="yes"/>
+ <cd:constant type="no"/>
+ <cd:constant type="force"/>
+ </cd:parameter>
<cd:parameter name="offset">
<cd:constant type="none"/>
<cd:constant type="overlay"/>
@@ -5247,6 +5252,14 @@
<cd:parameter name="separator">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="conversion">
+ <cd:constant type="numbers"/>
+ <cd:constant type="characters"/>
+ <cd:constant type="Characters"/>
+ <cd:constant type="romannumerals"/>
+ <cd:constant type="Romannumerals"/>
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
diff --git a/tex/context/interface/cont-fr.xml b/tex/context/interface/cont-fr.xml
index 7e9ad66a9..115df8b2a 100644
--- a/tex/context/interface/cont-fr.xml
+++ b/tex/context/interface/cont-fr.xml
@@ -1615,6 +1615,11 @@
<cd:constant type="local"/>
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="autolargeur">
+ <cd:constant type="oui"/>
+ <cd:constant type="non"/>
+ <cd:constant type="force"/>
+ </cd:parameter>
<cd:parameter name="offset">
<cd:constant type="rien"/>
<cd:constant type="revetement"/>
@@ -5247,6 +5252,14 @@
<cd:parameter name="separateur">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="conversion">
+ <cd:constant type="numeros"/>
+ <cd:constant type="caracteres"/>
+ <cd:constant type="Caracteres"/>
+ <cd:constant type="chiffresromains"/>
+ <cd:constant type="Chiffresromains"/>
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
diff --git a/tex/context/interface/cont-it.xml b/tex/context/interface/cont-it.xml
index 480b6098a..0a3ba26cc 100644
--- a/tex/context/interface/cont-it.xml
+++ b/tex/context/interface/cont-it.xml
@@ -1615,6 +1615,11 @@
<cd:constant type="locale"/>
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="autoampiezza">
+ <cd:constant type="si"/>
+ <cd:constant type="no"/>
+ <cd:constant type="forza"/>
+ </cd:parameter>
<cd:parameter name="offset">
<cd:constant type="nessuno"/>
<cd:constant type="sovrapponi"/>
@@ -5247,6 +5252,14 @@
<cd:parameter name="separatore">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="conversione">
+ <cd:constant type="numeri"/>
+ <cd:constant type="lettere"/>
+ <cd:constant type="Lettere"/>
+ <cd:constant type="numeriromani"/>
+ <cd:constant type="Numeriromani"/>
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
diff --git a/tex/context/interface/cont-nl.xml b/tex/context/interface/cont-nl.xml
index e74915152..92e6899b9 100644
--- a/tex/context/interface/cont-nl.xml
+++ b/tex/context/interface/cont-nl.xml
@@ -1615,6 +1615,11 @@
<cd:constant type="lokaal"/>
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="autobreedte">
+ <cd:constant type="ja"/>
+ <cd:constant type="nee"/>
+ <cd:constant type="forceer"/>
+ </cd:parameter>
<cd:parameter name="offset">
<cd:constant type="geen"/>
<cd:constant type="overlay"/>
@@ -5247,6 +5252,14 @@
<cd:parameter name="scheider">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="conversie">
+ <cd:constant type="cijfers"/>
+ <cd:constant type="letters"/>
+ <cd:constant type="Letters"/>
+ <cd:constant type="romeins"/>
+ <cd:constant type="Romeins"/>
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
diff --git a/tex/context/interface/cont-ro.xml b/tex/context/interface/cont-ro.xml
index 5a69366bb..967d0a9e9 100644
--- a/tex/context/interface/cont-ro.xml
+++ b/tex/context/interface/cont-ro.xml
@@ -1615,6 +1615,11 @@
<cd:constant type="local"/>
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="autolatime">
+ <cd:constant type="da"/>
+ <cd:constant type="nu"/>
+ <cd:constant type="fortat"/>
+ </cd:parameter>
<cd:parameter name="offset">
<cd:constant type="niciunul"/>
<cd:constant type="overlay"/>
@@ -5247,6 +5252,14 @@
<cd:parameter name="separator">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="conversie">
+ <cd:constant type="numere"/>
+ <cd:constant type="caractere"/>
+ <cd:constant type="Caractere"/>
+ <cd:constant type="numereromane"/>
+ <cd:constant type="Numereromane"/>
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml
index a4b077bae..5f31bdce3 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="2006.06.09 13:05">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2006.07.13 22:26">
<cd:variables>
<cd:variable name="one" value="jedna"/>
@@ -183,6 +183,7 @@
<cd:constant name="topoffset" value="offsetvrsku"/>
<cd:constant name="topstate" value="statusvrsku"/>
<cd:constant name="width" value="sirka"/>
+ <cd:constant name="autowidth" value="autosirka"/>
<cd:constant name="maxwidth" value="maxsirka"/>
<cd:constant name="minwidth" value="minsirka"/>
<cd:constant name="source" value="zdroj"/>
diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml
index 8e9d30ff2..0c2b50ec2 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="2006.06.09 13:05">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2006.07.13 22:26">
<cd:variables>
<cd:variable name="one" value="eins"/>
@@ -183,6 +183,7 @@
<cd:constant name="topoffset" value="obenoffset"/>
<cd:constant name="topstate" value="statusoben"/>
<cd:constant name="width" value="breite"/>
+ <cd:constant name="autowidth" value="autobreite"/>
<cd:constant name="maxwidth" value="maxbreite"/>
<cd:constant name="minwidth" value="minbreite"/>
<cd:constant name="source" value="quelle"/>
diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml
index 0fe262c0e..155e84be6 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="2006.06.09 13:05">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2006.07.13 22:26">
<cd:variables>
<cd:variable name="one" value="one"/>
@@ -183,6 +183,7 @@
<cd:constant name="topoffset" value="topoffset"/>
<cd:constant name="topstate" value="topstate"/>
<cd:constant name="width" value="width"/>
+ <cd:constant name="autowidth" value="autowidth"/>
<cd:constant name="maxwidth" value="maxwidth"/>
<cd:constant name="minwidth" value="minwidth"/>
<cd:constant name="source" value="source"/>
diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml
index f8156e14e..5c590c261 100644
--- a/tex/context/interface/keys-fr.xml
+++ b/tex/context/interface/keys-fr.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2006.06.09 13:05">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2006.07.13 22:26">
<cd:variables>
<cd:variable name="one" value="un"/>
@@ -183,6 +183,7 @@
<cd:constant name="topoffset" value="decalagesup"/>
<cd:constant name="topstate" value="etatsup"/>
<cd:constant name="width" value="largeur"/>
+ <cd:constant name="autowidth" value="autolargeur"/>
<cd:constant name="maxwidth" value="largeurmax"/>
<cd:constant name="minwidth" value="largeurmin"/>
<cd:constant name="source" value="origine"/>
diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml
index 6e281b78a..0c1c4c367 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="2006.06.09 13:05">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2006.07.13 22:26">
<cd:variables>
<cd:variable name="one" value="uno"/>
@@ -183,6 +183,7 @@
<cd:constant name="topoffset" value="offsetcima"/>
<cd:constant name="topstate" value="statocima"/>
<cd:constant name="width" value="ampiezza"/>
+ <cd:constant name="autowidth" value="autoampiezza"/>
<cd:constant name="maxwidth" value="ampiezzamax"/>
<cd:constant name="minwidth" value="ampiezzamin"/>
<cd:constant name="source" value="origine"/>
diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml
index f780a39d2..9a119e474 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="2006.06.09 13:05">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2006.07.13 22:26">
<cd:variables>
<cd:variable name="one" value="een"/>
@@ -183,6 +183,7 @@
<cd:constant name="topoffset" value="bovenoffset"/>
<cd:constant name="topstate" value="bovenstatus"/>
<cd:constant name="width" value="breedte"/>
+ <cd:constant name="autowidth" value="autobreedte"/>
<cd:constant name="maxwidth" value="maxbreedte"/>
<cd:constant name="minwidth" value="minbreedte"/>
<cd:constant name="source" value="bron"/>
diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml
index a1d740f38..98f5bc8ac 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="2006.06.09 13:05">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2006.07.13 22:26">
<cd:variables>
<cd:variable name="one" value="unu"/>
@@ -183,6 +183,7 @@
<cd:constant name="topoffset" value="offsetsus"/>
<cd:constant name="topstate" value="staresus"/>
<cd:constant name="width" value="latime"/>
+ <cd:constant name="autowidth" value="autolatime"/>
<cd:constant name="maxwidth" value="latimemaxima"/>
<cd:constant name="minwidth" value="latimeminima"/>
<cd:constant name="source" value="sursa"/>
diff --git a/tex/context/interface/t-bib.xml b/tex/context/interface/t-bib.xml
index 526e2fdf6..02af330a0 100644
--- a/tex/context/interface/t-bib.xml
+++ b/tex/context/interface/t-bib.xml
@@ -22,6 +22,7 @@
</cd:parameter>
<cd:parameter name="refcommand">
<cd:constant type="author"/>
+ <cd:constant type="authornum"/>
<cd:constant type="authoryear"/>
<cd:constant type="authoryears" default="yes"/>
<cd:constant type="key"/>
@@ -53,6 +54,9 @@
<cd:constant type="yes"/>
<cd:constant type="no" default="yes"/>
</cd:parameter>
+ <cd:parameter name="monthconversion">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -330,6 +334,15 @@
</cd:arguments>
</cd:command>
+<cd:command name="nocite" file="t-bib.tex">
+ <cd:sequence>
+ <cd:string value="nocite"/>
+ </cd:sequence>
+ <cd:arguments>
+ <cd:reference list="yes"/>
+ </cd:arguments>
+</cd:command>
+
<cd:command name="citealt" file="t-bib.tex">
<cd:sequence>
<cd:string value="cite"/>
diff --git a/tpm/t-bib.tpm b/tpm/t-bib.tpm
index c0786ca90..f40a3ad82 100644
--- a/tpm/t-bib.tpm
+++ b/tpm/t-bib.tpm
@@ -3,17 +3,17 @@
<rdf:Description about="http://dl.contextgarden.net/modules/t-bib.zip">
<TPM:Name>t-bib</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/04/11 00:00:00</TPM:Date>
- <TPM:Version>2006.04.11</TPM:Version>
+ <TPM:Date>2006/07/13 12:00:00</TPM:Date>
+ <TPM:Version>2006.07.13</TPM:Version>
<TPM:Creator>taco</TPM:Creator>
<TPM:Title>ConTeXt Bibliographies</TPM:Title>
<TPM:Description>
A bibliographic subsystem for ConTeXt
</TPM:Description>
<TPM:Author>Taco Hoekwater</TPM:Author>
- <TPM:Size>520061</TPM:Size>
+ <TPM:Size>540927</TPM:Size>
<TPM:Build/>
- <TPM:RunFiles size="233285">
+ <TPM:RunFiles size="245716">
tex/context/bib/bibl-ams.tex
tex/context/bib/bibl-apa-de.tex
tex/context/bib/bibl-apa-fr.tex
@@ -23,6 +23,7 @@ tex/context/bib/bibl-num-fr.tex
tex/context/bib/bibl-num.tex
tex/context/bib/bibl-ssa.tex
tex/context/bib/t-bib.tex
+tex/context/bib/t-bibltx.tex
tex/context/interface/t-bib.xml
bibtex/bst/context/cont-ab.bst
bibtex/bst/context/cont-au.bst
@@ -30,7 +31,7 @@ bibtex/bst/context/cont-no.bst
bibtex/bst/context/cont-ti.bst
tpm/t-bib.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="286776">
+ <TPM:DocFiles size="295211">
doc/context/bib/bibmod-doc.pdf
doc/context/bib/bibmod-doc.tex
</TPM:DocFiles>