summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--metapost/context/base/mp-figs.mp2
-rw-r--r--metapost/context/base/mp-spec.mp21
-rw-r--r--scripts/context/ruby/base/tex.rb51
-rw-r--r--scripts/context/ruby/base/texutil.rb11
-rw-r--r--scripts/context/ruby/ctxtools.rb2
-rw-r--r--scripts/context/ruby/texexec.rb3
-rw-r--r--scripts/context/ruby/texmfstart.rb22
-rwxr-xr-xscripts/context/stubs/mswin/luatools.bat2
-rwxr-xr-xscripts/context/stubs/mswin/mtxtools.bat2
-rwxr-xr-xscripts/context/stubs/unix/luatools2
-rwxr-xr-xscripts/context/stubs/unix/mtxtools2
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex8
-rw-r--r--tex/context/base/core-con.tex12
-rw-r--r--tex/context/base/core-des.tex142
-rw-r--r--tex/context/base/core-itm.tex228
-rw-r--r--tex/context/base/core-job.tex3
-rw-r--r--tex/context/base/core-ltb.tex111
-rw-r--r--tex/context/base/core-mat.tex158
-rw-r--r--tex/context/base/core-mis.tex58
-rw-r--r--tex/context/base/core-not.tex6
-rw-r--r--tex/context/base/core-num.tex4
-rw-r--r--tex/context/base/core-ref.tex7
-rw-r--r--tex/context/base/core-reg.mkii33
-rw-r--r--tex/context/base/core-reg.tex61
-rw-r--r--tex/context/base/core-spa.mkii46
-rw-r--r--tex/context/base/core-spa.tex103
-rw-r--r--tex/context/base/core-syn.mkii28
-rw-r--r--tex/context/base/core-syn.tex77
-rw-r--r--tex/context/base/core-trf.tex1
-rw-r--r--tex/context/base/core-two.mkii2
-rw-r--r--tex/context/base/core-uti.tex66
-rw-r--r--tex/context/base/core-var.tex38
-rw-r--r--tex/context/base/core-ver.mkii2
-rw-r--r--tex/context/base/enco-cyr.tex20
-rw-r--r--tex/context/base/lang-ini.mkii14
-rw-r--r--tex/context/base/lang-ini.tex13
-rw-r--r--tex/context/base/lang-sla.tex59
-rw-r--r--tex/context/base/m-newmat.tex60
-rw-r--r--tex/context/base/m-streams.tex3
-rw-r--r--tex/context/base/math-ini.tex43
-rw-r--r--tex/context/base/math-tex.tex31
-rw-r--r--tex/context/base/meta-tex.tex2
-rw-r--r--tex/context/base/mult-con.tex53
-rw-r--r--tex/context/base/mult-ini.tex11
-rw-r--r--tex/context/base/page-flt.tex7
-rw-r--r--tex/context/base/page-ini.tex13
-rw-r--r--tex/context/base/page-lin.tex5
-rw-r--r--tex/context/base/page-mul.tex6
-rw-r--r--tex/context/base/page-txt.tex3
-rw-r--r--tex/context/base/regi-ini.tex2
-rw-r--r--tex/context/base/s-abr-01.tex24
-rw-r--r--tex/context/base/s-fnt-02.tex39
-rw-r--r--tex/context/base/sort-def.mkii450
-rw-r--r--tex/context/base/sort-def.tex432
-rw-r--r--tex/context/base/sort-ini.mkii137
-rw-r--r--tex/context/base/sort-ini.tex127
-rw-r--r--tex/context/base/sort-lan.mkii203
-rw-r--r--tex/context/base/sort-lan.tex189
-rw-r--r--tex/context/base/spec-fdf.tex30
-rw-r--r--tex/context/base/spec-tpd.tex27
-rw-r--r--tex/context/base/spec-xet.tex4
-rw-r--r--tex/context/base/supp-box.tex26
-rw-r--r--tex/context/base/supp-mat.tex98
-rw-r--r--tex/context/base/supp-mps.tex32
-rw-r--r--tex/context/base/type-xtx.tex270
-rw-r--r--tex/context/base/verb-ini.tex5
-rw-r--r--tex/context/base/verb-xml.tex30
-rw-r--r--tex/context/base/x-contml.tex10
-rw-r--r--tex/context/base/x-newmml.tex270
-rw-r--r--tex/context/base/x-newmmo.tex12
-rw-r--r--tex/context/base/x-om2cml.xsl48
-rw-r--r--tex/context/base/x-sm2om.xsl4
-rw-r--r--tex/context/base/xtag-pre.tex2
-rw-r--r--tex/context/base/xtag-run.tex2
-rw-r--r--tex/context/interface/cont-cz.xml42
-rw-r--r--tex/context/interface/cont-de.xml42
-rw-r--r--tex/context/interface/cont-en.xml42
-rw-r--r--tex/context/interface/cont-fr.xml42
-rw-r--r--tex/context/interface/cont-it.xml42
-rw-r--r--tex/context/interface/cont-nl.xml42
-rw-r--r--tex/context/interface/cont-ro.xml42
-rw-r--r--tex/context/interface/keys-cz.xml17
-rw-r--r--tex/context/interface/keys-de.xml17
-rw-r--r--tex/context/interface/keys-en.xml17
-rw-r--r--tex/context/interface/keys-fr.xml17
-rw-r--r--tex/context/interface/keys-it.xml17
-rw-r--r--tex/context/interface/keys-nl.xml17
-rw-r--r--tex/context/interface/keys-ro.xml17
-rw-r--r--tex/context/sample/zapf.tex2
-rw-r--r--tex/generic/context/ppchtex.noc4
-rw-r--r--web2c/context.cnf16
92 files changed, 3189 insertions, 1378 deletions
diff --git a/metapost/context/base/mp-figs.mp b/metapost/context/base/mp-figs.mp
index aa6bc0399..da5fa0d16 100644
--- a/metapost/context/base/mp-figs.mp
+++ b/metapost/context/base/mp-figs.mp
@@ -22,7 +22,7 @@ def registerfigure(expr name,width,height) =
begingroup ;
save s ; string s ; s := cleanstring(name) ;
scantokens( s & "_width := " & decimal(width)) ;
- scantokens( s & "_height := " & decimal(width)) ;
+ scantokens( s & "_height := " & decimal(height)) ;
endgroup ;
enddef ;
diff --git a/metapost/context/base/mp-spec.mp b/metapost/context/base/mp-spec.mp
index 6c5a557b4..d6f68665b 100644
--- a/metapost/context/base/mp-spec.mp
+++ b/metapost/context/base/mp-spec.mp
@@ -13,6 +13,27 @@
% Spot colors are not handled by mptopdf !
+% let graycolor = numeric ;
+% let greycolor = numeric ;
+% let withanycolor = withcolor ;
+
+% rgbcolor red ; red := (1,0,0) ;
+% rgbcolor green ; green := (0,1,0) ;
+% rgbcolor blue ; blue := (0,0,1) ;
+% cmykcolor cyan ; cyan := (1,0,0,0) ;
+% cmykcolor magenta ; magenta := (0,1,0,0) ;
+% cmykcolor yellow ; yellow := (0,0,1,0) ;
+% graycolor black ; black := 0 ; % (0) ;
+% graycolor white ; white := 1 ; % (1) ;
+
+% primarydef p withcolor c =
+% p withanycolor (c)
+% enddef ;
+
+% fill fullcircle scaled 10cm withcolor cyan ;
+% fill fullcircle scaled 7cm withcolor red ;
+% fill fullcircle scaled 4cm withcolor white ;
+
% (r,g,b) => cmyk : r=123 g= 1 b=hash
% => spot : r=123 g= 2 b=hash
% => transparent rgb : r=123 g= 3 b=hash
diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb
index 6c77ab059..ceb9473c0 100644
--- a/scripts/context/ruby/base/tex.rb
+++ b/scripts/context/ruby/base/tex.rb
@@ -610,15 +610,12 @@ class TEX
report('using existing database')
else
report('updating file database')
- Kpse.update
+ Kpse.update # obsolete here
if getvariable('luatex') then
begin
- luatools = `texmfstart luatools --format=texmfscripts luatools.lua`.chomp.strip
- unless luatools.empty? then
- runcommand(["luatex","--luaonly #{luatools}","--generate","--verbose"])
- end
+ runcommand(["luatools","--generate","--verbose"])
rescue
- report("run 'luatex --luaonly pathto/luatools.lua --generate' manually")
+ report("run 'luatools --generate' manualy")
exit
end
end
@@ -816,7 +813,7 @@ class TEX
private
- def makeuserfile
+ def makeuserfile # not used in luatex (yet)
language = getvariable('language')
mainlanguage = getvariable('mainlanguage')
bodyfont = getvariable('bodyfont')
@@ -1159,18 +1156,22 @@ class TEX
public
- def run_luatools(args)
+ # def run_luatools(args)
# dirty trick: we know that the lua path is relative to the ruby path; of course this
# will not work well when stubs are used
- [(ENV["_CTX_K_S_texexec_"] or ENV["_CTX_K_S_THREAD_"] or ENV["TEXMFSTART.THREAD"]), File.dirname($0)].each do |path|
- if path then
- script = "#{path}/../lua/luatools.lua"
- if FileTest.file?(script) then
- return runcommand("luatex --luaonly #{script} #{args}")
- end
- end
- end
- return runcommand("texmfstart luatools #{args}")
+ # [(ENV["_CTX_K_S_texexec_"] or ENV["_CTX_K_S_THREAD_"] or ENV["TEXMFSTART.THREAD"]), File.dirname($0)].each do |path|
+ # if path then
+ # script = "#{path}/../lua/luatools.lua"
+ # if FileTest.file?(script) then
+ # return runcommand("luatex --luaonly #{script} #{args}")
+ # end
+ # end
+ # end
+ # return runcommand("texmfstart luatools #{args}")
+ # end
+
+ def run_luatools(args)
+ return runcommand("luatools #{args}")
end
def processmpgraphic
@@ -1789,10 +1790,10 @@ end
forcexml = getvariable('forcexml')
- # if dummyfile || forcexml then # after ctx?
- # jobsuffix = makestubfile(rawname,rawbase,forcexml)
- # checkxmlfile(rawname)
- # end
+if dummyfile || forcexml then # after ctx?
+ jobsuffix = makestubfile(rawname,rawbase,forcexml)
+ checkxmlfile(rawname)
+end
# preprocess files
@@ -1864,10 +1865,10 @@ end
globalfile = getvariable('globalfile')
forcexml = getvariable('forcexml') # can be set in ctx file
- if dummyfile || forcexml then # after ctx?
- jobsuffix = makestubfile(rawname,rawbase,forcexml)
- checkxmlfile(rawname)
- end
+if dummyfile || forcexml then # after ctx?
+ jobsuffix = makestubfile(rawname,rawbase,forcexml)
+ checkxmlfile(rawname)
+end
result = File.unixfied(result)
diff --git a/scripts/context/ruby/base/texutil.rb b/scripts/context/ruby/base/texutil.rb
index 31f0efb51..726e31381 100644
--- a/scripts/context/ruby/base/texutil.rb
+++ b/scripts/context/ruby/base/texutil.rb
@@ -433,8 +433,8 @@ class TeXUtil
def MyExtras::writer(logger,handle)
handle << logger.banner("programs: #{@@programs.size}")
- @@programs.each do |p|
- handle << "% #{p} (#{@@programs[p.to_i]})\n"
+ @@programs.each_with_index do |cmd, p|
+ handle << "% #{p+1} (#{cmd})\n"
end
end
@@ -447,12 +447,11 @@ class TeXUtil
end
def MyExtras::finalizer(logger)
-unless (ENV["CTX.TEXUTIL.EXTRAS"] =~ /^(no|off|false|0)$/io) || (ENV["CTX_TEXUTIL_EXTRAS"] =~ /^(no|off|false|0)$/io) then
- @@programs.each do |p|
- cmd = @@programs[p.to_i]
+ unless (ENV["CTX.TEXUTIL.EXTRAS"] =~ /^(no|off|false|0)$/io) || (ENV["CTX_TEXUTIL_EXTRAS"] =~ /^(no|off|false|0)$/io) then
+ @@programs.each do |cmd|
logger.report("running #{cmd}")
system(cmd)
-end
+ end
end
end
diff --git a/scripts/context/ruby/ctxtools.rb b/scripts/context/ruby/ctxtools.rb
index 27240583a..85b079ee1 100644
--- a/scripts/context/ruby/ctxtools.rb
+++ b/scripts/context/ruby/ctxtools.rb
@@ -534,7 +534,7 @@ class Commands
]
$dontasksuffixes = [
"mp(graph|run)\\.mp", "mp(graph|run)\\.mpd", "mp(graph|run)\\.mpo", "mp(graph|run)\\.mpy",
- "mp(graph|run)\\.\\d+",
+ "mp(graph|run)\\.\\d+", "mp(graph|run)\\.mp.keep",
"xlscript\\.xsl"
]
$forsuresuffixes = [
diff --git a/scripts/context/ruby/texexec.rb b/scripts/context/ruby/texexec.rb
index 568bbee1c..3ba3388f0 100644
--- a/scripts/context/ruby/texexec.rb
+++ b/scripts/context/ruby/texexec.rb
@@ -430,10 +430,11 @@ class Commands
if f = File.open(job.tempfilename('tex'),'w') then
scale = @commandline.checkedoption('scale')
begin
- scale = (scale.to_i * 1000).to_i if scale.to_i < 10
+ scale = (scale.to_f * 1000.0).to_i if scale.to_i < 10
rescue
scale = 1000
end
+ scale = scale.to_i
paperoffset = @commandline.checkedoption('paperoffset', '0cm')
f << "\\starttext\n"
files.each do |filename|
diff --git a/scripts/context/ruby/texmfstart.rb b/scripts/context/ruby/texmfstart.rb
index f60011d1d..4273de7bc 100644
--- a/scripts/context/ruby/texmfstart.rb
+++ b/scripts/context/ruby/texmfstart.rb
@@ -43,7 +43,7 @@ require "md5"
# kpse_merge_start
-# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpseremote.rb'
+# kpse_merge_file: 'c:/data/develop/context/ruby/base/kpseremote.rb'
# kpse_merge_done: require 'base/kpsefast'
@@ -163,7 +163,7 @@ class KpseRemote
end
-# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpsefast.rb'
+# kpse_merge_file: 'c:/data/develop/context/ruby/base/kpsefast.rb'
# module : base/kpsefast
# copyright : PRAGMA Advanced Document Engineering
@@ -1097,7 +1097,7 @@ end
-# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpse/drb.rb'
+# kpse_merge_file: 'c:/data/develop/context/ruby/base/kpse/drb.rb'
require 'drb'
# kpse_merge_done: require 'base/kpse/trees'
@@ -1157,7 +1157,7 @@ end
#
-# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpse/trees.rb'
+# kpse_merge_file: 'c:/data/develop/context/ruby/base/kpse/trees.rb'
require 'monitor'
# kpse_merge_done: require 'base/kpsefast'
@@ -1245,7 +1245,7 @@ class KpseTrees < Monitor
end
-# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpsedirect.rb'
+# kpse_merge_file: 'c:/data/develop/context/ruby/base/kpsedirect.rb'
class KpseDirect
@@ -1283,7 +1283,7 @@ class KpseDirect
end
-# kpse_merge_file: 'C:/data/develop/context/ruby/base/merge.rb'
+# kpse_merge_file: 'c:/data/develop/context/ruby/base/merge.rb'
# module : base/merge
# copyright : PRAGMA Advanced Document Engineering
@@ -1475,8 +1475,8 @@ $predefined['pdftools'] = 'pdftools.rb'
$predefined['mpstools'] = 'mpstools.rb'
$predefined['exatools'] = 'exatools.rb'
$predefined['xmltools'] = 'xmltools.rb'
-$predefined['luatools'] = 'luatools.lua'
-$predefined['mtxtools'] = 'mtxtools.rb'
+# $predefined['luatools'] = 'luatools.lua'
+# $predefined['mtxtools'] = 'mtxtools.rb'
$predefined['newpstopdf'] = 'pstopdf.rb'
$predefined['newtexexec'] = 'texexec.rb'
@@ -1501,8 +1501,8 @@ $makelist = [
'exatools',
'runtools',
'rlxtools',
- 'luatools',
- 'mtxtools',
+ # 'luatools',
+ # 'mtxtools',
#
# no, 'texmfstart'
]
@@ -1537,7 +1537,7 @@ def set_applications(page=1)
$applications['htm'] = $applications['html']
$applications['eps'] = $applications['ps']
- $runners['lua'] = "luatex --luaonly"
+ $runners['lua'] = "texlua"
end
diff --git a/scripts/context/stubs/mswin/luatools.bat b/scripts/context/stubs/mswin/luatools.bat
deleted file mode 100755
index 707657fad..000000000
--- a/scripts/context/stubs/mswin/luatools.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-texmfstart luatools.lua %*
diff --git a/scripts/context/stubs/mswin/mtxtools.bat b/scripts/context/stubs/mswin/mtxtools.bat
deleted file mode 100755
index b658116a5..000000000
--- a/scripts/context/stubs/mswin/mtxtools.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-texmfstart mtxtools.rb %*
diff --git a/scripts/context/stubs/unix/luatools b/scripts/context/stubs/unix/luatools
deleted file mode 100755
index cb3ec1add..000000000
--- a/scripts/context/stubs/unix/luatools
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-texmfstart luatools.lua "$@"
diff --git a/scripts/context/stubs/unix/mtxtools b/scripts/context/stubs/unix/mtxtools
deleted file mode 100755
index 2922e0b46..000000000
--- a/scripts/context/stubs/unix/mtxtools
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-texmfstart mtxtools.rb "$@"
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 802ab384e..d8cea5446 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -13,7 +13,7 @@
% it's about time to clean up this file ...
-\newcontextversion{2007.03.22 13:34}
+\newcontextversion{2007.07.24 14:36}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 4dfdcfcbe..b2ce3632e 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -42,7 +42,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2007.04.17 12:51}
+\edef\contextversion{2007.07.24 14:36}
%D For those who want to use this:
@@ -203,8 +203,12 @@
\loadmkivfile{char-def.tex}
\loadmkivfile{char-utf.tex}
+\loadmkivfile{toks-ini.tex}
+
+\loadmkivfile{attr-ini.tex}
\loadmkivfile{node-ini.tex}
+
%D We also use some third party macros. These are loaded by
%D saying:
@@ -406,7 +410,7 @@
%D content. Here we also redefine \type{\it} as {\it italic}
%D instead of italian.
-\loadmkivfile{font-set.tex}
+% \loadmkivfile{font-set.tex} -- experimental but now obsolete
\loadcorefile{font-ini.tex}
\loadcorefile{font-uni.tex}
diff --git a/tex/context/base/core-con.tex b/tex/context/base/core-con.tex
index 5594ccadd..1ad728702 100644
--- a/tex/context/base/core-con.tex
+++ b/tex/context/base/core-con.tex
@@ -588,9 +588,13 @@
%D Taco's modulo code is implemented in the system module
%D \type {syst-con}.
+%D If a conversion is just a font switch then we need to make sure
+%D that the number is indeed end up as number in the input, so we
+%D need to handle the second argument.
+
\beginETEX \ifcsname
-\def\convertnumber#1%
+\def\convertnumber#1#2%
{\csname\??cv
\ifcsname\??cv\currentlanguage#1\endcsname
\currentlanguage#1%
@@ -599,7 +603,7 @@
\else
\s!default
\fi\fi
- \endcsname}
+ \endcsname{\number#2}}
\def\doifconversiondefinedelse#1%
{\ifcsname\??cv\currentlanguage#1\endcsname
@@ -614,7 +618,7 @@
\beginTEX
-\def\convertnumber#1%
+\def\convertnumber#1#2%
{\csname\??cv
\@EA\ifx\csname\??cv\currentlanguage#1\endcsname\relax
\@EA\ifx\csname\??cv#1\endcsname\relax
@@ -625,7 +629,7 @@
\else
\currentlanguage#1%
\fi
- \endcsname}
+ \endcsname{\number#2}}
\def\doifconversiondefinedelse#1%
{\@EA\ifx\csname\??cv\currentlanguage#1\endcsname\relax
diff --git a/tex/context/base/core-des.tex b/tex/context/base/core-des.tex
index 7b786ec94..1c37b655c 100644
--- a/tex/context/base/core-des.tex
+++ b/tex/context/base/core-des.tex
@@ -13,9 +13,27 @@
\writestatus{loading}{Context Core Macros / Descriptions}
-\unprotect
+%D In order to be more flexible with theorems Aditya Mahajan added
+%D support for titles and endsymbols. At the same time we some more
+%D flexible support for inheriting numbers was added.
+
+%D \startbuffer
+%D \defineenumeration[one]
+%D \defineenumeration[two] [one]
+%D \defineenumeration[three] [number=one,style=slanted]
+%D \defineenumeration[four] [three]
+%D \defineenumeration[five] [three] [number=five]
+%D
+%D \startone test test 1 \stopone
+%D \starttwo test test 2 \stoptwo
+%D \startthree test test 3 \stopthree
+%D \startfour test test 4 \stopfour
+%D \startfive test test 1 \stopfive
+%D \stopbuffer
+%D
+%D \typebuffer \start \getbuffer \stop
-% beware: \insidedescription should be set to zero inside footnotes
+\unprotect
% Dit kan en moet dus anders:
%
@@ -242,13 +260,13 @@
\advance\leftskip -\leftskipadaption \relax
\ifdim\leftskipadaption=\zeropoint
\leftskipadaption1.5em % just some default
- \ifnum\insidedescription=\plusone
+ \ifnum\nesteddescriptionstate=\plusone
\ifdim\leftskip>\zeropoint \relax
\leftskipadaption\leftskip
\fi
\fi
\fi
- \ifnum\insidedescription>\zerocount % was \ifnum\insidedescription=\plusone
+ \ifnum\nesteddescriptionstate>\zerocount % was \ifnum\nesteddescriptionstate=\plusone
\advance\leftskip \leftskipadaption % but we're already further on
\fi
\hskip-\leftskipadaption
@@ -269,7 +287,7 @@
%D A new key 'headalign' in definitions.
\def\resetdescriptions % to be used in e.g. footnotes
- {\chardef\insidedescription\zerocount}
+ {\chardef\nesteddescriptionstate\zerocount}
\resetdescriptions
@@ -312,20 +330,22 @@
\doifelse{\descriptionparameter\c!aligntitle}\v!no
{\edef\@@leftdescriptionskip {\the\leftskip }%
\edef\@@rightdescriptionskip{\the\rightskip}}
- {\ifcase\insidedescription
+ {\ifcase\nesteddescriptionstate
\edef\@@leftdescriptionskip {\the\leftskip }%
\edef\@@rightdescriptionskip{\the\rightskip}%
\fi}%
\expanded{\indenting[\descriptionparameter\c!indenting]}%
% better a system mode
- \ifcase\insidedescription
- \chardef\insidedescription\plusone
+ \ifcase\nesteddescriptionstate
+ \chardef\nesteddescriptionstate\plusone
\or
- \chardef\insidedescription\plustwo
- \fi} % now happens elsewhere : \noindent\ignorespaces
+ \chardef\nesteddescriptionstate\plustwo
+ \fi% now happens elsewhere : \noindent\ignorespaces
+ \@@resetdescriptionclosesymbol}
\def\@@stopdescription#1%
{\def\currentdescription{#1}%
+ \@@placedescriptionclosesymbol
% was \par \dostopattributes % here, else problems with interlinespace and font change
\dostopparbasedattributes % == \settrue\parbasedattributes \dostopattributes
\endgroup
@@ -344,13 +364,17 @@
\def\@@startdescription[#1][#2]%
{\def\currentdescription{#1}%
\doifelse{\descriptionparameter\c!title}\v!yes
- {\dowithwargument{\@@startsomedescription{#1}[#2]}}
+ % {\dowithwargument{\@@startsomedescription{#1}[#2]}} % patched for theorems
+ {\permitspacesbetweengroups
+ \dodoublegroupempty{\@@startsomedescription{#1}[#2]}}
{\@@startsomedescription{#1}[#2]{}}}
\def\@@description[#1][#2]%
{\def\currentdescription{#1}%
\doifelse{\descriptionparameter\c!title}\v!yes
- {\dowithwargument{\@@somedescription{#1}[#2]}}
+ % {\dowithwargument{\@@somedescription{#1}[#2]}} % patched for theorems
+ {\permitspacesbetweengroups
+ \dodoublegroupempty{\@@somedescription{#1}[#2]}}
{\@@somedescription{#1}[#2]{}}}
% these call:
@@ -398,11 +422,12 @@
{\copyparameters[\??dd#1][\??dd]
[\c!location,\c!headstyle,\c!style,\c!color,\c!headcolor,\c!title,
\c!width,\c!hang,\c!sample,\c!before,\c!inbetween,\c!after,\c!margin,
- \c!indenting,\c!indentnext,\c!align,\c!text,\c!distance,\c!titledistance,\c!command]%
+ \c!indenting,\c!indentnext,\c!align,\c!text,\c!distance,\c!titledistance,\c!command,
+ \c!titleleft,\c!titleright,\c!closesymbol,\c!closecommand]%
\getparameters[\??dd#1]
[\c!title=\v!yes,\s!do\c!command=\normal@@descriptionhandler,
\c!type=\v!description,\c!list=,\c!listtext=,
- \c!level=,#2]%
+ \c!level=,#2]%AM?? Why do we have title=yes here?
%\doifvalue{\??dd#1\c!location}\v!top{\doassign[\??dd#1][\c!inbetween=\blank]}%
\doifvalue{\??dd#1\c!location}\v!top % we actually need more granularity
{\doifnotvalue{\??dd#1\c!inbetween}{\doassign[\??dd#1][\c!inbetween=\blank]}}%
@@ -464,12 +489,12 @@
{\??dd\currentdescription}\c!headstyle\c!headcolor % todo: sub as well
{\descriptionparameter\c!command
{\showdntext
- \domakednnumber
- \doif{\descriptionparameter\c!title}\v!yes % new, for david antos
- {\doattributes{\??dd\currentdescription}\c!titlestyle\c!titlecolor
- {\hskip\descriptionparameter\c!titledistance\begstrut#2\endstrut}}%
- }}% \c!command is hook for taco
- \doifsomething{\descriptionparameter\c!list} % also for david antos
+ \descriptionparameter\c!left
+ \strut\doshowdnnumber
+ \showdntitle{#2}%
+ \descriptionparameter\c!stopper
+ \descriptionparameter\c!right}}%
+ \doifsomething{\descriptionparameter\c!list}
{\dowritetolist
{\descriptionparameter\c!type:\descriptionparameter\c!list}
{\showdnlisttext\doshowdnnumber}{#2}{\currentdescription}}%
@@ -478,14 +503,28 @@
\doifreferencefoundelse\localconnection
{\in[\localconnection]}\donothing % genereert > of <
\fi\fi
- \doifnot{#1}{-}{\rawreference\s!num{#1}{\doshowdnnumber}}%
- \else % Why was this strange expansion needed?
- \edef\!!stringa{\showdnpuretext}% nog eens testen binnen \expanded
- \expanded{\doattributes{\??dd\currentdescription}\noexpand\c!headstyle\noexpand\c!headcolor
- {\noexpand\descriptionparameter\noexpand\c!command{\!!stringa}}}%
- \doifnot{#1}{-}{\rawreference\s!num{#1}{}}%
+ \doifnot{#1}{-}{\rawreference\s!num{#1}{{\doshowdnnumber}{#2}}}%
+ \else
+ \doattributes{\??dd\currentdescription}\c!headstyle\c!headcolor
+ {\descriptionparameter\c!command
+ {\showdnpuretext
+ \descriptionparameter\c!left
+ \showdntitle{#2}%
+ \descriptionparameter\c!stopper
+ \descriptionparameter\c!right}}%
+ \doifnot{#1}{-}{\rawreference\s!num{#1}{{}{#2}}}%
\fi}
+\def\showdntitle#1%
+ {\doif{\descriptionparameter\c!title}\v!yes % new, for david antos
+ {\doifsomething{#1}
+ {\doattributes{\??dd\currentdescription}\c!titlestyle\c!titlecolor
+ {\hskip\descriptionparameter\c!titledistance
+ \descriptionparameter\c!titleleft
+ \begstrut#1\endstrut
+ \descriptionparameter\c!titleright}}}}
+
+
\def\showdnpuretext
{\strut\descriptionparameter\c!text} % geen spatie
@@ -595,6 +634,14 @@
\def\setupenumerations
{\dodoubleempty\dosetupenumerations}
+\def\docheckenumerationnumber#1#2#3%
+ {\processaction
+ [\getvalue{\??dd#2\c!number}]
+ [ \v!yes=>\setvalue{\??dd#2\??dd\c!number}{#3},%
+ \v!no=>\setvalue{\??dd#2\??dd\c!number}{#3},%
+ \v!default=>\setvalue{\??dd#2\??dd\c!number}{#3},%
+ \v!unknown=>\letvalue{\??dd#2\??dd\c!number}\commalistelement]}
+
\def\dododefineenumeration#1#2#3[#4][#5]%
{\makecounter{\??dd\c!coupling#1}% new: global cross linking
\dodefinedescription[#3#1]%
@@ -606,29 +653,35 @@
\c!sample,\c!hang,\c!align,\c!before,\c!inbetween,\c!after,
\c!levels,\c!way,\c!blockway,\c!separator,\c!margin,
\c!indenting,\c!indentnext,\c!stopper,\c!sectionnumber,
- \c!number]%
+ \c!title,\c!titleleft,\c!titleright,\c!closesymbol,\c!closecommand]%
\doifassignmentelse{#4}
{\getparameters[\??dd#3#1]%
[\c!text=#1,\??dd\c!number=#1,\c!conversion=,\c!listtext=#1\space,
- \c!left=,\c!right=,\c!coupling=,\c!couplingway=\v!local,#4]}%
+ \c!left=,\c!right=,\c!coupling=,\c!couplingway=\v!local,#4]%
+ \docheckenumerationnumber{#1}{#3#1}{#1}}%
{\doifelsenothing{#4}
{\getparameters[\??dd#3#1]%
[\c!text=#1,\??dd\c!number=#1,\c!conversion=,
\c!stopper=,
- \c!left=,\c!right=,\c!coupling=,\c!couplingway=,#4]}%
+ \c!left=,\c!right=,\c!coupling=,\c!couplingway=,#4]%
+ \docheckenumerationnumber{#1}{#3#1}{#1}}%
{\copyparameters[\??dd#3#1][\??dd#3#4]
[\c!location,\c!headstyle,\c!style,\c!color,\c!headcolor,
\c!width,\c!number,\c!distance,\c!titledistance,\c!command,\c!margin,
\c!sample,\c!hang,\c!align,\c!before,\c!inbetween,\c!after,
\c!stopper,\c!indenting,\c!indentnext,\c!left,\c!right,
- \c!coupling,\c!couplingway]%
+ \c!coupling,\c!couplingway,
+ \c!title,\c!titleleft,\c!titleright,\c!closesymbol,\c!closecommand]%
\getparameters[\??dd#3#1]
- [\c!text=#1,\??dd\c!number=#4,\c!conversion=,#5]}}%
+ [\c!text=#1,\??dd\c!number=#4,\c!conversion=,#5]%
+ %docheckenumerationnumber{#1}{#3#1}{#4}}}%
+ \docheckenumerationnumber{#1}{#3#1}{\getvalue{\??dd#3#4\??dd\c!number}}}}%
\doifvalue{\??dd#3#1\??dd\c!number}{#1}
{\definenumber
[#3#1]
[\c!way=\descriptionparentparameter\c!way,
\c!blockway=\descriptionparentparameter\c!blockway,
+ \c!conversion=\descriptionparentparameter\c!conversion,
\c!sectionnumber=\descriptionparentparameter\c!sectionnumber]%
\doifvalue{\??dd#1\c!levels}{#2}% % for
{\doifsomething{\getvalue{\??dd#1\c!conversion}}% % old
@@ -665,6 +718,17 @@
\def\donextenumerationnumber[#1][#2][#3]%
{\pluscounter{\??dd\c!coupling#1}% new: global crosslinking
\getvalue{\??dd\e!next#2\c!number}[#3]}%
+
+\def\@@resetdescriptionclosesymbol
+ {\global\@EA\settrue\csname\??dd\currentdescription:mrk\endcsname
+ \let\placeclosesymbol\@@placedescriptionclosesymbol
+ \let\qed \@@placedescriptionclosesymbol}
+
+\def\@@placedescriptionclosesymbol
+ {\ifconditional\csname\??dd\currentdescription:mrk\endcsname
+ \global\@EA\setfalse\csname\??dd\currentdescription:mrk\endcsname
+ \doifsomething{\descriptionparameter\c!closesymbol}{\descriptionparameter\c!closecommand{\descriptionparameter\c!closesymbol}}%
+ \fi}
% Het default-mechanisme kan mooier: leegtest, enz.
%
@@ -774,12 +838,14 @@
\setupdescriptions
[\c!location=\v!left,
\c!headstyle=\v!bold,
+ \c!titlestyle=\v!bold,
\c!style=\v!normal,
\c!color=,
\c!headcolor=,
+ \c!titlecolor=,
\c!width=8em,
\c!distance=0pt,
- \c!titledistance=0pt,
+ \c!titledistance=0.5em,
\c!hang=,
\c!sample=,
\c!align=,
@@ -789,17 +855,23 @@
\c!after=\blank,
\c!indentnext=\v!yes,
\c!indenting=\v!never,
+ \c!titleleft=(,
+ \c!titleright=),
+ \c!closesymbol=,
+ \c!closecommand=\wordright,
\c!command=]
\setupenumerations
[\c!location=\v!top,
\c!headstyle=\v!bold,
\c!headcolor=,
+ \c!titlestyle=\v!bold,
+ \c!titlecolor=,
\c!style=\v!normal,
\c!color=,
\c!width=8em,
\c!distance=0pt,
- \c!titledistance=0pt,
+ \c!titledistance=0.5em,
\c!hang=,
\c!sample=,
\c!align=,
@@ -816,6 +888,10 @@
\c!sectionnumber=\v!yes,
\c!separator=\@@koseparator, % per 2006.06.23, was .
\c!stopper=,
+ \c!titleleft=(,
+ \c!titleright=),
+ \c!closesymbol=,
+ \c!closecommand=\wordright,
\c!number=,
\c!command=]
diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex
index 9642b0f94..2171ff837 100644
--- a/tex/context/base/core-itm.tex
+++ b/tex/context/base/core-itm.tex
@@ -69,6 +69,9 @@
\newconditional\afterlistitem \setfalse\afterlistitem
\newconditional\nowhitelistitem \setfalse\nowhitelistitem
\newconditional\joinedlistitem \setfalse\joinedwhitelistitem
+\newconditional\reverselistitem \setfalse\reverselistitem
+\newconditional\continuelistitems \setfalse\continuelistitems
+\newconditional\fittinglistitems \setfalse\fittinglistitems
\newcounter\noflists
\newcounter\itemlevel
@@ -77,7 +80,88 @@
\definetwopasslist\s!list
-\let\currentitemgroup\empty
+\let\currentitemgroup \empty
+\let\currentnofitems \!!zerocount
+\let\currentmaxnofitems\!!zerocount
+\let\currentminnofitems\!!zerocount
+\let\currentitemoffset \!!zerocount
+\def\currentitemnumber{\countervalue{\@@itemcounter\itemlevel}}
+
+\def\dolistreference
+ {\ifconditional\continuelistitems
+ \savetaggedtwopassdata\s!list\currentlist\currentlist{\itemlevel:\noflistelements:c:\getitemparameter\itemlevel\c!maxwidth}%
+ \else
+ \savetaggedtwopassdata\s!list\currentlist\currentlist{\itemlevel:\noflistelements:n:\getitemparameter\itemlevel\c!maxwidth}%
+ \fi}
+
+\def\splititemtwopassdata#1%
+ {\expanded{\findtwopassdata{\s!list}{\number#1}}%
+ \expandafter\dosplititemtwopassdata\twopassdata:0:0:0:0:0\relax}
+
+\def\dosplititemtwopassdata#1:#2:#3:#4:#5\relax
+ {\edef\itemdatal{#1}\edef\itemdatan{#2}\edef\itemdatat{#3}\edef\itemdataw{#4}}
+
+\def\checkcurrentnofitems
+ {\splititemtwopassdata\noflists
+ \iftwopassdatafound
+ \ifcase\scratchcounter
+ \let\currentnofitems \!!zerocount
+ \let\currentminnofitems\!!zerocount
+ \let\currentmaxnofitems\!!zerocount
+ \else
+ \scratchcounter\itemdatan\relax
+ \edef\currentnofitems{\the\scratchcounter}%
+ \let\currentitemtag\itemdatat
+ \doloop
+ {\splititemtwopassdata{\numexpr\noflists+\recurselevel\relax}%
+ \iftwopassdatafound
+ \ifnum\itemdatal=\itemlevel\relax
+ \doifelse{c}\itemdatat
+ {\advance\scratchcounter\itemdatan\relax}
+ {\exitloop}%
+ \fi
+ \else
+ \exitloop
+ \fi}%
+ \edef\currentmaxnofitems{\the\scratchcounter}%
+ \scratchcounter\zerocount
+ \doif{c}\currentitemtag
+ {\doloop
+ {\splititemtwopassdata{\numexpr\noflists-\recurselevel\relax}%
+ \iftwopassdatafound
+ \ifnum\itemdatal=\itemlevel\relax
+ \doifelse{c}\itemdatat
+ {\advance\scratchcounter\itemdatan\relax}
+ {\advance\scratchcounter\itemdatan\exitloop}%
+ \fi
+ \else
+ \exitloop
+ \fi}}%
+ \advance\scratchcounter\plusone
+ \edef\currentminnofitems{\the\scratchcounter}%
+ % [[\currentnofitems,\currentminnofitems,\currentmaxnofitems]]
+ \fi
+ \fi}
+
+% \startitemize[n,packed]
+% \item test \item test \item test
+% \stopitemize
+%
+% \startitemize[n,packed,reverse]
+% \item test \item test \item test
+% \stopitemize
+%
+% \startitemize[n,packed,reverse] \item test \item test \stopitemize
+% \startitemize[continue]
+% \item test \startitemize[n,packed] \item test \item test \stopitemize
+% \item test
+% \item test
+% \stopitemize
+% \startitemize[continue] \item test \stopitemize
+%
+% \startitemize[n,packed] \item test \item test \stopitemize
+% \startitemize[continue] \item test \stopitemize
+% \startitemize[continue] \item test \stopitemize
\def\unknownitemreference{0} \let\itemreferences\unknownitemreference
@@ -111,9 +195,6 @@
\def\doitembreak#1{\ifconditional\optimizelistitem\ifconditional\textlistitem\else\dosomebreak#1\fi\fi}
-\def\dolistreference
- {\savetaggedtwopassdata{\s!list}{\currentlist}{\currentlist}{\noflistelements}}
-
\def\initializeitemgroupslevel#1%
{\ifundefined{\@@globalitemsymbol{#1}}%
\edef\itemreferences{\itemreferences,#1}%
@@ -171,7 +252,8 @@
\newconditional\inlinelistitem \setfalse\inlinelistitem
\def\dododosetupitemgroupconstant[#1][#2#3#4]% * permits [2]
- {\processaction
+ {\global\setitemparameter\itemlevel\c!maxwidth{0}%
+ \processaction
[#2#3#4]
[ \v!packed*=>\packitems,
\v!intro*=>\settrue\introlistitem, % here? not set to false
@@ -193,6 +275,8 @@
\v!atmargin*=>\doifnot{#1}{1}{\setitemparameter{#1}\c!width{0em}}, % signal
\v!intext*=>\settrue\inlinelistitem, % new
\v!loose*=>\setfalse\optimizelistitem,
+ \v!fit*=>\settrue\fittinglistitems,
+ \v!nofit*=>\setfalse\fittinglistitems,
\v!paragraph*=>\settrue\paragraphlistitem
\packitems,
\v!joinedup*=>\settrue\joinedlistitem % \dosetuppackeditemgroup{#1}%
@@ -203,6 +287,7 @@
\v!stopper*=>\setitemparameter{#1}\c!placestopper{\v!yes}, % keep {}
\v!unpacked*=>\setfalse\packlistitem,
\v!repeat*=>\settrue\repeatlistitem, % new
+ \v!reverse*=>\settrue\reverselistitem,
\v!standard*=>\dosetupstandarditemgroup{#1}]}
\def\dosetupstandarditemgroup#1%
@@ -335,15 +420,34 @@
\pluscounter{\@@itemcounter\itemlevel}%
\fi\fi}
+% \def\setitemlevel#1%
+% {\ifnum\itemlevel>\zerocount
+% \settrue\firstlistitem
+% \doifnotinset\v!continue{#1}
+% {\doifinset{0}{#1}{\setitemparameter\itemlevel\c!start{0}}%
+% \doifsomething{\getitemparameter\itemlevel\c!start}
+% {\setcounter{\@@itemcounter\itemlevel}{\getitemparameter\itemlevel\c!start}%
+% \minuscounter{\@@itemcounter\itemlevel}%
+% \letitemparameter\itemlevel\c!start\empty}}%
+% \def\tempnumber
+% {\countervalue{\@@itemcounter\itemlevel}}%
+% \doifelse{\getitemparameter\itemlevel\c!placestopper}\v!yes
+% {\def\tempsymbol{\getitemparameter\itemlevel\c!stopper}}
+% {\let\tempsymbol\empty}%
+% \fi}
+
\def\setitemlevel#1%
{\ifnum\itemlevel>\zerocount
\settrue\firstlistitem
- \doifnotinset\v!continue{#1}
- {\doifinset{0}{#1}{\setitemparameter\itemlevel\c!start{0}}%
- \doifsomething{\getitemparameter\itemlevel\c!start}
- {\setcounter{\@@itemcounter\itemlevel}{\getitemparameter\itemlevel\c!start}%
- \minuscounter{\@@itemcounter\itemlevel}%
- \letitemparameter\itemlevel\c!start\empty}}%
+ %
+ \expanded{\setitemparameter{\itemlevel}{\c!start}{1}}%
+ \doifinset{0}{#1}{\setitemparameter\itemlevel\c!start{0}}%
+ \setcounter{\@@itemcounter\itemlevel}{0}%
+ \doifelsenothing{\getitemparameter\itemlevel\c!start}
+ {\def\currentitemoffset{1}}
+ {\def\currentitemoffset{\getitemparameter\itemlevel\c!start}%
+ \letitemparameter\itemlevel\c!start\empty}%
+ %
\def\tempnumber
{\countervalue{\@@itemcounter\itemlevel}}%
\doifelse{\getitemparameter\itemlevel\c!placestopper}\v!yes
@@ -351,6 +455,13 @@
{\let\tempsymbol\empty}%
\fi}
+\def\actualitemnumber
+ {\ifconditional\reverselistitem
+ \convertnumber\currentitemsymbol{\numexpr\currentmaxnofitems+\currentitemoffset-\currentitemnumber+1\relax}%
+ \else
+ \convertnumber\currentitemsymbol{\numexpr\currentminnofitems+\currentitemoffset+\currentitemnumber-1\relax}%
+ \fi}
+
% PAS OP: ook 'opelkaar' en zo worden getest, nog eens afvangen!
\def\unknownitemsymbol{?}
@@ -365,8 +476,7 @@
{\doifconversiondefinedelse{#1}
{\edef\currentitemsymbol{#1}%
\setxvalue{\@@globalitemsymbol\itemlevel}{\currentitemsymbol}%
- \setgvalue{\@@localitemsymbol \itemlevel}%
- {\convertnumber{\currentitemsymbol}{\countervalue{\@@itemcounter\itemlevel}}}%
+ \setgvalue{\@@localitemsymbol\itemlevel }{\actualitemnumber }%
\ifconditional\textlistitem
\doifsomething{\getitemparameter\itemlevel\c!lefttext}
{\let\tempsymbol\empty}%
@@ -505,8 +615,19 @@
\ifconditional\textlistitem\else\doifnotinset\v!text{#1}\par\fi % suboptimal
\fi
\begingroup
- \doifinsetelse\v!intro{#1}{\settrue\introlistitem}{\setfalse\introlistitem}%
- \doifinsetelse\v!random{#1}{\settrue\randomizeitems}{\setfalse\randomizeitems}%
+% new where, ok or not / we should integrate random, intro, continue here
+% beware, the following no longer inherit from the previous level, is this ok?
+\setfalse\reverselistitem
+\setfalse\introlistitem
+\setfalse\autointrolistitem
+\setfalse\beforelistitem
+\setfalse\afterlistitem
+\setfalse\nowhitelistitem
+\setfalse\randomizeitems
+%
+ \doifinsetelse\v!intro {#1}{\settrue\introlistitem }{\setfalse\introlistitem }%
+ \doifinsetelse\v!random {#1}{\settrue\randomizeitems }{\setfalse\randomizeitems }%
+ \doifinsetelse\v!continue{#1}{\settrue\continuelistitems}{\setfalse\continuelistitems}%
% == \doifinsetelse\v!intro{#1}\settrue\setfalse\introlistitem
\doglobal\increment\noflists
\let\currentlist\noflists
@@ -518,6 +639,7 @@
\globallet\somdestination\empty
\let\symsymbol\empty
\the\itemgroupcommands
+\checkcurrentnofitems
% \getitemparameter\itemlevel\empty
\let\listitem\empty % ** start value
\doifelsenothing{#1} % iffirstargument
@@ -586,7 +708,13 @@
\c!rule=\v!off,
\c!balance=\v!yes,
\c!align=\v!no]%
- \fi\fi}
+ \fi\fi}%
+\ifconditional\fittinglistitems
+ \splititemtwopassdata\noflists
+ \ifdim\itemdataw sp>\zeropoint
+ \expanded{\setitemparameter{\itemlevel}{\c!width}{\itemdataw sp}}%
+ \fi
+\fi
\calculatelistwidth\itemlevel{\dimen0}%
\ifdim\dimen0>\zeropoint\relax
\ifconditional\inlinelistitem\else
@@ -616,7 +744,8 @@
\else
\par
\fi
- \ifnum\itemcolumndepth=\zerocount \dolistreference \fi % beware !
+ %\ifnum\itemcolumndepth=\zerocount \dolistreference \fi % beware !
+ \dolistreference
\ifconditional\firstlistitem \else \endgroup \fi % toegevoegd, eerste \som opent groep
\ifnum\itemcolumndepth=\itemlevel\relax
\stopcolumns
@@ -729,6 +858,19 @@
% \headsym{xx} test \par test
% \stopitemize
+% aligned items
+%
+% \startitemize[n,fit,broad][itemalign=flushright]
+% \dorecurse{100}{\item The first item.}
+% \stopitemize
+%
+% \setupitemgroup[itemize][each][fit]
+% \setupitemgroup[itemize][each][distance=.5em,factor=1,itemalign=flushright]
+%
+% \startitemize[n]
+% \dorecurse{100}{\item The first item.}
+% \stopitemize
+
\appendtoks \let\headsym \itemgroupheadsym \to \itemgroupcommands
\def\itemgroupheadsym#1%
@@ -774,43 +916,40 @@
\llap{\hbox to \dimen0{\ifconditional\sublistitem\llap{+}\fi\box8\hfill}}%
\hskip\scratchdimen}
-\def\dolistitem % evt aantal items opslaan per niveau, scheelt zoeken
- {\ifconditional\textlistitem
- % begin of item
- \else
- \par
- \fi
-% \ignorespaces
- \increment\noflistelements
- \ifnum\itemcolumndepth=\zerocount \ifconditional\optimizelistitem
- \ifnum\noflistelements=\plusone % tgv bv kolommen/nesting
- \findtwopassdata\s!list{\noflists}% % wordt soms de volgorde
- \fi % verstoord, vandaar \find
- \iftwopassdatafound
- \ifcase0\twopassdata\relax \twopassdatafoundfalse \fi
- \fi
- \iftwopassdatafound
- \ifnum\twopassdata=3
- \ifnum\noflistelements>1
+\def\optimizelistitemsbreak
+ {\ifnum\itemcolumndepth=\zerocount \ifconditional\optimizelistitem
+ \ifcase \currentnofitems \else
+ \ifnum\currentnofitems=\plusthree
+ \ifnum\noflistelements>\plusone
\doitembreak\itemnobreak
\fi
- \else\ifnum\twopassdata>3
- \ifnum\noflistelements=2
+ \else\ifnum\currentnofitems>\plusthree
+ \ifnum\noflistelements=\plustwo
\ifconditional\introlistitem
\doitembreak\nobreak
\else
\doitembreak\itemnobreak
\fi
- \else\ifnum\twopassdata=\noflistelements\relax
+ \else\ifnum\currentnofitems=\noflistelements\relax
\doitembreak\itemnobreak
- \else\ifnum\noflistelements>2
+ \else\ifnum\noflistelements>\plustwo
\doitembreak\itembreak
\else
\ifconditional\introlistitem\else\doitembreak\itembreak\fi
\fi\fi\fi
\fi\fi
\fi
- \fi\fi
+ \fi\fi}
+
+\def\dolistitem % evt aantal items opslaan per niveau, scheelt zoeken
+ {\ifconditional\textlistitem
+ % begin of item
+ \else
+ \par
+ \fi
+% \ignorespaces
+ \increment\noflistelements
+ \optimizelistitemsbreak
\noindent
\setbox8\hbox
{\ifconditional\headlistitem
@@ -826,6 +965,15 @@
\doitemattributes\itemlevel\c!style\c!color{\listitem}%
\fi
\fi}%
+\ifconditional\fittinglistitems
+ \ifdim\wd8>\getitemparameter\itemlevel\c!maxwidth sp\relax
+ \expanded{\global\noexpand\setitemparameter{\itemlevel}{\c!maxwidth}{\number\wd8}}%
+ \fi
+ \splititemtwopassdata\noflists
+ \ifdim\itemdataw sp>\zeropoint
+ \setbox8\simplealignedbox{\getitemparameter\itemlevel\c!itemalign}{\itemdataw sp}{\box8}%
+ \fi
+\fi
\doifsomething\somdestination
{\setbox8\hbox{\goto{\box8}[\somdestination]}}%
\globallet\somdestination\empty
diff --git a/tex/context/base/core-job.tex b/tex/context/base/core-job.tex
index d1b766392..9fe31da6d 100644
--- a/tex/context/base/core-job.tex
+++ b/tex/context/base/core-job.tex
@@ -168,7 +168,8 @@
\def\loaduserspecifications
{\readsysfile\f!usrfilename{\showmessage\m!systems2\f!usrfilename}\donothing
- \readjobfile\f!fmtfilename{\showmessage\m!systems2\f!fmtfilename}\donothing}
+ \readjobfile\f!fmtfilename{\showmessage\m!systems2\f!fmtfilename}\donothing
+ \ifx\directlua\undefined\else\preloadallpatterns\fi} % temp hack, we will do runtime loading later
%D We don't want multiple jobfiles to interfere.
diff --git a/tex/context/base/core-ltb.tex b/tex/context/base/core-ltb.tex
index 74ae34210..915307383 100644
--- a/tex/context/base/core-ltb.tex
+++ b/tex/context/base/core-ltb.tex
@@ -69,6 +69,8 @@
\edef\??ler{\??le:r:}
\edef\??lec{\??le:c:}
\edef\??lew{\??le:w:}
+\edef\??leh{\??le:h:}
+\edef\??led{\??le:d:}
\newif\iflinetablepreroll
\newif\ifinlinetable
@@ -249,6 +251,28 @@
\dostartattributes{\??lec\number\linetablecolumn}\c!style\c!color\empty
\begstrut \ignorespaces}
+% \def\stoplinetablecell
+% {\unskip \endstrut
+% \dostopattributes
+% \ifcase\linetablemode
+% \endgraf
+% \else
+% \ifcase\alignmentswitch\else\hss\fi
+% \fi
+% \egroup
+% \hskip\linetablecparameter\c!rightoffset
+% \egroup
+% \iflinetablepreroll
+% \box\scratchbox
+% \else
+% \doif{\linetablecparameter\c!background}\v!color
+% {\backgroundline[\linetablecparameter\c!backgroundcolor]}%
+% {\box\scratchbox}%
+% \fi
+% \egroup}
+
+\newconditional\linetableautoheight \settrue\linetableautoheight
+
\def\stoplinetablecell
{\unskip \endstrut
\dostopattributes
@@ -263,12 +287,59 @@
\iflinetablepreroll
\box\scratchbox
\else
- \doif{\linetablecparameter\c!background}\v!color
- {\backgroundline[\linetablecparameter\c!backgroundcolor]}%
+ \doifelse{\linetablecparameter\c!background}\v!color
+ {\ifconditional\linetableautoheight
+ \hbox{\blackrule
+ [ \c!color=\linetablecparameter\c!backgroundcolor,
+ \c!height=\linetablerparameter{x\c!height},
+ \c!depth=\linetablerparameter{x\c!depth},
+ \c!width=\wd\scratchbox]%
+ \hskip-\wd\scratchbox\box\scratchbox}%
+ \else
+ \backgroundline[\linetablecparameter\c!backgroundcolor]{\box\scratchbox}%
+ \fi}%
{\box\scratchbox}%
\fi
\egroup}
+% \def\stoplinetablecell
+% {\unskip \endstrut
+% \dostopattributes
+% \ifcase\linetablemode
+% \endgraf
+% \else
+% \ifcase\alignmentswitch\else\hss\fi
+% \fi
+% \egroup
+% \hskip\linetablecparameter\c!rightoffset
+% \egroup
+% \iflinetablepreroll
+% \box\scratchbox
+% \else
+% \doifelse{\linetablecparameter\c!background}\v!color
+% {\ifconditional\linetableautoheight
+% % \hbox{\blackrule
+% % [ \c!color=\linetablecparameter\c!backgroundcolor,
+% % \c!height=\linetablerparameter{x\c!height},
+% % \c!depth=\linetablerparameter{x\c!depth},
+% % \c!width=\wd\scratchbox]%
+% % \hskip-\wd\scratchbox\box\scratchbox}%
+% \dp\scratchbox\linetablerparameter{x\c!depth}%
+% \ht\scratchbox\linetablerparameter{x\c!height}%
+% \framed
+% [\c!offset=\v!overlay,
+% \c!frameoffset=.5\linewidth,
+% \c!leftframe=\v!off,\c!rightframe=\v!off,
+% \c!background=\v!color,
+% \c!backgroundcolor=\linetablecparameter\c!backgroundcolor%
+% ]{\box\scratchbox}%
+% \else
+% \backgroundline[\linetablecparameter\c!backgroundcolor]{\box\scratchbox}%
+% \fi}%
+% {\box\scratchbox}%
+% \fi
+% \egroup}
+
\def\savelinetablepart
{\global\setbox\tablebox\linetablepart
\ifnum\linetablepart=\zerocount
@@ -541,15 +612,29 @@
% \setxvalue{\??lew\number\linetablecolumn}{\the\wd\linetablecell}%
% \fi}
-\def\checklinecolumnwidth
- {\expandafter\xdef\csname\??lew\number\linetablecolumn\endcsname
- {\expandafter\ifx\csname\??lew\number\linetablecolumn\endcsname\relax
- \the\wd\linetablecell
- \else\ifdim\csname\??lew\number\linetablecolumn\endcsname<\wd\linetablecell
- \the\wd\linetablecell
+% \def\checklinecolumnwidth
+% {\expandafter\xdef\csname\??lew\number\linetablecolumn\endcsname
+% {\expandafter\ifx\csname\??lew\number\linetablecolumn\endcsname\relax
+% \the\wd\linetablecell
+% \else\ifdim\csname\??lew\number\linetablecolumn\endcsname<\wd\linetablecell
+% \the\wd\linetablecell
+% \else
+% \csname\??lew\number\linetablecolumn\endcsname
+% \fi\fi}}
+
+\def\checklinecolumndimension#1#2#3%
+ {\expandafter\xdef\csname#1\number#3\endcsname
+ {\expandafter\ifx\csname#1\number#3\endcsname\relax
+ \the#2\linetablecell
+ \else\ifdim\csname#1\number#3\endcsname<#2\linetablecell
+ \the#2\linetablecell
\else
- \csname\??lew\number\linetablecolumn\endcsname
+ \csname#1\number#3\endcsname
\fi\fi}}
+
+\def\checklinecolumnwidth {\checklinecolumndimension\??lew\wd\linetablecolumn}
+\def\checklinecolumnheight{\checklinecolumndimension\??leh\ht\linetablerow}
+\def\checklinecolumndepth {\checklinecolumndimension\??led\dp\linetablerow}
\def\linetableBR
{\dosingleempty\dolinetableBR}
@@ -596,6 +681,8 @@
{\stoplinetablecell
\iflinetablepreroll
\checklinecolumnwidth
+ \checklinecolumnheight
+ \checklinecolumndepth
\fi
\checklinetablepart}
@@ -669,6 +756,12 @@
{\stoplinetablerun
\egroup
\globallet\noflinetablerows\linetablerows
+ \dorecurse\noflinetablerows % global, from last run {\linetableparameter\c!n}
+ {%\writestatus{linetable}{\recurselevel->\getvalue{\??lew\recurselevel}}%
+ \setevalue{\??ler\recurselevel x\c!height}{\getvalue{\??leh\recurselevel}}%
+ \setevalue{\??ler\recurselevel x\c!depth }{\getvalue{\??led\recurselevel}}%
+ \letgvalue{\??leh\recurselevel}\!!zeropoint
+ \letgvalue{\??led\recurselevel}\!!zeropoint}
\dorecurse\noflinetablecolumns % global, from last run {\linetableparameter\c!n}
{%\writestatus{linetable}{\recurselevel->\getvalue{\??lew\recurselevel}}%
\setevalue{\??lec\recurselevel\c!width}{\getvalue{\??lew\recurselevel}}%
diff --git a/tex/context/base/core-mat.tex b/tex/context/base/core-mat.tex
index 2451d6c1a..3d44767bb 100644
--- a/tex/context/base/core-mat.tex
+++ b/tex/context/base/core-mat.tex
@@ -283,6 +283,8 @@
{\displayindent\leftdisplayskip
\advance\displayindent\leftdisplaymargin
\displaywidth\hsize
+% \setlocalhsize
+% \displaywidth\localhsize
\ifdim\hangindent>\zeropoint
\advance\displayindent\hangindent
\else
@@ -317,7 +319,8 @@
% \ifdim\lastskip>\zeropoint
% \resetlastlinewidth % else problems with in between stuff without \epar
% \fi
- \bgroup
+ \bgroup % HERE
+ \the\everybeforedisplayformula
\formulaparskip\parskip
\formulastrutdp\strutdepth
\formulastrutht\strutheight
@@ -1687,17 +1690,32 @@
\presetdisplaymath
\tabskip\centering}
-\def\dobotheqalignno#1#2%
+% \def\dobotheqalignno#1#2%
+% {\ifmmode
+% \displ@y % \let\doplaceformulanumber\relax % strange hack
+% \vcenter\bgroup
+% \let\finishalignno\egroup
+% \else
+% \let\finishalignno\relax
+% \fi
+% #1%
+% \halign \ifcase\eqalignmode \or to \displaywidth \fi \@EA {\the\scratchtoks\crcr#2\crcr}%
+% \finishalignno}
+
+\def\dobothaligneqalignno#1%
{\ifmmode
- \displ@y % \let\doplaceformulanumber\relax % strange hack
- \vcenter\bgroup
- \let\finishalignno\egroup
- \else
- \let\finishalignno\relax
+ \displ@y
+ \global\chardef\mathnumberstatus\plusone
+ \ifcase\mathraggedstatus
+ \def\finishalignno{\crcr\egroup}%
+ \else
+ % we're in a mathbox
+ \vcenter\bgroup
+ \def\finishalignno{\crcr\egroup\egroup}%
+ \fi
\fi
#1%
- \halign \ifcase\eqalignmode \or to \displaywidth \fi \@EA {\the\scratchtoks\crcr#2\crcr}%
- \finishalignno}
+ \halign \ifcase\eqalignmode \or to \displaywidth \fi \@EA \bgroup\the\scratchtoks\crcr}
\def\mrlap#1%
{\setbox\scratchbox\hbox{#1}%
@@ -2449,12 +2467,53 @@
\penalty\predisplaypenalty
\beforedisplayspace}
+% %D \macros
+% %D {substack}
+% %D
+% %D Preliminary code:
+% %D
+% %D \starttyping
+% %D \startformula
+% %D \sum_{%
+% %D \startsubstack
+% %D i = 1 \NR
+% %D i \neq n \NR
+% %D i \neq m
+% %D \stopsubstack
+% %D }a_i
+% %D \stopformula
+% %D \stoptyping
+
+% \def\startsubstack
+% {\begingroup
+% \null
+% \vcenter\bgroup
+% \pushmacro\domatrixNC
+% \let\stopmathmode\relax
+% \def\NC{\domatrixNC}%
+% \def\MC{\domatrixNC\startmathmode}%
+% \global\let\domatrixNC\dodomatrixNC
+% \def\NR
+% {\stopmathmode
+% \global\let\domatrixNC\dodomatrixNC
+% \crcr\noalign{\nointerlineskip}}%
+% \mathsurround\zeropoint
+% \everycr\emptytoks
+% \halign\bgroup\hfil$\scriptstyle\mathstrut##$\hfil\crcr}
+
+% \def\stopsubstack
+% {\crcr
+% \egroup
+% \popmacro\domatrixNC
+% \egroup
+% \endgroup}
+
%D \macros
%D {substack}
%D
%D Preliminary code:
%D
-%D \starttyping
+%D \startbuffer
%D \startformula
%D \sum_{%
%D \startsubstack
@@ -2464,31 +2523,44 @@
%D \stopsubstack
%D }a_i
%D \stopformula
-%D \stoptyping
+%D \stopbuffer
+%D
+%D \getbuffer which was typed as \typebuffer
+%D
+%D Notice that these macros give the correct spacing for
+%D subscripts. Compare for example
+%D
+%D \startbuffer
+%D \startformula
+%D \sum_{\startsubstack a \NR b \NR \stopsubstack}
+%D \text{ and }
+%D \sum_{\scriptstyle a \atop \scriptstyle}
+%D \stopformula
+%D \typebuffer which gives \getbuffer
\def\startsubstack
- {\begingroup
- \null
- \vcenter\bgroup
- \pushmacro\domatrixNC
- \let\stopmathmode\relax
- \def\NC{\domatrixNC}%
- \def\MC{\domatrixNC\startmathmode}%
- \global\let\domatrixNC\dodomatrixNC
- \def\NR
- {\stopmathmode
- \global\let\domatrixNC\dodomatrixNC
- \crcr\noalign{\nointerlineskip}}%
- \mathsurround\zeropoint
- \everycr\emptytoks
- \halign\bgroup\hfil$\scriptstyle\mathstrut##$\hfil\crcr}
+ {\begingroup
+ \vcenter\bgroup
+ \baselineskip\dimexpr\fontdimen10 \scriptfont\plustwo + \fontdimen12 \scriptfont\plustwo\relax
+ \lineskip\plusthree\fontdimen8 \scriptfont\plusthree
+ \lineskiplimit\lineskip
+ \let\stopmathmode\relax
+ \def\NC{\domatrixNC}%
+ \def\MC{\domatrixNC\startmathmode}%
+ \global\let\domatrixNC\dodomatrixNC
+ \def\NR
+ {\stopmathmode
+ \global\let\domatrixNC\dodomatrixNC
+ \crcr}%
+ \mathsurround\zeropoint
+ \everycr\emptytoks
+ \halign\bgroup\hfil$\scriptstyle##$\hfil\crcr}
\def\stopsubstack
- {\crcr
- \egroup
- \popmacro\domatrixNC
- \egroup
- \endgroup}
+ {\crcr
+ \egroup
+ \egroup
+ \endgroup}
%D \macros
%D {frac, xfrac, xxfrac}
@@ -2737,6 +2809,30 @@
{\preparebinrel{#2}%
\currentbinrel{\mathop{\kern\zeropoint#2}\limits_{#1}}}
+%D \macros
+%D {boldsymbol}
+%D
+%D The math definition is inspired by amsmath.
+%D
+%D \startbuffer
+%D \definetypeface [boldmath] [mm] [boldmath] [latin-modern] [modern] [encoding=texnansi]
+%D
+%D $a \times b$ $a \boldsymbol{\times} b$
+%D \stopbuffer
+%D
+%D \typebuffer \start \getbuffer \stop
+
+\def\mathboldsymbol#1%
+ {\preparebinrel{#1}%
+ \currentbinrel{\mathchoice
+ {\hbox{\switchtoformulabodyfont [boldmath]$\m@th#1$}}
+ {\hbox{\switchtoformulabodyfont [boldmath]$\m@th#1$}}
+ {\hbox{\switchtoformulabodyfont [boldmath,script]$\m@th#1$}}
+ {\hbox{\switchtoformulabodyfont[boldmath,scriptscript]$\m@th#1$}}}}
+
+\def\boldsymbol
+ {\mathortext\mathboldsymbol\bold}
+
%D How negative such a symbol looks is demonstrated in:
%D $\negative 10^{\negative 10^{\negative 10}}$.
diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex
index 895a1af83..9d3682d69 100644
--- a/tex/context/base/core-mis.tex
+++ b/tex/context/base/core-mis.tex
@@ -1079,35 +1079,37 @@
{\dosingleempty\dostartdelimitedtextpar}\dostartdelimitedtexttxt}}
\def\dostartdelimitedtextpar[#1]%
- {\let\dostopdelimitedtext\dostopdelimitedtextpar
- \doifsomething{\delimitedtextparameter\c!spacebefore}
- {\blank[\delimitedtextparameter\c!spacebefore]}%
- \delimitedtextparameter\c!before
- % nicer:
- % \doadaptleftskip {\delimitedtextparameter\c!leftmargin}%
- % \doadaptrightskip{\delimitedtextparameter\c!rightmargin}%
- % backward compatible:
- \doifelsenothing{#1}
- {\endgraf
- \doadaptleftskip {\delimitedtextparameter\c!leftmargin}%
- \doadaptrightskip{\delimitedtextparameter\c!rightmargin}%
- \let\dodostopdelimitedtextpar\endgraf}
- {\startnarrower[#1]\let\dodostopdelimitedtextpar\stopnarrower}%
- % so far
- \dochecknextindentation{\??ci\currentdelimitedtext}%
- \dostartattributes{\??ci\currentdelimitedtext}\c!style\c!color\empty
- \leftdelimitedtextmark
- \ignorespaces}
+ {\let\dostopdelimitedtext\dostopdelimitedtextpar
+ \doifsomething{\delimitedtextparameter\c!spacebefore}
+ {\blank[\delimitedtextparameter\c!spacebefore]}%
+ \delimitedtextparameter\c!before
+ % nicer:
+ % \doadaptleftskip {\delimitedtextparameter\c!leftmargin}%
+ % \doadaptrightskip{\delimitedtextparameter\c!rightmargin}%
+ % backward compatible:
+ \doifelsenothing{#1}
+ {\endgraf
+ \doadaptleftskip {\delimitedtextparameter\c!leftmargin}%
+ \doadaptrightskip{\delimitedtextparameter\c!rightmargin}%
+ \let\dodostopdelimitedtextpar\endgraf}
+ {\startnarrower[#1]\let\dodostopdelimitedtextpar\stopnarrower}%
+ % so far
+ % \dochecknextindentation{\??ci\currentdelimitedtext}% AM: not here
+ \dostartattributes{\??ci\currentdelimitedtext}\c!style\c!color\empty
+ \leftdelimitedtextmark
+ \ignorespaces}
\def\dostopdelimitedtextpar
- {\removeunwantedspaces
- \removelastskip
- \rightdelimitedtextmark
- \dostopattributes
- \dodostopdelimitedtextpar
- \delimitedtextparameter\c!after
- \doifsomething{\delimitedtextparameter\c!spaceafter}
- {\blank[\delimitedtextparameter\c!spaceafter]}}
+ {\removeunwantedspaces
+ \removelastskip
+ \rightdelimitedtextmark
+ \dostopattributes
+ \dodostopdelimitedtextpar
+ \delimitedtextparameter\c!after
+ \doifsomething{\delimitedtextparameter\c!spaceafter}
+ {\blank[\delimitedtextparameter\c!spaceafter]}%
+ \dochecknextindentation{\??ci\currentdelimitedtext}% AM: here
+ \dorechecknextindentation}% AM: This was missing!
% \def\dostartdelimitedtexttxt
% {\let\dostopdelimitedtext\dostopdelimitedtexttxt
@@ -2343,7 +2345,7 @@
%D \macros
%D {startfloatcombination}
%D
-%D \setupexternalfigures[directory={../sample}]
+%D \setupexternalfigures[directory={../sample}]
%D \startbuffer
%D \placefigure
%D [left,none]
diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex
index c8e7c2a52..fa86a9847 100644
--- a/tex/context/base/core-not.tex
+++ b/tex/context/base/core-not.tex
@@ -681,7 +681,8 @@
\rawreference\s!fnt{\s!fnt:t:\internalfootreference}{}}
\def\dostartnote% nog gobble als in pagebody
- {\bgroup
+ {\pushsomestates
+ \bgroup
\settrue\processingnote
%\restorecatcodes % to be tested first
\iftypesettinglines % otherwise problems with \type <crlf> {xxx}
@@ -732,7 +733,8 @@
\stoppushnote
\egroup
\stoplocalnoteinsert
- \kern\notesignal\relax} % \relax is needed to honor spaces
+ \kern\notesignal\relax % \relax is needed to honor spaces
+ \popsomestates}
\def\dolastnotesymbol
{\removeunwantedspaces
diff --git a/tex/context/base/core-num.tex b/tex/context/base/core-num.tex
index 442333acf..3f75b93d0 100644
--- a/tex/context/base/core-num.tex
+++ b/tex/context/base/core-num.tex
@@ -147,6 +147,10 @@
{\getvalue{\@@thenumber{#1}\c!n}}
\let\getnumber\convertednumber
+
+\def\doifdefinednumber #1{\doifdefined {\csname\s!number#1\c!number\endcsname}}
+\def\doifundefinednumber #1{\doifundefined {\csname\s!number#1\c!number\endcsname}}
+\def\doifdefinednumberelse#1{\doifdefinedelse{\csname\s!number#1\c!number\endcsname}}
\ifx\checknumber\undefined \def\checknumber[#1]{} \fi
diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex
index 9c6ad0f9c..85175cc88 100644
--- a/tex/context/base/core-ref.tex
+++ b/tex/context/base/core-ref.tex
@@ -313,10 +313,6 @@
\doiffirstreferenceoccurance\lastreference
{\thisisdestination{\referenceprefix\lastreference}}%
\referenceinfo>\lastreference
-% \edef\dododowritereference
-% {\writeutilitycommand
-% {\mainreference{\referenceprefix}{\lastreference}{#4}{#5}{#6}}}%
-% \dododowritereference
\expanded{\writeutilitycommand{\noexpand\mainreference{\referenceprefix}{\lastreference}{#4}{#5}{#6}}}%
\fi
\egroup}
@@ -1935,6 +1931,9 @@
\setglobalsystemreference \rt!exec \v!FitWidth {fitwidth}
\setglobalsystemreference \rt!exec \v!FitHeight {fitheight}
+\setglobalsystemreference \rt!exec \v!ShowThumbs {thumbnails}
+\setglobalsystemreference \rt!exec \v!ShowBookmarks {bookmarks}
+
%D Executing the command looks alike the previous goto macros.
\def\executecommand#1#2#3%
diff --git a/tex/context/base/core-reg.mkii b/tex/context/base/core-reg.mkii
new file mode 100644
index 000000000..ef52ca475
--- /dev/null
+++ b/tex/context/base/core-reg.mkii
@@ -0,0 +1,33 @@
+%D \module
+%D [ file=core-reg,
+%D version=2007.05.07,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Register Management,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+% the spaces between } { are essential for texutil's split
+
+\def\mkdefineregister#1% class
+ {\addutilityreset{#1}}
+
+\def\mksaveregisterentry#1#2#3#4#5#6#7% class type reference key entry pagespec realpage
+ {\expanded{\writeutility{r #2 {#1} {#3} {#4} {#5} {#6} {#7}}}}
+
+\def\mksaveregistersee#1#2#3#4#5#6#7% class type reference key entry see pagespec
+ {\expanded{\writeutility{r #2 {#1} {#3} {#4} {#5} {#6} {#7}}}}
+
+\def\mksaveregistervariable#1#2#3% class type value
+ {\expanded{\immediatewriteutility{r #2 {#1} {#3}}}}
+
+\def\mkloadregister#1% class
+ {\doutilities{#1}{\registerparameter\c!file}{#1}\relax\par} % par needed for hanging indentation
+
+\protect \endinput
diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex
index 2b486fcd0..77bb6b8f7 100644
--- a/tex/context/base/core-reg.tex
+++ b/tex/context/base/core-reg.tex
@@ -81,6 +81,14 @@
\newif\ifwritetoregister \writetoregistertrue
+\ifx\undefined\mkdefineregister
+ \let\mkdefineregister \gobbleoneargument
+ \let\mksaveregistervariable\gobblethreearguments
+ \let\mksaveregisterentry \gobblesevenarguments
+ \let\mksaveregistersee \gobblesevenarguments
+ \let\mkloadregister \gobbleoneargument
+\fi
+
\def\doprocesspageregister[#1]#2#3% key altnum entry
{\ifwritetoregister
\begingroup
@@ -95,17 +103,15 @@
\makesectionformat
\doifelse{\registerparameter\c!ownnumber}\v!yes
\donetrue\donefalse
- % the spaces between } { are essential for texutil's split
- \expanded
- {\writeutility%
- {r \ifcase\registerpagestatus\space\or e \or f \or t \fi
- {\currentregister} %
- {\nextinternalreference} %
- {\asciiregisterentryA} %
- {\asciiregisterentryB} %
- {\sectionformat\sectionseparator\sectionseparator
- \ifdone#2\else\noexpand\pagenumber\fi} %
- {\noexpand\realfolio}}}%
+ \mksaveregisterentry
+ {\currentregister}
+ {\ifcase\registerpagestatus\space\or e\or f\or t\fi}
+ {\nextinternalreference}
+ {\asciiregisterentryA}
+ {\asciiregisterentryB}
+ {\sectionformat\sectionseparator\sectionseparator
+ \ifdone#2\else\noexpand\pagenumber\fi}
+ {\noexpand\realfolio}%
\getfirstcharacter\currentregister
\registerinfo{> \firstcharacter}{#3}%
\endgroup
@@ -189,15 +195,14 @@
\convertexpanded{\registerparameter\c!keyexpansion}{#2}\asciiregisterentryA
\fi}%
\makesectionformat
- \expanded
- {\writeutility%
- {r s %
- {\currentregister} %
- {\nextinternalreference} %
- {\asciiregisterentryA} %
- {\asciiregisterentryB} %
- {\asciiregisterentryC} %
- {\sectionformat}}}%
+ \mksaveregistersee
+ {\currentregister}
+ {s}
+ {\nextinternalreference}
+ {\asciiregisterentryA}
+ {\asciiregisterentryB}
+ {\asciiregisterentryC}
+ {\sectionformat}%
\endgroup
\registerinfo{> see}{#2}%
\fi}
@@ -825,7 +830,7 @@
\let\dosetregister\doloadregisterlinks
\def\currentregister{#1}%
\setupregister[#1][#2]%
- \doutilities{#1}{\registerparameter\c!file}{#1}\relax\relax
+ \mkloadregister\currentregister
\endgroup
\ifautoregisterhack
\doinitializeautoregister{#1}%
@@ -1041,7 +1046,7 @@
\c!align=\registerparameter\c!align]%
\dontcomplain
\startpacked[\v!blank]%
- \doutilities\currentregister{\registerparameter\c!file}\currentregister\dobeforeplaceregister\doafterplaceregister
+ \mkloadregister\currentregister
\stoppacked
\stopcolumns
\endgroup
@@ -1071,7 +1076,7 @@
\def\doregisterregisterlanguage#1%
{\savesortlanguage{\getvalue{\??id#1\s!language}}%
- \immediatewriteutility{r l {#1} {\getvalue{\??id#1\s!language}}}}
+ \mksaveregistervariable{#1}{l}{\getvalue{\??id#1\s!language}}}
\def\dodefineregister[#1][#2]%
{\setupregister[#1]%
@@ -1107,7 +1112,7 @@
\doregisterregisterlanguage{#1}%
\to \everysavesortkeys
\presetheadtext[#1=\Word{#1}]%
- \addutilityreset{#1}%
+ \mkdefineregister{#1}%
\setvalue{#1}{\doregister{#1}}%
\setvalue{\e!coupled#1}{\dolinkedregister{#1}}%
\setvalue{\s!set#1}{\dosetregister{#1}}%
@@ -1137,7 +1142,7 @@
\global\utilitydonetrue}
{}}%
\doglobal\newcounter\utilityregisterlength
- \setbox0\vbox{\doutilities{#1}{\registerparameter\c!file}{#1}\relax\relax}%
+ \setbox0\vbox{\mkloadregister\currentregister}%
\endgroup
\ifregistergeplaatst
\setsystemmode \v!register
@@ -1148,6 +1153,12 @@
\def\determineregistercharacteristics
{\dodoubleempty\dodetermineregistercharacteristics}
+%D Plugins.
+
+\loadmarkfile{core-reg}
+
+%D Default index:
+
\defineregister
[\v!index]
[\v!indices]
diff --git a/tex/context/base/core-spa.mkii b/tex/context/base/core-spa.mkii
new file mode 100644
index 000000000..b3d71699d
--- /dev/null
+++ b/tex/context/base/core-spa.mkii
@@ -0,0 +1,46 @@
+%D \module
+%D [ file=core-spa,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Spacing,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+% Just after we implemented the \MKIV\ code, Thanh posted a patch for
+% \PDFTEX. The following code is untested! (\LUATEX\ does not contain
+% this code!)
+
+\ifx\pdfkeeplinedimen\undefined
+
+ \let\mksetupgridsnapping \relax
+ \let\mkenablegridsnapping \relax
+ \let\mkdisablegridsnapping\relax
+
+\else
+
+ \def\mksetupgridsnapping
+ {\pdfeachlineheight \openstrutheight
+ \pdfeachlinedepth \openstrutdepth
+ \pdffirstlineheight \pdfeachlineheight
+ \pdflastlinedepth \pdfeachlinedepth}
+
+ \def\mkenablegridsnapping
+ {\pdfkeeplinedimen\maxdimen
+ \topskip\strutht
+ \offinterlineskip}
+
+ \def\mkdisablegridsnapping
+ {\pdfkeeplinedimen\zeropoint
+ % reset topskip
+ \oninterlineskip}
+
+\fi
+
+\protect \endinput
diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex
index d98480248..159624c0d 100644
--- a/tex/context/base/core-spa.tex
+++ b/tex/context/base/core-spa.tex
@@ -17,6 +17,12 @@
\unprotect
+% interfacing mkii/mkiv
+
+\ifx\mksetupgridsnapping \undefined \let\mksetupgridsnapping \relax \fi
+\ifx\mkenablegridsnapping \undefined \let\mkenablegridsnapping \relax \fi
+\ifx\mkdisablegridsnapping\undefined \let\mkdisablegridsnapping\relax \fi
+
% some will move to core-var
\newif \ifgridsnapping
@@ -1415,6 +1421,16 @@
\def\notoggleindentation
{\gdef\checkindentation{\global\indentationtrue\dotoggleindentation}}
+
+\appendtoks
+ \pushmacro\checkindentation
+ \pushmacro\ifindentation
+\to \everypushsomestate
+
+\appendtoks
+ \popmacro\ifindentation
+ \popmacro\checkindentation
+\to \everypopsomestate
% we need to save the state if we want to adapt behaviour to empty lines
%
@@ -2165,13 +2181,14 @@
\endgroup
\fi
\normalbaselineskip\openlineheight
-\ifgridsnapping\else
- \!!plus \baselinegluefactor\openlineheight
- \!!minus\baselinegluefactor\openlineheight
-\fi
+ \ifgridsnapping\else
+ \!!plus \baselinegluefactor\openlineheight
+ \!!minus\baselinegluefactor\openlineheight
+ \fi
\normallineskip\minimumlinedistance\relax % \onepoint\relax
\normallineskiplimit\zeropoint\relax
- \normalbaselines}
+ \normalbaselines
+ \mksetupgridsnapping}
\def\setspacingfactor#1\to#2\by#3\\%
{\strutdimen#2\points
@@ -2747,7 +2764,10 @@
[ \v!left=>\global\advance\ctxleftskip \@@slleft,
\v!middle=>\global\advance\ctxmidskip \@@slmiddle,
\v!right=>\global\advance\ctxrightskip \@@slright,
- \v!none=>,
+ \v!reset=>\global\ctxleftskip \zeropoint
+ \global\ctxmidskip \zeropoint
+ \global\ctxrightskip\zeropoint,
+ \v!none=>,
\s!unknown=>\global\advance\ctxmidskip \commalistelement]}
% \def\donarrower[#1]% hm, can be dorepeat directly
@@ -2956,6 +2976,11 @@
{\getvalue{\@@ragged@@command\v!left}}
{\getvalue{\@@ragged@@command\v!right}}}
+\setvalue{\@@ragged@@command\v!lesshyphenation}%
+ {\appendtoks\lesshyphens\to\everyraggedcommand}
+\setvalue{\@@ragged@@command\v!morehyphenation}%
+ {\appendtoks\morehyphens\to\everyraggedcommand}
+
% compare:
%
% \framed[width=4cm,align=no] {\hfil xxx}
@@ -3882,6 +3907,26 @@
\installalign \v!verytolerant {\tolerance4500 \relax}
\installalign \v!stretch {\emergencystretch\bodyfontsize}
+\installalign \v!grid {\mkenablegridsnapping } % only mkiv
+\installalign \v!nogrid {\mkdisablegridsnapping} % only mkiv
+
+\newcount\hyphenminoffset
+
+\ifx\sethyphenationvariables\undefined \let\sethyphenationvariables\relax \fi
+
+\def\lesshyphens
+ {\advance\hyphenminoffset\plusone
+ \sethyphenationvariables}
+
+\def\morehyphens
+ {\ifcase\hyphenminoffset \else
+ \advance\hyphenminoffset\minusone
+ \fi
+ \sethyphenationvariables}
+
+\installalign \v!lesshyphenation {\lesshyphens}
+\installalign \v!morehyphenation {\morehyphens}
+
\def\dodosetupalign#1{\csname @@align@@#1\endcsname}
\def\dodosetupngila#1{\csname @@ngila@@#1\endcsname}
@@ -3918,14 +3963,29 @@
\newtoks \everyleftofalignedline
\newtoks \everyrightofalignedline
+% \def\doalignline#1#2% \\ == newline
+% {\begingroup
+% \setlocalhsize % new
+% \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
+% \dowithnextbox
+% {\noindentation % was \noindent
+% \dontleavehmode % added in marrakesch at TUG 2006
+% \hbox to \localhsize
+% {\ifcase\alignstrutmode\or\strut\fi
+% \the\everyleftofalignedline
+% #1\unhbox\nextbox#2\relax
+% \the\everyrightofalignedline}%
+% \endgroup}
+% \hbox}
+
\def\doalignline#1#2% \\ == newline
- {\begingroup
+ {\noindentation % was \noindent
+ \dontleavehmode % added in marrakesch at TUG 2006\begingroup
+ \begingroup
\setlocalhsize % new
\def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
\dowithnextbox
- {\noindentation % was \ noindent
- \dontleavehmode % added in marrakesch at TUG 2006
- \hbox to \localhsize
+ {\hbox to \localhsize
{\ifcase\alignstrutmode\or\strut\fi
\the\everyleftofalignedline
#1\unhbox\nextbox#2\relax
@@ -3974,11 +4034,13 @@
% more extensive:
\def\doxalignline#1#2#3#4#5#6%
- {\bgroup
+ {\noindentation % was \noindent
+ \dontleavehmode % added in marrakesch at TUG 2006\begingroup
+ \begingroup
\setlocalhsize
\def\\{\egroup\par\doxalignline#1#2#3#4#5#6\bgroup}% inefficient
\dowithnextbox
- {\noindent
+ {%\noindent moved up
\hbox to \localhsize
{#1\hskip\ifdone#2\else#3\fi#4%
\hbox to \localhsize
@@ -3987,7 +4049,7 @@
\ifdone#5\unhbox\nextbox#6\else#6\unhbox\nextbox#5\fi
\the\everyrightofalignedline}%
\hss}%
- \egroup}
+ \endgroup}
\hbox}
\def\doxcheckline
@@ -4064,6 +4126,7 @@
\hbox}
{\doifelse{#1}\v!right{\kern-\rightskip}{\doifsomething{#1}{\kern-#1}}%
\parfillskip\zeropoint
+ %\finalhyphendemerits\zerocount % yes or no
\par}}
\def\wordright
@@ -4079,6 +4142,16 @@
%
% \wordright[\rightskip]{whatever}
+% \simplealignedbox{2cm}{right}{x}
+
+\setvalue{\s!simple\c!align\v!right }#1#2{\hbox to #1{#2\hss}}
+\setvalue{\s!simple\c!align\v!left }#1#2{\hbox to #1{\hss#2}}
+\setvalue{\s!simple\c!align\v!flushright }#1#2{\hbox to #1{\hss#2}}
+\setvalue{\s!simple\c!align\v!flushleft }#1#2{\hbox to #1{#2\hss}}
+\setvalue{\s!simple\c!align\v!middle }#1#2{\hbox to #1{\hss#2\hss}}
+
+\def\simplealignedbox#1{\executeifdefined{\s!simple\c!align#1}{\getvalue{\s!simple\c!align\v!right}}}
+
%D \macros
%D {pushindentation,popindentation}
%D
@@ -4641,6 +4714,10 @@
\space
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+% plugins
+
+\loadmarkfile{core-spa}
+
\setupwhitespace
[\v!none]
diff --git a/tex/context/base/core-syn.mkii b/tex/context/base/core-syn.mkii
new file mode 100644
index 000000000..b3fdb1738
--- /dev/null
+++ b/tex/context/base/core-syn.mkii
@@ -0,0 +1,28 @@
+%D \module
+%D [ file=core-syn,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Synonyms and Sorts,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+\def\mkdefinesortedlist#1% class
+ {\addutilityreset{#1}}
+
+\def\mksavesortedlistentry#1#2#3#4%
+ {\immediatewriteutility{s e {#1} {#2} {#3} {#4}}}
+
+\def\mksavesortedlistvariable#1#2#3% class type value
+ {\immediatewriteutility{s #2 {#1} {#3}}}
+
+\def\mkloadsortedlist#1% class
+ {\doutilities{#1}\jobname{#1}\relax\relax}
+
+\protect \endinput
diff --git a/tex/context/base/core-syn.tex b/tex/context/base/core-syn.tex
index 3f26b973d..6d1b88c94 100644
--- a/tex/context/base/core-syn.tex
+++ b/tex/context/base/core-syn.tex
@@ -15,6 +15,13 @@
\unprotect
+\ifx\mkdefinesortedlist\undefined
+ \let\mkdefinesortedlist \gobbleoneargument
+ \let\mksavesortedlistentry \gobblefourarguments
+ \let\mksavesortedlistvariable\gobblethreearguments
+ \let\mkloadsortedlist \gobbleoneargument
+\fi
+
% \checkdefined kan hierheen
% Formaat tex-utility-input-file <jobname.tui>:
@@ -63,16 +70,6 @@
\def\currentsynonym{#1}%
\definedescription % nog eens een class van maken, net als framed
[syndef]
-% [\c!location=\getvalue{\??sm#1\c!location}, % todo \synonymparameter
-% \c!width=\getvalue{\??sm#1\c!width},
-% \c!distance=\getvalue{\??sm#1\c!distance},
-% \c!sample=\getvalue{\??sm#1\c!sample},
-% \c!hang=\getvalue{\??sm#1\c!hang},
-% \c!align=\getvalue{\??sm#1\c!align},
-% \c!before=\getvalue{\??sm#1\c!before},
-% \c!inbetween=\getvalue{\??sm#1\c!inbetween},
-% \c!after=\getvalue{\??sm#1\c!after},
-% \c!indentnext=\getvalue{\??sm#1\c!indentnext},
[\c!location=\synonymparameter\c!location,
\c!width=\synonymparameter\c!width,
\c!distance=\synonymparameter\c!distance,
@@ -86,7 +83,8 @@
\c!headstyle=,
\c!style=]%
\setupwhitespace[\v!none]%
- \doutilities{#1}\jobname{#2}\relax\par
+ %doutilities{#1}\jobname{#2}\relax\par % no longer \par
+ \mkloadsortedlist{#1}%
\endgroup
\ifutilitydone\else\nowhitespace\fi}
@@ -119,19 +117,9 @@
{\begingroup % anders in mathmode lege \hbox
\convertexpanded{\getvalue{\??sm#1\c!expansion}}{#3}\asciisynonym
\convertexpanded{\getvalue{\??sm#1\c!expansion}}{#4}\asciimeaning
- \immediatewriteutility{s e {#1} {#2} {\asciisynonym} {\asciimeaning}}%
+ \mksavesortedlistentry{#1}{#2}{\asciisynonym}{\asciimeaning}%
\endgroup}
-% \def\preexecutesynonym#1#2#3#4%
-% {\ifdoinpututilities \else
-% \dowritesynonym{#1}{#2}{#3}{#4}%
-% \unexpanded\setgvalue{#2}{\processsynonym{#1}{#3}{#4}}%
-% \fi}
-%
-% \def\executesynonym#1#2#3#4%
-% {\preexecutesynonym{#1}{#2}{#3}{#4}%
-% \processsynonym{#1}{#3}{#4}}
-
\def\reprocesssynonym#1#2#3%
{\processsynonym{#1}{#2}{#3}%
\getvalue{\??sm#1\c!next}} % not formally documented
@@ -165,7 +153,7 @@
{\bgroup
\let\dosetsynonym\doloadsynonym
\showmessage\m!systems{19}{#2}%
- \doutilities{#1}\jobname\empty\relax\relax
+ \mkloadsortedlist{#1}%
\egroup
\setvalue{\s!check#1}##1{}}
@@ -190,7 +178,7 @@
\def\doregistersynonymlanguage#1%
{\savesortlanguage{\getvalue{\??sm#1\s!language}}%
- \immediatewriteutility{s l {#1} {\getvalue{\??sm#1\s!language}}}}
+ \mksavesortedlistvariable{#1}{l}{\getvalue{\??sm#1\s!language}}}
\def\dodefinesynonyms[#1][#2][#3][#4]%
{\iffourthargument
@@ -219,7 +207,7 @@
\doregistersynonymlanguage{#1}%
\to \everysavesortkeys
\presetheadtext[#2=\Word{#2}]% changes the \if...argument
- \addutilityreset{#1}%
+ \mkdefinesortedlist{#1}%
\setvalue{\e!setup #2\e!endsetup}{\dodoubleargument\getparameters[\??sm#1]}% to be obsolete
\setvalue{\s!set #1}{\dosetsynonym{#1}}%
\setvalue{\s!reset #1}{\doresetsynonym{#1}}%
@@ -251,7 +239,7 @@
\def\dosetsort#1%
{\setvalue{#1\s!entry}##1##2##3%
- {\def\dowritesort####1####2####3{}%
+ {\let\dowritesort\gobblethreearguments
\global\utilitydonetrue
\bgroup
\doifdefinedelse{\??so#1\c!command}
@@ -265,7 +253,8 @@
{\whitespace % ZONDER WITRUIMTE ETC ETC
\begingroup
\setupwhitespace[\v!none]%
- \doutilities{#1}\jobname{#1}\relax\par
+ %doutilities{#1}\jobname{#1}\relax\par % brr \par
+ \mkloadsortedlist{#1}%
\endgroup
\ifutilitydone\else\nowhitespace\fi}
@@ -273,7 +262,8 @@
%
% \def\doplacelistofsorts#1% NOG EEN RUWE VERSIE MAKEN
% {\startpacked
-% \doutilities{#1}\jobname{#1}\relax\par
+% %doutilities{#1}\jobname{#1}\relax\par
+% \mkloadsortedlist{#1}%
% \stoppacked}
\def\docompletelistofsorts#1#2%
@@ -295,25 +285,12 @@
\def\dowritesort#1#2#3%
{\bgroup
\convertexpanded{\getvalue{\??so#1\c!expansion}}{#3}\asciisynonym
- \immediatewriteutility{s e {#1} {#2} {\asciisynonym} {}}%
+ \mksavesortedlistentry{#1}{#2}{\asciisynonym}{}%
\egroup}
\def\synonymentry#1%
{\executeifdefined{#1\s!entry}\gobblethreearguments}
-% \def\preexecutesort#1#2#3%
-% {\ifdoinpututilities \else
-% \dowritesort{#1}{#2}{#3}%
-% \unexpanded\setgvalue{#2}{\processsort{#1}{#3}{#2}}%
-% \fi}
-%
-% \def\executesort#1#2#3%
-% {\begingroup
-% \let\executesort\thirdofthreearguments % Trick needed for nested logo's.
-% \preexecutesort{#1}{#2}{#3}%
-% \processsort{#1}{#3}{#2}%
-% \endgroup}
-
\def\reprocesssort#1#2#3%
{\processsort{#1}{#2}{#3}%
\getvalue{\??so#1\c!next}}
@@ -341,7 +318,7 @@
{\bgroup
\let\dosetsort\doloadsort
\showmessage\m!systems{20}{#2}%
- \doutilities{#1}\jobname\empty\relax\relax
+ \mkloadsortedlist{#1}%
\egroup
\setvalue{\s!check#1}##1{}}
@@ -366,7 +343,7 @@
\def\doregistersortinglanguage#1%
{\savesortlanguage{\getvalue{\??so#1\s!language}}%
- \immediatewriteutility{s l {#1} {\getvalue{\??so#1\s!language}}}}
+ \mksavesortedlistvariable{#1}{l}{\getvalue{\??so#1\s!language}}}
\def\dodefinesorting[#1][#2][#3]%
{\getparameters[\??so#1]
@@ -390,7 +367,7 @@
\else
\setvalue{#1}{\dotripleempty\docomplexsort[][#1]}%
\fi
- \addutilityreset{#1}%
+ \mkdefinesortedlist{#1}%
\presetheadtext[#2=\Word{#2}]% after \ifthirdargument -)
\setvalue{\e!setup#2\e!endsetup}[##1]{\getparameters[\??so#1][##1]}% to be obsolete
\setvalue{\s!set#1}{\dosetsort{#1}}%
@@ -408,7 +385,7 @@
%D written by Taco.
\def\processlistofsorts[#1]%
- {\doutilities{#1}\jobname{#1}\donothing\donothing}
+ {\mkloadsortedlist{#1}}
\newcounter\nofsortedalphalists
@@ -429,7 +406,13 @@
% \def\whatever{a,b,q,d,r,f} \sortalphacommacommand\whatever \whatever \endgraf
% \def\whatever{ax,bx,qx,dx,rx,fx} \sortalphacommacommand\whatever \whatever \endgraf
% \stoptext
-
+
+%D Plugins.
+
+\loadmarkfile{core-syn}
+
+%D Presets.
+
\definesynonyms
[\v!abbreviation]
[\v!abbreviations]
diff --git a/tex/context/base/core-trf.tex b/tex/context/base/core-trf.tex
index 03889f1fb..ab5dfd17a 100644
--- a/tex/context/base/core-trf.tex
+++ b/tex/context/base/core-trf.tex
@@ -76,6 +76,7 @@
\def\dodoscalenextbox#1%
{\edef\currentscaletag{#1}%
+ \doif{\scaleparameter\c!depth}\v!no{\setbox\nextbox\hbox{\raise\nextboxdp\box\nextbox}}% new
\forgetall
\dontshowcomposition
\dontcomplain
diff --git a/tex/context/base/core-two.mkii b/tex/context/base/core-two.mkii
index 38bf1b8d4..234080d97 100644
--- a/tex/context/base/core-two.mkii
+++ b/tex/context/base/core-two.mkii
@@ -73,7 +73,7 @@
\def\loadtwopassdata
{\ifx\alltwopasslists\empty\else
\processcommacommand[\alltwopasslists]\doloadtwopassdata
- \globallet\alltwopassdata\empty
+ \globallet\alltwopasslists\empty
\fi}
\def\dogettwopassdata[#1,#2]#3#4%
diff --git a/tex/context/base/core-uti.tex b/tex/context/base/core-uti.tex
index 8cf91912d..55cebf673 100644
--- a/tex/context/base/core-uti.tex
+++ b/tex/context/base/core-uti.tex
@@ -228,9 +228,58 @@
\def\currentutilityfilename{\jobname}
+% \long\def\doutilities#1#2#3#4#5% % introduceren in utility file
+% {\restorecatcodes
+% \resetutilities
+% % more than one utility thing can be handled in one pass,
+% % for instance lists, so we process ##1 as list
+% \def\douticommand##1{\csname\s!set##1\endcsname}%
+% \processcommacommand[#1]\douticommand
+% \begingroup
+% \def\currentutilityfilename{#2}%
+% \notesenabledfalse
+% \doinpututilitiestrue
+% \global\utilitydonefalse
+% \catcode`\\=\@@escape
+% \catcode`\{=\@@begingroup
+% \catcode`\}=\@@endgroup
+% \catcode`\%=\@@comment\relax
+% \pushendofline % geeft problemen zodra andere file wordt ingelezen
+% \ifunprotectutilities % nog nodig ?
+% \unprotect
+% \fi
+% \ifnum\catcode`\@=\@@active \else
+% \catcode`\@=\@@letter % permits expanded commands with \@'s
+% \fi
+% \ifnum\catcode`\!=\@@active \else
+% \catcode`\!=\@@letter % permits multilingual constants
+% \fi
+% #4%
+% \the\everybeforeutilityread
+% \readjobfile{#2.\f!outputextension}\donothing\donothing
+% \the\everyafterutilityread
+% #5%
+% \relax
+% \ifunprotectutilities
+% \protect
+% \fi
+% \popendofline
+% \ifutilitydone\else
+% \doifsomething{#3}
+% {\showmessage\m!systems9{{#3}}%
+% \doifconcepttracing
+% {\blank
+% \type{[\currentmessagetext]}%
+% \blank}}%
+% \fi
+% \endgroup}
+
+% we need to pop and push, else problems with reading
+% utility files (toc) in xml mode and (e.g.) in a toc
+% entry doing a doifmode
+
\long\def\doutilities#1#2#3#4#5% % introduceren in utility file
- {\restorecatcodes
- \resetutilities
+ {\resetutilities
% more than one utility thing can be handled in one pass,
% for instance lists, so we process ##1 as list
\def\douticommand##1{\csname\s!set##1\endcsname}%
@@ -240,24 +289,17 @@
\notesenabledfalse
\doinpututilitiestrue
\global\utilitydonefalse
- \catcode`\\=\@@escape
- \catcode`\{=\@@begingroup
- \catcode`\}=\@@endgroup
- \catcode`\%=\@@comment\relax
\pushendofline % geeft problemen zodra andere file wordt ingelezen
+ \pushcatcodetable
+ \setcatcodetable\ctxcatcodes
\ifunprotectutilities % nog nodig ?
\unprotect
\fi
- \ifnum\catcode`\@=\@@active \else
- \catcode`\@=\@@letter % permits expanded commands with \@'s
- \fi
- \ifnum\catcode`\!=\@@active \else
- \catcode`\!=\@@letter % permits multilingual constants
- \fi
#4%
\the\everybeforeutilityread
\readjobfile{#2.\f!outputextension}\donothing\donothing
\the\everyafterutilityread
+ \popcatcodetable
#5%
\relax
\ifunprotectutilities
diff --git a/tex/context/base/core-var.tex b/tex/context/base/core-var.tex
index 9a5cde07d..0fba2b3b3 100644
--- a/tex/context/base/core-var.tex
+++ b/tex/context/base/core-var.tex
@@ -264,24 +264,34 @@
%newevery \everybeforeutilitywrite \relax
-\newevery \everycleanupfeatures \relax
-\newevery \everyinsidefloat \relax
-\newevery \everyheadstart \relax
-\newevery \everyendoftextbody \relax
-\newevery \everybeginofpar \relax
-\newevery \everyendofpar \relax
-\newevery \everylistentry \relax
-\newevery \everymarking \relax
-\newevery \everysavesortkeys \relax
-
-\newevery \everyfont \relax
-\newevery \everybodyfont \EveryBodyFont
-\newevery \everyfontswitch \EveryFontSwitch
-\newevery \everydefinedfont \relax
+\newevery \everycleanupfeatures \relax
+\newevery \everyinsidefloat \relax
+\newevery \everyheadstart \relax
+\newevery \everyendoftextbody \relax
+\newevery \everybeginofpar \relax
+\newevery \everyendofpar \relax
+\newevery \everylistentry \relax
+\newevery \everymarking \relax
+\newevery \everysavesortkeys \relax
+
+\newevery \everyfont \relax
+\newevery \everybodyfont \EveryBodyFont
+\newevery \everyfontswitch \EveryFontSwitch
+\newevery \everydefinedfont \relax
+
+\newevery \everybeforedisplayformula \relax
\def\cleanupfeatures{\the\everycleanupfeatures}
\def\forgetall {\the\everyforgetall}
+%D State mess:
+
+\newtoks \everypushsomestate
+\newtoks \everypopsomestate
+
+\def\pushsomestates{\the\everypushsomestate}
+\def\popsomestates {\the\everypopsomestate }
+
%D For shared \type {\everymath} and \type {\everydisplay}:
\newevery \everymathematics \relax
diff --git a/tex/context/base/core-ver.mkii b/tex/context/base/core-ver.mkii
index 374b9a063..739bd103c 100644
--- a/tex/context/base/core-ver.mkii
+++ b/tex/context/base/core-ver.mkii
@@ -54,7 +54,7 @@
\def\mktype#1% was \dotype
{\bgroup
\resumecoloraftergroup % a problem is that we can still be in color mode, tricky hack
- \strut % new, enables leading space in \type { abc } at par start
+ \begstrut % new, enables leading space in \type { abc } at par start / begstrut else no hyphenation
\let\currenttypingclass\??ty
\edef\currenttyping{#1}%
\catcode`\<=\@@other
diff --git a/tex/context/base/enco-cyr.tex b/tex/context/base/enco-cyr.tex
index 95ab42231..0ac82207f 100644
--- a/tex/context/base/enco-cyr.tex
+++ b/tex/context/base/enco-cyr.tex
@@ -70,7 +70,7 @@
\stopmapping
-\startcoding[t2a]
+\startencoding[t2a]
\definecharacter textgrave 0
\definecharacter textacute 1
@@ -256,7 +256,7 @@
% \definecharacter textperthousand {\%\char 24 }
% \definecharacter textpertenthousand {\%\char 24\char 24 }
-\stopcoding
+\stopencoding
\startmapping[t2b]
@@ -276,7 +276,7 @@
\stopmapping
-\startcoding[t2b]
+\startencoding[t2b]
\definecharacter textgrave 0
\definecharacter textacute 1
@@ -461,7 +461,7 @@
\definecharacter cyrillicW 87
\definecharacter cyrillicw 119
-\stopcoding
+\stopencoding
\startmapping[t2c]
@@ -481,7 +481,7 @@
\stopmapping
-\startcoding[t2c]
+\startencoding[t2c]
\definecharacter textgrave 0
\definecharacter textacute 1
@@ -666,7 +666,7 @@
\definecharacter cyrillicW 87
\definecharacter cyrillicw 119
-\stopcoding
+\stopencoding
\startmapping[x2]
@@ -686,7 +686,7 @@
\stopmapping
-\startcoding[x2]
+\startencoding[x2]
\definecharacter textgrave 0
\definecharacter textacute 1
@@ -921,7 +921,7 @@
\definecharacter cyrillicDELTA 30
\definecharacter cyrillicdelta 31
-\stopcoding
+\stopencoding
\startmapping[lcy]
@@ -942,7 +942,7 @@
\stopmapping
-\startcoding[lcy]
+\startencoding[lcy]
%D Characters 0 to 127 are as in normal cmr slots
@@ -1030,6 +1030,6 @@
\definecharacter rightguillemot 254
\definecharacter quotedblbase 255
-\stopcoding
+\stopencoding
\endinput
diff --git a/tex/context/base/lang-ini.mkii b/tex/context/base/lang-ini.mkii
new file mode 100644
index 000000000..a0f6f3881
--- /dev/null
+++ b/tex/context/base/lang-ini.mkii
@@ -0,0 +1,14 @@
+%D \module
+%D [ file=lang-ini,
+%D version=1996.01.25,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% mkiv code is experimental
diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex
index f82b800ba..b5cfda0db 100644
--- a/tex/context/base/lang-ini.tex
+++ b/tex/context/base/lang-ini.tex
@@ -416,7 +416,7 @@
\globallet\dodoloadpatterns\gobblefourarguments
\to \everydump
-% \loadmarkfile{lang-ini} % not yet
+\loadmarkfile{lang-ini} % not yet
%D \macros
%D {setuplanguage}
@@ -585,6 +585,12 @@
\dosetnormallanguage{:\s!default :\currentmapping:}#1{%
\dosetnormallanguage{:\s!default :\s!default :}#1\empty}}}}
+\def\sethyphenationvariables
+ {\lefthyphenmin 0\languageparameter\s!lefthyphenmin \relax
+ \righthyphenmin0\languageparameter\s!righthyphenmin\relax
+ \lefthyphenmin \numexpr\lefthyphenmin +\hyphenminoffset\relax
+ \righthyphenmin\numexpr\righthyphenmin+\hyphenminoffset\relax}
+
\def\docomplexlanguage% assumes that \currentlanguage is set
{\edef\currentdefaultlanguage{\defaultlanguage\currentlanguage}%
% called quite often, so we use \csname
@@ -619,8 +625,9 @@
% \ifx\languagemapping\empty\else
% \fastenablemapping\languagemapping
% \fi
- \lefthyphenmin 0\languageparameter\s!lefthyphenmin
- \righthyphenmin0\languageparameter\s!righthyphenmin
+ \sethyphenationvariables
+ %\lefthyphenmin 0\languageparameter\s!lefthyphenmin
+ %\righthyphenmin0\languageparameter\s!righthyphenmin
\relax
% will be definable and move to core-spa !
\doifelse{\languageparameter\c!spacing}\v!broad
diff --git a/tex/context/base/lang-sla.tex b/tex/context/base/lang-sla.tex
index b5a9728ce..330c6f7f5 100644
--- a/tex/context/base/lang-sla.tex
+++ b/tex/context/base/lang-sla.tex
@@ -121,19 +121,54 @@
\c!date={\v!day,\ ,\v!month,\ ,\v!year},
\c!state=\v!stop]
+%D The default quotation marks for Slovenian were chosen as
+%D \lowerleftdoubleninequote these ones\upperrightdoublesixquote\
+%D which was probably due to the strong influence computers
+%D had on typesetting, but \rightguillemot these ones\leftguillemot\
+%D are \quotation{more correct}.
+%D
+%D If you still want the other quotation marks, use this:
+%D
+%D \starttyping
+%D \installlanguage
+%D [sl]
+%D [leftquote=\lowerleftsingleninequote,
+%D rightquote=\upperrightsinglesixquote,
+%D leftquotation=\lowerleftdoubleninequote,
+%D rightquotation=\upperrightdoublesixquote]
+%D \stoptyping
+%D
+%D If you disagree with the change, please send an email to Mojca, but
+%D best use some pretty strong arguments because she loves S{\sl love}nia
+%D to much to comprimise on this.
+%D
+%D German faces approximately the same problem. I (MM) would prefer to
+%D have something like:
+%D
+%D \starttyping
+%D \mainlanguage[sl][quotationstyle=guillemot|doublequote] % better name needed
+%D \stoptyping
+%D
+%D but users are expected to respect the rules of nice and correct
+%D typography anyway.
+
\installlanguage
- [\s!sl]
- [\c!spacing=\v!packed,
- \c!leftsentence={\hbox{--~}},
- \c!rightsentence={\hbox{~--}},
- \c!leftsubsentence={--},
- \c!rightsubsentence={--},
- \c!leftquote=\lowerleftsingleninequote,
- \c!rightquote=\upperrightsinglesixquote,
- \c!leftquotation=\lowerleftdoubleninequote,
- \c!rightquotation=\upperrightdoublesixquote,
- \c!date={\v!day,{.},\ ,\v!month,\ ,\v!year},
- \c!state=\v!stop]
+ [\s!sl]
+ [\c!spacing=\v!packed,
+ \c!leftsentence={\hbox{--~}},
+ \c!rightsentence={\hbox{~--}},
+ \c!leftsubsentence={--},
+ \c!rightsubsentence={--},
+ %\c!leftquote=\lowerleftsingleninequote,
+ %\c!rightquote=\upperrightsinglesixquote,
+ %\c!leftquotation=\lowerleftdoubleninequote,
+ %\c!rightquotation=\upperrightdoublesixquote,
+ \c!leftquote=\guilsingleright,
+ \c!rightquote=\guilsingleleft,
+ \c!leftquotation=\rightguillemot,
+ \c!rightquotation=\leftguillemot,
+ \c!date={\v!day,{.},\ ,\v!month,\ ,\v!year},
+ \c!state=\v!stop]
\installlanguage [polish] [\s!pl]
\installlanguage [czech] [\s!cz]
diff --git a/tex/context/base/m-newmat.tex b/tex/context/base/m-newmat.tex
index eb3208d94..fad746d93 100644
--- a/tex/context/base/m-newmat.tex
+++ b/tex/context/base/m-newmat.tex
@@ -53,7 +53,7 @@
%D have the symbol available. \symbol[qed]
\def\QED{\symbol[qed]}
-
+
%D \macros
%D {genfrac}
%D
@@ -102,20 +102,20 @@
%\def\tfrac {\genfrac\empty\empty\empty\textstyle}
%\def\frac {\genfrac\empty\empty\empty\donothing}
-\def\dfrac {\genfrac{}{}{}\displaystyle}
-\def\tfrac {\genfrac{}{}{}\textstyle}
-\def\frac {\genfrac{}{}{}\donothing}
+\def\dfrac {\genfrac\empty\empty\empty\displaystyle}
+\def\tfrac {\genfrac\empty\empty\empty\textstyle}
+\def\frac {\genfrac\empty\empty\empty\donothing}
\def\dbinom{\genfrac()\zeropoint\displaystyle}
\def\tbinom{\genfrac()\zeropoint\textstyle}
\def\binom {\genfrac()\zeropoint\donothing}
-\def\xfrac {\genfrac{}{}{}\scriptstyle}
-\def\xxfrac{\genfrac{}{}{}\scriptscriptstyle}
+\def\xfrac {\genfrac\empty\empty\empty\scriptstyle}
+\def\xxfrac{\genfrac\empty\empty\empty\scriptscriptstyle}
%D Better:
-\unexpanded\def\frac#1#2{\mathematics{\genfrac{}{}{}\donothing{#1}{#2}}}
+\unexpanded\def\frac#1#2{\mathematics{\genfrac\empty\empty\empty\donothing{#1}{#2}}}
%D [HH] This shows up as:
%D
@@ -127,7 +127,7 @@
%D \typebuffer
%D
%D \getbuffer
-
+
%D \macros
%D {text}
%D
@@ -174,7 +174,7 @@
%D \typebuffer
%D
%D \getbuffer
-
+
%D \macros
%D {mathhexbox}
%D
@@ -191,7 +191,7 @@
\def\boxed
{\ifmmode\expandafter\mframed\else\expandafter\framed\fi}
-
+
%D \macros
%D {cfrac}
%D
@@ -243,9 +243,45 @@
%D \typebuffer
%D
%D \getbuffer
-
+
+%D \macros
+%D {splitfrac, splitdfrac}
+%D
+%D Occasionally one needs to typeset multi||line fractions.
+%D These commands use \tex{genfrac} to create such fractions.
+%D
+%D \startbuffer
+%D \startformula
+%D a=\frac{
+%D \splitfrac{xy + xy + xy + xy + xy}
+%D {+ xy + xy + xy + xy}
+%D }
+%D {z}
+%D =\frac{
+%D \splitdfrac{xy + xy + xy + xy + xy}
+%D {+ xy + xy + xy + xy}
+%D }
+%D {z}
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D These macros are based on Michael J.~Downes posting on
+%D comp.text.tex on 2001/12/06
+
+\def\splitfrac#1#2%
+ {\genfrac\empty\empty\zeropoint\textstyle%
+ {\textstyle#1\quad\hfill}%
+ {\textstyle\hfill\quad\mathstrut#2}}
+
+\def\splitdfrac#1#2%
+ {\genfrac\empty\empty\zeropoint\displaystyle%
+ {#1\quad\hfill}
+ {\hfill\quad\mathstrut #2}}
+
\protect \endinput
-
+
%D \macros
%D {startsubarray,substack,startsmallmatrix}
%D
diff --git a/tex/context/base/m-streams.tex b/tex/context/base/m-streams.tex
index c1ef994ff..9d7e8d7dd 100644
--- a/tex/context/base/m-streams.tex
+++ b/tex/context/base/m-streams.tex
@@ -68,6 +68,9 @@
%D \SwitchToRight \dorecurse{10}{\dontleavehmode{\bs\RecurseLevel:r \begstrut \input davis \endstrut \endgraf}}
%D \SwitchToNormal \SynchronizeLeftAndRight
%D }
+%D
+%D \FlushLeftAndRight
+%D
%D \stoptext
%D \stoptyping
%D
diff --git a/tex/context/base/math-ini.tex b/tex/context/base/math-ini.tex
index 1957ab0d7..200d23d98 100644
--- a/tex/context/base/math-ini.tex
+++ b/tex/context/base/math-ini.tex
@@ -710,6 +710,49 @@
%D \showmathtoken{Gamma} $\Gamma \Delta \alpha \delta \zeta$
%D \stoptyping
+%D \macros
+%D {nonknuthmode, donknuthmode}
+%D
+%D The underscore is frequently used in manuals but unfortunately \TEX\ prefers
+%D it to be a math specific character. And since computer modern fonts didn't
+%D have an underscore, one had to use commands to fake one. Nowadays we do
+%D have underscores in latin modern, and since all other fonts have them, we
+%D decided to get away from the restriction to use the underscore character in
+%D text mode.
+%D
+%D \starttyping
+%D \def\test#1{#1}
+%D
+%D \nonknuthmode $x_2$ x_2 \test{$x_2$} \test{x_2}
+%D
+%D \donknuthmode $x_2$ x_2 \test{$x_2$} \test{x_2}
+%D \stoptyping
+%D
+%D The result is as expected: the first line typesets ok, while the second
+%D one triggers an error message.
+
+\bgroup
+
+ \ifx\normalsuber\undefined \def\normalsuber{_} \fi
+ \ifx\normalsuper\undefined \def\normalsuper{^} \fi
+
+ \catcode`_=\active
+ \catcode`^=\active
+
+ \gdef\nonknuthmode
+ {\appendtoks\let_\normalsuber\let^\normalsuper\to\everymathematics
+ \mathcode`_="8000
+ \mathcode`^="8000
+ \catcode`_=\@@other
+ \catcode`^=\@@other
+ \let\nonknuthmode\relax}
+
+ \gdef\donknuthmode
+ {\catcode`_=\@@subscript
+ \catcode`^=\@@superscript}
+
+\egroup
+
\protect \endinput
\tracemathcollectiontrue
diff --git a/tex/context/base/math-tex.tex b/tex/context/base/math-tex.tex
index 42fb9bd17..386d40b84 100644
--- a/tex/context/base/math-tex.tex
+++ b/tex/context/base/math-tex.tex
@@ -636,4 +636,35 @@
\definemathcommand [colonsim] [rel] {\coloncolon\colonsep\sim}
\definemathcommand [simcoloncolon] [rel] {\sim\coloncolon\colonsep}
+%D More integrals (AM):
+
+\def\dointkern{\mkern-6mu\mathchoice{\mkern-3mu}{}{}{}}
+
+\definemathcommand [iint] {\repeatintegral\plusone }
+\definemathcommand [iiint] {\repeatintegral\plustwo }
+\definemathcommand [iiiint] {\repeatintegral\plusthree}
+
+\def\repeatintegral#1%
+ {\scratchtoks\emptytoks
+ \let\dointlimits\nolimits
+ \dorecurse{#1}{\appendtoks \intop \dointkern \to \scratchtoks}
+ \appendtoks \intop \dointlimits \to \scratchtoks
+ \edef\dodorepeatintegral{\the\scratchtoks}%
+ \futurelet\next\dorepeatintegral}
+
+%D If the \type{\limits} option is used after \type{\iint}, use
+%D \type{\mathop} and fudge the left hand space a bit to make the
+%D subscript visually centered.
+
+\def\dorepeatintegral
+ {\ifx\next\limits \dointlimitcorrection \else
+ \ifx\next\displaylimits \dointlimitcorrection \fi\fi
+ \dodorepeatintegral}
+
+\def\dointlimitcorrection
+ {\mkern-7mu\mathchoice{\mkern-2mu}{}{}{}%
+ \mathop\bgroup
+ \mkern7mu\mathchoice{\mkern2mu}{}{}{}%
+ \let\dointlimits\egroup}
+
\protect \endinput
diff --git a/tex/context/base/meta-tex.tex b/tex/context/base/meta-tex.tex
index 7ca57e0c4..75aeb54c7 100644
--- a/tex/context/base/meta-tex.tex
+++ b/tex/context/base/meta-tex.tex
@@ -20,6 +20,8 @@
%D the Dave Matthews band in the background (or the corner of my
%D screen).
+% todo: testmacro for empty pic
+
\unprotect
\newwrite\TeXtextwrite
diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex
index d293472b3..043d5fb6e 100644
--- a/tex/context/base/mult-con.tex
+++ b/tex/context/base/mult-con.tex
@@ -18,6 +18,13 @@
\startlogginginterface context.con
+%D Todo:
+
+\startvariables all
+ lesshyphenation: lesshyphenation
+ morehyphenation: morehyphenation
+\stopvariables
+
%D First come some variables. These are used as keywords and
%D therefore need a different treatment.
@@ -1650,6 +1657,16 @@ subsubsubsubsubsubject: subsubsubsubsubonderwerp subsubsubsubsub
symbol symbol
simbolo simbol
symbole
+
+ closesymbol: sluitsymbool closesymbol
+ closesymbol closesymbol
+ closesymbol closesymbol
+ closesymbol
+ closecommand: sluitcommando closecommand
+ closecommand closecommand
+ closecommand closecommand
+ closecommand
+
symbolset: symboolset symbolset
symbolset sadasymbolu
setsimboli setsimbol
@@ -1738,6 +1755,20 @@ numberwidth: nummerbreedte numberwidth
titelabstand vzdalenosttitulek
distanzatitolo distantatitlu
distancetitre
+
+ titleleft: titellinks titleleft % new
+ titleleft titleleft
+ titleleft titleleft
+ titleleft
+ titleright: titelrechts titleright % new
+ titleright titleright
+ titleright titleright
+ titleright
+ titlecommand: titelcommando titlecommand % new
+ titlecommand titlecommand
+ titlecommand titlecommand
+ titlecommand
+
aligntitle: titeluitlijnen aligntitle
titelausrichten zarovnejtitul
allineatitolo alinieretitlu
@@ -1890,6 +1921,11 @@ numberwidth: nummerbreedte numberwidth
selbeseite stejnastranka
stessapagina aceeasipagina
memepage
+% new
+itemalign: itemuitlijnen itemalign
+ itemalign itemalign
+ itemalign itemalign
+ itemalign
sidealign: zijuitlijnen sidealign
sidealign sidealign
sidealign sidealign
@@ -2268,6 +2304,10 @@ numberwidth: nummerbreedte numberwidth
gritter mrizka
griglia grila
grille
+ nogrid: geengrid nogrid
+ nogrid nogrid
+ nogrid nogrid
+ nogrid
big: groot big
gross velke
grande mare
@@ -2704,6 +2744,10 @@ numberwidth: nummerbreedte numberwidth
passend prizpusobive
adatta ajustat
adapte
+nofit: nietpassend nofit
+ nofit nofit
+ nofit nofit
+ nofit
postscript: postscript postscript
postscript postscript
postscript postscript
@@ -3841,6 +3885,15 @@ numberwidth: nummerbreedte numberwidth
ToggleLayer ToggleLayer
ToggleLayer
+ ShowThumbs: ShowThumbs ShowThumbs
+ ShowThumbs UkazNahledy
+ MostraThumbs ShowThumbs
+ ShowThumbs
+ ShowBookmarks: ShowBookmarks ShowBookmarks
+ ShowBookmarks UkazZalozky
+ MostraSegnalibro ShowBookmarks
+ ShowBookmarks
+
\stopvariables
%D Here are some symbol names. We capitalize them because they are
diff --git a/tex/context/base/mult-ini.tex b/tex/context/base/mult-ini.tex
index 444edcfee..68180d372 100644
--- a/tex/context/base/mult-ini.tex
+++ b/tex/context/base/mult-ini.tex
@@ -1305,6 +1305,17 @@
{\doifdefined{#1}{\doifvaluesomething{#1}{\doifnotvalue{#1}{#2}
{\writestatus{problems}{set #1 to #2 overloads \getvalue{#1}}}}}}
+% \def\checksetvalue#1#2%
+% {\expandafter\ifx\csname#1\endcsname\relax\else
+% \expandafter\ifx\csname#1\endcsname\empty\else
+% \def\!!stringa{#1}%
+% \def\!!stringb{#2}%
+% \ifx\!!stringa\!!stringb\else
+% \writestatus{problems}{set #1 to #2 overloads \getvalue{#1}}%
+% \fi
+% \fi
+% \fi}
+
\def\startvariables{\startinterfaceobjects\setinterfacevariable\stopvariables}
\def\startconstants{\startinterfaceobjects\setinterfaceconstant\stopconstants}
diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex
index 98d62bcb5..6ebade65d 100644
--- a/tex/context/base/page-flt.tex
+++ b/tex/context/base/page-flt.tex
@@ -213,7 +213,6 @@
\def\setupcaption
{\dodoubleargument\dosetupcaption}
-
\def\doemptyblock#1%
{\localframed
[\??fl#1]
@@ -1531,7 +1530,8 @@
\def\dosettempcaptionbox
{\setbox\tempcaptionbox\vbox\bgroup
- \expanded{\setupalign[\v!new,\v!reset,\floatcaptionparameter\c!align,\v!old]}%
+ %expanded{\setupalign[\v!new,\v!reset,\floatcaptionparameter\c!align,\v!old]}% wrong! see icare
+ \expanded{\setupalign[\v!reset,\floatcaptionparameter\c!align]}% i need to check what reset does
\let\next}
\def\dopreparesideautocaption#1#2#3#4%
@@ -2409,8 +2409,7 @@
\def\dodostartpostponing
{\doglobal\increment\nofpostponedblocks
\showmessage\m!layouts3\nofpostponedblocks
- \dostartbuffer[pbuf-\nofpostponedblocks]%
- [\e!start\v!postponing][\e!stop\v!postponing]}
+ \expanded{\dostartbuffer[pbuf-\nofpostponedblocks][\e!start\v!postponing][\e!stop\v!postponing]}}
\def\dooutput{\sidefloatoutput} % redefinition of \dooutput
diff --git a/tex/context/base/page-ini.tex b/tex/context/base/page-ini.tex
index bbcc41f0a..a51395730 100644
--- a/tex/context/base/page-ini.tex
+++ b/tex/context/base/page-ini.tex
@@ -632,6 +632,9 @@
\fi
+\ifx\mkprocesscolumncontents\undefined\let\mkprocesscolumncontents\gobbleoneargument\fi
+\ifx\mkprocesspagecontents \undefined\let\mkprocesspagecontents \gobbleoneargument\fi
+
\def\normalejectpenalty{-\@M} \let\ejectpenalty\normalejectpenalty
\def\normalsuperpenalty{-\@MM} \let\superpenalty\normalsuperpenalty
@@ -774,6 +777,13 @@
\outputmessage-{normal}\outputpenalty}
\mainoutput{\invokeoutputroutine} \output{\inotrtrue\the\mainoutput}
+
+%D Some hooks:
+
+\newtoks \everybeforeoutput
+\newtoks \everyafteroutput
+
+\output{\inotrtrue\the\everybeforeoutput\the\mainoutput\the\everyafteroutput}
\installoutput\synchronizeoutput % maybe add pagediscards
{\ifvoid\normalpagebox\else\unvbox\normalpagebox\fi}
@@ -1000,7 +1010,7 @@
\def\dofinaloutput#1#2% \vbox: prevents spurious spaces in every..pagebody
{\beforefinaloutput
- \the\everybeforeshipout
+ \the\everybeforeshipout % brrr not in shipout
\ifspecialbasedsettings
\myshipout{\hbox{\hbox to \zeropoint{\the\pageboundsettings}%
\hbox{\vbox{\dopagebody#1#2\setpagecounters}}}}%
@@ -1823,6 +1833,7 @@
\def\noshipout
{\writestatus\m!systems{ignoring further shipouts}%
+ \global\advance\realpageno\minusone % else no flush of resources
\dowithnextbox{\deadcycles\zerocount}}
% \def\doignorerestoftext
diff --git a/tex/context/base/page-lin.tex b/tex/context/base/page-lin.tex
index d28674686..66a09527c 100644
--- a/tex/context/base/page-lin.tex
+++ b/tex/context/base/page-lin.tex
@@ -104,6 +104,11 @@
\let\obeyedspace\normalspace
\let\ =\normalspace}
+\installspacehandler \v!fixed
+ {\obeyspaces
+ \def\obeyedspace{\mathortext\normalspace{\dontleavehmode\fixedspace}}%
+ \let\ =\obeyedspace}
+
\def\activatespacehandler#1%
{\executeifdefined{\??sr#1}{\activatespacehandler\v!off}}
diff --git a/tex/context/base/page-mul.tex b/tex/context/base/page-mul.tex
index edee9cee1..8efa1af18 100644
--- a/tex/context/base/page-mul.tex
+++ b/tex/context/base/page-mul.tex
@@ -427,7 +427,7 @@
\ifsomefloatwaiting
\showmessage\m!columns6{\the\savednoffloats}%
\global\setbox\savedfloatlist\box\floatlist
- \xdef\restoresavedfloats%
+ \xdef\restoresavedfloats
{\global\savednoffloats\the\savednoffloats
\global\setbox\floatlist\box\savedfloatlist
\global\noexpand\somefloatwaitingtrue}%
@@ -488,7 +488,7 @@
%D e.g. when there is no text given between \type{\begin..}
%D and \type{\end..}. The \type{\par} is needed!
-\chardef\multicolumnendsyncmethod\plusone % 1: old sync 2: new sync (cont-loc/project)
+\chardef\multicolumnendsyncmethod\plusone % 1: old sync 2: new sync (cont-loc/project) / may fail ! ! ! !
\def\endmulticolumns
{%\par
@@ -608,6 +608,8 @@
\setmulticolumnsout
\showcomposition
\setmaxcolumndimensions
+ \dohandleallcolumns
+ {\mkprocesscolumncontents\currentcolumnbox}%
\postprocesscolumns
\dohandleallcolumns % \hbox i.v.m. \showcomposition
{\global\setbox\currentcolumnbox\hbox to \localcolumnwidth
diff --git a/tex/context/base/page-txt.tex b/tex/context/base/page-txt.tex
index ecc82c46e..3dc7721c9 100644
--- a/tex/context/base/page-txt.tex
+++ b/tex/context/base/page-txt.tex
@@ -67,7 +67,7 @@
\def\setuplayouttext
{\dotripleempty\dosetuplayouttext}
-\def\dosetuplayouttext[#1][#2][#3]%
+\def\dosetuplayouttext[#1][#2][#3]% beware, non global
{\ifthirdargument
\getparameters[\??tk#1#2][#3]%
\else
@@ -428,6 +428,7 @@
\fi
\hskip\leftmargindistance
\egroup
+ \mkprocesspagecontents{#2}%
\settextpagecontent\scratchpagebox{#1}{#2}%
\setbox\scratchpagebox\vbox
{\startlayoutcomponent{textbody}{text body}%
diff --git a/tex/context/base/regi-ini.tex b/tex/context/base/regi-ini.tex
index 3de73d90a..42bbf9718 100644
--- a/tex/context/base/regi-ini.tex
+++ b/tex/context/base/regi-ini.tex
@@ -177,6 +177,6 @@
%D Plugins.
-\loadmkfile{regi-ini}
+\loadmarkfile{regi-ini}
\protect \endinput
diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex
index 6f16942b2..dd5160a0d 100644
--- a/tex/context/base/s-abr-01.tex
+++ b/tex/context/base/s-abr-01.tex
@@ -19,8 +19,10 @@
\protect
-\logo [MKII] {MkII}
-\logo [MKIV] {MkIV}
+\logo [MKI] {MkI}
+\logo [MKII] {MkII}
+\logo [MKIII] {MkIII}
+\logo [MKIV] {MkIV}
\logo [ACROBAT] {Acro\-bat}
\logo [AFM] {afm}
@@ -33,6 +35,7 @@
\logo [ANSI] {ansi}
\logo [ASCIITEX] {ascii\TeX}
\logo [ASCII] {ascii}
+\logo [BACHOTEX] {Bacho\TeX}
\logo [BIBTEX] {bib\TeX}
\logo [BLUESKY] {BlueSky}
\logo [BSD] {bsd}
@@ -45,6 +48,7 @@
\logo [CALCMATH] {CalcMath}
\logo [CONTEXT] {\ConTeXt}
\logo [CSS] {css}
+\logo [CID] {cid}
\logo [CTAN] {ctan}
\logo [CWEB] {cweb}
\logo [DANTE] {Dante}
@@ -69,6 +73,7 @@
\logo [EMTEX] {em\TeX}
\logo [ENCTEX] {enc\TeX}
\logo [EPS] {eps}
+\logo [EUROBACHOTEX] {EuroBacho\TeX}
\logo [ENCODING] {enc}
\logo [MAPPING] {map}
\logo [EXAMPLEX] {examplex}
@@ -88,12 +93,13 @@
\logo [FPTEX] {fp\TeX}
\logo [FREEBSD] {FreeBSD}
\logo [FOXET] {foXet}
+\logo [FONTFORGE] {FontForge}
\logo [FTP] {ftp}
\logo [GHOSTSCRIPT]{Ghost\-script}
\logo [GHOSTVIEW] {Ghost\-view}
\logo [GIF] {gif}
\logo [GNU] {gnu}
-\logo [GNUPLOT] {gnuplot}
+\logo [GNUPLOT] {gnuplot}
\logo [GS] {Ghost\-Script}
\logo [GUST] {Gust}
\logo [GWTEX] {gw\TeX}
@@ -101,8 +107,10 @@
\logo [HTTP] {http}
\logo [HSB] {hsb}
\logo [HTML] {html}
+\logo [XHTML] {xhtml}
\logo [IBM] {ibm}
\logo [IMAGEMAGICK]{ImageMagick}
+\logo [INITEX] {ini\TeX}
\logo [INRSTEX] {inrs\TeX}
\logo [IO] {io}
\logo [IRCNET] {IRCnet}
@@ -113,6 +121,7 @@
\logo [JPG] {jpg}
\logo [KPSE] {kpse}
\logo [KPSEWHICH] {kpsewhich}
+\logo [KPATHSEA] {kpathsea}
\logo [LAMSTEX] {\LamSTeX}
\logo [LATEXTE] {\LaTeX2e}
\logo [LATEXTN] {\LaTeX2.09}
@@ -122,6 +131,7 @@
\logo [LUAJIT] {LuaJIT}
\logo [LUA] {Lua}
\logo [LUATEX] {Lua\TeX}
+\logo [TEXLUA] {\TeX Lua}
\logo [LUATOOLS] {luatools}
\logo [MACOSX] {MacOSX}
\logo [MACROTEX] {Macro\TeX}
@@ -176,6 +186,7 @@
\logo [PS] {Post\-Script}
\logo [READER] {Acro\-bat Reader}
\logo [RELAXNG] {Relax\kern.125emNG}
+\logo [RAM] {ram}
\logo [RUBY] {Ruby}
\logo [RGB] {rgb}
\logo [SCITE] {SciTE}
@@ -193,12 +204,14 @@
\logo [TEXFORM] {\TeX form}
\logo [TEXLIVE] {\TeX Live}
\logo [TEXMF] {texmf}
-\logo [TEXNL] {TEX-NL}
+\logo [TEXNL] {tex-nl}
+\logo [TEXXET] {\TeX\XeT} \def\XeT{XeT}
\logo [TEXSHOW] {\TeX show}
\logo [TEXSPELL] {\TeX spell}
\logo [TEXUTIL] {\TeX util}
\logo [TEXWORK] {\TeX work}
\logo [TEXFONT] {\TeX font}
+\logo [TEXTMATE] {TextMate}
\logo [TEXTOOLS] {\TeX tools}
\logo [TRUETYPE] {TrueType}
\logo [TTF] {ttf}
@@ -212,6 +225,8 @@
\logo [TEXSYNC] {texsync}
\logo [TEX] {\TeX}
\logo [TFM] {tfm}
+\logo [VF] {vf}
+\logo [PK] {pk}
\logo [TIFFINFO] {tiffinfo}
\logo [TIFFTAGS] {tifftags}
\logo [TIFF] {tiff}
@@ -235,6 +250,7 @@
\logo [WEB] {web}
\logo [WINNT] {WinNT}
\logo [WIKI] {Wiki}
+\logo [WINDOWS] {Windows}
\logo [WINNX] {Win9x}
\logo [WWW] {www}
\logo [WYSIWYG] {wysiwyg}
diff --git a/tex/context/base/s-fnt-02.tex b/tex/context/base/s-fnt-02.tex
index c3ffeb9b4..69f976102 100644
--- a/tex/context/base/s-fnt-02.tex
+++ b/tex/context/base/s-fnt-02.tex
@@ -58,10 +58,38 @@
\definefont[FontOne][\getvariable{glyphs}{name-1} at 280pt]
\definefont[FontTwo][\getvariable{glyphs}{name-2} at 280pt]
+% \dostepwiserecurse{0}{255}{1}
+% {\doiffontcharelse{\getvariable{glyphs}{name-1}}{\recurselevel}
+% {\doiffontcharelse{\getvariable{glyphs}{name-2}}{\recurselevel}
+% {\startstandardmakeup
+% \doifelse{\getvariable{glyphs}{frame}}{on} % too many box calculations when off, but who cares
+% {\boxrulewidth=2pt}
+% {\boxrulewidth=0pt}
+% \setbox 0=\hbox{\white\ruledhbox{\FontOne \char\recurselevel}}
+% \setbox 2=\hbox{\white\ruledhbox{\FontTwo \char\recurselevel}}
+% \setbox 4=\hbox{\FontOne \ColorOne \char\recurselevel}
+% \setbox 6=\hbox{\FontTwo \ColorTwo \char\recurselevel}
+% \setbox 8=\hbox{\BackOne \ruledhbox{\FontOne \phantom{\char\recurselevel}}}
+% \setbox10=\hbox{\BackTwo \ruledhbox{\FontTwo \phantom{\char\recurselevel}}}
+% \vfill
+% \hbox{\dostepwiserecurse{0}{10}{2}{\hbox to \hsize{\hss\box\recurselevel\hss}\hskip-\hsize}}
+% \vfill
+% \tttf
+% \setstrut
+% \hbox to \hsize{\strut\hss
+% {\ColorOne \getvariable{glyphs}{name-1}}\quad
+% {\ColorTwo \getvariable{glyphs}{name-2}}\quad
+% {\ColorNone char \recurselevel }\hss}
+% \stopstandardmakeup}
+% {}}
+% {}}
+
\dostepwiserecurse{0}{255}{1}
- {\doiffontcharelse{\getvariable{glyphs}{name-1}}{\recurselevel}
- {\doiffontcharelse{\getvariable{glyphs}{name-2}}{\recurselevel}
- {\startstandardmakeup
+ {\donefalse
+ \doiffontcharelse{\getvariable{glyphs}{name-1}}{\recurselevel}{\donetrue}{}%
+ \doiffontcharelse{\getvariable{glyphs}{name-2}}{\recurselevel}{\donetrue}{}%
+ \ifdone
+ \startstandardmakeup
\doifelse{\getvariable{glyphs}{frame}}{on} % too many box calculations when off, but who cares
{\boxrulewidth=2pt}
{\boxrulewidth=0pt}
@@ -80,9 +108,8 @@
{\ColorOne \getvariable{glyphs}{name-1}}\quad
{\ColorTwo \getvariable{glyphs}{name-2}}\quad
{\ColorNone char \recurselevel }\hss}
- \stopstandardmakeup}
- {}}
- {}}
+ \stopstandardmakeup
+ \fi}
\stopsetups
diff --git a/tex/context/base/sort-def.mkii b/tex/context/base/sort-def.mkii
new file mode 100644
index 000000000..10dc31b14
--- /dev/null
+++ b/tex/context/base/sort-def.mkii
@@ -0,0 +1,450 @@
+%D \module
+%D [ file=sort-def,
+%D version=2005.08.08,
+%D title=\CONTEXT\ Sort Macros,
+%D subtitle=Defaults,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module replaces existing sort key handling and is meant to be
+%D used with the new texutil functionality. Here we define the default
+%D mappings
+
+\exportsortexpansion{aeligature} {ae}
+\exportsortexpansion{AEligature} {AE}
+\exportsortexpansion{ijligature} {ij}
+\exportsortexpansion{IJligature} {IJ}
+\exportsortexpansion{oeligature} {oe}
+\exportsortexpansion{OEligature} {OE}
+
+\exportsortexpansion{ssharp} {ss}
+\exportsortexpansion{Ssharp} {SS}
+
+\exportsortexpansion{thorn} {}
+\exportsortexpansion{Thorn} {}
+
+\exportsortexpansion{eth} {}
+\exportsortexpansion{Eth} {}
+
+\exportsortexpansion{dj} {dstroke}
+\exportsortexpansion{Dj} {Dstroke}
+
+\exportsortexpansion{Acircumflex} {}
+\exportsortexpansion{acircumflex} {}
+\exportsortexpansion{Ccircumflex} {}
+\exportsortexpansion{ccircumflex} {}
+\exportsortexpansion{Ecircumflex} {}
+\exportsortexpansion{ecircumflex} {}
+\exportsortexpansion{Gcircumflex} {}
+\exportsortexpansion{gcircumflex} {}
+\exportsortexpansion{Hcircumflex} {}
+\exportsortexpansion{hcircumflex} {}
+\exportsortexpansion{Icircumflex} {}
+\exportsortexpansion{icircumflex} {}
+\exportsortexpansion{Jcircumflex} {}
+\exportsortexpansion{jcircumflex} {}
+\exportsortexpansion{Ocircumflex} {}
+\exportsortexpansion{ocircumflex} {}
+\exportsortexpansion{Scircumflex} {}
+\exportsortexpansion{scircumflex} {}
+\exportsortexpansion{Ucircumflex} {}
+\exportsortexpansion{ucircumflex} {}
+\exportsortexpansion{Wcircumflex} {}
+\exportsortexpansion{wcircumflex} {}
+\exportsortexpansion{Ycircumflex} {}
+\exportsortexpansion{ycircumflex} {}
+
+\exportsortexpansion{Agrave} {}
+\exportsortexpansion{agrave} {}
+\exportsortexpansion{Egrave} {}
+\exportsortexpansion{egrave} {}
+\exportsortexpansion{Igrave} {}
+\exportsortexpansion{igrave} {}
+\exportsortexpansion{Ograve} {}
+\exportsortexpansion{ograve} {}
+\exportsortexpansion{Ugrave} {}
+\exportsortexpansion{ugrave} {}
+\exportsortexpansion{Ygrave} {}
+\exportsortexpansion{ygrave} {}
+
+\exportsortexpansion{Atilde} {}
+\exportsortexpansion{atilde} {}
+\exportsortexpansion{Itilde} {}
+\exportsortexpansion{itilde} {}
+\exportsortexpansion{Ntilde} {}
+\exportsortexpansion{ntilde} {}
+\exportsortexpansion{Otilde} {}
+\exportsortexpansion{otilde} {}
+\exportsortexpansion{Utilde} {}
+\exportsortexpansion{utilde} {}
+\exportsortexpansion{Ytilde} {}
+\exportsortexpansion{ytilde} {}
+
+\exportsortexpansion{Adiaeresis} {}
+\exportsortexpansion{adiaeresis} {}
+\exportsortexpansion{Ediaeresis} {}
+\exportsortexpansion{ediaeresis} {}
+\exportsortexpansion{Idiaeresis} {}
+\exportsortexpansion{idiaeresis} {}
+\exportsortexpansion{Odiaeresis} {}
+\exportsortexpansion{odiaeresis} {}
+\exportsortexpansion{Udiaeresis} {}
+\exportsortexpansion{udiaeresis} {}
+\exportsortexpansion{Ydiaeresis} {}
+\exportsortexpansion{ydiaeresis} {}
+
+\exportsortexpansion{Aacute} {}
+\exportsortexpansion{aacute} {}
+\exportsortexpansion{Cacute} {}
+\exportsortexpansion{cacute} {}
+\exportsortexpansion{Eacute} {}
+\exportsortexpansion{eacute} {}
+\exportsortexpansion{Iacute} {}
+\exportsortexpansion{iacute} {}
+\exportsortexpansion{Lacute} {}
+\exportsortexpansion{lacute} {}
+\exportsortexpansion{Nacute} {}
+\exportsortexpansion{nacute} {}
+\exportsortexpansion{Oacute} {}
+\exportsortexpansion{oacute} {}
+\exportsortexpansion{Racute} {}
+\exportsortexpansion{racute} {}
+\exportsortexpansion{Sacute} {}
+\exportsortexpansion{sacute} {}
+\exportsortexpansion{Uacute} {}
+\exportsortexpansion{uacute} {}
+\exportsortexpansion{Yacute} {}
+\exportsortexpansion{yacute} {}
+\exportsortexpansion{Zacute} {}
+\exportsortexpansion{zacute} {}
+
+\exportsortexpansion{dstroke} {}
+\exportsortexpansion{Dstroke} {}
+\exportsortexpansion{Hstroke} {}
+\exportsortexpansion{hstroke} {}
+\exportsortexpansion{Tstroke} {}
+\exportsortexpansion{tstroke} {}
+
+\exportsortexpansion{Cdotaccent} {}
+\exportsortexpansion{cdotaccent} {}
+\exportsortexpansion{Edotaccent} {}
+\exportsortexpansion{edotaccent} {}
+\exportsortexpansion{Gdotaccent} {}
+\exportsortexpansion{gdotaccent} {}
+\exportsortexpansion{Idotaccent} {}
+\exportsortexpansion{idotaccent} {}
+\exportsortexpansion{Zdotaccent} {}
+\exportsortexpansion{zdotaccent} {}
+
+\exportsortexpansion{Amacron} {}
+\exportsortexpansion{amacron} {}
+\exportsortexpansion{Emacron} {}
+\exportsortexpansion{emacron} {}
+\exportsortexpansion{Imacron} {}
+\exportsortexpansion{imacron} {}
+\exportsortexpansion{Omacron} {}
+\exportsortexpansion{omacron} {}
+\exportsortexpansion{Umacron} {}
+\exportsortexpansion{umacron} {}
+
+\exportsortexpansion{Ccedilla} {}
+\exportsortexpansion{ccedilla} {}
+\exportsortexpansion{Kcedilla} {}
+\exportsortexpansion{kcedilla} {}
+\exportsortexpansion{Lcedilla} {}
+\exportsortexpansion{lcedilla} {}
+\exportsortexpansion{Ncedilla} {}
+\exportsortexpansion{ncedilla} {}
+\exportsortexpansion{Rcedilla} {}
+\exportsortexpansion{rcedilla} {}
+\exportsortexpansion{Scedilla} {}
+\exportsortexpansion{scedilla} {}
+\exportsortexpansion{Tcedilla} {}
+\exportsortexpansion{tcedilla} {}
+
+\exportsortexpansion{Ohungarumlaut} {}
+\exportsortexpansion{ohungarumlaut} {}
+\exportsortexpansion{Uhungarumlaut} {}
+\exportsortexpansion{uhungarumlaut} {}
+
+\exportsortexpansion{Aogonek} {}
+\exportsortexpansion{aogonek} {}
+\exportsortexpansion{Eogonek} {}
+\exportsortexpansion{eogonek} {}
+\exportsortexpansion{Iogonek} {}
+\exportsortexpansion{iogonek} {}
+\exportsortexpansion{Uogonek} {}
+\exportsortexpansion{uogonek} {}
+
+\exportsortexpansion{Aring} {}
+\exportsortexpansion{aring} {}
+\exportsortexpansion{Uring} {}
+\exportsortexpansion{uring} {}
+
+\exportsortexpansion{Abreve} {}
+\exportsortexpansion{abreve} {}
+\exportsortexpansion{Ebreve} {}
+\exportsortexpansion{ebreve} {}
+\exportsortexpansion{Gbreve} {}
+\exportsortexpansion{gbreve} {}
+\exportsortexpansion{Ibreve} {}
+\exportsortexpansion{ibreve} {}
+\exportsortexpansion{Obreve} {}
+\exportsortexpansion{obreve} {}
+\exportsortexpansion{Ubreve} {}
+\exportsortexpansion{ubreve} {}
+
+\exportsortexpansion{Ccaron} {}
+\exportsortexpansion{ccaron} {}
+\exportsortexpansion{Dcaron} {}
+\exportsortexpansion{dcaron} {}
+\exportsortexpansion{Ecaron} {}
+\exportsortexpansion{ecaron} {}
+\exportsortexpansion{Lcaron} {}
+\exportsortexpansion{lcaron} {}
+\exportsortexpansion{Ncaron} {}
+\exportsortexpansion{ncaron} {}
+\exportsortexpansion{Rcaron} {}
+\exportsortexpansion{rcaron} {}
+\exportsortexpansion{Scaron} {}
+\exportsortexpansion{scaron} {}
+\exportsortexpansion{Tcaron} {}
+\exportsortexpansion{tcaron} {}
+\exportsortexpansion{Ycaron} {}
+\exportsortexpansion{ycaron} {}
+\exportsortexpansion{Zcaron} {}
+\exportsortexpansion{zcaron} {}
+
+\exportsortexpansion{Lstroke} {}
+\exportsortexpansion{lstroke} {}
+\exportsortexpansion{Ostroke} {}
+\exportsortexpansion{ostroke} {}
+
+\exportsortexpansion{aumlaut} {}
+\exportsortexpansion{eumlaut} {}
+\exportsortexpansion{iumlaut} {}
+\exportsortexpansion{oumlaut} {}
+\exportsortexpansion{uumlaut} {}
+
+\exportsortexpansion{Aumlaut} {}
+\exportsortexpansion{Eumlaut} {}
+\exportsortexpansion{Iumlaut} {}
+\exportsortexpansion{Oumlaut} {}
+\exportsortexpansion{Uumlaut} {}
+
+\exportsortexpansion{scommaaccent} {}
+\exportsortexpansion{Scommaaccent} {}
+\exportsortexpansion{tcommaaccent} {}
+\exportsortexpansion{Tcommaaccent} {}
+
+\exportsortexpansion{Etilde} {}
+\exportsortexpansion{etilde} {}
+
+\exportsortexpansion{Ahook} {}
+\exportsortexpansion{ahook} {}
+\exportsortexpansion{Ehook} {}
+\exportsortexpansion{ehook} {}
+\exportsortexpansion{Ihook} {}
+\exportsortexpansion{ihook} {}
+\exportsortexpansion{Ohook} {}
+\exportsortexpansion{ohook} {}
+\exportsortexpansion{Uhook} {}
+\exportsortexpansion{uhook} {}
+\exportsortexpansion{Yhook} {}
+\exportsortexpansion{yhook} {}
+
+\exportsortexpansion{Acircumflexgrave} {}
+\exportsortexpansion{Acircumflexacute} {}
+\exportsortexpansion{Acircumflextilde} {}
+\exportsortexpansion{Acircumflexhook} {}
+\exportsortexpansion{acircumflexgrave} {}
+\exportsortexpansion{acircumflexacute} {}
+\exportsortexpansion{acircumflextilde} {}
+\exportsortexpansion{acircumflexhook} {}
+\exportsortexpansion{Ecircumflexgrave} {}
+\exportsortexpansion{Ecircumflexacute} {}
+\exportsortexpansion{Ecircumflextilde} {}
+\exportsortexpansion{Ecircumflexhook} {}
+\exportsortexpansion{ecircumflexgrave} {}
+\exportsortexpansion{ecircumflexacute} {}
+\exportsortexpansion{ecircumflextilde} {}
+\exportsortexpansion{ecircumflexhook} {}
+\exportsortexpansion{Ocircumflexgrave} {}
+\exportsortexpansion{Ocircumflexacute} {}
+\exportsortexpansion{Ocircumflextilde} {}
+\exportsortexpansion{Ocircumflexhook} {}
+\exportsortexpansion{ocircumflexgrave} {}
+\exportsortexpansion{ocircumflexacute} {}
+\exportsortexpansion{ocircumflextilde} {}
+\exportsortexpansion{ocircumflexhook} {}
+
+\exportsortexpansion{Abrevegrave} {}
+\exportsortexpansion{Abreveacute} {}
+\exportsortexpansion{Abrevetilde} {}
+\exportsortexpansion{Abrevehook} {}
+\exportsortexpansion{abrevegrave} {}
+\exportsortexpansion{abreveacute} {}
+\exportsortexpansion{abrevetilde} {}
+\exportsortexpansion{abrevehook} {}
+
+\exportsortexpansion{Adotbelow} {}
+\exportsortexpansion{adotbelow} {}
+\exportsortexpansion{Edotbelow} {}
+\exportsortexpansion{edotbelow} {}
+\exportsortexpansion{Idotbelow} {}
+\exportsortexpansion{idotbelow} {}
+\exportsortexpansion{Odotbelow} {}
+\exportsortexpansion{odotbelow} {}
+\exportsortexpansion{Udotbelow} {}
+\exportsortexpansion{udotbelow} {}
+\exportsortexpansion{Ydotbelow} {}
+\exportsortexpansion{ydotbelow} {}
+\exportsortexpansion{Ohorndotbelow} {}
+\exportsortexpansion{ohorndotbelow} {}
+\exportsortexpansion{Uhorndotbelow} {}
+\exportsortexpansion{uhorndotbelow} {}
+
+\exportsortexpansion{Acircumflexdotbelow} {}
+\exportsortexpansion{acircumflexdotbelow} {}
+\exportsortexpansion{Ecircumflexdotbelow} {}
+\exportsortexpansion{ecircumflexdotbelow} {}
+\exportsortexpansion{Ocircumflexdotbelow} {}
+\exportsortexpansion{ocircumflexdotbelow} {}
+\exportsortexpansion{Abrevedotbelow} {}
+\exportsortexpansion{abrevedotbelow} {}
+
+\exportsortexpansion{Ohorn} {}
+\exportsortexpansion{Ohorngrave} {}
+\exportsortexpansion{Ohornacute} {}
+\exportsortexpansion{Ohorntilde} {}
+\exportsortexpansion{Ohornhook } {}
+\exportsortexpansion{ohorn} {}
+\exportsortexpansion{ohorngrave} {}
+\exportsortexpansion{ohornacute} {}
+\exportsortexpansion{ohorntilde} {}
+\exportsortexpansion{ohornhook } {}
+\exportsortexpansion{Uhorn} {}
+\exportsortexpansion{Uhorngrave} {}
+\exportsortexpansion{Uhornacute} {}
+\exportsortexpansion{Uhorntilde} {}
+\exportsortexpansion{Uhornhook } {}
+\exportsortexpansion{uhorn} {}
+\exportsortexpansion{uhorngrave} {}
+\exportsortexpansion{uhornacute} {}
+\exportsortexpansion{uhorntilde} {}
+\exportsortexpansion{uhornhook} {}
+
+\exportsortexpansion{eszett} {ssharp}
+\exportsortexpansion{Eszett} {Ssharp}
+
+\exportsortexpansion{lslash} {lstroke}
+\exportsortexpansion{Lslash} {Lstroke}
+\exportsortexpansion{dslash} {dstroke}
+\exportsortexpansion{Dslash} {Dstroke}
+\exportsortexpansion{oslash} {ostroke}
+\exportsortexpansion{Oslash} {Ostroke}
+
+\exportsortexpansion{dcroat} {dstroke}
+\exportsortexpansion{Dcroat} {Dstroke}
+
+% more
+
+\exportsortshortcut{\^ A} {\Acircumflex} \exportsortshortcut{\^ a} {\acircumflex}
+\exportsortshortcut{\^ C} {\Ccircumflex} \exportsortshortcut{\^ c} {\ccircumflex}
+\exportsortshortcut{\^ E} {\Ecircumflex} \exportsortshortcut{\^ e} {\ecircumflex}
+\exportsortshortcut{\^ G} {\Gcircumflex} \exportsortshortcut{\^ g} {\gcircumflex}
+\exportsortshortcut{\^ H} {\Hcircumflex} \exportsortshortcut{\^ h} {\hcircumflex}
+\exportsortshortcut{\^ I} {\Icircumflex} \exportsortshortcut{\^ i} {\icircumflex} \exportsortshortcut{\^\i} {\icircumflex}
+\exportsortshortcut{\^ J} {\Jcircumflex} \exportsortshortcut{\^ j} {\jcircumflex} \exportsortshortcut{\^\j} {\jcircumflex}
+\exportsortshortcut{\^ O} {\Ocircumflex} \exportsortshortcut{\^ o} {\ocircumflex}
+\exportsortshortcut{\^ S} {\Scircumflex} \exportsortshortcut{\^ s} {\scircumflex}
+\exportsortshortcut{\^ U} {\Ucircumflex} \exportsortshortcut{\^ u} {\ucircumflex}
+\exportsortshortcut{\^ W} {\Wcircumflex} \exportsortshortcut{\^ w} {\wcircumflex}
+\exportsortshortcut{\^ Y} {\Ycircumflex} \exportsortshortcut{\^ y} {\ycircumflex}
+
+\exportsortshortcut{\` A} {\Agrave} \exportsortshortcut{\` a} {\agrave}
+\exportsortshortcut{\` E} {\Egrave} \exportsortshortcut{\` e} {\egrave}
+\exportsortshortcut{\` I} {\Igrave} \exportsortshortcut{\` i} {\igrave} \exportsortshortcut{\`\i} {\igrave}
+\exportsortshortcut{\` O} {\Ograve} \exportsortshortcut{\` o} {\ograve}
+\exportsortshortcut{\` U} {\Ugrave} \exportsortshortcut{\` u} {\ugrave}
+\exportsortshortcut{\` Y} {\Ygrave} \exportsortshortcut{\` y} {\ygrave}
+
+\exportsortshortcut{\~ A} {\Atilde} \exportsortshortcut{\~ a} {\atilde}
+\exportsortshortcut{\~ I} {\Itilde} \exportsortshortcut{\~ i} {\itilde} \exportsortshortcut{\~\i} {\itilde}
+\exportsortshortcut{\~ O} {\Otilde} \exportsortshortcut{\~ o} {\otilde}
+\exportsortshortcut{\~ U} {\Utilde} \exportsortshortcut{\~ u} {\utilde}
+
+\exportsortshortcut{\" A} {\Adiaeresis} \exportsortshortcut{\" a} {\adiaeresis}
+\exportsortshortcut{\" E} {\Ediaeresis} \exportsortshortcut{\" e} {\ediaeresis}
+\exportsortshortcut{\" I} {\Idiaeresis} \exportsortshortcut{\" i} {\idiaeresis} \exportsortshortcut{\"\i} {\idiaeresis}
+\exportsortshortcut{\" O} {\Odiaeresis} \exportsortshortcut{\" o} {\odiaeresis}
+\exportsortshortcut{\" U} {\Udiaeresis} \exportsortshortcut{\" u} {\udiaeresis}
+\exportsortshortcut{\" Y} {\Ydiaeresis} \exportsortshortcut{\" y} {\ydiaeresis}
+
+\exportsortshortcut{\' A} {\Aacute} \exportsortshortcut{\' a} {\aacute}
+\exportsortshortcut{\' C} {\Cacute} \exportsortshortcut{\' c} {\cacute}
+\exportsortshortcut{\' E} {\Eacute} \exportsortshortcut{\' e} {\eacute}
+\exportsortshortcut{\' I} {\Iacute} \exportsortshortcut{\' i} {\iacute} \exportsortshortcut{\'\i} {\iacute}
+\exportsortshortcut{\' L} {\Lacute} \exportsortshortcut{\' l} {\lacute}
+\exportsortshortcut{\' N} {\Nacute} \exportsortshortcut{\' n} {\nacute}
+\exportsortshortcut{\' O} {\Oacute} \exportsortshortcut{\' o} {\oacute}
+\exportsortshortcut{\' R} {\Racute} \exportsortshortcut{\' r} {\racute}
+\exportsortshortcut{\' S} {\Sacute} \exportsortshortcut{\' s} {\sacute}
+\exportsortshortcut{\' U} {\Uacute} \exportsortshortcut{\' u} {\uacute}
+\exportsortshortcut{\' Y} {\Yacute} \exportsortshortcut{\' y} {\yacute}
+\exportsortshortcut{\' Z} {\Zacute} \exportsortshortcut{\' z} {\zacute}
+
+\exportsortshortcut{\. C} {\Cdotaccent} \exportsortshortcut{\. c} {\cdotaccent}
+\exportsortshortcut{\. E} {\Edotaccent} \exportsortshortcut{\. e} {\edotaccent}
+\exportsortshortcut{\. G} {\Gdotaccent} \exportsortshortcut{\. g} {\gdotaccent}
+\exportsortshortcut{\. I} {\Idotaccent} \exportsortshortcut{\. i} {\idotaccent} \exportsortshortcut{\.\i} {\idotaccent}
+\exportsortshortcut{\. Z} {\Zdotaccent} \exportsortshortcut{\. z} {\zdotaccent}
+
+\exportsortshortcut{\= A} {\Amacron} \exportsortshortcut{\= a} {\amacron}
+\exportsortshortcut{\= E} {\Emacron} \exportsortshortcut{\= e} {\emacron}
+\exportsortshortcut{\= I} {\Imacron} \exportsortshortcut{\= i} {\imacron} \exportsortshortcut{\=\i} {\imacron}
+\exportsortshortcut{\= O} {\Omacron} \exportsortshortcut{\= o} {\omacron}
+\exportsortshortcut{\= U} {\Umacron} \exportsortshortcut{\= u} {\umacron}
+
+\exportsortshortcut{\c C} {\Ccedilla} \exportsortshortcut{\c c} {\ccedilla}
+\exportsortshortcut{\c K} {\Kcedilla} \exportsortshortcut{\c k} {\kcedilla}
+\exportsortshortcut{\c L} {\Lcedilla} \exportsortshortcut{\c l} {\lcedilla}
+\exportsortshortcut{\c N} {\Ncedilla} \exportsortshortcut{\c n} {\ncedilla}
+\exportsortshortcut{\c R} {\Rcedilla} \exportsortshortcut{\c r} {\rcedilla}
+\exportsortshortcut{\c S} {\Scedilla} \exportsortshortcut{\c s} {\scedilla}
+\exportsortshortcut{\c T} {\Tcedilla} \exportsortshortcut{\c t} {\tcedilla}
+
+\exportsortshortcut{\H O} {\Ohungarumlaut} \exportsortshortcut{\H o} {\ohungarumlaut}
+\exportsortshortcut{\H u} {\uhungarumlaut} \exportsortshortcut{\H U} {\Uhungarumlaut}
+
+\exportsortshortcut{\k A} {\Aogonek} \exportsortshortcut{\k a} {\aogonek}
+\exportsortshortcut{\k E} {\Eogonek} \exportsortshortcut{\k e} {\eogonek}
+\exportsortshortcut{\k I} {\Iogonek} \exportsortshortcut{\k i} {\iogonek}
+\exportsortshortcut{\k U} {\Uogonek} \exportsortshortcut{\k u} {\uogonek}
+
+\exportsortshortcut{\r A} {\Aring} \exportsortshortcut{\r a} {\aring}
+\exportsortshortcut{\r U} {\Uring} \exportsortshortcut{\r u} {\uring}
+
+\exportsortshortcut{\u A} {\Abreve} \exportsortshortcut{\u a} {\abreve}
+\exportsortshortcut{\u E} {\Ebreve} \exportsortshortcut{\u e} {\ebreve}
+\exportsortshortcut{\u G} {\Gbreve} \exportsortshortcut{\u g} {\gbreve}
+\exportsortshortcut{\u I} {\Ibreve} \exportsortshortcut{\u i} {\ibreve} \exportsortshortcut{\u\i} {\ibreve}
+\exportsortshortcut{\u O} {\Obreve} \exportsortshortcut{\u o} {\obreve}
+\exportsortshortcut{\u U} {\Ubreve} \exportsortshortcut{\u u} {\ubreve}
+
+\exportsortshortcut{\v C} {\Ccaron} \exportsortshortcut{\v c} {\ccaron}
+\exportsortshortcut{\v D} {\Dcaron} \exportsortshortcut{\v d} {\dcaron}
+\exportsortshortcut{\v E} {\Ecaron} \exportsortshortcut{\v e} {\ecaron}
+\exportsortshortcut{\v L} {\Lcaron} \exportsortshortcut{\v l} {\lcaron}
+\exportsortshortcut{\v N} {\Ncaron} \exportsortshortcut{\v n} {\ncaron}
+\exportsortshortcut{\v R} {\Rcaron} \exportsortshortcut{\v r} {\rcaron}
+\exportsortshortcut{\v S} {\Scaron} \exportsortshortcut{\v s} {\scaron}
+\exportsortshortcut{\v T} {\Tcaron} \exportsortshortcut{\v t} {\tcaron}
+\exportsortshortcut{\v Z} {\Zcaron} \exportsortshortcut{\v z} {\zcaron}
+
+\endinput
diff --git a/tex/context/base/sort-def.tex b/tex/context/base/sort-def.tex
index 10dc31b14..502fb787f 100644
--- a/tex/context/base/sort-def.tex
+++ b/tex/context/base/sort-def.tex
@@ -15,436 +15,6 @@
%D used with the new texutil functionality. Here we define the default
%D mappings
-\exportsortexpansion{aeligature} {ae}
-\exportsortexpansion{AEligature} {AE}
-\exportsortexpansion{ijligature} {ij}
-\exportsortexpansion{IJligature} {IJ}
-\exportsortexpansion{oeligature} {oe}
-\exportsortexpansion{OEligature} {OE}
-
-\exportsortexpansion{ssharp} {ss}
-\exportsortexpansion{Ssharp} {SS}
-
-\exportsortexpansion{thorn} {}
-\exportsortexpansion{Thorn} {}
-
-\exportsortexpansion{eth} {}
-\exportsortexpansion{Eth} {}
-
-\exportsortexpansion{dj} {dstroke}
-\exportsortexpansion{Dj} {Dstroke}
-
-\exportsortexpansion{Acircumflex} {}
-\exportsortexpansion{acircumflex} {}
-\exportsortexpansion{Ccircumflex} {}
-\exportsortexpansion{ccircumflex} {}
-\exportsortexpansion{Ecircumflex} {}
-\exportsortexpansion{ecircumflex} {}
-\exportsortexpansion{Gcircumflex} {}
-\exportsortexpansion{gcircumflex} {}
-\exportsortexpansion{Hcircumflex} {}
-\exportsortexpansion{hcircumflex} {}
-\exportsortexpansion{Icircumflex} {}
-\exportsortexpansion{icircumflex} {}
-\exportsortexpansion{Jcircumflex} {}
-\exportsortexpansion{jcircumflex} {}
-\exportsortexpansion{Ocircumflex} {}
-\exportsortexpansion{ocircumflex} {}
-\exportsortexpansion{Scircumflex} {}
-\exportsortexpansion{scircumflex} {}
-\exportsortexpansion{Ucircumflex} {}
-\exportsortexpansion{ucircumflex} {}
-\exportsortexpansion{Wcircumflex} {}
-\exportsortexpansion{wcircumflex} {}
-\exportsortexpansion{Ycircumflex} {}
-\exportsortexpansion{ycircumflex} {}
-
-\exportsortexpansion{Agrave} {}
-\exportsortexpansion{agrave} {}
-\exportsortexpansion{Egrave} {}
-\exportsortexpansion{egrave} {}
-\exportsortexpansion{Igrave} {}
-\exportsortexpansion{igrave} {}
-\exportsortexpansion{Ograve} {}
-\exportsortexpansion{ograve} {}
-\exportsortexpansion{Ugrave} {}
-\exportsortexpansion{ugrave} {}
-\exportsortexpansion{Ygrave} {}
-\exportsortexpansion{ygrave} {}
-
-\exportsortexpansion{Atilde} {}
-\exportsortexpansion{atilde} {}
-\exportsortexpansion{Itilde} {}
-\exportsortexpansion{itilde} {}
-\exportsortexpansion{Ntilde} {}
-\exportsortexpansion{ntilde} {}
-\exportsortexpansion{Otilde} {}
-\exportsortexpansion{otilde} {}
-\exportsortexpansion{Utilde} {}
-\exportsortexpansion{utilde} {}
-\exportsortexpansion{Ytilde} {}
-\exportsortexpansion{ytilde} {}
-
-\exportsortexpansion{Adiaeresis} {}
-\exportsortexpansion{adiaeresis} {}
-\exportsortexpansion{Ediaeresis} {}
-\exportsortexpansion{ediaeresis} {}
-\exportsortexpansion{Idiaeresis} {}
-\exportsortexpansion{idiaeresis} {}
-\exportsortexpansion{Odiaeresis} {}
-\exportsortexpansion{odiaeresis} {}
-\exportsortexpansion{Udiaeresis} {}
-\exportsortexpansion{udiaeresis} {}
-\exportsortexpansion{Ydiaeresis} {}
-\exportsortexpansion{ydiaeresis} {}
-
-\exportsortexpansion{Aacute} {}
-\exportsortexpansion{aacute} {}
-\exportsortexpansion{Cacute} {}
-\exportsortexpansion{cacute} {}
-\exportsortexpansion{Eacute} {}
-\exportsortexpansion{eacute} {}
-\exportsortexpansion{Iacute} {}
-\exportsortexpansion{iacute} {}
-\exportsortexpansion{Lacute} {}
-\exportsortexpansion{lacute} {}
-\exportsortexpansion{Nacute} {}
-\exportsortexpansion{nacute} {}
-\exportsortexpansion{Oacute} {}
-\exportsortexpansion{oacute} {}
-\exportsortexpansion{Racute} {}
-\exportsortexpansion{racute} {}
-\exportsortexpansion{Sacute} {}
-\exportsortexpansion{sacute} {}
-\exportsortexpansion{Uacute} {}
-\exportsortexpansion{uacute} {}
-\exportsortexpansion{Yacute} {}
-\exportsortexpansion{yacute} {}
-\exportsortexpansion{Zacute} {}
-\exportsortexpansion{zacute} {}
-
-\exportsortexpansion{dstroke} {}
-\exportsortexpansion{Dstroke} {}
-\exportsortexpansion{Hstroke} {}
-\exportsortexpansion{hstroke} {}
-\exportsortexpansion{Tstroke} {}
-\exportsortexpansion{tstroke} {}
-
-\exportsortexpansion{Cdotaccent} {}
-\exportsortexpansion{cdotaccent} {}
-\exportsortexpansion{Edotaccent} {}
-\exportsortexpansion{edotaccent} {}
-\exportsortexpansion{Gdotaccent} {}
-\exportsortexpansion{gdotaccent} {}
-\exportsortexpansion{Idotaccent} {}
-\exportsortexpansion{idotaccent} {}
-\exportsortexpansion{Zdotaccent} {}
-\exportsortexpansion{zdotaccent} {}
-
-\exportsortexpansion{Amacron} {}
-\exportsortexpansion{amacron} {}
-\exportsortexpansion{Emacron} {}
-\exportsortexpansion{emacron} {}
-\exportsortexpansion{Imacron} {}
-\exportsortexpansion{imacron} {}
-\exportsortexpansion{Omacron} {}
-\exportsortexpansion{omacron} {}
-\exportsortexpansion{Umacron} {}
-\exportsortexpansion{umacron} {}
-
-\exportsortexpansion{Ccedilla} {}
-\exportsortexpansion{ccedilla} {}
-\exportsortexpansion{Kcedilla} {}
-\exportsortexpansion{kcedilla} {}
-\exportsortexpansion{Lcedilla} {}
-\exportsortexpansion{lcedilla} {}
-\exportsortexpansion{Ncedilla} {}
-\exportsortexpansion{ncedilla} {}
-\exportsortexpansion{Rcedilla} {}
-\exportsortexpansion{rcedilla} {}
-\exportsortexpansion{Scedilla} {}
-\exportsortexpansion{scedilla} {}
-\exportsortexpansion{Tcedilla} {}
-\exportsortexpansion{tcedilla} {}
-
-\exportsortexpansion{Ohungarumlaut} {}
-\exportsortexpansion{ohungarumlaut} {}
-\exportsortexpansion{Uhungarumlaut} {}
-\exportsortexpansion{uhungarumlaut} {}
-
-\exportsortexpansion{Aogonek} {}
-\exportsortexpansion{aogonek} {}
-\exportsortexpansion{Eogonek} {}
-\exportsortexpansion{eogonek} {}
-\exportsortexpansion{Iogonek} {}
-\exportsortexpansion{iogonek} {}
-\exportsortexpansion{Uogonek} {}
-\exportsortexpansion{uogonek} {}
-
-\exportsortexpansion{Aring} {}
-\exportsortexpansion{aring} {}
-\exportsortexpansion{Uring} {}
-\exportsortexpansion{uring} {}
-
-\exportsortexpansion{Abreve} {}
-\exportsortexpansion{abreve} {}
-\exportsortexpansion{Ebreve} {}
-\exportsortexpansion{ebreve} {}
-\exportsortexpansion{Gbreve} {}
-\exportsortexpansion{gbreve} {}
-\exportsortexpansion{Ibreve} {}
-\exportsortexpansion{ibreve} {}
-\exportsortexpansion{Obreve} {}
-\exportsortexpansion{obreve} {}
-\exportsortexpansion{Ubreve} {}
-\exportsortexpansion{ubreve} {}
-
-\exportsortexpansion{Ccaron} {}
-\exportsortexpansion{ccaron} {}
-\exportsortexpansion{Dcaron} {}
-\exportsortexpansion{dcaron} {}
-\exportsortexpansion{Ecaron} {}
-\exportsortexpansion{ecaron} {}
-\exportsortexpansion{Lcaron} {}
-\exportsortexpansion{lcaron} {}
-\exportsortexpansion{Ncaron} {}
-\exportsortexpansion{ncaron} {}
-\exportsortexpansion{Rcaron} {}
-\exportsortexpansion{rcaron} {}
-\exportsortexpansion{Scaron} {}
-\exportsortexpansion{scaron} {}
-\exportsortexpansion{Tcaron} {}
-\exportsortexpansion{tcaron} {}
-\exportsortexpansion{Ycaron} {}
-\exportsortexpansion{ycaron} {}
-\exportsortexpansion{Zcaron} {}
-\exportsortexpansion{zcaron} {}
-
-\exportsortexpansion{Lstroke} {}
-\exportsortexpansion{lstroke} {}
-\exportsortexpansion{Ostroke} {}
-\exportsortexpansion{ostroke} {}
-
-\exportsortexpansion{aumlaut} {}
-\exportsortexpansion{eumlaut} {}
-\exportsortexpansion{iumlaut} {}
-\exportsortexpansion{oumlaut} {}
-\exportsortexpansion{uumlaut} {}
-
-\exportsortexpansion{Aumlaut} {}
-\exportsortexpansion{Eumlaut} {}
-\exportsortexpansion{Iumlaut} {}
-\exportsortexpansion{Oumlaut} {}
-\exportsortexpansion{Uumlaut} {}
-
-\exportsortexpansion{scommaaccent} {}
-\exportsortexpansion{Scommaaccent} {}
-\exportsortexpansion{tcommaaccent} {}
-\exportsortexpansion{Tcommaaccent} {}
-
-\exportsortexpansion{Etilde} {}
-\exportsortexpansion{etilde} {}
-
-\exportsortexpansion{Ahook} {}
-\exportsortexpansion{ahook} {}
-\exportsortexpansion{Ehook} {}
-\exportsortexpansion{ehook} {}
-\exportsortexpansion{Ihook} {}
-\exportsortexpansion{ihook} {}
-\exportsortexpansion{Ohook} {}
-\exportsortexpansion{ohook} {}
-\exportsortexpansion{Uhook} {}
-\exportsortexpansion{uhook} {}
-\exportsortexpansion{Yhook} {}
-\exportsortexpansion{yhook} {}
-
-\exportsortexpansion{Acircumflexgrave} {}
-\exportsortexpansion{Acircumflexacute} {}
-\exportsortexpansion{Acircumflextilde} {}
-\exportsortexpansion{Acircumflexhook} {}
-\exportsortexpansion{acircumflexgrave} {}
-\exportsortexpansion{acircumflexacute} {}
-\exportsortexpansion{acircumflextilde} {}
-\exportsortexpansion{acircumflexhook} {}
-\exportsortexpansion{Ecircumflexgrave} {}
-\exportsortexpansion{Ecircumflexacute} {}
-\exportsortexpansion{Ecircumflextilde} {}
-\exportsortexpansion{Ecircumflexhook} {}
-\exportsortexpansion{ecircumflexgrave} {}
-\exportsortexpansion{ecircumflexacute} {}
-\exportsortexpansion{ecircumflextilde} {}
-\exportsortexpansion{ecircumflexhook} {}
-\exportsortexpansion{Ocircumflexgrave} {}
-\exportsortexpansion{Ocircumflexacute} {}
-\exportsortexpansion{Ocircumflextilde} {}
-\exportsortexpansion{Ocircumflexhook} {}
-\exportsortexpansion{ocircumflexgrave} {}
-\exportsortexpansion{ocircumflexacute} {}
-\exportsortexpansion{ocircumflextilde} {}
-\exportsortexpansion{ocircumflexhook} {}
-
-\exportsortexpansion{Abrevegrave} {}
-\exportsortexpansion{Abreveacute} {}
-\exportsortexpansion{Abrevetilde} {}
-\exportsortexpansion{Abrevehook} {}
-\exportsortexpansion{abrevegrave} {}
-\exportsortexpansion{abreveacute} {}
-\exportsortexpansion{abrevetilde} {}
-\exportsortexpansion{abrevehook} {}
-
-\exportsortexpansion{Adotbelow} {}
-\exportsortexpansion{adotbelow} {}
-\exportsortexpansion{Edotbelow} {}
-\exportsortexpansion{edotbelow} {}
-\exportsortexpansion{Idotbelow} {}
-\exportsortexpansion{idotbelow} {}
-\exportsortexpansion{Odotbelow} {}
-\exportsortexpansion{odotbelow} {}
-\exportsortexpansion{Udotbelow} {}
-\exportsortexpansion{udotbelow} {}
-\exportsortexpansion{Ydotbelow} {}
-\exportsortexpansion{ydotbelow} {}
-\exportsortexpansion{Ohorndotbelow} {}
-\exportsortexpansion{ohorndotbelow} {}
-\exportsortexpansion{Uhorndotbelow} {}
-\exportsortexpansion{uhorndotbelow} {}
-
-\exportsortexpansion{Acircumflexdotbelow} {}
-\exportsortexpansion{acircumflexdotbelow} {}
-\exportsortexpansion{Ecircumflexdotbelow} {}
-\exportsortexpansion{ecircumflexdotbelow} {}
-\exportsortexpansion{Ocircumflexdotbelow} {}
-\exportsortexpansion{ocircumflexdotbelow} {}
-\exportsortexpansion{Abrevedotbelow} {}
-\exportsortexpansion{abrevedotbelow} {}
-
-\exportsortexpansion{Ohorn} {}
-\exportsortexpansion{Ohorngrave} {}
-\exportsortexpansion{Ohornacute} {}
-\exportsortexpansion{Ohorntilde} {}
-\exportsortexpansion{Ohornhook } {}
-\exportsortexpansion{ohorn} {}
-\exportsortexpansion{ohorngrave} {}
-\exportsortexpansion{ohornacute} {}
-\exportsortexpansion{ohorntilde} {}
-\exportsortexpansion{ohornhook } {}
-\exportsortexpansion{Uhorn} {}
-\exportsortexpansion{Uhorngrave} {}
-\exportsortexpansion{Uhornacute} {}
-\exportsortexpansion{Uhorntilde} {}
-\exportsortexpansion{Uhornhook } {}
-\exportsortexpansion{uhorn} {}
-\exportsortexpansion{uhorngrave} {}
-\exportsortexpansion{uhornacute} {}
-\exportsortexpansion{uhorntilde} {}
-\exportsortexpansion{uhornhook} {}
-
-\exportsortexpansion{eszett} {ssharp}
-\exportsortexpansion{Eszett} {Ssharp}
-
-\exportsortexpansion{lslash} {lstroke}
-\exportsortexpansion{Lslash} {Lstroke}
-\exportsortexpansion{dslash} {dstroke}
-\exportsortexpansion{Dslash} {Dstroke}
-\exportsortexpansion{oslash} {ostroke}
-\exportsortexpansion{Oslash} {Ostroke}
-
-\exportsortexpansion{dcroat} {dstroke}
-\exportsortexpansion{Dcroat} {Dstroke}
-
-% more
-
-\exportsortshortcut{\^ A} {\Acircumflex} \exportsortshortcut{\^ a} {\acircumflex}
-\exportsortshortcut{\^ C} {\Ccircumflex} \exportsortshortcut{\^ c} {\ccircumflex}
-\exportsortshortcut{\^ E} {\Ecircumflex} \exportsortshortcut{\^ e} {\ecircumflex}
-\exportsortshortcut{\^ G} {\Gcircumflex} \exportsortshortcut{\^ g} {\gcircumflex}
-\exportsortshortcut{\^ H} {\Hcircumflex} \exportsortshortcut{\^ h} {\hcircumflex}
-\exportsortshortcut{\^ I} {\Icircumflex} \exportsortshortcut{\^ i} {\icircumflex} \exportsortshortcut{\^\i} {\icircumflex}
-\exportsortshortcut{\^ J} {\Jcircumflex} \exportsortshortcut{\^ j} {\jcircumflex} \exportsortshortcut{\^\j} {\jcircumflex}
-\exportsortshortcut{\^ O} {\Ocircumflex} \exportsortshortcut{\^ o} {\ocircumflex}
-\exportsortshortcut{\^ S} {\Scircumflex} \exportsortshortcut{\^ s} {\scircumflex}
-\exportsortshortcut{\^ U} {\Ucircumflex} \exportsortshortcut{\^ u} {\ucircumflex}
-\exportsortshortcut{\^ W} {\Wcircumflex} \exportsortshortcut{\^ w} {\wcircumflex}
-\exportsortshortcut{\^ Y} {\Ycircumflex} \exportsortshortcut{\^ y} {\ycircumflex}
-
-\exportsortshortcut{\` A} {\Agrave} \exportsortshortcut{\` a} {\agrave}
-\exportsortshortcut{\` E} {\Egrave} \exportsortshortcut{\` e} {\egrave}
-\exportsortshortcut{\` I} {\Igrave} \exportsortshortcut{\` i} {\igrave} \exportsortshortcut{\`\i} {\igrave}
-\exportsortshortcut{\` O} {\Ograve} \exportsortshortcut{\` o} {\ograve}
-\exportsortshortcut{\` U} {\Ugrave} \exportsortshortcut{\` u} {\ugrave}
-\exportsortshortcut{\` Y} {\Ygrave} \exportsortshortcut{\` y} {\ygrave}
-
-\exportsortshortcut{\~ A} {\Atilde} \exportsortshortcut{\~ a} {\atilde}
-\exportsortshortcut{\~ I} {\Itilde} \exportsortshortcut{\~ i} {\itilde} \exportsortshortcut{\~\i} {\itilde}
-\exportsortshortcut{\~ O} {\Otilde} \exportsortshortcut{\~ o} {\otilde}
-\exportsortshortcut{\~ U} {\Utilde} \exportsortshortcut{\~ u} {\utilde}
-
-\exportsortshortcut{\" A} {\Adiaeresis} \exportsortshortcut{\" a} {\adiaeresis}
-\exportsortshortcut{\" E} {\Ediaeresis} \exportsortshortcut{\" e} {\ediaeresis}
-\exportsortshortcut{\" I} {\Idiaeresis} \exportsortshortcut{\" i} {\idiaeresis} \exportsortshortcut{\"\i} {\idiaeresis}
-\exportsortshortcut{\" O} {\Odiaeresis} \exportsortshortcut{\" o} {\odiaeresis}
-\exportsortshortcut{\" U} {\Udiaeresis} \exportsortshortcut{\" u} {\udiaeresis}
-\exportsortshortcut{\" Y} {\Ydiaeresis} \exportsortshortcut{\" y} {\ydiaeresis}
-
-\exportsortshortcut{\' A} {\Aacute} \exportsortshortcut{\' a} {\aacute}
-\exportsortshortcut{\' C} {\Cacute} \exportsortshortcut{\' c} {\cacute}
-\exportsortshortcut{\' E} {\Eacute} \exportsortshortcut{\' e} {\eacute}
-\exportsortshortcut{\' I} {\Iacute} \exportsortshortcut{\' i} {\iacute} \exportsortshortcut{\'\i} {\iacute}
-\exportsortshortcut{\' L} {\Lacute} \exportsortshortcut{\' l} {\lacute}
-\exportsortshortcut{\' N} {\Nacute} \exportsortshortcut{\' n} {\nacute}
-\exportsortshortcut{\' O} {\Oacute} \exportsortshortcut{\' o} {\oacute}
-\exportsortshortcut{\' R} {\Racute} \exportsortshortcut{\' r} {\racute}
-\exportsortshortcut{\' S} {\Sacute} \exportsortshortcut{\' s} {\sacute}
-\exportsortshortcut{\' U} {\Uacute} \exportsortshortcut{\' u} {\uacute}
-\exportsortshortcut{\' Y} {\Yacute} \exportsortshortcut{\' y} {\yacute}
-\exportsortshortcut{\' Z} {\Zacute} \exportsortshortcut{\' z} {\zacute}
-
-\exportsortshortcut{\. C} {\Cdotaccent} \exportsortshortcut{\. c} {\cdotaccent}
-\exportsortshortcut{\. E} {\Edotaccent} \exportsortshortcut{\. e} {\edotaccent}
-\exportsortshortcut{\. G} {\Gdotaccent} \exportsortshortcut{\. g} {\gdotaccent}
-\exportsortshortcut{\. I} {\Idotaccent} \exportsortshortcut{\. i} {\idotaccent} \exportsortshortcut{\.\i} {\idotaccent}
-\exportsortshortcut{\. Z} {\Zdotaccent} \exportsortshortcut{\. z} {\zdotaccent}
-
-\exportsortshortcut{\= A} {\Amacron} \exportsortshortcut{\= a} {\amacron}
-\exportsortshortcut{\= E} {\Emacron} \exportsortshortcut{\= e} {\emacron}
-\exportsortshortcut{\= I} {\Imacron} \exportsortshortcut{\= i} {\imacron} \exportsortshortcut{\=\i} {\imacron}
-\exportsortshortcut{\= O} {\Omacron} \exportsortshortcut{\= o} {\omacron}
-\exportsortshortcut{\= U} {\Umacron} \exportsortshortcut{\= u} {\umacron}
-
-\exportsortshortcut{\c C} {\Ccedilla} \exportsortshortcut{\c c} {\ccedilla}
-\exportsortshortcut{\c K} {\Kcedilla} \exportsortshortcut{\c k} {\kcedilla}
-\exportsortshortcut{\c L} {\Lcedilla} \exportsortshortcut{\c l} {\lcedilla}
-\exportsortshortcut{\c N} {\Ncedilla} \exportsortshortcut{\c n} {\ncedilla}
-\exportsortshortcut{\c R} {\Rcedilla} \exportsortshortcut{\c r} {\rcedilla}
-\exportsortshortcut{\c S} {\Scedilla} \exportsortshortcut{\c s} {\scedilla}
-\exportsortshortcut{\c T} {\Tcedilla} \exportsortshortcut{\c t} {\tcedilla}
-
-\exportsortshortcut{\H O} {\Ohungarumlaut} \exportsortshortcut{\H o} {\ohungarumlaut}
-\exportsortshortcut{\H u} {\uhungarumlaut} \exportsortshortcut{\H U} {\Uhungarumlaut}
-
-\exportsortshortcut{\k A} {\Aogonek} \exportsortshortcut{\k a} {\aogonek}
-\exportsortshortcut{\k E} {\Eogonek} \exportsortshortcut{\k e} {\eogonek}
-\exportsortshortcut{\k I} {\Iogonek} \exportsortshortcut{\k i} {\iogonek}
-\exportsortshortcut{\k U} {\Uogonek} \exportsortshortcut{\k u} {\uogonek}
-
-\exportsortshortcut{\r A} {\Aring} \exportsortshortcut{\r a} {\aring}
-\exportsortshortcut{\r U} {\Uring} \exportsortshortcut{\r u} {\uring}
-
-\exportsortshortcut{\u A} {\Abreve} \exportsortshortcut{\u a} {\abreve}
-\exportsortshortcut{\u E} {\Ebreve} \exportsortshortcut{\u e} {\ebreve}
-\exportsortshortcut{\u G} {\Gbreve} \exportsortshortcut{\u g} {\gbreve}
-\exportsortshortcut{\u I} {\Ibreve} \exportsortshortcut{\u i} {\ibreve} \exportsortshortcut{\u\i} {\ibreve}
-\exportsortshortcut{\u O} {\Obreve} \exportsortshortcut{\u o} {\obreve}
-\exportsortshortcut{\u U} {\Ubreve} \exportsortshortcut{\u u} {\ubreve}
-
-\exportsortshortcut{\v C} {\Ccaron} \exportsortshortcut{\v c} {\ccaron}
-\exportsortshortcut{\v D} {\Dcaron} \exportsortshortcut{\v d} {\dcaron}
-\exportsortshortcut{\v E} {\Ecaron} \exportsortshortcut{\v e} {\ecaron}
-\exportsortshortcut{\v L} {\Lcaron} \exportsortshortcut{\v l} {\lcaron}
-\exportsortshortcut{\v N} {\Ncaron} \exportsortshortcut{\v n} {\ncaron}
-\exportsortshortcut{\v R} {\Rcaron} \exportsortshortcut{\v r} {\rcaron}
-\exportsortshortcut{\v S} {\Scaron} \exportsortshortcut{\v s} {\scaron}
-\exportsortshortcut{\v T} {\Tcaron} \exportsortshortcut{\v t} {\tcaron}
-\exportsortshortcut{\v Z} {\Zcaron} \exportsortshortcut{\v z} {\zcaron}
+\loadmarkfile{sort-def}
\endinput
diff --git a/tex/context/base/sort-ini.mkii b/tex/context/base/sort-ini.mkii
new file mode 100644
index 000000000..f9e813d5c
--- /dev/null
+++ b/tex/context/base/sort-ini.mkii
@@ -0,0 +1,137 @@
+%D \module
+%D [ file=sort-ini,
+%D version=2005.08.08,
+%D title=\CONTEXT\ Sort Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo: autokeyexpansion => igv utf: \setupregister[index][keyexpansion=yes]
+
+%D This module replaces existing sort key handling and is meant to be
+%D used with the new texutil functionality. This module defines a few
+%D auxiliary macros.
+
+\ifx\exportsortaction\undefined \else \endinput \fi
+
+%D The sorting method is largely bases on the one used in the old version
+%D of texutil but i've changed the interface a bit. It all boils down to
+%D a bunch of substitutions. The reimplementation makes it easier to extend
+%D the rules. Currently we have multipass substitution and onepass sorting,
+%D but we may change this some day. Since there is a plugin mechanism, using
+%D an external sorter is also possible.
+
+% test file:
+%
+% \mainlanguage[sl] \readfile{sort-ini}{}{}
+%
+% \starttext
+% test \index {aa1} test \index {ab1} test \index {aa2}
+% test \index {ab2} test \index {aa10} test \index {aa8}
+% test \index {aa9} test \index {aa11} test \index {aa10}
+% test \index {cccc} test \index {\ccaron ccc} test \index {\cacute ccc}
+% test \index {caaa} test \index {\ccaron aaa} test \index {\cacute aaa}
+% \placeindex
+% \stoptext
+
+% definitions:
+%
+% \exportsortshortcut{\\\'\\i}{iacute}
+% \exportsortshortcut{\\\'i} {iacute}
+% \exportsortshortcut{\\\"e} {ediaeresis}
+% \exportsortshortcut{\\\'o} {oacute}
+%
+% \exportsortexpansion{aeligature}{ae}
+% \exportsortexpansion{ijligature}{y}
+% \exportsortexpansion{oacute} {oz}
+% \exportsortexpansion{eacute} {ezzz} % or e3
+% \exportsortexpansion{egrave} {ezz} % or e2
+% \exportsortexpansion{ediaeresis}{ez} % or e1
+% \exportsortexpansion{adiaeresis}{az}
+% \exportsortreduction{ch} {c}
+% \exportsortreduction{ij} {y}
+%
+% \exportsortexpansion{ccaron} {cz}
+% \exportsortexpansion{cacute} {czz}
+% \exportsortexpansion{dstroke} {dz}
+% \exportsortexpansion{scaron} {sz}
+% \exportsortexpansion{zcaron} {zz}
+%
+% \exportsortreduction{ch}{c}
+% \exportsortreduction{ij}{y}
+%
+% \exportsortexpansion {ccaron} {c+1}
+% \exportsortdivision {c+1} {ccaron}
+% ==
+% \exportsortrule {ccaron} {c+1}
+
+\unprotect
+
+\let\currentexportclass\empty
+
+\def\exportsortaction#1#2#3%
+ {\convertargument#2\to\asciia
+ \convertargument#3\to\asciib
+ \immediatewriteutility{x #1 {\currentexportclass} {\asciia} {\asciib}}}
+
+\def\exportsortshortcut {\exportsortaction s}
+\def\exportsortexpansion{\exportsortaction e}
+\def\exportsortreduction{\exportsortaction r}
+\def\exportsortdivision {\exportsortaction d}
+
+\def\exportsortrule#1#2%
+ {\exportsortexpansion{#1}{#2}%
+ \exportsortdivision {#2}{#1}}
+
+\def\exportutfsortexpansion#1#2#3%
+ {\bgroup
+ \edef\utfsorta{\string\unknownchar}%
+ \dostepwiserecurse{#2}{#3}\plusone
+ {\edef\utfsortb{\@EA\string\csname\doutfunihash{#1}{\recurselevel}\endcsname}%
+ \ifx\utfsortb\utfsorta \else
+ \edef\utfsortc{\numbertoutf{\numexpr#1*256+\recurselevel\relax}}%
+ \expanded{\exportsortshortcut{\utfsortc}{\utfsortb\space}}% space is really needed
+ \fi}%
+ \egroup}
+
+\def\savesortdefinitions
+ {\bgroup
+ \doifelse \currentregime {utf}
+ {\exportutfsortexpansion{0}{128}{255}%
+ \exportutfsortexpansion{1}{0}{255}}
+ {\def\defineactivecharacter##1 ##2% mkii code !
+ {\expanded{\exportsortshortcut{\rawcharacter{##1}}}{##2}}%
+ \doifelsenothing\currentregime
+ {\doifnot\characterencoding\nocharacterencoding % to be sure, autoregime
+ {\dowalkregime\characterencoding}}%
+ {\dowalkregime\characterencoding}}%
+ \egroup
+ \readsysfile{\f!sortprefix def}\donothing\donothing % default
+ \global\let\savesortdefinitions\relax}
+
+\def\savesortlanguage#1% language specifics
+ {\doifsomething{#1}
+ {\doifundefined{\f!sortprefix::#1}%
+ {\bgroup
+ \global\letvalue{\f!sortprefix::#1}\empty
+ \def\currentexportclass{#1}%
+ \enablemode[sortorder-#1]%
+ \readsysfile{\f!sortprefix lan}\donothing\donothing
+ \egroup}}}
+
+% \defineregister[one]
+% \defineregister[two] \setupregister[two][language=cz]
+%
+% \starttext
+% test \one{one} test \one{two} test \one {\aacute} test \one{alpha} test \one{chow}
+% test \two{one} test \two{two} test \two {\aacute} test \two{alpha} test \two{chow}
+% \blank[3*big] \placeregister[one]
+% \blank[3*big] \placeregister[two]
+% \stoptext
+
+\protect \endinput
diff --git a/tex/context/base/sort-ini.tex b/tex/context/base/sort-ini.tex
index c3cbb319c..75e3f2e73 100644
--- a/tex/context/base/sort-ini.tex
+++ b/tex/context/base/sort-ini.tex
@@ -11,141 +11,20 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% dodo: autokeyexpansion => igv utf: \setupregister[index][keyexpansion=yes]
-
%D This module replaces existing sort key handling and is meant to be
%D used with the new texutil functionality. This module defines a few
%D auxiliary macros.
-\ifx\exportsortaction\undefined \else \endinput \fi
-
\writestatus{loading}{Context Sorting Macros (ini)}
-%D The sorting method is largely bases on the one used in the old version
-%D of texutil but i've changed the interface a bit. It all boils down to
-%D a bunch of substitutions. The reimplementation makes it easier to extend
-%D the rules. Currently we have multipass substitution and onepass sorting,
-%D but we may change this some day. Since there is a plugin mechanism, using
-%D an external sorter is also possible.
-
-% test file:
-%
-% \mainlanguage[sl] \readfile{sort-ini}{}{}
-%
-% \starttext
-% test \index {aa1} test \index {ab1} test \index {aa2}
-% test \index {ab2} test \index {aa10} test \index {aa8}
-% test \index {aa9} test \index {aa11} test \index {aa10}
-% test \index {cccc} test \index {\ccaron ccc} test \index {\cacute ccc}
-% test \index {caaa} test \index {\ccaron aaa} test \index {\cacute aaa}
-% \placeindex
-% \stoptext
-
-% definitions:
-%
-% \exportsortshortcut{\\\'\\i}{iacute}
-% \exportsortshortcut{\\\'i} {iacute}
-% \exportsortshortcut{\\\"e} {ediaeresis}
-% \exportsortshortcut{\\\'o} {oacute}
-%
-% \exportsortexpansion{aeligature}{ae}
-% \exportsortexpansion{ijligature}{y}
-% \exportsortexpansion{oacute} {oz}
-% \exportsortexpansion{eacute} {ezzz} % or e3
-% \exportsortexpansion{egrave} {ezz} % or e2
-% \exportsortexpansion{ediaeresis}{ez} % or e1
-% \exportsortexpansion{adiaeresis}{az}
-% \exportsortreduction{ch} {c}
-% \exportsortreduction{ij} {y}
-%
-% \exportsortexpansion{ccaron} {cz}
-% \exportsortexpansion{cacute} {czz}
-% \exportsortexpansion{dstroke} {dz}
-% \exportsortexpansion{scaron} {sz}
-% \exportsortexpansion{zcaron} {zz}
-%
-% \exportsortreduction{ch}{c}
-% \exportsortreduction{ij}{y}
-%
-% \exportsortexpansion {ccaron} {c+1}
-% \exportsortdivision {c+1} {ccaron}
-% ==
-% \exportsortrule {ccaron} {c+1}
-
-\unprotect
-
\newevery \everysavesortkeys \relax
-\let\currentexportclass\empty
-
-\def\exportsortaction#1#2#3%
- {\convertargument#2\to\asciia
- \convertargument#3\to\asciib
- \immediatewriteutility{x #1 {\currentexportclass} {\asciia} {\asciib}}}
-
-\def\exportsortshortcut {\exportsortaction s}
-\def\exportsortexpansion{\exportsortaction e}
-\def\exportsortreduction{\exportsortaction r}
-\def\exportsortdivision {\exportsortaction d}
-
-\def\exportsortrule#1#2%
- {\exportsortexpansion{#1}{#2}%
- \exportsortdivision {#2}{#1}}
-
-\def\exportutfsortexpansion#1#2#3%
- {\bgroup
- \edef\utfsorta{\string\unknownchar}%
- \dostepwiserecurse{#2}{#3}\plusone
- {\edef\utfsortb{\@EA\string\csname\doutfunihash{#1}{\recurselevel}\endcsname}%
- \ifx\utfsortb\utfsorta \else
- \edef\utfsortc{\numbertoutf{\numexpr#1*256+\recurselevel\relax}}%
- \expanded{\exportsortshortcut{\utfsortc}{\utfsortb\space}}% space is really needed
- \fi}%
- \egroup}
-
-\def\savesortdefinitions
- {\bgroup
- \doifelse \currentregime {utf}
- {\exportutfsortexpansion{0}{128}{255}%
- \exportutfsortexpansion{1}{0}{255}}
- {\def\defineactivecharacter##1 ##2% mkii code !
- {\expanded{\exportsortshortcut{\rawcharacter{##1}}}{##2}}%
- \doifelsenothing\currentregime
- {\doifnot\characterencoding\nocharacterencoding % to be sure, autoregime
- {\dowalkregime\characterencoding}}%
- {\dowalkregime\characterencoding}}%
- \egroup
- \readsysfile{\f!sortprefix def}\donothing\donothing % default
- \global\let\savesortdefinitions\relax}
-
-\def\savesortlanguage#1% language specifics
- {\doifsomething{#1}
- {\doifundefined{\f!sortprefix::#1}%
- {\bgroup
- \global\letvalue{\f!sortprefix::#1}\empty
- \def\currentexportclass{#1}%
- \enablemode[sortorder-#1]%
- \readsysfile{\f!sortprefix lan}\donothing\donothing
- \egroup}}}
-
-\prependtoks
- \savesortdefinitions
-\to \everysavesortkeys
-
\def\savesortkeys
{\the\everysavesortkeys
\global\everysavesortkeys\emptytoks}
-% \defineregister[one]
-% \defineregister[two] \setupregister[two][language=cz]
-%
-% \starttext
-% test \one{one} test \one{two} test \one {\aacute} test \one{alpha} test \one{chow}
-% test \two{one} test \two{two} test \two {\aacute} test \two{alpha} test \two{chow}
-% \blank[3*big] \placeregister[one]
-% \blank[3*big] \placeregister[two]
-% \stoptext
-
\prependtoks \savesortkeys \to \everystarttext
-\protect \endinput
+\loadmarkfile{sort-ini}
+
+\endinput
diff --git a/tex/context/base/sort-lan.mkii b/tex/context/base/sort-lan.mkii
new file mode 100644
index 000000000..ad5232b02
--- /dev/null
+++ b/tex/context/base/sort-lan.mkii
@@ -0,0 +1,203 @@
+%D \module
+%D [ file=sort-lan,
+%D version=2005.08.08,
+%D title=\CONTEXT\ Sort Macros,
+%D subtitle=Language Definitions,
+%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.
+
+% for testing:
+
+\startmode[sortorder-en]
+ \exportsortexpansion{aacute}{a+1}
+ \exportsortexpansion{Aacute}{A+2}
+ \exportsortexpansion{agrave}{a+1}
+ \exportsortexpansion{Agrave}{A+2}
+\stopmode
+
+%D This module replaces existing sort key handling and is meant to be
+%D used with the new texutil functionality. Here we define the language
+%D specific sort rules.
+
+% slovenian
+%
+% a-c, ccaron, cacute, d, dstroke, e-s, scaron, t-z, zcaron
+
+% \enableregime[utf]
+% \mainlanguage[sl]
+% \starttext
+% \ccaron\index{\ccaron\space 1}
+% \Ccaron\index{\Ccaron\space 1}
+% Ä\index{Ä 2}
+% Č\index{Č 2}
+% \v c\index{\v c 3}
+% \v C\index{\v C 3}
+% \placeindex
+% \stoptext
+
+% \startmode[sortorder-sl]
+% \exportsortexpansion {ccaron} {cz}
+% \exportsortexpansion {cacute} {czz}
+% \exportsortexpansion {dstroke} {dz}
+% \exportsortexpansion {scaron} {sz}
+% \exportsortexpansion {zacron} {zz}
+
+% \exportsortdivision {cz} {ccaron}
+% \exportsortdivision {czz} {cacute}
+% \exportsortdivision {dz} {dstroke}
+% \exportsortdivision {sz} {scaron}
+% \exportsortdivision {zz} {zacron}
+% \stopmode
+%
+% \startmode[sortorder-sl]
+% \exportsortexpansion {ccaron} {c+1}
+% \exportsortexpansion {cacute} {c+2}
+% \exportsortexpansion {dstroke} {d+1}
+% \exportsortexpansion {scaron} {s+1}
+% \exportsortexpansion {zacron} {z+1}
+%
+% \exportsortdivision {c+1} {ccaron}
+% \exportsortdivision {c+2} {cacute}
+% \exportsortdivision {d+1} {dstroke}
+% \exportsortdivision {s+1} {scaron}
+% \exportsortdivision {z+1} {zacron}
+% \stopmode
+
+\startmode[sortorder-sl]
+ \exportsortrule {ccaron} {c+1}
+ \exportsortrule {cacute} {c+2}
+ \exportsortrule {dstroke} {d+1}
+ \exportsortrule {scaron} {s+1}
+ \exportsortrule {zacron} {z+1}
+\stopmode
+
+% finnish
+%
+% a-u, v+w sorted together, x-z, aring, adiaeresis, odiaeresis
+
+\startmode[sortorder-fi]
+ \exportsortrule {v} {w}
+ \exportsortrule {aring} {z+1}
+ \exportsortrule {adiaeresis} {z+2}
+ \exportsortrule {odiaeresis} {z+3}
+\stopmode
+
+% swedish
+%
+% a-z, aring, adiaeresis, odiaeresis
+
+% \mainlanguage[sv]
+% \starttext
+% a\index{a}
+% a\index{a}
+% z\index{z}
+% z\index{z}
+% q\index{q}
+% q\index{q}
+% å\index{å}
+% å\index{å}
+% å\index{å}
+% ä\index{ä}
+% ä\index{ä}
+% ä\index{ä}
+% ä\index{ä}
+% ö\index{ö}
+% ö\index{ö}
+% \aring\index{\aring}
+% \adiaeresis\index{\adiaeresis}
+% \odiaeresis\index{\odiaeresis}
+% A\index{A}
+% Å\index{Å}
+% Ä\index{Ä}
+% Ö\index{Ö}
+% \Aring\index{\Aring}
+% \Adiaeresis\index{\Adiaeresis}
+% \Odiaeresis\index{\Odiaeresis}
+% \placeindex
+% \stoptext
+
+\startmode[sortorder-sv]
+ \exportsortrule {aring} {z+1}
+ \exportsortrule {adiaeresis} {z+2}
+ \exportsortrule {odiaeresis} {z+3}
+\stopmode
+
+% norwegian, danish
+%
+% a-z, aeligature, oslash, aring
+
+\startmode[sortorder-no,sortorder-da]
+ \exportsortrule {aeligature} {z+1}
+ \exportsortrule {oslash} {z+2}
+ \exportsortrule {aring} {z+3}
+\stopmode
+
+% islandic
+%
+% a, aacute, b, c, d, eth, e, eacute, f-i, iacute, j-o, oacute, p-u, uacute, v, w (?), x, y, yacute, z, aeligature, oslash, thorn
+
+% estonian
+%
+% a-s, scaron, z, zcaron, t-w, otilde, adiaeresis, odiaeresis, udiaeresis, x, y
+
+% czech
+%
+% a) make a single group for: "a", "á", "A", "Á"
+% b) make a different two groups for: "c", "C" and "c", "C"
+% c) sorting rule: "A" < "Á" < "a" < "á" < "C" < "c" < "C" < "c"
+% d) sorting rule: "h" < "ch" < "i" ("c" < "h")
+
+\gdef\czsortdivisionch{ch}
+\gdef\czsortdivisionCh{Ch}
+
+\startmode[sortorder-cz]
+ \exportsortexpansion {aacute} {a+1}
+ \exportsortexpansion {Aacute} {A+1}
+ \exportsortexpansion {ccaron} {c+1}
+ \exportsortexpansion {Ccaron} {C+1}
+ \exportsortdivision {c+1} {ccaron}
+ \exportsortexpansion {dcaron} {d+1}
+ \exportsortexpansion {Dcaron} {D+1}
+ \exportsortdivision {d+1} {dcaron}
+ \exportsortexpansion {eacute} {e+1}
+ \exportsortexpansion {Eacute} {E+1}
+ \exportsortexpansion {ecaron} {e+2}
+ \exportsortexpansion {Ecaron} {E+2}
+ \exportsortreduction {ch} {h+1}
+ \exportsortexpansion {ch} {h+1}
+ \exportsortreduction {Ch} {H+1}
+ \exportsortexpansion {Ch} {H+1}
+ \exportsortdivision {h+1} {czsortdivisionch}
+ \exportsortexpansion {iacute} {i+1}
+ \exportsortexpansion {Iacute} {I+1}
+ \exportsortexpansion {ncaron} {n+1}
+ \exportsortexpansion {Ncaron} {N+1}
+ \exportsortdivision {n+1} {ncaron}
+ \exportsortexpansion {oacute} {o+1}
+ \exportsortexpansion {Oacute} {O+1}
+ \exportsortexpansion {rcaron} {r+1}
+ \exportsortexpansion {Rcaron} {R+1}
+ \exportsortdivision {r+1} {rcaron}
+ \exportsortexpansion {scaron} {s+1}
+ \exportsortexpansion {Scaron} {S+1}
+ \exportsortdivision {s+1} {scaron}
+ \exportsortexpansion {tcaron} {t+1}
+ \exportsortexpansion {Tcaron} {T+1}
+ \exportsortdivision {t+1} {tcaron}
+ \exportsortexpansion {uacute} {u+1}
+ \exportsortexpansion {Uacute} {U+1}
+ \exportsortexpansion {uring} {u+2}
+ \exportsortexpansion {Uring} {U+2}
+ \exportsortexpansion {yacute} {y+1}
+ \exportsortexpansion {Yacute} {Y+1}
+ \exportsortexpansion {zcaron} {z+1}
+ \exportsortexpansion {Zcaron} {Z+1}
+ \exportsortdivision {z+1} {zcaron}
+\stopmode
+
+\endinput
diff --git a/tex/context/base/sort-lan.tex b/tex/context/base/sort-lan.tex
index ad5232b02..1eadae407 100644
--- a/tex/context/base/sort-lan.tex
+++ b/tex/context/base/sort-lan.tex
@@ -11,193 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% for testing:
+\writestatus{loading}{Context Sorting Macros (languages)}
-\startmode[sortorder-en]
- \exportsortexpansion{aacute}{a+1}
- \exportsortexpansion{Aacute}{A+2}
- \exportsortexpansion{agrave}{a+1}
- \exportsortexpansion{Agrave}{A+2}
-\stopmode
-
-%D This module replaces existing sort key handling and is meant to be
-%D used with the new texutil functionality. Here we define the language
-%D specific sort rules.
-
-% slovenian
-%
-% a-c, ccaron, cacute, d, dstroke, e-s, scaron, t-z, zcaron
-
-% \enableregime[utf]
-% \mainlanguage[sl]
-% \starttext
-% \ccaron\index{\ccaron\space 1}
-% \Ccaron\index{\Ccaron\space 1}
-% Ä\index{Ä 2}
-% Č\index{Č 2}
-% \v c\index{\v c 3}
-% \v C\index{\v C 3}
-% \placeindex
-% \stoptext
-
-% \startmode[sortorder-sl]
-% \exportsortexpansion {ccaron} {cz}
-% \exportsortexpansion {cacute} {czz}
-% \exportsortexpansion {dstroke} {dz}
-% \exportsortexpansion {scaron} {sz}
-% \exportsortexpansion {zacron} {zz}
-
-% \exportsortdivision {cz} {ccaron}
-% \exportsortdivision {czz} {cacute}
-% \exportsortdivision {dz} {dstroke}
-% \exportsortdivision {sz} {scaron}
-% \exportsortdivision {zz} {zacron}
-% \stopmode
-%
-% \startmode[sortorder-sl]
-% \exportsortexpansion {ccaron} {c+1}
-% \exportsortexpansion {cacute} {c+2}
-% \exportsortexpansion {dstroke} {d+1}
-% \exportsortexpansion {scaron} {s+1}
-% \exportsortexpansion {zacron} {z+1}
-%
-% \exportsortdivision {c+1} {ccaron}
-% \exportsortdivision {c+2} {cacute}
-% \exportsortdivision {d+1} {dstroke}
-% \exportsortdivision {s+1} {scaron}
-% \exportsortdivision {z+1} {zacron}
-% \stopmode
-
-\startmode[sortorder-sl]
- \exportsortrule {ccaron} {c+1}
- \exportsortrule {cacute} {c+2}
- \exportsortrule {dstroke} {d+1}
- \exportsortrule {scaron} {s+1}
- \exportsortrule {zacron} {z+1}
-\stopmode
-
-% finnish
-%
-% a-u, v+w sorted together, x-z, aring, adiaeresis, odiaeresis
-
-\startmode[sortorder-fi]
- \exportsortrule {v} {w}
- \exportsortrule {aring} {z+1}
- \exportsortrule {adiaeresis} {z+2}
- \exportsortrule {odiaeresis} {z+3}
-\stopmode
-
-% swedish
-%
-% a-z, aring, adiaeresis, odiaeresis
-
-% \mainlanguage[sv]
-% \starttext
-% a\index{a}
-% a\index{a}
-% z\index{z}
-% z\index{z}
-% q\index{q}
-% q\index{q}
-% å\index{å}
-% å\index{å}
-% å\index{å}
-% ä\index{ä}
-% ä\index{ä}
-% ä\index{ä}
-% ä\index{ä}
-% ö\index{ö}
-% ö\index{ö}
-% \aring\index{\aring}
-% \adiaeresis\index{\adiaeresis}
-% \odiaeresis\index{\odiaeresis}
-% A\index{A}
-% Å\index{Å}
-% Ä\index{Ä}
-% Ö\index{Ö}
-% \Aring\index{\Aring}
-% \Adiaeresis\index{\Adiaeresis}
-% \Odiaeresis\index{\Odiaeresis}
-% \placeindex
-% \stoptext
-
-\startmode[sortorder-sv]
- \exportsortrule {aring} {z+1}
- \exportsortrule {adiaeresis} {z+2}
- \exportsortrule {odiaeresis} {z+3}
-\stopmode
-
-% norwegian, danish
-%
-% a-z, aeligature, oslash, aring
-
-\startmode[sortorder-no,sortorder-da]
- \exportsortrule {aeligature} {z+1}
- \exportsortrule {oslash} {z+2}
- \exportsortrule {aring} {z+3}
-\stopmode
-
-% islandic
-%
-% a, aacute, b, c, d, eth, e, eacute, f-i, iacute, j-o, oacute, p-u, uacute, v, w (?), x, y, yacute, z, aeligature, oslash, thorn
-
-% estonian
-%
-% a-s, scaron, z, zcaron, t-w, otilde, adiaeresis, odiaeresis, udiaeresis, x, y
-
-% czech
-%
-% a) make a single group for: "a", "á", "A", "Á"
-% b) make a different two groups for: "c", "C" and "c", "C"
-% c) sorting rule: "A" < "Á" < "a" < "á" < "C" < "c" < "C" < "c"
-% d) sorting rule: "h" < "ch" < "i" ("c" < "h")
-
-\gdef\czsortdivisionch{ch}
-\gdef\czsortdivisionCh{Ch}
-
-\startmode[sortorder-cz]
- \exportsortexpansion {aacute} {a+1}
- \exportsortexpansion {Aacute} {A+1}
- \exportsortexpansion {ccaron} {c+1}
- \exportsortexpansion {Ccaron} {C+1}
- \exportsortdivision {c+1} {ccaron}
- \exportsortexpansion {dcaron} {d+1}
- \exportsortexpansion {Dcaron} {D+1}
- \exportsortdivision {d+1} {dcaron}
- \exportsortexpansion {eacute} {e+1}
- \exportsortexpansion {Eacute} {E+1}
- \exportsortexpansion {ecaron} {e+2}
- \exportsortexpansion {Ecaron} {E+2}
- \exportsortreduction {ch} {h+1}
- \exportsortexpansion {ch} {h+1}
- \exportsortreduction {Ch} {H+1}
- \exportsortexpansion {Ch} {H+1}
- \exportsortdivision {h+1} {czsortdivisionch}
- \exportsortexpansion {iacute} {i+1}
- \exportsortexpansion {Iacute} {I+1}
- \exportsortexpansion {ncaron} {n+1}
- \exportsortexpansion {Ncaron} {N+1}
- \exportsortdivision {n+1} {ncaron}
- \exportsortexpansion {oacute} {o+1}
- \exportsortexpansion {Oacute} {O+1}
- \exportsortexpansion {rcaron} {r+1}
- \exportsortexpansion {Rcaron} {R+1}
- \exportsortdivision {r+1} {rcaron}
- \exportsortexpansion {scaron} {s+1}
- \exportsortexpansion {Scaron} {S+1}
- \exportsortdivision {s+1} {scaron}
- \exportsortexpansion {tcaron} {t+1}
- \exportsortexpansion {Tcaron} {T+1}
- \exportsortdivision {t+1} {tcaron}
- \exportsortexpansion {uacute} {u+1}
- \exportsortexpansion {Uacute} {U+1}
- \exportsortexpansion {uring} {u+2}
- \exportsortexpansion {Uring} {U+2}
- \exportsortexpansion {yacute} {y+1}
- \exportsortexpansion {Yacute} {Y+1}
- \exportsortexpansion {zcaron} {z+1}
- \exportsortexpansion {Zcaron} {Z+1}
- \exportsortdivision {z+1} {zcaron}
-\stopmode
+\loadmarkfile{sort-lan}
\endinput
diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex
index f9e697f20..250fd1ad0 100644
--- a/tex/context/base/spec-fdf.tex
+++ b/tex/context/base/spec-fdf.tex
@@ -190,6 +190,28 @@
\def\appendtoPDFdocumentextgstates#1%
{\xdef\docuPDFextgstates{\docuPDFextgstates\space#1}}
+% this can save a pass, but we need to handle dpx then first; for
+% that we need a 'direct special'
+%
+% \def\checkPDFextgstates
+% {\ifx\docuPDFextgstates\empty \else
+% \doreservePDFobject{FDF}{docuextgstates}%
+% \gdef\checkPDFextgstates
+% {\doPDFgetobjectreference{FDF}{docuextgstates}\PDFobjectreference
+% \doPDFpageresource{/ExtGState \PDFobjectreference}}%
+% \checkPDFextgstates
+% \fi}
+%
+% \appendtoksonce
+% \ifx\docuPDFextgstates\empty \else
+% \doPDFreserveddictionaryobject{FDF}{docuextgstates}\docuPDFextgstates
+% \fi
+% \to \everybye
+%
+% \appendtoksonce
+% \checkPDFextgstates
+% \to \everyshipout
+
%D Another special mechanism (needed for color separation):
\let\docuPDFcolorspaces\empty
@@ -2421,9 +2443,13 @@
\long\def\doPDFinsertcomment#1#2#3#4#5#6#7#8% % \@@DriverCommentLayer set otherwise
{\bgroup % title width height color open symbol collect data
\presetPDFsymbolappearance{#4}{#6}{#2}{#3}\!!zeropoint% sets width/height
+% \doifelsenothing{#1}
+% {\let\PDFidentifier\empty}
+% {\def\PDFidentifier{/T (#1)}}%
\doifelsenothing{#1}
{\let\PDFidentifier\empty}
- {\def\PDFidentifier{/T (#1)}}%
+ {\sanitizePDFencoding#1\to\PDFcommenttitle
+ \def\PDFidentifier{/T \ifPDFunicode <\PDFcommenttitle>\else (\PDFcommenttitle)\fi}}%
\sanitizePDFencoding#8\to\PDFdata
\setFDFlayer\@@DriverCommentLayer
\startPDFsymbolappearance
@@ -3048,7 +3074,7 @@
{\ifx\initializePDFoverprint\undefined\else
\initializePDFoverprint
% \PDFdirectcode{/GSknockout gs}%
- \PDFcode{/GSknockout gs}%
+ \PDFcode{/GSknockout gs}% wrong
\fi}
%D Transparency support (experimental):
diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex
index fdf41daec..428eb2750 100644
--- a/tex/context/base/spec-tpd.tex
+++ b/tex/context/base/spec-tpd.tex
@@ -651,7 +651,7 @@
%D {dostarttransparency,dostoptransparency}
%D
%D For transparency, we need to implement a couple of
-%D auxiliary macros. If needed, we will generalize tham later.
+%D auxiliary macros. If needed, we will generalize them later.
\definespecial\dostarttransparency{\doPDFstarttransparency}
\definespecial\dostoptransparency {\doPDFstoptransparency}
@@ -1235,6 +1235,27 @@
{\immediate\pdfobj{[ #3 ]}%
\dosetobjectreference{#1}{#2}{\the\pdflastobj}}}
+% no, we sometimes need to keep track of the page number too
+%
+% \def\doPDFdictionaryobject#1#2#3%
+% {\immediate\pdfobj{<< #3 >>}%
+% \dosetobjectreference{#1}{#2}{\the\pdflastobj}}
+% \def\doPDFarrayobject#1#2#3%
+% {\immediate\pdfobj{[ #3 ]}%
+% \dosetobjectreference{#1}{#2}{\the\pdflastobj}}
+
+\def\doreservePDFobject#1#2%
+ {\pdfobj reserveobjnum{}%
+ \driverreferenced\dosetobjectreference{#1}{#2}{\the\pdflastobj}}
+
+\def\doPDFreserveddictionaryobject#1#2#3%
+ {\doPDFgetobjectnumber{#1}{#2}\PDFobjectnumber
+ \immediate\pdfobj useobjnum \PDFobjectnumber {<< #3 >>}}
+
+\def\doPDFreservedarrayobject#1#2#3%
+ {\doPDFgetobjectnumber{#1}{#2}\PDFobjectnumber
+ \immediate\pdfobj useobjnum \PDFobjectnumber {[ #3 ]}}
+
%D \macros
%D {defaultobjectreference,doPDFgetobjectreference}
%D
@@ -1249,6 +1270,10 @@
{\dogetobjectreference{#1}{#2}#3%
\edef#3{\ifx#3\empty null\else\PDFobjref{#3}\fi}}
+\def\doPDFgetobjectnumber#1#2#3%
+ {\dogetobjectreference{#1}{#2}#3%
+ \edef#3{\ifx#3\empty 0\else#3\fi}}
+
% \def\doPDFgetobjectpage #1#2#3{..}
% \def\doPDFgetobjectpagereference#1#2#3{..}
diff --git a/tex/context/base/spec-xet.tex b/tex/context/base/spec-xet.tex
index f814fd6f9..0cbd55ba7 100644
--- a/tex/context/base/spec-xet.tex
+++ b/tex/context/base/spec-xet.tex
@@ -39,13 +39,13 @@
\relax}
\def\dogetXTXfiguresize
- {\setbox\foundexternalfigure\vbox{\XeTeXpicfile "\@@DriverImageFile"}%
+ {\setbox\foundexternalfigure\vbox{\XeTeXpicfile "\@@DriverImageFile"\relax}%
\xdef\analyzedfigurewidth {\the\wd\foundexternalfigure}%
\xdef\analyzedfigureheight{\the\ht\foundexternalfigure}}
\def\dogetXTXpdfsize
{\checkpdfimagepagenumber
- \setbox\foundexternalfigure\vbox{\XeTeXpdffile "\@@DriverImageFile" \pdfimagepagenumber}%
+ \setbox\foundexternalfigure\vbox{\XeTeXpdffile "\@@DriverImageFile" \pdfimagepagenumber\relax}%
\xdef\analyzedfigurewidth {\the\wd\foundexternalfigure}%
\xdef\analyzedfigureheight{\the\ht\foundexternalfigure}}
diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex
index 53f096de5..09c390309 100644
--- a/tex/context/base/supp-box.tex
+++ b/tex/context/base/supp-box.tex
@@ -626,16 +626,24 @@
%D {llap, rlap, tlap, blap, clap}
%D
%D Some well known friends, but we implement them our own
-%D way.
+%D way. We want the macros to work in both math and text mode.
-\def\rlap{\begingroup\dowithnextbox{\normalhbox to \zeropoint
- {\flushnextbox\normalhss}\endgroup}\normalhbox}
+\def\dorlap{\begingroup\dowithnextbox{\normalhbox to \zeropoint
+ {\flushnextbox\normalhss}\endgroup}\normalhbox}
-\def\llap{\begingroup\dowithnextbox{\normalhbox to \zeropoint
- {\normalhss\flushnextbox}\endgroup}\normalhbox}
+\def\dollap{\begingroup\dowithnextbox{\normalhbox to \zeropoint
+ {\normalhss\flushnextbox}\endgroup}\normalhbox}
-\def\clap{\begingroup\dowithnextbox{\normalhbox to \zeropoint
- {\normalhss\flushnextbox\normalhss}\endgroup}\normalhbox}
+\def\doclap{\begingroup\dowithnextbox{\normalhbox to \zeropoint
+ {\normalhss\flushnextbox\normalhss}\endgroup}\normalhbox}
+
+\def\domathclap{\mathpalette\dodomathclap} \def\dodomathclap#1#2{\doclap{$\m@th#1#2$}}
+\def\domathllap{\mathpalette\dodomathllap} \def\dodomathllap#1#2{\dollap{$\m@th#1#2$}}
+\def\domathrlap{\mathpalette\dodomathrlap} \def\dodomathrlap#1#2{\dorlap{$\m@th#1#2$}}
+
+\unexpanded\def\rlap{\mathortext\domathrlap\dorlap}
+\unexpanded\def\llap{\mathortext\domathllap\dollap}
+\unexpanded\def\clap{\mathortext\domathclap\doclap}
\def\tlap{\begingroup\dowithnextbox{\normalvbox to \zeropoint
{\normalvss\flushnextbox}\endgroup}\normalvbox}
@@ -1067,7 +1075,7 @@
\exhyphenpenalty\zerocount
\setbox0\normalvbox
{\hsize\zeropoint
- \hskip\zeropoint % really needed
+ \hskip\zeropoint\relax % really needed
\ifnum#1<\zeropoint
\obeyspaces
\obeylines
@@ -2339,7 +2347,7 @@
%D The alternatives \type {\tbox} and \type {\bbox} can be used
%D to properly align boxes, like in:
%D
-%D \setupexternalfigures[directory={../sample}]
+%D \setupexternalfigures[directory={../sample}]
%D \startbuffer
%D \starttable[|||]
%D \HL
diff --git a/tex/context/base/supp-mat.tex b/tex/context/base/supp-mat.tex
index f21ee6afa..3c66566d3 100644
--- a/tex/context/base/supp-mat.tex
+++ b/tex/context/base/supp-mat.tex
@@ -48,7 +48,7 @@
\long\def\mathematics#1{\relax\ifmmode#1\else $#1$\fi} % lookahead bug reported by brooks
\long\def\displaymath#1{\relax\ifmmode#1\else$$#1$$\fi}
-\long\def\inlinemath #1{\relax\ifmmode#1\else $#1$\fi}
+\long\def\inlinemath #1{\dontleavehmode\relax\ifmmode#1\else $#1$\fi}
\let\stopmathmode\relax
@@ -77,7 +77,7 @@
%D An example of usage of the following can be found in the MathML module:
\long\def\displaymathematics#1{\relax\ifmmode#1\else\dostartformula{}#1\dostopformula\fi}
- \let\inlinemathematics \mathematics
+ \def\inlinemathematics {\dontleavehmode\mathematics}
\def\automathematics {\relax\ifhmode\@EA\inlinemathematics\else\@EA\displaymathematics\fi}
% better, esp when used in bTABLE ... eTABLE
@@ -189,4 +189,98 @@
\fi
\fi}
+%D \macros
+%D {cramped}
+%D
+%D \TEX provides no primitive to force in cramped math mode. Here is
+%D a macro that does so. It is based on a solution by Don Knuth (\userul
+%D {http://www.ctan.org/tex-archive/digests/tex-implementors/042}).
+
+\def\cramped
+ {\mathpalette\docramped}
+
+%D We force a cramped style by issuing a non||existing radical (box).
+%D After that we make sure the height is correct. (Comment taken from
+%D Morten Høgholm's mathtools package.) Macro suggested by AM and
+%D cleaned up a bit by HH.
+
+% original
+%
+% \def\docramped#1#2%
+% {\setbox\scratchbox\hbox
+% {\nulldelimiterspace\zeropoint
+% $\m@th#1\radical\zerocount{#2}$}%
+% \ifx#1\displaystyle
+% \scratchdimen\fontdimen8\textfont3
+% \advance\scratchdimen .25\fontdimen5\textfont2
+% \else
+% \scratchdimen1.25\fontdimen8
+% \ifx#1\textstyle\textfont
+% \else
+% \ifx#1\scriptstyle\scriptfont\else\scriptscriptfont\fi
+% \fi
+% 3
+% \fi
+% \advance\scratchdimen-\ht\scratchbox
+% \ht\scratchbox-\scratchdimen
+% \box\scratchbox}
+
+\def\docramped#1#2%
+ {\begingroup % added HH, made even more cramped
+ \setbox\scratchbox\hbox
+ {\nulldelimiterspace\zeropoint
+ $\m@th#1\radical\zerocount{#2}$}%
+ \ht\scratchbox-\dimexpr
+ \ifx#1\displaystyle
+ \fontdimen8\textfont3
+ +.25\fontdimen5\textfont2
+ \else
+ 1.25\fontdimen8
+ \ifx#1\textstyle
+ \textfont
+ \else\ifx#1\scriptstyle
+ \scriptfont
+ \else
+ \scriptscriptfont
+ \fi \fi
+ \plusthree
+ \fi
+ -\ht\scratchbox
+ \relax
+ \box\scratchbox
+ \endgroup}
+
+%D \macros
+%D {cramedllap, crampedrlap, crampedclap}
+%D
+%D In many cases, one wants to use the \tex {clap} macro in
+%D math mode while using subscripts. Normally, subscripts are
+%D in cramped mode, and these macros allow you to go to
+%D cramped mode. For example:
+%D
+%D \startbuffer
+%D \startformula
+%D \sum_{a^2 < b^2 < c^2} \quad
+%D \sum_{\clap{a^2 < b^2 < c^2}} \quad
+%D \sum_{\crampedclap{a^2 < b^2 < c^2}}
+%D \stopformula
+%D \stopbuffer
+%D
+%D \start
+%D \typebuffer
+%D \switchtobodyfont[24pt]
+%D \getbuffer
+%D \stop
+%D
+%D Notice that \type {\clap{\cramped ... }} would also work,
+%D but it requires \TEX\ to typeset it arguments 16 times.
+
+\def\docrampedllap#1#2{{}\dollap{\docramped #1{#2}}}
+\def\docrampedrlap#1#2{{}\dorlap{\docramped #1{#2}}}
+\def\docrampedclap#1#2{{}\doclap{\docramped #1{#2}}}
+
+\def\crampedllap{\mathpalette\docrampedllap}
+\def\crampedrlap{\mathpalette\docrampedrlap}
+\def\crampedclap{\mathpalette\docrampedclap}
+
\protect \endinput
diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex
index fea1c7356..145681489 100644
--- a/tex/context/base/supp-mps.tex
+++ b/tex/context/base/supp-mps.tex
@@ -1498,7 +1498,7 @@
%D Now let's see if things work all right and show the example
%D files that are part of the \METAPOST\ distribution:
%D
-%D \setupexternalfigures[directory={../sample}]
+%D \setupexternalfigures[directory={../sample}]
%D \startlinecorrection
%D \setupalign[middle]
%D \leavevmode
@@ -1872,8 +1872,7 @@
\long\def\startMPclip#1#2\stopMPclip
{\blabelgroup
- \long\setgvalue{MPC:#1}%
- {\startMPgraphic#2\stopMPgraphic\dograbMPclippath}%
+ \long\setgvalue{MPC:#1}{\startMPgraphic#2\stopMPgraphic\dograbMPclippath}%
\elabelgroup}
\let\stopMPclip\relax
@@ -1900,6 +1899,22 @@
%D and the \type {%} triggers the grabber. Next we filter the
%D clipping path, or actually, the first path.
+% \bgroup
+% \catcode`\%=\@@active
+% \catcode`\/=\@@comment
+% \gdef\dograbMPclippath/
+% {\setbox\scratchbox=\hbox\bgroup/
+% \catcode`\%=\@@active
+% \obeylines\let\obeyedline\space
+% \def\do##1newpath##2closepath##3\od/
+% {\xdef\MPclippath{##2}\endinput}/
+% \def%##1%%EOF/
+% {\do##1newpathclosepath\od\endinput}/
+% \readfile{\MPgraphicfile.\the\currentMPgraphic}{}{}/
+% \deallocateMPslot\currentMPgraphic / new
+% \egroup}
+% \egroup
+
\bgroup
\catcode`\%=\@@active
\catcode`\/=\@@comment
@@ -1907,11 +1922,18 @@
{\setbox\scratchbox=\hbox\bgroup/
\catcode`\%=\@@active
\obeylines\let\obeyedline\space
- \def\do##1newpath##2closepath##3\od/
+ \def\do##1q n##2p W##3\od/
{\xdef\MPclippath{##2}\endinput}/
\def%##1%%EOF/
- {\do##1newpathclosepath\od\endinput}/
+ {\do##1q np W\od\endinput}/
\readfile{\MPgraphicfile.\the\currentMPgraphic}{}{}/
+ \ifx\MPclippath\empty
+ \def\do##1newpath##2closepath##3\od/
+ {\xdef\MPclippath{##2}\endinput}/
+ \def%##1%%EOF/
+ {\do##1newpathclosepath\od\endinput}/
+ \readfile{\MPgraphicfile.\the\currentMPgraphic}{}{}/
+ \fi
\deallocateMPslot\currentMPgraphic / new
\egroup}
\egroup
diff --git a/tex/context/base/type-xtx.tex b/tex/context/base/type-xtx.tex
index c2c217515..010de1f85 100644
--- a/tex/context/base/type-xtx.tex
+++ b/tex/context/base/type-xtx.tex
@@ -46,14 +46,72 @@
%D \setupbodyfont[basic]
%D \stoptyping
+%D This file is hacked by Taco Hoekwater in an attempt to figure out the right approach
+%D to font loading in \XeTeX. (jun19,2007)
+
+%D The General \XeTeX\ low-level font syntax is (at least) as follows.
+%D
+%D Named font:
+%D \starttyping
+%D \font\x = "<fontname><engine-options>:<featurelist>" <at or scaled>
+%D \stoptyping
+%D \type{<fontname>} = Font name as seen in a system font menu or the output of fc-list
+%D
+%D \type{<engine-options>} = \type{/B} or \type{/I} or \tupe{/BI}, and||or \type{/S=<X>}.
+%D That last one selects an optical scaled variant for size \type{<X>}
+%D (it is a bare number, the unit is points).
+%D
+%D \type{<featurelist>} = comma- or semicolon- separated list of font features.
+%D
+%D Opentype features are selected using \type{+<tag>}, and deselected using \type{-<tag>},
+%D except that key||value pairs are used for \type{script=<tag>} and \type{language=<tag>}
+%D
+%D AAT features are always key||value pairs, often including spaces.
+%D
+%D \XETEX's own features are key||value pairs, and can be applied to both OpenType
+%D and AAT fonts:
+%D \type{mapping=<font map>} for glyph remapping
+%D \type{color=RRGGBB[TT]} for color (hex numbers, with optional transparancy),
+%D \type{letterspace=<x>} to add \type{<x>/<fontsize>} intercharacter spacing.
+%D
+%D Full example showing all parts of the syntax for an OTF font:
+%D \starttyping
+%D \font\f= "Warnock Pro/I/S=5:+smcp,-liga,mapping=tex-text,script=latn"
+%D \stoptyping
+
+%D Non-installed (filename-based) fonts :
+%D
+%D \starttyping
+%D \font\x = "[<fontname>]:<featurelist>" <at or scaled>
+%D \stoptyping
+%D
+%D Here, there are no \type{<engine-options>}, because there is no
+%D font discovery engine available to be queried.
+
+
+%D TH: This \type{\xetexcolon} definition seems needed because the name/file \
+%D parser otherwise drops the rest of the argument into oblivion.
+
+\unexpanded\def\xetexcolon{:}
+
\starttypescriptcollection[xetex]
\starttypescript[Xserif][all][name]
-\definefontsynonym[Dummy] ['\typescripttwo:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[DummyItalic] ['\typescripttwo/I:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[DummyBold] ['\typescripttwo/B:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[DummyBoldItalic]['\typescripttwo/BI:mapping=tex-text'][encoding=uc]
+%D TH: I removed all single quotes because they don't seem to add anything. And I added
+%D the \type{name:} everywhere, because passing that information on \type{\typescripttwo}
+%D doesn't work either (maybe \type{\typescripttwo} is expanded incorrectly)
+%D
+%D And even if that would have worked, \type{file:} will not work properly anyway
+%D in this case since tricks like \type{/I} will never, ever work for local fonts,
+%D so there is really only one choice.
+
+%D HH: todo, define feature set swith mapping=tex-tex
+
+\definefontsynonym[Dummy] [name:\typescripttwo\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[DummyItalic] [name:\typescripttwo/I\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[DummyBold] [name:\typescripttwo/B\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[DummyBoldItalic][name:\typescripttwo/BI\xetexcolon mapping=tex-text][encoding=uc]
\definefontsynonym[Serif] [Dummy]
\definefontsynonym[SerifBold] [DummyBold]
@@ -67,10 +125,10 @@
\starttypescript[Xsans][all][name]
-\definefontsynonym[DummySans] ['\typescripttwo:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[DummySansItalic] ['\typescripttwo/I:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[DummySansBold] ['\typescripttwo/B:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[DummySansBoldItalic]['\typescripttwo/BI:mapping=tex-text'][encoding=uc]
+\definefontsynonym[DummySans] [name:\typescripttwo\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[DummySansItalic] [name:\typescripttwo/I\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[DummySansBold] [name:\typescripttwo/B\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[DummySansBoldItalic][name:\typescripttwo/BI\xetexcolon mapping=tex-text][encoding=uc]
\definefontsynonym[Sans] [DummySans]
\definefontsynonym[SansBold] [DummySansBold]
@@ -84,10 +142,10 @@
\starttypescript[Xmono][all][name]
-\definefontsynonym[DummyMono] ['\typescripttwo'] [encoding=uc]
-\definefontsynonym[DummyMonoItalic] ['\typescripttwo/I'] [encoding=uc]
-\definefontsynonym[DummyMonoBold] ['\typescripttwo/B'] [encoding=uc]
-\definefontsynonym[DummyMonoBoldItalic]['\typescripttwo/BI'][encoding=uc]
+\definefontsynonym[DummyMono] [name:\typescripttwo] [encoding=uc]
+\definefontsynonym[DummyMonoItalic] [name:\typescripttwo/I] [encoding=uc]
+\definefontsynonym[DummyMonoBold] [name:\typescripttwo/B] [encoding=uc]
+\definefontsynonym[DummyMonoBoldItalic][name:\typescripttwo/BI][encoding=uc]
\definefontsynonym[Mono] [DummyMono]
\definefontsynonym[MonoBold] [DummyMonoBold]
@@ -101,8 +159,8 @@
\starttypescript[Xserif][default][size]
\definebodyfont
- [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
- [rm] [default]
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt] [rm]
+ [default]
\stoptypescript
\starttypescript[Xsans][default][size]
@@ -146,10 +204,10 @@
\starttypescript[serif][times][uc]
-\definefontsynonym[Times-Roman] ['Times Roman:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[Times-Italic] ['Times Italic:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[Times-Bold] ['Times Bold:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[Times-BoldItalic]['Times Bold Italic:mapping=tex-text;'][encoding=uc]
+\definefontsynonym[Times-Roman] [name:Times Roman\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[Times-Italic] [name:Times Italic\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[Times-Bold] [name:Times Bold\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[Times-BoldItalic][name:Times Bold Italic\xetexcolon mapping=tex-text;][encoding=uc]
\stoptypescript
@@ -157,10 +215,10 @@
\starttypescript[serif][palatino][uc]
-\definefontsynonym[Palatino] ['Book Antiqua:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[Palatino-Italic] ['Book Antiqua Italic:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[Palatino-Bold] ['Book Antiqua Bold:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[Palatino-BoldItalic] ['Book Antiqua Bold Italic:mapping=tex-text'][encoding=uc]
+\definefontsynonym[Palatino] [name:Book Antiqua\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[Palatino-Italic] [name:Book Antiqua Italic\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[Palatino-Bold] [name:Book Antiqua Bold\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[Palatino-BoldItalic] [name:Book Antiqua Bold Italic\xetexcolon mapping=tex-text][encoding=uc]
\definefontsynonym[Palatino-Slanted] [Palatino-Italic]
\definefontsynonym[Palatino-BoldSlanted][Palatino-BoldItalic]
@@ -173,10 +231,10 @@
\starttypescript[sans][helvetica][uc]
-\definefontsynonym[Helvetica] ['Helvetica Neue:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[Helvetica-Oblique] ['Helvetica Neue Italic:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[Helvetica-Bold] ['Helvetica Neue Bold:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[Helvetica-BoldOblique]['Helvetica Neue Bold Italic:mapping=tex-text'][encoding=uc]
+\definefontsynonym[Helvetica] [name:Helvetica Neue\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[Helvetica-Oblique] [name:Helvetica Neue Italic\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[Helvetica-Bold] [name:Helvetica Neue Bold\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[Helvetica-BoldOblique][name:Helvetica Neue Bold Italic\xetexcolon mapping=tex-text][encoding=uc]
\stoptypescript
@@ -186,30 +244,30 @@
\starttypescript[mono][courier][uc]
-\definefontsynonym[Courier] ['Courier:mapping=tex-text'] [encoding=uc]
+\definefontsynonym[Courier] [name:Courier\xetexcolon mapping=tex-text] [encoding=uc]
\definefontsynonym[Courier-Oblique] [Courier]
-\definefontsynonym[Courier-Bold] ['Courier Bold:mapping=tex-text'][encoding=uc]
+\definefontsynonym[Courier-Bold] [name:Courier Bold\xetexcolon mapping=tex-text][encoding=uc]
\definefontsynonym[Courier-BoldOblique][Courier-Bold]
\stoptypescript
%D The following fonts go beyond the usual four variants that
%D are accessible via the above wildcard typescripts, so they
-%D get a more expanded treatment here:
+%D get a more expanded treatment here\xetexcolon
\starttypescript[serif][hoefler][uc]
-\definefontsynonym[Hoefler] ['Hoefler Text:mapping=tex-text;
- Ligatures=Diphthongs'] [encoding=uc]
-\definefontsynonym[HoeflerItalic]['Hoefler Text Italic:mapping=tex-text;
- Ligatures=Diphthongs'] [encoding=uc]
-\definefontsynonym[HoeflerBlack] ['Hoefler Text Black:mapping=tex-text;
- Ligatures=Diphthongs'] [encoding=uc]
-\definefontsynonym[HoeflerBlackItalic]['Hoefler Text Black Italic:mapping=tex-text;
- Ligatures=Diphthongs'] [encoding=uc]
-\definefontsynonym[HoeflerSmCap] ['Hoefler Text:mapping=tex-text;
- Ligatures=Diphthongs;
- Letter Case=Small Caps'][encoding=uc]
+\definefontsynonym[Hoefler] [name:Hoefler Text\xetexcolon mapping=tex-text;%
+ Ligatures=Diphthongs] [encoding=uc]
+\definefontsynonym[HoeflerItalic][name:Hoefler Text Italic\xetexcolon mapping=tex-text;%
+ Ligatures=Diphthongs] [encoding=uc]
+\definefontsynonym[HoeflerBlack] [name:Hoefler Text Black\xetexcolon mapping=tex-text;%
+ Ligatures=Diphthongs] [encoding=uc]
+\definefontsynonym[HoeflerBlackItalic][name:Hoefler Text Black Italic\xetexcolon mapping=tex-text;%
+ Ligatures=Diphthongs] [encoding=uc]
+\definefontsynonym[HoeflerSmCap] [name:Hoefler Text\xetexcolon mapping=tex-text;%
+ Ligatures=Diphthongs;%
+ Letter Case=Small Caps][encoding=uc]
\stoptypescript
\starttypescript[serif][hoefler][name]
@@ -226,8 +284,8 @@
\starttypescript[sans][lucidagrande][uc]
-\definefontsynonym[LucidaGrande] ['Lucida Grande:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[LucidaGrandeBold]['Lucida Grande Bold:mapping=tex-text'][encoding=uc]
+\definefontsynonym[LucidaGrande] [name:Lucida Grande\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[LucidaGrandeBold][name:Lucida Grande Bold\xetexcolon mapping=tex-text][encoding=uc]
\stoptypescript
@@ -244,11 +302,11 @@
\stoptypescript
\starttypescript[sans][optima][uc]
-\definefontsynonym[Optima] ['Optima Regular:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[OptimaItalic] ['Optima Italic:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[OptimaBold] ['Optima Bold:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[OptimaBoldItalic]['Optima Bold Italic:mapping=tex-text'][encoding=uc]
-\definefontsynonym[OptimaBlack] ['Optima ExtraBlack:mapping=tex-text'] [encoding=uc]
+\definefontsynonym[Optima] [name:Optima Regular\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[OptimaItalic] [name:Optima Italic\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[OptimaBold] [name:Optima Bold\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[OptimaBoldItalic][name:Optima Bold Italic\xetexcolon mapping=tex-text][encoding=uc]
+\definefontsynonym[OptimaBlack] [name:Optima ExtraBlack\xetexcolon mapping=tex-text] [encoding=uc]
\stoptypescript
\starttypescript[sans][optima][name]
@@ -265,12 +323,12 @@
\starttypescript[sans][gillsans,gillsanslt][uc]
-\definefontsynonym[GillSans] ['Gill Sans:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[GillSansItalic] ['Gill Sans Italic:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[GillSansBold] ['Gill Sans Bold:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[GillSansBoldItalic] ['Gill Sans Bold Italic:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[GillSansLight] ['Gill Sans Light:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[GillSansLightItalic]['Gill Sans Light Italic:mapping=tex-text'][encoding=uc]
+\definefontsynonym[GillSans] [name:Gill Sans\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[GillSansItalic] [name:Gill Sans Italic\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[GillSansBold] [name:Gill Sans Bold\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[GillSansBoldItalic] [name:Gill Sans Bold Italic\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[GillSansLight] [name:Gill Sans Light\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[GillSansLightItalic][name:Gill Sans Light Italic\xetexcolon mapping=tex-text][encoding=uc]
\stoptypescript
@@ -300,13 +358,13 @@
\starttypescript[serif,handwriting][zapfino][uc]
-\definefontsynonym[ZapfinoOne] ['Zapfino:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[ZapfinoTwo] ['Zapfino:mapping=tex-text;
- Stylistic Variants=First variant glyph set'] [encoding=uc]
-\definefontsynonym[ZapfinoThree]['Zapfino:mapping=tex-text;
- Stylistic Variants=Second variant glyph set'][encoding=uc]
-\definefontsynonym[ZapfinoFour] ['Zapfino:mapping=tex-text;
- Stylistic Variants=Third variant glyph set'] [encoding=uc]
+\definefontsynonym[ZapfinoOne] [name:Zapfino\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[ZapfinoTwo] [name:Zapfino\xetexcolon mapping=tex-text;%
+ Stylistic Variants=First variant glyph set] [encoding=uc]
+\definefontsynonym[ZapfinoThree][name:Zapfino\xetexcolon mapping=tex-text;%
+ Stylistic Variants=Second variant glyph set][encoding=uc]
+\definefontsynonym[ZapfinoFour] [name:Zapfino\xetexcolon mapping=tex-text;%
+ Stylistic Variants=Third variant glyph set] [encoding=uc]
\stoptypescript
\starttypescript[handwriting][zapfino][name]
@@ -329,24 +387,24 @@
\starttypescript[serif,calligraphy][applechancery][uc]
-\definefontsynonym[AppleChanceryOne] ['Apple Chancery:mapping=tex-text;
- Number Case=Old Styles'] [encoding=uc]
-\definefontsynonym[AppleChanceryTwo] ['Apple Chancery:mapping=tex-text;
- Number Case=Old Styles;
- Design Complexity=Elegant Design Level'][encoding=uc]
-\definefontsynonym[AppleChanceryThree] ['Apple Chancery:mapping=tex-text;
- Number Case=Old Styles;
- Design Complexity=Flourishes Set A'] [encoding=uc]
-\definefontsynonym[AppleChanceryFour] ['Apple Chancery:mapping=tex-text;
- Number Case=Old Styles;
- Design Complexity=Flourishes Set B'] [encoding=uc]
-\definefontsynonym[AppleChanceryCaps] ['Apple Chancery:mapping=tex-text;
- Number Case=Old Styles;
- Letter Case=Small Caps'] [encoding=uc]
-\definefontsynonym[AppleChanceryCapsTwo]['Apple Chancery:mapping=tex-text;
- Number Case=Old Styles;
- Letter Case=Small Caps;
- Design Complexity=Flourishes Set B'] [encoding=uc]
+\definefontsynonym[AppleChanceryOne] [name:Apple Chancery\xetexcolon mapping=tex-text;%
+ Number Case=Old Styles] [encoding=uc]
+\definefontsynonym[AppleChanceryTwo] [name:Apple Chancery\xetexcolon mapping=tex-text;%
+ Number Case=Old Styles;%
+ Design Complexity=Elegant Design Level][encoding=uc]
+\definefontsynonym[AppleChanceryThree] [name:Apple Chancery\xetexcolon mapping=tex-text;%
+ Number Case=Old Styles;%
+ Design Complexity=Flourishes Set A] [encoding=uc]
+\definefontsynonym[AppleChanceryFour] [name:Apple Chancery\xetexcolon mapping=tex-text;%
+ Number Case=Old Styles;%
+ Design Complexity=Flourishes Set B] [encoding=uc]
+\definefontsynonym[AppleChanceryCaps] [name:Apple Chancery\xetexcolon mapping=tex-text;%
+ Number Case=Old Styles;%
+ Letter Case=Small Caps] [encoding=uc]
+\definefontsynonym[AppleChanceryCapsTwo][name:Apple Chancery\xetexcolon mapping=tex-text;%
+ Number Case=Old Styles;%
+ Letter Case=Small Caps;%
+ Design Complexity=Flourishes Set B] [encoding=uc]
\stoptypescript
\starttypescript[calligraphy][applechancery][name]
@@ -372,10 +430,10 @@
\starttypescript[serif][timesnewroman][uc]
-\definefontsynonym[MSTimes] ['Times New Roman:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[MSTimesItalic] ['Times New Roman Italic:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[MSTimesBold] ['Times New Roman Bold:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[MSTimesBoldItalic]['Times New Roman Bold Italic:mapping=tex-text'][encoding=uc]
+\definefontsynonym[MSTimes] [name:Times New Roman\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[MSTimesItalic] [name:Times New Roman Italic\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[MSTimesBold] [name:Times New Roman Bold\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[MSTimesBoldItalic][name:Times New Roman Bold Italic\xetexcolon mapping=tex-text][encoding=uc]
\stoptypescript
@@ -393,10 +451,10 @@
\starttypescript[sans][arial][uc]
-\definefontsynonym[Arial] ['Arial:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[ArialItalic] ['Arial Italic:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[ArialBold] ['Arial Bold:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[ArialBoldItalic]['Arial Bold Italic:mapping=tex-text'][encoding=uc]
+\definefontsynonym[Arial] [name:Arial\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[ArialItalic] [name:Arial Italic\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[ArialBold] [name:Arial Bold\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[ArialBoldItalic][name:Arial Bold Italic\xetexcolon mapping=tex-text][encoding=uc]
\stoptypescript
@@ -418,10 +476,10 @@
\starttypescript [serif] [lucida] [uc]
- \definefontsynonym [LucidaBright] ['Lucida Bright:mapping=tex-text'] [encoding=uc]
- \definefontsynonym [LucidaBright-Demi] ['Lucida Bright Demibold:mapping=tex-text'][encoding=uc]
- \definefontsynonym [LucidaBright-DemiItalic] ['Lucida Bright Demibold:mapping=tex-text'][encoding=uc]
- \definefontsynonym [LucidaBright-Italic] ['Lucida Bright:mapping=tex-text'] [encoding=uc]
+ \definefontsynonym [LucidaBright] [name:Lucida Bright\xetexcolon mapping=tex-text] [encoding=uc]
+ \definefontsynonym [LucidaBright-Demi] [name:Lucida Bright Demibold\xetexcolon mapping=tex-text][encoding=uc]
+ \definefontsynonym [LucidaBright-DemiItalic] [name:Lucida Bright Demibold\xetexcolon mapping=tex-text][encoding=uc]
+ \definefontsynonym [LucidaBright-Italic] [name:Lucida Bright\xetexcolon mapping=tex-text] [encoding=uc]
\definefontsynonym [LucidaBrightSmallcaps] [LucidaBright]
\definefontsynonym [LucidaBrightSmallcaps-Demi][LucidaBright-Demi]
@@ -430,10 +488,10 @@
\stoptypescript
\starttypescript [sans] [lucida] [uc]
- \definefontsynonym [LucidaSans] ['Lucida Sans Regular:mapping=tex-text'] [encoding=uc]
- \definefontsynonym [LucidaSans-Demi] ['Lucida Sans Demibold Roman:mapping=tex-text'] [encoding=uc]
- \definefontsynonym [LucidaSans-DemiItalic]['Lucida Sans Demibold Italic:mapping=tex-text'][encoding=uc]
- \definefontsynonym [LucidaSans-Italic] ['Lucida Sans Italic:mapping=tex-text'] [encoding=uc]
+ \definefontsynonym [LucidaSans] [name:Lucida Sans Regular\xetexcolon mapping=tex-text] [encoding=uc]
+ \definefontsynonym [LucidaSans-Demi] [name:Lucida Sans Demibold Roman\xetexcolon mapping=tex-text] [encoding=uc]
+ \definefontsynonym [LucidaSans-DemiItalic][name:Lucida Sans Demibold Italic\xetexcolon mapping=tex-text][encoding=uc]
+ \definefontsynonym [LucidaSans-Italic] [name:Lucida Sans Italic\xetexcolon mapping=tex-text] [encoding=uc]
\definefontsynonym [LucidaSans-Bold] [LucidaSans-Demi]
\definefontsynonym [LucidaSans-BoldItalic][LucidaSans-DemiItalic]
@@ -442,16 +500,16 @@
\starttypescript [mono] [lucida] [uc]
- \definefontsynonym [LucidaSans-Typewriter] ['Lucida Sans Typewriter Regular'] [encoding=uc]
- \definefontsynonym [LucidaSans-TypewriterBold] ['Lucida Sans Typewriter Bold'] [encoding=uc]
- \definefontsynonym [LucidaSans-TypewriterBoldOblique]['Lucida Sans Typewriter Bold Oblique'][encoding=uc]
- \definefontsynonym [LucidaSans-TypewriterOblique] ['Lucida Sans Typewriter Oblique'] [encoding=uc]
+ \definefontsynonym [LucidaSans-Typewriter] [name:Lucida Sans Typewriter Regular] [encoding=uc]
+ \definefontsynonym [LucidaSans-TypewriterBold] [name:Lucida Sans Typewriter Bold] [encoding=uc]
+ \definefontsynonym [LucidaSans-TypewriterBoldOblique][name:Lucida Sans Typewriter Bold Oblique][encoding=uc]
+ \definefontsynonym [LucidaSans-TypewriterOblique] [name:Lucida Sans Typewriter Oblique] [encoding=uc]
\stoptypescript
\starttypescript [calligraphy] [lucida] [uc]
- \definefontsynonym[LucidaCalligraphy-Italic]['Lucida Calligraphy Italic:mapping=tex-text'][encoding=uc]
+ \definefontsynonym[LucidaCalligraphy-Italic][name:Lucida Calligraphy Italic\xetexcolon mapping=tex-text][encoding=uc]
\stoptypescript
@@ -459,16 +517,16 @@
\starttypescript[handwriting][lucida][uc]
- \definefontsynonym[LucidaHandwriting-Italic]['Lucida Handwriting Italic:mapping=tex-text'][encoding=uc]
+ \definefontsynonym[LucidaHandwriting-Italic][name:Lucida Handwriting Italic\xetexcolon mapping=tex-text][encoding=uc]
\stoptypescript
\starttypescript[fax][lucida][uc]
- \definefontsynonym[LucidaFax] ['Lucida Fax Regular:mapping=tex-text'] [encoding=uc]
- \definefontsynonym[LucidaFax-Demi] ['Lucida Fax Demibold:mapping=tex-text'] [encoding=uc]
- \definefontsynonym[LucidaFax-DemiItalic]['Lucida Fax Demibold Italic:mapping=tex-text'][encoding=uc]
- \definefontsynonym[LucidaFax-Italic] ['Lucida Fax Italic:mapping=tex-text'] [encoding=uc]
+ \definefontsynonym[LucidaFax] [name:Lucida Fax Regular\xetexcolon mapping=tex-text] [encoding=uc]
+ \definefontsynonym[LucidaFax-Demi] [name:Lucida Fax Demibold\xetexcolon mapping=tex-text] [encoding=uc]
+ \definefontsynonym[LucidaFax-DemiItalic][name:Lucida Fax Demibold Italic\xetexcolon mapping=tex-text][encoding=uc]
+ \definefontsynonym[LucidaFax-Italic] [name:Lucida Fax Italic\xetexcolon mapping=tex-text] [encoding=uc]
\stoptypescript
@@ -478,8 +536,8 @@
\starttypescript[serif][gentium][uc]
-\definefontsynonym[Gentium] ['Gentium:mapping=tex-text'] [encoding=uc]
-\definefontsynonym[GentiumItalic]['Gentium Italic:mapping=tex-text'][encoding=uc]
+\definefontsynonym[Gentium] [name:Gentium\xetexcolon mapping=tex-text] [encoding=uc]
+\definefontsynonym[GentiumItalic][name:Gentium Italic\xetexcolon mapping=tex-text][encoding=uc]
\stoptypescript
diff --git a/tex/context/base/verb-ini.tex b/tex/context/base/verb-ini.tex
index f4b24d730..e30c9ecfe 100644
--- a/tex/context/base/verb-ini.tex
+++ b/tex/context/base/verb-ini.tex
@@ -13,7 +13,10 @@
%D Today I would implement the pretty handler slightly
%D different, using stack and intermediate flushing. Maybe
-%D even without active chars. So, someday \unknown
+%D even without active chars. So, someday \unknown. Also
+%D I think that there are better ways (the current approach
+%D is an accumulation; for instance, we could save a second
+%D argument by turning chars into numbers and vise versa.
%D Because this module is quite independant of system macros,
%D it can be used as a stand||alone verbatim environment.
diff --git a/tex/context/base/verb-xml.tex b/tex/context/base/verb-xml.tex
index f80147ebe..7b0237315 100644
--- a/tex/context/base/verb-xml.tex
+++ b/tex/context/base/verb-xml.tex
@@ -105,10 +105,9 @@
\setpretty`\7=17 \setpretty`\8=17 \setpretty`\9=17
\setpretty`\==16
\setpretty`\"=20
- \setpretty`\(=30 \setpretty`\)=30 \setpretty`\,=30
- \setpretty`\*=30 \setpretty`\+=30 \setpretty`\#=30
-% \setpretty`\:=30
- \setpretty`\:=10 % better for tags
+ \setpretty`\(=31 \setpretty`\)=31 \setpretty`\,=31
+ \setpretty`\*=31 \setpretty`\+=31 \setpretty`\#=31
+ \setpretty`\:=32
\setpretty`\&=41 \setpretty`\;=42 }
\gdef\XMLsethandlers%
@@ -121,7 +120,8 @@
\installprettyhandler 15 \XMLtypeonefive
\installprettyhandler 16 \XMLtypeonesix
\installprettyhandler 20 \XMLdoublequote
- \installprettyhandler 30 \XMLtypethree
+ \installprettyhandler 31 \XMLtypethreeone
+ \installprettyhandler 32 \XMLtypethreetwo
\installprettyhandler 41 \XMLbampersand
\installprettyhandler 42 \XMLeampersand }
@@ -256,7 +256,7 @@
\ifnum\prettytype=11 % >
\expandafter\dododoXMLtypeonetwo
\else % treat as `green' character
- \expandafter\XMLtypethree
+ \expandafter\XMLtypethreeone
\fi
{#1}#2}
@@ -386,7 +386,7 @@
% symbols like `(', `)' and `,' should be green
-\gdef\XMLtypethree#1%
+\gdef\XMLtypethreeone#1%
{\ifinXMLcomment
\getpretty{#1}%
\else
@@ -403,6 +403,22 @@
\fi
\fi}
+% \gdef\XMLtypethreetwo#1%
+% {\ifinXMLcomment
+% \getpretty{#1}%
+% \else
+% \ifinXMLtagname
+% \endofpretty
+% \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
+% \beginofpretty[\!!prettyone]%
+% \else
+% \getpretty{#1}%
+% \fi
+% \fi}
+
+\gdef\XMLtypethreetwo#1%
+ {\getpretty{#1}}
+
% special characters with `&'
\gdef\XMLbampersand#1%
diff --git a/tex/context/base/x-contml.tex b/tex/context/base/x-contml.tex
index 10a21b996..ba6762e77 100644
--- a/tex/context/base/x-contml.tex
+++ b/tex/context/base/x-contml.tex
@@ -80,7 +80,11 @@
\defineXMLsingular [context:compound] [token=]
{\mathortext % disc comm looks ahead, so \relax
{\doifXMLop{token}{\XMLop{token}}\compoundhyphen}%
- {\expanded{\discretionarycommand\noexpand|\XMLop{token}}|\relax}}
+ {\expanded{\directdiscretionary{\XMLop{token}}}\relax}}
+
+\defineXMLenvironmentsave [context:cp]
+ {}
+ {\expanded{\directdiscretionary{\XMLflush{cp}}}\relax}
%D \elements {p}
%D
@@ -242,7 +246,7 @@
\egroup}
%D \elements {fixed}
-%D \setupexternalfigures[directory={../sample}]
+%D \setupexternalfigures[directory={../sample}]
%D \startbuffer
%D Something fixed will end up at the place where it defined in the input
%D stream. The main idea behind this element is that it gives you control
@@ -275,7 +279,7 @@
\egroup}
%D \elements {float}
-%D \setupexternalfigures[directory={../sample}]
+%D \setupexternalfigures[directory={../sample}]
%D \startbuffer
%D A floating body will be placed at the first location available, unless
%D a location is specified. As with the <element>fixed</element> element,
diff --git a/tex/context/base/x-newmml.tex b/tex/context/base/x-newmml.tex
index 923ec3c76..cadd985db 100644
--- a/tex/context/base/x-newmml.tex
+++ b/tex/context/base/x-newmml.tex
@@ -15,6 +15,10 @@
%D filter. In due time it will replace the older renderer (which
%D we will keep around for sentimental reasons).
+\def\inlinemathematics {\dontleavehmode\mathematics} % already in kernel
+\long\def\inlinemath #1{\dontleavehmode\relax\ifmmode#1\else $#1$\fi}
+
+
% \defineXMLentity[x000AF]{\normalorfiller{x}\hrulefill}
% CHECK FOR: \xmlrent
% \enablemathpunctuation
@@ -785,6 +789,7 @@
\XMLfirstnamed{bvar}
\fi
\getXMLentity{mapsto}
+ \MMLcreset
\XMLfirstnamed{apply,reln,ci,cn}
}
\endgroup
@@ -804,6 +809,7 @@
\startsetups mmc:lambda:simple:stop
\stopsavingXMLelements
+ \MMLcreset % new
\XMLfirstnamed{apply}
\endgroup
\stopsetups
@@ -840,7 +846,13 @@
\setupMMLappearance[piece][\c!separator=]
-\def\MMLcPIECEseparator{\doif\@@MMLpieceseparator\v!yes,}
+\def\setMMLcPIECEseparator
+ {\processaction
+ [\@@MMLpieceseparator]
+ [ \v!yes=>\def\theMMLpieceseparator{,\@col@amp@},
+ \v!no=>\let\theMMLpieceseparator\@col@amp@,
+ \s!default=>\let\theMMLpieceseparator\@col@amp@,
+ \s!unknown=>\def\theMMLpieceseparator{\,\,\hbox{\@@MMLpieceseparator}\,\,}]}
\defineXMLargument[piecewise] {\cases}
@@ -856,12 +868,13 @@
\startsetups mmc:piece:start
\startsavingXMLelements
+ \setMMLcPIECEseparator
\stopsetups
\startsetups mmc:piece:stop
\stopsavingXMLelements
\edef\ascii{\getXMLstackdata\plusone}
- \@EA\XMLRtoks\@EA{\ascii\MMLcPIECEseparator\@col@amp@}
+ \@EA\XMLRtoks\@EA{\ascii\theMMLpieceseparator}
\edef\ascii{\getXMLstackdata\plustwo}
\@EA\appendtoks\@EA\mathematics\@EA{\ascii}\to\XMLRtoks
\the\XMLRtoks\crcr
@@ -879,23 +892,25 @@
\defineXMLcommand [factorial] {\getXMLstackdata\plustwo !}
-\defineXMLcommand [divide] {\directsetup{mmc:divide}}
+\defineXMLcommand [divide] [\MMLargumentprefix] [] {\directsetup{mmc:divide}} % brr not nested
\setupMMLappearance [divide] [\c!level=\!!maxcard,\c!alternative=\v!a]
\startsetups mmc:divide
- \increment\MMLcDIVIDElevel
- \doifelse \@@MMLdividealternative\v!b {
- \getXMLstackdata\plustwo/\getXMLstackdata\plusthree
- } {
- \ifnum\MMLcDIVIDElevel>\@@MMLdividelevel\space
+ \startusingMMLarguments
+ \increment\MMLcDIVIDElevel
+ \doifelse \@@MMLdividealternative\v!b {
\getXMLstackdata\plustwo/\getXMLstackdata\plusthree
- \else
- \MMLcreset
- \frac{\MMLcreset\getXMLstackdata\plustwo}{\MMLcreset\getXMLstackdata\plusthree}%
- \fi
- }
- \decrement\MMLcDIVIDElevel
+ } {
+ \ifnum\MMLcDIVIDElevel>\@@MMLdividelevel\space
+ \getXMLstackdata\plustwo/\getXMLstackdata\plusthree
+ \else
+ \MMLcreset
+ \frac{\MMLcreset\getXMLstackdata\plustwo}{\MMLcreset\getXMLstackdata\plusthree}%
+ \fi
+ }
+ \decrement\MMLcDIVIDElevel
+ \stopusingMMLarguments
\stopsetups
% min max
@@ -914,9 +929,10 @@
% minus plus
-\defineXMLcommand [minus] {\directsetup{mmc:minus}}
-\defineXMLcommand [plus] {\directsetup{mmc:plus}}
+\defineXMLcommand [minus] {\directsetup{mmc:minus}}
+\defineXMLcommand [plus] [\MMLargumentprefix] [] {\directsetup{mmc:plus}}
+\setupMMLappearance [plus] [\c!alternative=\v!a] % b = no sign -> 3 1/4
\setupMMLappearance [sign] [\c!reduction=\v!yes]
\startsetups mmc:minus
@@ -934,49 +950,60 @@
\stopsetups
\startsetups mmc:plus
- \doifelse \@@MMLsignreduction \v!yes {
- \setMMLcreset{fn,plus,minus,\MMLcfunctionlist,\MMLcconstructlist}% was plus/, minus/
- \doifelse{\getXMLstackname\plustwo} {apply} {
- % branch needed, else (a-b) + (c-d) goes wrong
- % reset check in case of (-x) + 37
- \begingroup
- \dodoifelseMMCfunctioninapply \plustwo {minus} {
- \ifnum\XMLstacklevel>\plustwo
- \endgroup
- \else
+ \startusingMMLarguments
+ \doifelse \@@MMLsignreduction \v!yes {
+ \setMMLcreset{fn,plus,minus,\MMLcfunctionlist,\MMLcconstructlist}% was plus/, minus/
+ \doifelse{\getXMLstackname\plustwo} {apply} {
+ % branch needed, else (a-b) + (c-d) goes wrong
+ % reset check in case of (-x) + 37
+ \begingroup
+ \dodoifelseMMCfunctioninapply \plustwo {minus} {
+ \ifnum\XMLstacklevel>\plustwo
+ \endgroup
+ \else
+ \endgroup
+ \MMLcreset
+ \fi
+ } {
\endgroup
- \MMLcreset
- \fi
+ }
+ \doifelse \@@MMLplusalternative \v!b {
+ \getXMLstackdata\plustwo \,
+ } {
+ \flushXMLstackwith\plustwo +
+ }
+
} {
- \endgroup
- }
- \flushXMLstackwith\plustwo +
- } {
- \flushXMLstackwith\plustwo {
- \doifelse {\getXMLstackname\recurselevel} {apply} {
- \begingroup
- \dodoifelseMMCfunctioninapply \recurselevel {minus} {
- \ifnum\XMLstacklevel>\plustwo +\fi
+ \flushXMLstackwith\plustwo {
+ \doifelse {\getXMLstackname\recurselevel} {apply} {
+ \begingroup
+ \dodoifelseMMCfunctioninapply \recurselevel {minus} {
+ \ifnum\XMLstacklevel>\plustwo +\fi
+ } {
+ \doifelse \@@MMLplusalternative \v!b {
+ \, % maybe 2 1/3
+ } {
+ +
+ }
+ }
+ \endgroup
+ \MMLcreset
} {
+
}
- \endgroup
- \MMLcreset
- } {
- +
}
}
+ } {
+ \ifcase\XMLstacklevel
+ \or
+ % self
+ \or
+ +\getXMLstackdata\plustwo
+ \else
+ \flushXMLstackwith\plustwo+
+ \fi
}
- } {
- \ifcase\XMLstacklevel
- \or
- % self
- \or
- +\getXMLstackdata\plustwo
- \else
- \flushXMLstackwith\plustwo+
- \fi
- }
+ \stopusingMMLarguments
\stopsetups
% power
@@ -1132,20 +1159,22 @@
% relations
-\defineXMLcommand [eq] {\MMLcrelation=}
-\defineXMLcommand [neq] {\MMLcrelation\neq}
-\defineXMLcommand [gt] {\MMLcrelation>}
-\defineXMLcommand [lt] {\MMLcrelation<}
-\defineXMLcommand [geq] {\MMLcrelation\geq}
-\defineXMLcommand [leq] {\MMLcrelation\leq}
-\defineXMLcommand [equivalent] {\MMLcrelation\equiv}
-\defineXMLcommand [approx] {\MMLcrelation\approx}
-\defineXMLcommand [factorof] {\MMLcrelation\mid}
+\defineXMLcommand [eq] [\MMLargumentprefix] [\c!align=] {\MMLcrelation=}
+\defineXMLcommand [neq] [\MMLargumentprefix] [\c!align=] {\MMLcrelation\neq}
+\defineXMLcommand [gt] [\MMLargumentprefix] [\c!align=] {\MMLcrelation>}
+\defineXMLcommand [lt] [\MMLargumentprefix] [\c!align=] {\MMLcrelation<}
+\defineXMLcommand [geq] [\MMLargumentprefix] [\c!align=] {\MMLcrelation\geq}
+\defineXMLcommand [leq] [\MMLargumentprefix] [\c!align=] {\MMLcrelation\leq}
+\defineXMLcommand [equivalent] [\MMLargumentprefix] [\c!align=] {\MMLcrelation\equiv}
+\defineXMLcommand [approx] [\MMLargumentprefix] [\c!align=] {\MMLcrelation\approx}
+\defineXMLcommand [factorof] [\MMLargumentprefix] [\c!align=] {\MMLcrelation\mid}
\setupMMLappearance[relation][\c!align=\v!no]
\def\MMLcrelation
- {\MMLcreset
+ {\startusingMMLarguments
+ \MMLcreset
+ \edef\@@MMLrelationalign{\executeifdefined{\MMLargumentprefix\c!align}\@@MMLrelationalign}%
\processaction
[\@@MMLrelationalign]
[\v!last=>\let\next\lastMMLcrelation ,
@@ -1158,7 +1187,8 @@
\next}
\def\noMMLcrelation#1%
- {\flushXMLstackwith\plustwo{#1}}
+ {\flushXMLstackwith\plustwo{#1}
+ \stopusingMMLarguments}
\def\lastMMLcrelation#1%
{\XMLRtoks\emptytoks
@@ -1169,19 +1199,23 @@
\else\ifnum\recurselevel=\numexpr\XMLstacklevel-1\relax
\appendtoks\@col@amp@#1\to\XMLRtoks
\fi\fi}%
- \eqalign{\the\XMLRtoks\crcr}}
+ \eqalign{\the\XMLRtoks\crcr}%
+ \stopusingMMLarguments}
\def\firstMMLcrelation#1%
{\collectXMLstackrows\plusthree{\crcr\@col@amp@#1}%
- \eqalign{\getXMLstackdata\plustwo\@col@amp@#1\the\XMLRtoks}}
+ \eqalign{\getXMLstackdata\plustwo\@col@amp@#1\the\XMLRtoks}%
+ \stopusingMMLarguments}
\def\leftMMLcrelation#1%
{\collectXMLstackrows\plustwo{\@col@amp@#1\crcr}%
- \eqalign{\the\XMLRtoks}}
+ \eqalign{\the\XMLRtoks}%
+ \stopusingMMLarguments}
\def\rightMMLcrelation#1%
{\collectXMLstackrows\plustwo{\crcr#1{}\@col@amp@}%
- \eqalign{\@col@amp@\the\XMLRtoks\crcr}}
+ \eqalign{\@col@amp@\the\XMLRtoks\crcr}%
+ \stopusingMMLarguments}
\defineXMLcommand [becomes] {\MMLcrelation{:=}}
@@ -1285,40 +1319,64 @@
% <math><apply><apply><diff/><bvar><ci>x</ci></bvar><degree>2</degree><ci>f</ci></apply><ci>a</ci></apply></math>
% \stopXMLdata
+% d^y/dx^2
+%
+% \startXMLdata
+% <math><apply><diff/>
+% <bvar><ci>x</ci><cn type="integer">2</cn></bvar>
+% <lambda><bvar><ci>x</ci></bvar><ci>y</ci></lambda>
+% </apply></math>
+% \stopXMLdata
+
\startsetups mmc:diff
\MMLcreset
\doifelse\@@MMLdiffalternative\v!a {
- \XMLdoifonstackelse{bvar} {
- \frac {
- \XMLdoifonstackelse{degree} {
- \collectXMLnamedstack{degree}\empty
+ \XMLdoifonstackelse{lambda} {
+ % a special case (mathadore/openmath)
+ \begingroup
+ \defineXMLsave[ci]
+ \defineXMLsave[cn]
+ \defineXMLprocess[lambda]
+ \defineXMLprocess[bvar]
+ \frac {
+ d^{\XMLfirstnamed{bvar}\XMLflush{cn}}{\XMLfirstnamed{lambda}\XMLflush{ci}}
} {
- \collectXMLnamedstacknamed{bvar}{degree}+
+ d{\XMLfirstnamed{bvar}\XMLflush{ci}}^{\XMLfirstnamed{bvar}\XMLflush{cn}}
}
- \mfunction{\getXMLentity{mathematicald}}
- ^{\the\XMLRtoks}
- \doif\@@MMLdifflocation\v!top {
- \XMLdoifonstackelse{ci} {
- \XMLfirstnamed{ci}
+ \endgroup
+ } {
+ \XMLdoifonstackelse{bvar} {
+ \frac {
+ \XMLdoifonstackelse{degree} {
+ \collectXMLnamedstack{degree}\empty
} {
- \MMLcreset\XMLfirstnamed{apply}
+ \collectXMLnamedstacknamed{bvar}{degree}+
+ }
+ \mfunction{\getXMLentity{mathematicald}}
+ ^{\the\XMLRtoks}
+ \doif\@@MMLdifflocation\v!top {
+ \XMLdoifonstackelse{ci} {
+ \XMLfirstnamed{ci}
+ } {
+ \MMLcreset\XMLfirstnamed{apply}
+ }
}
+ } {
+ \mfunction{\getXMLentity{mathematicald}}
+ \begingroup
+ \defineXMLsave[degree]
+ \XMLfirstnamed{bvar}
+ \doifXMLdata{degree} {
+ ^{\XMLflush{degree}}
+ }
+ \endgroup
+ }
+ \doifnot\@@MMLdifflocation\v!top {
+ \left(\MMLcreset\XMLfirstnamed{apply,ci}\right)
}
} {
- \mfunction{\getXMLentity{mathematicald}}
- \begingroup
- \defineXMLsave[degree]
- \XMLfirstnamed{bvar}
- \doifXMLdata{degree} {
- ^{\XMLflush{degree}}
- }
- \endgroup
- }
- \doifnot\@@MMLdifflocation\v!top {
- \left(\MMLcreset\XMLfirstnamed{apply,ci}\right)
+ \flushXMLstackfrom\plustwo^\prime
}
- } {
- \flushXMLstackfrom\plustwo^\prime
}
} {
\MMLcreset
@@ -1407,8 +1465,30 @@
\defineXMLcommand [laplacian] {\getXMLentity {laplacian}\directsetup{mmc:donamedfunction}}
\defineXMLcommand [ident] {\getXMLentity {identity}\directsetup{mmc:donamedfunction}}
-\defineXMLcommand [domain] {\getXMLentity {domain}\directsetup{mmc:donamedfunction}}
-\defineXMLcommand [codomain] {\getXMLentity {codomain}\directsetup{mmc:donamedfunction}}
+% \defineXMLcommand [domain] {\getXMLentity {domain}\directsetup{mmc:donamedfunction}}
+% \defineXMLcommand [codomain] {\getXMLentity {codomain}\directsetup{mmc:donamedfunction}}
+
+\defineXMLcommand[domain] {\directsetup{mmc:domain:action}}
+\defineXMLcommand[codomain]{\directsetup{mmc:codomain:action}}
+
+\setupMMLappearance[domain] [symbol=]
+\setupMMLappearance[codomain][symbol=]
+
+\startsetups mmc:domain:action
+ \doifelsenothing\@@MMLdomainsymbol {
+ \getXMLentity{domain}\directsetup{mmc:donamedfunction}
+ } {
+ \@@MMLdomainsymbol_{\flushXMLstackfrom\plustwo}
+ }
+\stopsetups
+\startsetups mmc:codomain:action
+ \doifelsenothing\@@MMLcodomainsymbol {
+ \getXMLentity{codomain}\directsetup{mmc:donamedfunction}
+ } {
+ \@@MMLcodomainsymbol_{\flushXMLstackfrom\plustwo}
+ }
+\stopsetups
+
\startsetups mmc:donamedfunction
% \left(
@@ -1540,7 +1620,11 @@
\XMLfirstnamed{lowlimit}
}
}
- \XMLfirstnamed{apply}
+ \begingroup
+ \MMLcreset
+ \directsetup{mmc:lambda:simple}% a bit of open math conversion mess
+ \XMLfirstnamed{apply,lambda}% lambda needed for openmath
+ \endgroup
\stopsetups
\defineXMLcommand [tendsto] [type=default] {\directsetup{mmc:tendsto}}
diff --git a/tex/context/base/x-newmmo.tex b/tex/context/base/x-newmmo.tex
index 2dc5b9009..c410f002b 100644
--- a/tex/context/base/x-newmmo.tex
+++ b/tex/context/base/x-newmmo.tex
@@ -195,4 +195,16 @@
\directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash degree}
\stopsetups
+\defineXMLargument
+ [ci]
+ {\checkMMLciSYMBOL}
+
+\def\checkMMLciSYMBOL#1%
+ {\convertargument#1\to\ascii
+ \executeifdefined{ci:symbol:crap:\ascii}{#1}}
+
+\setvalue{ci:symbol:crap:alpha}{\alpha}
+\setvalue{ci:symbol:crap:beta}{\beta}
+\setvalue{ci:symbol:crap:gamma}{\gamma}
+
\protect \endinput
diff --git a/tex/context/base/x-om2cml.xsl b/tex/context/base/x-om2cml.xsl
index 570c54bb5..4070d94dc 100644
--- a/tex/context/base/x-om2cml.xsl
+++ b/tex/context/base/x-om2cml.xsl
@@ -78,12 +78,27 @@
<!-- ****************** Basic Elements ****************** -->
<!-- **************************************************** -->
- <!-- OMOBJ (D. Carlisle) -->
- <xsl:template match="om:OMOBJ">
- <math>
- <xsl:apply-templates/>
- </math>
- </xsl:template>
+ <!-- OMOBJ (D. Carlisle) / adapted by HH -->
+
+<xsl:template match="om:OMOBJ">
+ <xsl:choose>
+ <xsl:when test="@style='inline'">
+ <imath>
+ <xsl:apply-templates/>
+ </imath>
+ </xsl:when>
+ <xsl:when test="@style='display'">
+ <dmath>
+ <xsl:apply-templates/>
+ </dmath>
+ </xsl:when>
+ <xsl:otherwise>
+ <math>
+ <xsl:apply-templates/>
+ </math>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
<!-- OMI (D. Carlisle) -->
<xsl:template match="om:OMI">
@@ -202,6 +217,13 @@
</xsl:when>
</xsl:choose>
</xsl:when>
+ <xsl:when test="@name='plus'">
+ <xsl:choose>
+ <xsl:when test="../@style='empty'">
+ <xsl:attribute name='alternative'>b</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:when>
<xsl:otherwise>
<!-- forget about it -->
</xsl:otherwise>
@@ -830,7 +852,11 @@
<!-- Trivial cases: all -->
<xsl:template match="om:OMS[@cd='relation1']">
- <xsl:element name="{@name}"/>
+ <xsl:element name="{@name}">
+ <xsl:if test="../@style!=''">
+ <xsl:attribute name='align'><xsl:value-of select="../@style"/></xsl:attribute>
+ </xsl:if>
+ </xsl:element>
</xsl:template>
<!-- Content Dictionary: setname1 -->
@@ -1052,7 +1078,7 @@
<!-- Content Dictionary: altenc -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
- <!-- This CD contains: LaTeX_encoding, MathML_encoding -->
+ <!-- This CD contains: TeX_encoding, MathML_encoding -->
<!-- Trivial cases: none -->
@@ -1071,9 +1097,9 @@
</annotation-xml>
</xsl:template>
- <!-- LaTeX_encoding -->
- <xsl:template match="om:OMS[@cd='altenc' and @name='LaTeX_encoding']">
- <annotation encoding="LaTeX">
+ <!-- TeX_encoding -->
+ <xsl:template match="om:OMS[@cd='altenc' and @name='TeX_encoding']">
+ <annotation encoding="TeX">
<xsl:value-of select="normalize-space(following::om:OMSTR)"/>
</annotation>
</xsl:template>
diff --git a/tex/context/base/x-sm2om.xsl b/tex/context/base/x-sm2om.xsl
index 241452dbf..93e1a12c5 100644
--- a/tex/context/base/x-sm2om.xsl
+++ b/tex/context/base/x-sm2om.xsl
@@ -112,6 +112,7 @@
<xsl:template match='i|n'>
<xsl:element name="OMOBJ">
+ <xsl:attribute name="style">inline</xsl:attribute>
<xsl:attribute name="xmlns">http://www.openmath.org/OpenMath</xsl:attribute>
<xsl:attribute name="version">2.0</xsl:attribute>
<xsl:call-template name="om-kind-of-data">
@@ -122,6 +123,7 @@
<xsl:template match='v'>
<xsl:element name="OMOBJ">
+ <xsl:attribute name="style">inline</xsl:attribute>
<xsl:attribute name="xmlns">http://www.openmath.org/OpenMath</xsl:attribute>
<xsl:attribute name="version">2.0</xsl:attribute>
<xsl:element name="OMV">
@@ -134,6 +136,7 @@
<xsl:template match='r'>
<xsl:element name="OMOBJ">
+ <xsl:attribute name="style">inline</xsl:attribute>
<xsl:attribute name="xmlns">http://www.openmath.org/OpenMath</xsl:attribute>
<xsl:attribute name="version">2.0</xsl:attribute>
<xsl:element name="OMA">
@@ -209,6 +212,7 @@
<xsl:template match='c'>
<xsl:element name="OMOBJ">
+ <xsl:attribute name="style">inline</xsl:attribute>
<xsl:attribute name="xmlns">http://www.openmath.org/OpenMath</xsl:attribute>
<xsl:attribute name="version">2.0</xsl:attribute>
<xsl:element name="OMA">
diff --git a/tex/context/base/xtag-pre.tex b/tex/context/base/xtag-pre.tex
index 5a1d7fa97..67e80ee78 100644
--- a/tex/context/base/xtag-pre.tex
+++ b/tex/context/base/xtag-pre.tex
@@ -71,7 +71,7 @@
\defineXMLentities [tex-dollar] {\letterdollar} {\$}
\defineXMLentities [tex-percent] {\letterpercent} {\%}
\defineXMLentities [tex-backslash] {\letterbackslash} {\texescape}
-\defineXMLentities [tex-hat] {\letterhar} {\^{}}
+\defineXMLentities [tex-hat] {\letterhat} {\^{}}
\defineXMLentities [tex-underscore] {\letterunderscore} {\_}
\defineXMLentities [tex-leftbrace] {\letterleftbrace} {\leftargument}
\defineXMLentities [tex-rightbrace] {\letterrightbrace} {\rightargument}
diff --git a/tex/context/base/xtag-run.tex b/tex/context/base/xtag-run.tex
index 2691e8dff..8075bfbe4 100644
--- a/tex/context/base/xtag-run.tex
+++ b/tex/context/base/xtag-run.tex
@@ -11,6 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% TODO: make this mkiv compliant, catcode tables etc
+
\writestatus{loading}{Context XML Macros (visualization)}
\unprotect
diff --git a/tex/context/interface/cont-cz.xml b/tex/context/interface/cont-cz.xml
index 655e50372..c177b181e 100644
--- a/tex/context/interface/cont-cz.xml
+++ b/tex/context/interface/cont-cz.xml
@@ -2954,6 +2954,27 @@
<cd:parameter name="text">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="closesymbol">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="closecommand">
+ <cd:constant type="cd:oneargument"/>
+ </cd:parameter>
+ <cd:parameter name="titleleft">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="titleright">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="vzdalenosttitulek">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="styltitulek">
+ <cd:resolve name="style"/>
+ </cd:parameter>
+ <cd:parameter name="barvatitulek">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
<cd:parameter name="zarovnani">
<cd:resolve name="align"/>
</cd:parameter>
@@ -5969,6 +5990,7 @@
<cd:constant type="odstavec"/>
<cd:constant type="dotextu"/>
<cd:constant type="nahodny"/>
+ <cd:constant type="reverse"/>
</cd:keywords>
<cd:assignments optional="yes" list="yes">
<cd:parameter name="marginalie">
@@ -6893,10 +6915,30 @@
<cd:constant type="nothanging"/>
<cd:constant type="hyphenated"/>
<cd:constant type="nothyphenated"/>
+ <cd:constant type="lesshyphens"/>
+ <cd:constant type="morehyphens"/>
+ <cd:constant type="novy"/>
+ <cd:constant type="old"/>
+ <cd:constant type="normalni"/>
+ <cd:constant type="ano"/>
+ <cd:constant type="ne"/>
+ <cd:constant type="flushleft"/>
+ <cd:constant type="flushright"/>
+ <cd:constant type="flushouter"/>
+ <cd:constant type="flushinner"/>
+ <cd:constant type="center"/>
+ <cd:constant type="hz"/>
+ <cd:constant type="nohz"/>
+ <cd:constant type="mezerovani"/>
+ <cd:constant type="nospacing"/>
+ <cd:constant type="tolerantni"/>
+ <cd:constant type="velmitolerantni"/>
+ <cd:constant type="natahnout"/>
</cd:keywords>
</cd:arguments>
</cd:command>
+
<cd:command name="alignment" type="environment">
<cd:sequence>
<cd:string value="alignment"/>
diff --git a/tex/context/interface/cont-de.xml b/tex/context/interface/cont-de.xml
index 8e5ac5a45..28b58b381 100644
--- a/tex/context/interface/cont-de.xml
+++ b/tex/context/interface/cont-de.xml
@@ -2954,6 +2954,27 @@
<cd:parameter name="text">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="closesymbol">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="closecommand">
+ <cd:constant type="cd:oneargument"/>
+ </cd:parameter>
+ <cd:parameter name="titleleft">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="titleright">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="titelabstand">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="titelstil">
+ <cd:resolve name="style"/>
+ </cd:parameter>
+ <cd:parameter name="titelfarbe">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
<cd:parameter name="ausrichtung">
<cd:resolve name="align"/>
</cd:parameter>
@@ -5969,6 +5990,7 @@
<cd:constant type="absatz"/>
<cd:constant type="imtext"/>
<cd:constant type="zufaellig"/>
+ <cd:constant type="reverse"/>
</cd:keywords>
<cd:assignments optional="yes" list="yes">
<cd:parameter name="marginalie">
@@ -6893,10 +6915,30 @@
<cd:constant type="nothanging"/>
<cd:constant type="hyphenate"/>
<cd:constant type="nothyphenated"/>
+ <cd:constant type="lesshyphens"/>
+ <cd:constant type="morehyphens"/>
+ <cd:constant type="neu"/>
+ <cd:constant type="old"/>
+ <cd:constant type="normal"/>
+ <cd:constant type="ja"/>
+ <cd:constant type="nein"/>
+ <cd:constant type="flushleft"/>
+ <cd:constant type="flushright"/>
+ <cd:constant type="flushouter"/>
+ <cd:constant type="flushinner"/>
+ <cd:constant type="center"/>
+ <cd:constant type="hz"/>
+ <cd:constant type="nohz"/>
+ <cd:constant type="spatiumausgleich"/>
+ <cd:constant type="nospacing"/>
+ <cd:constant type="tolerant"/>
+ <cd:constant type="sehrtolerant"/>
+ <cd:constant type="strecken"/>
</cd:keywords>
</cd:arguments>
</cd:command>
+
<cd:command name="alignment" type="environment">
<cd:sequence>
<cd:string value="alignment"/>
diff --git a/tex/context/interface/cont-en.xml b/tex/context/interface/cont-en.xml
index e0bb0af3e..fc2c28240 100644
--- a/tex/context/interface/cont-en.xml
+++ b/tex/context/interface/cont-en.xml
@@ -2954,6 +2954,27 @@
<cd:parameter name="text">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="closesymbol">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="closecommand">
+ <cd:constant type="cd:oneargument"/>
+ </cd:parameter>
+ <cd:parameter name="titleleft">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="titleright">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="titledistance">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="titlestyle">
+ <cd:resolve name="style"/>
+ </cd:parameter>
+ <cd:parameter name="titlecolor">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
<cd:parameter name="align">
<cd:resolve name="align"/>
</cd:parameter>
@@ -5969,6 +5990,7 @@
<cd:constant type="paragraph"/>
<cd:constant type="intext"/>
<cd:constant type="random"/>
+ <cd:constant type="reverse"/>
</cd:keywords>
<cd:assignments optional="yes" list="yes">
<cd:parameter name="margin">
@@ -6893,10 +6915,30 @@
<cd:constant type="nothanging"/>
<cd:constant type="hyphenated"/>
<cd:constant type="nothyphenated"/>
+ <cd:constant type="lesshyphens"/>
+ <cd:constant type="morehyphens"/>
+ <cd:constant type="new"/>
+ <cd:constant type="old"/>
+ <cd:constant type="normal"/>
+ <cd:constant type="yes"/>
+ <cd:constant type="no"/>
+ <cd:constant type="flushleft"/>
+ <cd:constant type="flushright"/>
+ <cd:constant type="flushouter"/>
+ <cd:constant type="flushinner"/>
+ <cd:constant type="center"/>
+ <cd:constant type="hz"/>
+ <cd:constant type="nohz"/>
+ <cd:constant type="spacing"/>
+ <cd:constant type="nospacing"/>
+ <cd:constant type="tolerant"/>
+ <cd:constant type="verytolerant"/>
+ <cd:constant type="stretch"/>
</cd:keywords>
</cd:arguments>
</cd:command>
+
<cd:command name="alignment" type="environment">
<cd:sequence>
<cd:string value="alignment"/>
diff --git a/tex/context/interface/cont-fr.xml b/tex/context/interface/cont-fr.xml
index ecaf36823..ac5186a6d 100644
--- a/tex/context/interface/cont-fr.xml
+++ b/tex/context/interface/cont-fr.xml
@@ -2954,6 +2954,27 @@
<cd:parameter name="texte">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="closesymbol">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="closecommand">
+ <cd:constant type="cd:oneargument"/>
+ </cd:parameter>
+ <cd:parameter name="titleleft">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="titleright">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="distancetitre">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="styletitre">
+ <cd:resolve name="style"/>
+ </cd:parameter>
+ <cd:parameter name="couleurtitre">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
<cd:parameter name="alignement">
<cd:resolve name="align"/>
</cd:parameter>
@@ -5969,6 +5990,7 @@
<cd:constant type="paragraphe"/>
<cd:constant type="danstexte"/>
<cd:constant type="aleatoire"/>
+ <cd:constant type="inverse"/>
</cd:keywords>
<cd:assignments optional="yes" list="yes">
<cd:parameter name="marge">
@@ -6893,10 +6915,30 @@
<cd:constant type="nonsuspendu"/>
<cd:constant type="hyphenated"/>
<cd:constant type="nothyphenated"/>
+ <cd:constant type="lesshyphens"/>
+ <cd:constant type="morehyphens"/>
+ <cd:constant type="nouveau"/>
+ <cd:constant type="old"/>
+ <cd:constant type="normal"/>
+ <cd:constant type="oui"/>
+ <cd:constant type="non"/>
+ <cd:constant type="flushleft"/>
+ <cd:constant type="flushright"/>
+ <cd:constant type="flushouter"/>
+ <cd:constant type="flushinner"/>
+ <cd:constant type="center"/>
+ <cd:constant type="hz"/>
+ <cd:constant type="nohz"/>
+ <cd:constant type="espacement"/>
+ <cd:constant type="sansespacement"/>
+ <cd:constant type="tolerant"/>
+ <cd:constant type="trestolerant"/>
+ <cd:constant type="etire"/>
</cd:keywords>
</cd:arguments>
</cd:command>
+
<cd:command name="alignment" type="environment">
<cd:sequence>
<cd:string value="alignment"/>
diff --git a/tex/context/interface/cont-it.xml b/tex/context/interface/cont-it.xml
index 142740294..b723620f5 100644
--- a/tex/context/interface/cont-it.xml
+++ b/tex/context/interface/cont-it.xml
@@ -2954,6 +2954,27 @@
<cd:parameter name="testo">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="closesymbol">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="closecommand">
+ <cd:constant type="cd:oneargument"/>
+ </cd:parameter>
+ <cd:parameter name="titleleft">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="titleright">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="distanzatitolo">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="stiletitolo">
+ <cd:resolve name="style"/>
+ </cd:parameter>
+ <cd:parameter name="coloretitolo">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
<cd:parameter name="allinea">
<cd:resolve name="align"/>
</cd:parameter>
@@ -5969,6 +5990,7 @@
<cd:constant type="capoverso"/>
<cd:constant type="intesto"/>
<cd:constant type="casuale"/>
+ <cd:constant type="invertito"/>
</cd:keywords>
<cd:assignments optional="yes" list="yes">
<cd:parameter name="margine">
@@ -6893,10 +6915,30 @@
<cd:constant type="nonsospeso"/>
<cd:constant type="sillabato"/>
<cd:constant type="nonsillabato"/>
+ <cd:constant type="lesshyphens"/>
+ <cd:constant type="morehyphens"/>
+ <cd:constant type="nuovo"/>
+ <cd:constant type="old"/>
+ <cd:constant type="normale"/>
+ <cd:constant type="si"/>
+ <cd:constant type="no"/>
+ <cd:constant type="flushleft"/>
+ <cd:constant type="flushright"/>
+ <cd:constant type="flushouter"/>
+ <cd:constant type="flushinner"/>
+ <cd:constant type="center"/>
+ <cd:constant type="hz"/>
+ <cd:constant type="nohz"/>
+ <cd:constant type="spaziatura"/>
+ <cd:constant type="nospacing"/>
+ <cd:constant type="tollerante"/>
+ <cd:constant type="moltotollerante"/>
+ <cd:constant type="dilata"/>
</cd:keywords>
</cd:arguments>
</cd:command>
+
<cd:command name="alignment" type="environment">
<cd:sequence>
<cd:string value="alignment"/>
diff --git a/tex/context/interface/cont-nl.xml b/tex/context/interface/cont-nl.xml
index ace0c537a..28bbc4003 100644
--- a/tex/context/interface/cont-nl.xml
+++ b/tex/context/interface/cont-nl.xml
@@ -2954,6 +2954,27 @@
<cd:parameter name="tekst">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="sluitsymbool">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="sluitcommando">
+ <cd:constant type="cd:oneargument"/>
+ </cd:parameter>
+ <cd:parameter name="titellinks">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="titelrechts">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="titelafstand">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="titelletter">
+ <cd:resolve name="style"/>
+ </cd:parameter>
+ <cd:parameter name="titelkleur">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
<cd:parameter name="uitlijnen">
<cd:resolve name="align"/>
</cd:parameter>
@@ -5969,6 +5990,7 @@
<cd:constant type="alinea"/>
<cd:constant type="intekst"/>
<cd:constant type="willekeurig"/>
+ <cd:constant type="omgekeerd"/>
</cd:keywords>
<cd:assignments optional="yes" list="yes">
<cd:parameter name="marge">
@@ -6893,10 +6915,30 @@
<cd:constant type="niethangend"/>
<cd:constant type="afgebroken"/>
<cd:constant type="nietafgebroken"/>
+ <cd:constant type="lesshyphens"/>
+ <cd:constant type="morehyphens"/>
+ <cd:constant type="nieuw"/>
+ <cd:constant type="oud"/>
+ <cd:constant type="normaal"/>
+ <cd:constant type="ja"/>
+ <cd:constant type="nee"/>
+ <cd:constant type="lijnlinks"/>
+ <cd:constant type="lijnrechts"/>
+ <cd:constant type="lijnbuiten"/>
+ <cd:constant type="lijnbinnen"/>
+ <cd:constant type="centreer"/>
+ <cd:constant type="hz"/>
+ <cd:constant type="geenhz"/>
+ <cd:constant type="spatiering"/>
+ <cd:constant type="geenspatiering"/>
+ <cd:constant type="soepel"/>
+ <cd:constant type="zeersoepel"/>
+ <cd:constant type="rek"/>
</cd:keywords>
</cd:arguments>
</cd:command>
+
<cd:command name="alignment" type="environment">
<cd:sequence>
<cd:string value="alignment"/>
diff --git a/tex/context/interface/cont-ro.xml b/tex/context/interface/cont-ro.xml
index 1847e0176..40ac61844 100644
--- a/tex/context/interface/cont-ro.xml
+++ b/tex/context/interface/cont-ro.xml
@@ -2954,6 +2954,27 @@
<cd:parameter name="text">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="closesymbol">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="closecommand">
+ <cd:constant type="cd:oneargument"/>
+ </cd:parameter>
+ <cd:parameter name="titleleft">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="titleright">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="distantatitlu">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="stiltitlu">
+ <cd:resolve name="style"/>
+ </cd:parameter>
+ <cd:parameter name="culoaretitlu">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
<cd:parameter name="aliniere">
<cd:resolve name="align"/>
</cd:parameter>
@@ -5969,6 +5990,7 @@
<cd:constant type="paragraf"/>
<cd:constant type="intext"/>
<cd:constant type="aleator"/>
+ <cd:constant type="reverse"/>
</cd:keywords>
<cd:assignments optional="yes" list="yes">
<cd:parameter name="margine">
@@ -6893,10 +6915,30 @@
<cd:constant type="nothanging"/>
<cd:constant type="despsilabe"/>
<cd:constant type="nedespsilabe"/>
+ <cd:constant type="lesshyphens"/>
+ <cd:constant type="morehyphens"/>
+ <cd:constant type="nou"/>
+ <cd:constant type="old"/>
+ <cd:constant type="normal"/>
+ <cd:constant type="da"/>
+ <cd:constant type="nu"/>
+ <cd:constant type="flushleft"/>
+ <cd:constant type="flushright"/>
+ <cd:constant type="flushouter"/>
+ <cd:constant type="flushinner"/>
+ <cd:constant type="center"/>
+ <cd:constant type="hz"/>
+ <cd:constant type="nohz"/>
+ <cd:constant type="spatiere"/>
+ <cd:constant type="nospacing"/>
+ <cd:constant type="tolerant"/>
+ <cd:constant type="foartetolerant"/>
+ <cd:constant type="dilatat"/>
</cd:keywords>
</cd:arguments>
</cd:command>
+
<cd:command name="alignment" type="environment">
<cd:sequence>
<cd:string value="alignment"/>
diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml
index f091f739c..41bf3c338 100644
--- a/tex/context/interface/keys-cz.xml
+++ b/tex/context/interface/keys-cz.xml
@@ -1,6 +1,11 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2007.03.22 13:34">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2007.07.24 14:36">
+
+ <cd:variables>
+ <cd:variable name="lesshyphenation" value="lesshyphenation"/>
+ <cd:variable name="morehyphenation" value="morehyphenation"/>
+ </cd:variables>
<cd:variables>
<cd:variable name="one" value="jedna"/>
@@ -406,6 +411,8 @@
<cd:constant name="sub" value="pod"/>
<cd:constant name="subtitle" value="podtitulek"/>
<cd:constant name="symbol" value="symbol"/>
+ <cd:constant name="closesymbol" value="closesymbol"/>
+ <cd:constant name="closecommand" value="closecommand"/>
<cd:constant name="symbolset" value="sadasymbolu"/>
<cd:constant name="symcolor" value="barvasymbolu"/>
<cd:constant name="symstyle" value="stylsymboly"/>
@@ -428,6 +435,9 @@
<cd:constant name="titlestyle" value="styltitulek"/>
<cd:constant name="titlecolor" value="barvatitulek"/>
<cd:constant name="titledistance" value="vzdalenosttitulek"/>
+ <cd:constant name="titleleft" value="titleleft"/>
+ <cd:constant name="titleright" value="titleright"/>
+ <cd:constant name="titlecommand" value="titlecommand"/>
<cd:constant name="aligntitle" value="zarovnejtitul"/>
<cd:constant name="tolerance" value="tolerance"/>
<cd:constant name="inbetween" value="mezi"/>
@@ -466,6 +476,7 @@
<cd:constant name="yscale" value="ymeritko"/>
<cd:constant name="ystep" value="ykrok"/>
<cd:constant name="samepage" value="stejnastranka"/>
+ <cd:constant name="itemalign" value="itemalign"/>
<cd:constant name="sidealign" value="sidealign"/>
<cd:constant name="side" value="pocitat"/>
<cd:constant name="fieldlayer" value="fieldlayer"/>
@@ -559,6 +570,7 @@
<cd:variable name="mirrored" value="zrcadleno"/>
<cd:variable name="global" value="globalne"/>
<cd:variable name="grid" value="mrizka"/>
+ <cd:variable name="nogrid" value="nogrid"/>
<cd:variable name="big" value="velke"/>
<cd:variable name="bigbodyfont" value="bigbodyfont"/>
<cd:variable name="bigpreference" value="vysokapriorita"/>
@@ -668,6 +680,7 @@
<cd:variable name="display" value="obrazovka"/>
<cd:variable name="reverse" value="reverse"/>
<cd:variable name="fit" value="prizpusobive"/>
+ <cd:variable name="nofit" value="nofit"/>
<cd:variable name="postscript" value="postscript"/>
<cd:variable name="preview" value="nahled"/>
<cd:variable name="program" value="program"/>
@@ -935,6 +948,8 @@
<cd:variable name="HideLayer" value="HideLayer"/>
<cd:variable name="VideLayer" value="VideLayer"/>
<cd:variable name="ToggleLayer" value="ToggleLayer"/>
+ <cd:variable name="ShowThumbs" value="UkazNahledy"/>
+ <cd:variable name="ShowBookmarks" value="UkazZalozky"/>
</cd:variables>
<cd:variables>
diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml
index b60b842c3..1b042b3dd 100644
--- a/tex/context/interface/keys-de.xml
+++ b/tex/context/interface/keys-de.xml
@@ -1,6 +1,11 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2007.03.22 13:34">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2007.07.24 14:36">
+
+ <cd:variables>
+ <cd:variable name="lesshyphenation" value="lesshyphenation"/>
+ <cd:variable name="morehyphenation" value="morehyphenation"/>
+ </cd:variables>
<cd:variables>
<cd:variable name="one" value="eins"/>
@@ -406,6 +411,8 @@
<cd:constant name="sub" value="unter"/>
<cd:constant name="subtitle" value="untertitel"/>
<cd:constant name="symbol" value="symbol"/>
+ <cd:constant name="closesymbol" value="closesymbol"/>
+ <cd:constant name="closecommand" value="closecommand"/>
<cd:constant name="symbolset" value="symbolset"/>
<cd:constant name="symcolor" value="symfarbe"/>
<cd:constant name="symstyle" value="symstil"/>
@@ -428,6 +435,9 @@
<cd:constant name="titlestyle" value="titelstil"/>
<cd:constant name="titlecolor" value="titelfarbe"/>
<cd:constant name="titledistance" value="titelabstand"/>
+ <cd:constant name="titleleft" value="titleleft"/>
+ <cd:constant name="titleright" value="titleright"/>
+ <cd:constant name="titlecommand" value="titlecommand"/>
<cd:constant name="aligntitle" value="titelausrichten"/>
<cd:constant name="tolerance" value="toleranz"/>
<cd:constant name="inbetween" value="zwischen"/>
@@ -466,6 +476,7 @@
<cd:constant name="yscale" value="yformat"/>
<cd:constant name="ystep" value="yschritt"/>
<cd:constant name="samepage" value="selbeseite"/>
+ <cd:constant name="itemalign" value="itemalign"/>
<cd:constant name="sidealign" value="sidealign"/>
<cd:constant name="side" value="objektabstand"/>
<cd:constant name="fieldlayer" value="fieldlayer"/>
@@ -559,6 +570,7 @@
<cd:variable name="mirrored" value="gespiegelt"/>
<cd:variable name="global" value="global"/>
<cd:variable name="grid" value="gritter"/>
+ <cd:variable name="nogrid" value="nogrid"/>
<cd:variable name="big" value="gross"/>
<cd:variable name="bigbodyfont" value="bigbodyfont"/>
<cd:variable name="bigpreference" value="grosszuegig"/>
@@ -668,6 +680,7 @@
<cd:variable name="display" value="bildschirm"/>
<cd:variable name="reverse" value="reverse"/>
<cd:variable name="fit" value="passend"/>
+ <cd:variable name="nofit" value="nofit"/>
<cd:variable name="postscript" value="postscript"/>
<cd:variable name="preview" value="vorschau"/>
<cd:variable name="program" value="programm"/>
@@ -935,6 +948,8 @@
<cd:variable name="HideLayer" value="HideLayer"/>
<cd:variable name="VideLayer" value="VideLayer"/>
<cd:variable name="ToggleLayer" value="ToggleLayer"/>
+ <cd:variable name="ShowThumbs" value="ShowThumbs"/>
+ <cd:variable name="ShowBookmarks" value="ShowBookmarks"/>
</cd:variables>
<cd:variables>
diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml
index bc8148d95..acce559b9 100644
--- a/tex/context/interface/keys-en.xml
+++ b/tex/context/interface/keys-en.xml
@@ -1,6 +1,11 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2007.03.22 13:34">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2007.07.24 14:36">
+
+ <cd:variables>
+ <cd:variable name="lesshyphenation" value="lesshyphenation"/>
+ <cd:variable name="morehyphenation" value="morehyphenation"/>
+ </cd:variables>
<cd:variables>
<cd:variable name="one" value="one"/>
@@ -406,6 +411,8 @@
<cd:constant name="sub" value="sub"/>
<cd:constant name="subtitle" value="subtitle"/>
<cd:constant name="symbol" value="symbol"/>
+ <cd:constant name="closesymbol" value="closesymbol"/>
+ <cd:constant name="closecommand" value="closecommand"/>
<cd:constant name="symbolset" value="symbolset"/>
<cd:constant name="symcolor" value="symcolor"/>
<cd:constant name="symstyle" value="symstyle"/>
@@ -428,6 +435,9 @@
<cd:constant name="titlestyle" value="titlestyle"/>
<cd:constant name="titlecolor" value="titlecolor"/>
<cd:constant name="titledistance" value="titledistance"/>
+ <cd:constant name="titleleft" value="titleleft"/>
+ <cd:constant name="titleright" value="titleright"/>
+ <cd:constant name="titlecommand" value="titlecommand"/>
<cd:constant name="aligntitle" value="aligntitle"/>
<cd:constant name="tolerance" value="tolerance"/>
<cd:constant name="inbetween" value="inbetween"/>
@@ -466,6 +476,7 @@
<cd:constant name="yscale" value="yscale"/>
<cd:constant name="ystep" value="ystep"/>
<cd:constant name="samepage" value="samepage"/>
+ <cd:constant name="itemalign" value="itemalign"/>
<cd:constant name="sidealign" value="sidealign"/>
<cd:constant name="side" value="side"/>
<cd:constant name="fieldlayer" value="fieldlayer"/>
@@ -559,6 +570,7 @@
<cd:variable name="mirrored" value="mirrored"/>
<cd:variable name="global" value="global"/>
<cd:variable name="grid" value="grid"/>
+ <cd:variable name="nogrid" value="nogrid"/>
<cd:variable name="big" value="big"/>
<cd:variable name="bigbodyfont" value="bigbodyfont"/>
<cd:variable name="bigpreference" value="bigpreference"/>
@@ -668,6 +680,7 @@
<cd:variable name="display" value="display"/>
<cd:variable name="reverse" value="reverse"/>
<cd:variable name="fit" value="fit"/>
+ <cd:variable name="nofit" value="nofit"/>
<cd:variable name="postscript" value="postscript"/>
<cd:variable name="preview" value="preview"/>
<cd:variable name="program" value="program"/>
@@ -935,6 +948,8 @@
<cd:variable name="HideLayer" value="HideLayer"/>
<cd:variable name="VideLayer" value="VideLayer"/>
<cd:variable name="ToggleLayer" value="ToggleLayer"/>
+ <cd:variable name="ShowThumbs" value="ShowThumbs"/>
+ <cd:variable name="ShowBookmarks" value="ShowBookmarks"/>
</cd:variables>
<cd:variables>
diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml
index 0859ed2e1..a3f06eb2f 100644
--- a/tex/context/interface/keys-fr.xml
+++ b/tex/context/interface/keys-fr.xml
@@ -1,6 +1,11 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2007.03.22 13:34">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2007.07.24 14:36">
+
+ <cd:variables>
+ <cd:variable name="lesshyphenation" value="lesshyphenation"/>
+ <cd:variable name="morehyphenation" value="morehyphenation"/>
+ </cd:variables>
<cd:variables>
<cd:variable name="one" value="un"/>
@@ -406,6 +411,8 @@
<cd:constant name="sub" value="sous"/>
<cd:constant name="subtitle" value="soustitre"/>
<cd:constant name="symbol" value="symbole"/>
+ <cd:constant name="closesymbol" value="closesymbol"/>
+ <cd:constant name="closecommand" value="closecommand"/>
<cd:constant name="symbolset" value="jeusymbole"/>
<cd:constant name="symcolor" value="couleursym"/>
<cd:constant name="symstyle" value="stylesym"/>
@@ -428,6 +435,9 @@
<cd:constant name="titlestyle" value="styletitre"/>
<cd:constant name="titlecolor" value="couleurtitre"/>
<cd:constant name="titledistance" value="distancetitre"/>
+ <cd:constant name="titleleft" value="titleleft"/>
+ <cd:constant name="titleright" value="titleright"/>
+ <cd:constant name="titlecommand" value="titlecommand"/>
<cd:constant name="aligntitle" value="alignementtitre"/>
<cd:constant name="tolerance" value="tolerance"/>
<cd:constant name="inbetween" value="entre"/>
@@ -466,6 +476,7 @@
<cd:constant name="yscale" value="yscale"/>
<cd:constant name="ystep" value="ystep"/>
<cd:constant name="samepage" value="memepage"/>
+ <cd:constant name="itemalign" value="itemalign"/>
<cd:constant name="sidealign" value="sidealign"/>
<cd:constant name="side" value="cote"/>
<cd:constant name="fieldlayer" value="calquechamp"/>
@@ -559,6 +570,7 @@
<cd:variable name="mirrored" value="reflete"/>
<cd:variable name="global" value="global"/>
<cd:variable name="grid" value="grille"/>
+ <cd:variable name="nogrid" value="nogrid"/>
<cd:variable name="big" value="grand"/>
<cd:variable name="bigbodyfont" value="grandepolicecorp"/>
<cd:variable name="bigpreference" value="grandepreference"/>
@@ -668,6 +680,7 @@
<cd:variable name="display" value="affichage"/>
<cd:variable name="reverse" value="inverse"/>
<cd:variable name="fit" value="adapte"/>
+ <cd:variable name="nofit" value="nofit"/>
<cd:variable name="postscript" value="postscript"/>
<cd:variable name="preview" value="previsualisation"/>
<cd:variable name="program" value="programme"/>
@@ -935,6 +948,8 @@
<cd:variable name="HideLayer" value="CacheCalque"/>
<cd:variable name="VideLayer" value="VideLayer"/>
<cd:variable name="ToggleLayer" value="ToggleLayer"/>
+ <cd:variable name="ShowThumbs" value="ShowThumbs"/>
+ <cd:variable name="ShowBookmarks" value="ShowBookmarks"/>
</cd:variables>
<cd:variables>
diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml
index 9ae368785..f34789f34 100644
--- a/tex/context/interface/keys-it.xml
+++ b/tex/context/interface/keys-it.xml
@@ -1,6 +1,11 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2007.03.22 13:34">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2007.07.24 14:36">
+
+ <cd:variables>
+ <cd:variable name="lesshyphenation" value="lesshyphenation"/>
+ <cd:variable name="morehyphenation" value="morehyphenation"/>
+ </cd:variables>
<cd:variables>
<cd:variable name="one" value="uno"/>
@@ -406,6 +411,8 @@
<cd:constant name="sub" value="sotto"/>
<cd:constant name="subtitle" value="sottotitolo"/>
<cd:constant name="symbol" value="simbolo"/>
+ <cd:constant name="closesymbol" value="closesymbol"/>
+ <cd:constant name="closecommand" value="closecommand"/>
<cd:constant name="symbolset" value="setsimboli"/>
<cd:constant name="symcolor" value="coloresimbolo"/>
<cd:constant name="symstyle" value="stilesimbolo"/>
@@ -428,6 +435,9 @@
<cd:constant name="titlestyle" value="stiletitolo"/>
<cd:constant name="titlecolor" value="coloretitolo"/>
<cd:constant name="titledistance" value="distanzatitolo"/>
+ <cd:constant name="titleleft" value="titleleft"/>
+ <cd:constant name="titleright" value="titleright"/>
+ <cd:constant name="titlecommand" value="titlecommand"/>
<cd:constant name="aligntitle" value="allineatitolo"/>
<cd:constant name="tolerance" value="tolleranza"/>
<cd:constant name="inbetween" value="tra"/>
@@ -466,6 +476,7 @@
<cd:constant name="yscale" value="yscale"/>
<cd:constant name="ystep" value="ystep"/>
<cd:constant name="samepage" value="stessapagina"/>
+ <cd:constant name="itemalign" value="itemalign"/>
<cd:constant name="sidealign" value="sidealign"/>
<cd:constant name="side" value="lato"/>
<cd:constant name="fieldlayer" value="fieldlayer"/>
@@ -559,6 +570,7 @@
<cd:variable name="mirrored" value="riflesso"/>
<cd:variable name="global" value="globale"/>
<cd:variable name="grid" value="griglia"/>
+ <cd:variable name="nogrid" value="nogrid"/>
<cd:variable name="big" value="grande"/>
<cd:variable name="bigbodyfont" value="grossofontdeltesto"/>
<cd:variable name="bigpreference" value="grandepreferenza"/>
@@ -668,6 +680,7 @@
<cd:variable name="display" value="schermo"/>
<cd:variable name="reverse" value="invertito"/>
<cd:variable name="fit" value="adatta"/>
+ <cd:variable name="nofit" value="nofit"/>
<cd:variable name="postscript" value="postscript"/>
<cd:variable name="preview" value="anteprima"/>
<cd:variable name="program" value="programma"/>
@@ -935,6 +948,8 @@
<cd:variable name="HideLayer" value="HideLayer"/>
<cd:variable name="VideLayer" value="VideLayer"/>
<cd:variable name="ToggleLayer" value="ToggleLayer"/>
+ <cd:variable name="ShowThumbs" value="MostraThumbs"/>
+ <cd:variable name="ShowBookmarks" value="MostraSegnalibro"/>
</cd:variables>
<cd:variables>
diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml
index f2c07448a..c066fc013 100644
--- a/tex/context/interface/keys-nl.xml
+++ b/tex/context/interface/keys-nl.xml
@@ -1,6 +1,11 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2007.03.22 13:34">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2007.07.24 14:36">
+
+ <cd:variables>
+ <cd:variable name="lesshyphenation" value="lesshyphenation"/>
+ <cd:variable name="morehyphenation" value="morehyphenation"/>
+ </cd:variables>
<cd:variables>
<cd:variable name="one" value="een"/>
@@ -406,6 +411,8 @@
<cd:constant name="sub" value="sub"/>
<cd:constant name="subtitle" value="subtitel"/>
<cd:constant name="symbol" value="symbool"/>
+ <cd:constant name="closesymbol" value="sluitsymbool"/>
+ <cd:constant name="closecommand" value="sluitcommando"/>
<cd:constant name="symbolset" value="symboolset"/>
<cd:constant name="symcolor" value="symkleur"/>
<cd:constant name="symstyle" value="symletter"/>
@@ -428,6 +435,9 @@
<cd:constant name="titlestyle" value="titelletter"/>
<cd:constant name="titlecolor" value="titelkleur"/>
<cd:constant name="titledistance" value="titelafstand"/>
+ <cd:constant name="titleleft" value="titellinks"/>
+ <cd:constant name="titleright" value="titelrechts"/>
+ <cd:constant name="titlecommand" value="titelcommando"/>
<cd:constant name="aligntitle" value="titeluitlijnen"/>
<cd:constant name="tolerance" value="tolerantie"/>
<cd:constant name="inbetween" value="tussen"/>
@@ -466,6 +476,7 @@
<cd:constant name="yscale" value="yschaal"/>
<cd:constant name="ystep" value="ystap"/>
<cd:constant name="samepage" value="zelfdepagina"/>
+ <cd:constant name="itemalign" value="itemuitlijnen"/>
<cd:constant name="sidealign" value="zijuitlijnen"/>
<cd:constant name="side" value="zij"/>
<cd:constant name="fieldlayer" value="veldlaag"/>
@@ -559,6 +570,7 @@
<cd:variable name="mirrored" value="gespiegeld"/>
<cd:variable name="global" value="globaal"/>
<cd:variable name="grid" value="grid"/>
+ <cd:variable name="nogrid" value="geengrid"/>
<cd:variable name="big" value="groot"/>
<cd:variable name="bigbodyfont" value="grootkorps"/>
<cd:variable name="bigpreference" value="grotevoorkeur"/>
@@ -668,6 +680,7 @@
<cd:variable name="display" value="scherm"/>
<cd:variable name="reverse" value="omgekeerd"/>
<cd:variable name="fit" value="passend"/>
+ <cd:variable name="nofit" value="nietpassend"/>
<cd:variable name="postscript" value="postscript"/>
<cd:variable name="preview" value="preview"/>
<cd:variable name="program" value="programma"/>
@@ -935,6 +948,8 @@
<cd:variable name="HideLayer" value="VerbergLaag"/>
<cd:variable name="VideLayer" value="ToonLaag"/>
<cd:variable name="ToggleLayer" value="WisselLaag"/>
+ <cd:variable name="ShowThumbs" value="ShowThumbs"/>
+ <cd:variable name="ShowBookmarks" value="ShowBookmarks"/>
</cd:variables>
<cd:variables>
diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml
index 9e803d217..c6130bb68 100644
--- a/tex/context/interface/keys-ro.xml
+++ b/tex/context/interface/keys-ro.xml
@@ -1,6 +1,11 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2007.03.22 13:34">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2007.07.24 14:36">
+
+ <cd:variables>
+ <cd:variable name="lesshyphenation" value="lesshyphenation"/>
+ <cd:variable name="morehyphenation" value="morehyphenation"/>
+ </cd:variables>
<cd:variables>
<cd:variable name="one" value="unu"/>
@@ -406,6 +411,8 @@
<cd:constant name="sub" value="sub"/>
<cd:constant name="subtitle" value="subtitlu"/>
<cd:constant name="symbol" value="simbol"/>
+ <cd:constant name="closesymbol" value="closesymbol"/>
+ <cd:constant name="closecommand" value="closecommand"/>
<cd:constant name="symbolset" value="setsimbol"/>
<cd:constant name="symcolor" value="culoaresimbol"/>
<cd:constant name="symstyle" value="stilsimbol"/>
@@ -428,6 +435,9 @@
<cd:constant name="titlestyle" value="stiltitlu"/>
<cd:constant name="titlecolor" value="culoaretitlu"/>
<cd:constant name="titledistance" value="distantatitlu"/>
+ <cd:constant name="titleleft" value="titleleft"/>
+ <cd:constant name="titleright" value="titleright"/>
+ <cd:constant name="titlecommand" value="titlecommand"/>
<cd:constant name="aligntitle" value="alinieretitlu"/>
<cd:constant name="tolerance" value="toleranta"/>
<cd:constant name="inbetween" value="intre"/>
@@ -466,6 +476,7 @@
<cd:constant name="yscale" value="yscala"/>
<cd:constant name="ystep" value="ystep"/>
<cd:constant name="samepage" value="aceeasipagina"/>
+ <cd:constant name="itemalign" value="itemalign"/>
<cd:constant name="sidealign" value="sidealign"/>
<cd:constant name="side" value="parte"/>
<cd:constant name="fieldlayer" value="fieldlayer"/>
@@ -559,6 +570,7 @@
<cd:variable name="mirrored" value="oglindit"/>
<cd:variable name="global" value="global"/>
<cd:variable name="grid" value="grila"/>
+ <cd:variable name="nogrid" value="nogrid"/>
<cd:variable name="big" value="mare"/>
<cd:variable name="bigbodyfont" value="bigbodyfont"/>
<cd:variable name="bigpreference" value="preferintamare"/>
@@ -668,6 +680,7 @@
<cd:variable name="display" value="display"/>
<cd:variable name="reverse" value="reverse"/>
<cd:variable name="fit" value="ajustat"/>
+ <cd:variable name="nofit" value="nofit"/>
<cd:variable name="postscript" value="postscript"/>
<cd:variable name="preview" value="previzualizare"/>
<cd:variable name="program" value="program"/>
@@ -935,6 +948,8 @@
<cd:variable name="HideLayer" value="HideLayer"/>
<cd:variable name="VideLayer" value="VideLayer"/>
<cd:variable name="ToggleLayer" value="ToggleLayer"/>
+ <cd:variable name="ShowThumbs" value="ShowThumbs"/>
+ <cd:variable name="ShowBookmarks" value="ShowBookmarks"/>
</cd:variables>
<cd:variables>
diff --git a/tex/context/sample/zapf.tex b/tex/context/sample/zapf.tex
index f73835b1c..4029ec6ce 100644
--- a/tex/context/sample/zapf.tex
+++ b/tex/context/sample/zapf.tex
@@ -8,4 +8,4 @@ now, as there was in the old days, showing the differences
between good and bad typographic design. Many people are
just fascinated by their PC's tricks, and think that a
widely||praised program, called up on the screen, will make
-everything automatic from now on. \ No newline at end of file
+everything automatic from now on.
diff --git a/tex/generic/context/ppchtex.noc b/tex/generic/context/ppchtex.noc
index 7b1d5b3b0..37e217599 100644
--- a/tex/generic/context/ppchtex.noc
+++ b/tex/generic/context/ppchtex.noc
@@ -30,10 +30,14 @@
%D First we load some auxiliary macro's:
+\let\normalunexpanded\unexpanded
+
\input supp-mis.tex \let\writestatus\undefined
\input syst-gen.tex
\input syst-fnt.tex
+\let\unexpanded\normalunexpanded
+
%D after which we can go on with:
\unprotect
diff --git a/web2c/context.cnf b/web2c/context.cnf
index 6ca969e84..c5aec83d9 100644
--- a/web2c/context.cnf
+++ b/web2c/context.cnf
@@ -119,13 +119,15 @@ CTXDEVJVPATH=unset
% some old paths; we restrict the search to context paths; new ones as well as old ones
-PERLINPUTS = .;$CTXDEVPLPATH;$TEXMF/scripts/context/perl
-PYTHONINPUTS = .;$CTXDEVPYPATH;$TEXMF/scripts/context/python
-RUBYINPUTS = .;$CTXDEVRBPATH;$TEXMF/scripts/context/ruby
-LUAINPUTS = .;$CTXDEVJVPATH;$TEXMF/scripts/context/lua
-JAVAINPUTS = .;$CTXDEVJVPATH;$TEXMF/scripts/context/java
+PERLINPUTS = .;$CTXDEVPLPATH;$TEXMF/scripts/context/perl
+PYTHONINPUTS = .;$CTXDEVPYPATH;$TEXMF/scripts/context/python
+RUBYINPUTS = .;$CTXDEVRBPATH;$TEXMF/scripts/context/ruby
+% LUAINPUTS = .;$CTXDEVLUPATH;$TEXMF/scripts/context/lua
+JAVAINPUTS = .;$CTXDEVJVPATH;$TEXMF/scripts/context/java
-TEXMFSCRIPTS = .;$CTXDEVRBPATH;$CTXDEVLUPATH;$CTXDEVPLPATH;$TEXMF/scripts/context
+% LUAINPUTS = .;$TEXINPUTS;$TEXMFSCRIPTS
+LUAINPUTS = .;$CTXDEVLUPATH;$TEXINPUTS;$TEXMF/scripts/context/lua.;
+TEXMFSCRIPTS = .;$CTXDEVLUPATH;$TEXINPUTS;$CTXDEVRBPATH;$CTXDEVPLPATH;$TEXMF/scripts/context
% RUBYINPUTS = .;$CTXDEVPLPATH;$TEXMF/scripts/{$progname,$engine,}/ruby
% LUAINPUTS = .;$CTXDEVPYPATH;$TEXMF/scripts/{$progname,$engine,}/lua
@@ -133,8 +135,6 @@ TEXMFSCRIPTS = .;$CTXDEVRBPATH;$CTXDEVLUPATH;$CTXDEVPLPATH;$TEXMF/scripts/contex
% PERLINPUTS = .;$CTXDEVJVPATH;$TEXMF/scripts/{$progname,$engine,}/perl
% JAVAINPUTS = .;$CTXDEVJVPATH;$TEXMF/scripts/{$progname,$engine,}/java
-% TEXMFSCRIPTS = .;$CTXDEVRBPATH;$CTXDEVLUPATH;$CTXDEVPLPATH;$TEXMF/scripts/$progname
-
% features
shell_escape = t