summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-12 23:01:17 +0000
committerKarl Berry <karl@freefriends.org>2013-04-12 23:01:17 +0000
commit879e67d4e530cd1a38e1a80a4f779dacd44636dc (patch)
tree00d16b7e64cd3717ad4e16a024e00b47cc549496 /Master/texmf-dist/tex/context
parent512547ff22232693018f59e34d48351f031c4c33 (diff)
context (size 11122862, Apr 11 19:56)
git-svn-id: svn://tug.org/texlive/trunk@29878 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context')
-rw-r--r--Master/texmf-dist/tex/context/base/bibl-tra.mkiv7
-rw-r--r--Master/texmf-dist/tex/context/base/colo-ini.mkiv13
-rw-r--r--Master/texmf-dist/tex/context/base/cont-new.mkii2
-rw-r--r--Master/texmf-dist/tex/context/base/cont-new.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/cont-new.tmp83
-rw-r--r--Master/texmf-dist/tex/context/base/context-version.pdfbin4128 -> 4135 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/context-version.pngbin40483 -> 40511 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/context.mkii2
-rw-r--r--Master/texmf-dist/tex/context/base/context.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/context.tmp511
-rw-r--r--Master/texmf-dist/tex/context/base/data-exp.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/data-pre.lua8
-rw-r--r--Master/texmf-dist/tex/context/base/data-res.lua47
-rw-r--r--Master/texmf-dist/tex/context/base/data-tmp.lua21
-rw-r--r--Master/texmf-dist/tex/context/base/font-mat.mkvi5
-rw-r--r--Master/texmf-dist/tex/context/base/lpdf-nod.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/math-ali.mkiv12
-rw-r--r--Master/texmf-dist/tex/context/base/math-fen.mkiv18
-rw-r--r--Master/texmf-dist/tex/context/base/math-frc.lua51
-rw-r--r--Master/texmf-dist/tex/context/base/math-frc.mkiv89
-rw-r--r--Master/texmf-dist/tex/context/base/math-ini.mkiv12
-rw-r--r--Master/texmf-dist/tex/context/base/mlib-run.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mult-def.mkiv1
-rw-r--r--Master/texmf-dist/tex/context/base/node-pro.lua8
-rw-r--r--Master/texmf-dist/tex/context/base/pack-rul.lua74
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-17.mkii (renamed from Master/texmf-dist/tex/context/base/s-pre-17.tex)0
-rw-r--r--Master/texmf-dist/tex/context/base/s-pre-17.mkiv408
-rw-r--r--Master/texmf-dist/tex/context/base/spac-ver.mkiv11
-rw-r--r--Master/texmf-dist/tex/context/base/status-files.pdfbin24752 -> 24755 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/status-lua.pdfbin211622 -> 211771 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/status-mkiv.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/strc-ref.mkvi26
-rw-r--r--Master/texmf-dist/tex/context/base/tabl-xtb.lua16
-rw-r--r--Master/texmf-dist/tex/context/base/trac-vis.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/util-lib.lua8
-rw-r--r--Master/texmf-dist/tex/context/base/util-mrg.lua67
36 files changed, 1371 insertions, 149 deletions
diff --git a/Master/texmf-dist/tex/context/base/bibl-tra.mkiv b/Master/texmf-dist/tex/context/base/bibl-tra.mkiv
index 511212a9822..b142e8938cc 100644
--- a/Master/texmf-dist/tex/context/base/bibl-tra.mkiv
+++ b/Master/texmf-dist/tex/context/base/bibl-tra.mkiv
@@ -1267,13 +1267,6 @@
\expandafter\secondoftwoarguments
\fi}
-% \unexpanded\def\bibmaybeinteractive#1#2%
-% {\ifbibcitecompress
-% #2%
-% \else
-% \doifbibinteractionelse{\gotobiblink{#2}[#1]}{#2}%
-% \fi}
-
\unexpanded\def\bibmaybeinteractive#1#2%
{\doifbibinteractionelse{\gotobiblink{#2}[#1]}{#2}}
diff --git a/Master/texmf-dist/tex/context/base/colo-ini.mkiv b/Master/texmf-dist/tex/context/base/colo-ini.mkiv
index 7052bf6c9c9..3a037691eeb 100644
--- a/Master/texmf-dist/tex/context/base/colo-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/colo-ini.mkiv
@@ -275,6 +275,19 @@
{\csname\??colorstack\number\c_colo_nesting\endcsname
\global\advance\c_colo_nesting\minusone}
+% a simple one: assumes grouping
+
+\newcount\c_colo_saved_attribute_color
+\newcount\c_colo_saved_attribute_transparency
+
+\unexpanded\def\savecolor
+ {\c_colo_saved_attribute_color \attribute\colorattribute
+ \c_colo_saved_attribute_transparency\attribute\transparencyattribute}
+
+\unexpanded\def\restorecolor
+ {\attribute\colorattribute \c_colo_saved_attribute_color
+ \attribute\transparencyattribute\c_colo_saved_attribute_transparency}
+
%D In this documentation we will not go into too much details
%D on palets. Curious users can find more information on this
%D topic in \from[use of color].
diff --git a/Master/texmf-dist/tex/context/base/cont-new.mkii b/Master/texmf-dist/tex/context/base/cont-new.mkii
index b2df7931aea..544e5e5374c 100644
--- a/Master/texmf-dist/tex/context/base/cont-new.mkii
+++ b/Master/texmf-dist/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2013.03.29 01:31}
+\newcontextversion{2013.04.09 10:38}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/Master/texmf-dist/tex/context/base/cont-new.mkiv b/Master/texmf-dist/tex/context/base/cont-new.mkiv
index 85a3cf0a5dd..df90979f08f 100644
--- a/Master/texmf-dist/tex/context/base/cont-new.mkiv
+++ b/Master/texmf-dist/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2013.04.08 17:52}
+\newcontextversion{2013.04.11 19:55}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/Master/texmf-dist/tex/context/base/cont-new.tmp b/Master/texmf-dist/tex/context/base/cont-new.tmp
new file mode 100644
index 00000000000..af47ccb20ff
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/cont-new.tmp
@@ -0,0 +1,83 @@
+%D \module
+%D [ file=cont-new,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Miscellaneous Macros,
+%D subtitle=New Macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\newcontextversion{2013.04.11 19:49}
+
+%D This file is loaded at runtime, thereby providing an excellent place for
+%D hacks, patches, extensions and new features.
+
+\unprotect
+
+% \writestatus\m!system{beware: some patches loaded from cont-new.mkiv}
+
+% \attribute152\zerocount : marks ... lots of sweeps so best early in list
+
+%D Maybe:
+
+\unexpanded\def\tightvbox{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox}
+\unexpanded\def\tightvtop{\dowithnextbox{\ht\nextbox\zeropoint\box\nextbox}\vtop}
+
+%D Maybe:
+
+% \startluacode
+% function context.loadfile(filename)
+% context(string.strip(io.loaddata(resolvers.findfile(filename))))
+% end
+% \stopluacode
+%
+% \edef\tufte{\cldcommand{loadfile("tufte.tex")}}
+
+%D Needs some work:
+
+\unexpanded\def\startgridcorrection
+ {\dosingleempty\spac_grid_correction_start}
+
+\def\spac_grid_correction_start[#1]%
+ {\ifgridsnapping
+ \snaptogrid[#1]\vbox\bgroup
+ \else
+ \startbaselinecorrection
+ \fi}
+
+\unexpanded\def\stopgridcorrection
+ {\ifgridsnapping
+ \egroup
+ \else
+ \stopbaselinecorrection
+ \fi}
+
+\unexpanded\def\checkgridsnapping
+ {\lineskip\ifgridsnapping\zeropoint\else\normallineskip\fi}
+
+%D Probably obsolete:
+
+\unexpanded\def\startcolumnmakeup % don't change
+ {\bgroup
+ \getrawnoflines\textheight % raw as we cna have topskip
+ \setbox\scratchbox\vbox to \dimexpr\noflines\lineheight-\lineheight+\topskip\relax
+ \bgroup
+ \forgetall}
+
+\unexpanded\def\stopcolumnmakeup
+ {\egroup
+ \dp\scratchbox\zeropoint
+ \wd\scratchbox\textwidth
+ \box\scratchbox
+ \egroup
+ \page_otr_command_synchronize_hsize}
+
+%D Till we fixed all styles:
+
+\let\\=\crlf
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/context-version.pdf b/Master/texmf-dist/tex/context/base/context-version.pdf
index 916ff06beb2..69e004c07f1 100644
--- a/Master/texmf-dist/tex/context/base/context-version.pdf
+++ b/Master/texmf-dist/tex/context/base/context-version.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/context-version.png b/Master/texmf-dist/tex/context/base/context-version.png
index b32e53f50b9..5d84680bb54 100644
--- a/Master/texmf-dist/tex/context/base/context-version.png
+++ b/Master/texmf-dist/tex/context/base/context-version.png
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/context.mkii b/Master/texmf-dist/tex/context/base/context.mkii
index 1309ce1cbc4..97afd33df3e 100644
--- a/Master/texmf-dist/tex/context/base/context.mkii
+++ b/Master/texmf-dist/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.03.29 01:31}
+\edef\contextversion{2013.04.09 10:38}
%D For those who want to use this:
diff --git a/Master/texmf-dist/tex/context/base/context.mkiv b/Master/texmf-dist/tex/context/base/context.mkiv
index e11a57a4f94..81f7c188c9e 100644
--- a/Master/texmf-dist/tex/context/base/context.mkiv
+++ b/Master/texmf-dist/tex/context/base/context.mkiv
@@ -25,8 +25,8 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.04.08 17:52}
-\edef\contextkind {beta}
+\edef\contextversion{2013.04.11 19:55}
+\edef\contextkind {current}
%D For those who want to use this:
diff --git a/Master/texmf-dist/tex/context/base/context.tmp b/Master/texmf-dist/tex/context/base/context.tmp
new file mode 100644
index 00000000000..197dbb5309d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/context.tmp
@@ -0,0 +1,511 @@
+%D \module
+%D [ file=context,
+%D version=2008.28.10, % 1995.10.10,
+%D title=\CONTEXT,
+%D subtitle=\CONTEXT\ Format Generation,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\catcode`\{=1 \catcode`\}=2 \catcode`\#=6
+
+%D From the next string (which is set by the script that assembles the
+%D distribution) later on we will calculate a number that can be used
+%D by use modules to identify the feature level. Starting with version
+%D 2004.8.30 the low level interface is english. Watch out and adapt
+%D your styles an modules.
+
+% \everypar{\writestatus{!!!!}{some spurious input in line \the\inputlineno}\wait}
+
+%D The order of loading will change when all modules have been cleaned
+%D up and the dependencies are more consistent.
+
+\edef\contextformat {\jobname}
+\edef\contextversion{2013.04.11 19:49}
+\edef\contextkind {beta}
+
+%D For those who want to use this:
+
+\let\fmtname \contextformat
+\let\fmtversion\contextversion
+
+%D Loading:
+
+\edef\mksuffix {mkiv}
+\edef\contextmark{MKIV}
+
+\ifx\normalinput\undefined \let\normalinput\input \fi
+
+\def\loadcorefile#1{\normalinput#1\relax}
+\def\loadmarkfile#1{\normalinput#1.\mksuffix\relax}
+\def\loadmkiifile#1{}
+\def\loadmkivfile#1{\normalinput#1.mkiv\relax}
+\def\loadmkvifile#1{\normalinput#1.mkvi\relax}
+
+%D First we load the system modules. These implement a lot of
+%D manipulation macros. We start with setting up some basic \TEX\
+%D machinery.
+
+\loadmarkfile{syst-ini}
+
+%D Some checking (more primitives are now defined):
+
+\ifdefined\defaultinterface \else \def\defaultinterface {english} \fi
+%ifdefined\messageinterface \else \let\messageinterface \defaultinterface \fi
+\ifdefined\defaultlanguagetag \else \def\defaultlanguagetag{en} \fi
+
+%D We just quit if new functionality is expected.
+
+\ifnum\luatexversion<70 % also change message
+ \writestatus{!!!!}{Your luatex binary is too old, you need at least version 0.70!}
+ \expandafter\end
+\fi
+
+%D There is only this way to pass the version info to \LUA\ (currently). Hm, we could
+%D now put it into the environment.
+
+\newtoks\contextversiontoks \contextversiontoks\expandafter{\contextversion}
+\newtoks\contextkindtoks \contextkindtoks \expandafter{\contextkind}
+
+% \normaleverypar{\wait} % uncomment for test of funny injections
+
+%D Now the more fundamental code gets defined.
+
+\loadmarkfile{norm-ctx}
+\loadmarkfile{syst-pln}
+\loadmarkfile{syst-mes}
+
+\loadmarkfile{luat-cod}
+\loadmarkfile{luat-bas}
+\loadmarkfile{luat-lib}
+
+\loadmarkfile{catc-ini}
+\loadmarkfile{catc-act}
+\loadmarkfile{catc-def}
+\loadmarkfile{catc-ctx}
+\loadmarkfile{catc-sym}
+
+\loadmarkfile{cldf-ini}
+
+% From here on we have \unexpanded being \normalprotected, as we already had
+% \unexpanded long before etex came around.
+
+\loadmarkfile{syst-aux}
+\loadmarkfile{syst-lua}
+\loadmarkfile{syst-con}
+
+\loadmarkfile{syst-fnt}
+\loadmarkfile{syst-rtp}
+
+\loadmkvifile{file-ini}
+\loadmkvifile{file-res}
+\loadmkvifile{file-lib}
+
+\loadmarkfile{supp-dir}
+
+\loadmarkfile{char-ini}
+\loadmarkfile{char-utf}
+\loadmarkfile{char-act}
+
+\loadmarkfile{mult-ini}
+\loadmarkfile{mult-sys}
+\loadmarkfile{mult-aux}
+\loadmarkfile{mult-def}
+\loadmarkfile{mult-chk}
+%loadmarkfile{mult-aux} % moved up
+\loadmkvifile{mult-dim}
+
+\loadmarkfile{cldf-int} % interface
+
+\loadmarkfile{luat-ini}
+
+\loadmarkfile{toks-ini}
+
+\loadmarkfile{attr-ini}
+
+\loadmarkfile{core-ini}
+\loadmarkfile{core-env}
+
+\loadmarkfile{layo-ini}
+
+\loadmarkfile{node-ini}
+
+\loadmarkfile{cldf-bas} % basics / depends on nodes
+
+\loadmarkfile{node-fin}
+\loadmarkfile{node-mig}
+\loadmarkfile{typo-bld} % par builders
+%loadmarkfile{node-pag}
+
+\loadmarkfile{back-ini}
+
+\loadmarkfile{attr-col}
+\loadmarkfile{attr-lay}
+\loadmarkfile{attr-neg}
+\loadmarkfile{attr-eff}
+\loadmarkfile{attr-mkr}
+
+\loadmarkfile{trac-tex}
+\loadmarkfile{trac-deb} % will move up
+\loadmarkfile{trac-ctx} % maybe move up
+
+%loadmarkfile{blob-ini} % not to be used, we only use a helper
+
+\loadmarkfile{supp-box}
+
+%loadmarkfile{supp-vis} % replaced by trac-vis
+%loadmarkfile{supp-fun} % mostly replaced
+
+\loadmarkfile{supp-ran}
+\loadmarkfile{supp-mat}
+\loadmarkfile{spac-cha}
+%loadmarkfile{supp-num} % obsolete
+
+\loadmarkfile{typo-ini}
+
+\loadmkvifile{file-syn}
+\loadmkvifile{file-mod}
+
+\loadmarkfile{core-con}
+
+\loadmarkfile{cont-fil}
+
+\loadmarkfile{regi-ini}
+\loadmarkfile{enco-ini}
+\loadmarkfile{hand-ini}
+
+\loadmarkfile{lang-ini}
+\loadmarkfile{lang-lab}
+
+\loadmarkfile{unic-ini}
+
+\loadmarkfile{core-uti}
+\loadmarkfile{core-two}
+\loadmarkfile{core-dat}
+
+\loadmarkfile{colo-ini}
+\loadmarkfile{colo-grp} % optional
+\loadmarkfile{colo-ext}
+
+\loadmarkfile{node-bck} % overloads anch-pgr (experimental and undocumented)
+
+\loadmarkfile{pack-cut} % leftovers from trac-vis
+
+\loadmarkfile{lang-mis}
+\loadmarkfile{lang-url}
+\loadmarkfile{lang-def}
+\loadmarkfile{lang-wrd} % can be optional
+
+\loadmkvifile{file-job} % why so late?
+
+\loadmarkfile{symb-ini} % brrr depends on fonts
+
+\loadmarkfile{sort-ini}
+
+\loadmkvifile{pack-mis}
+\loadmarkfile{pack-rul}
+\loadmarkfile{pack-mrl}
+\loadmkvifile{pack-bck}
+\loadmarkfile{pack-fen}
+
+\loadmarkfile{lxml-ini}
+\loadmarkfile{lxml-sor}
+
+\loadmkvifile{typo-prc}
+
+\loadmkvifile{strc-ini}
+\loadmarkfile{strc-tag}
+\loadmarkfile{strc-doc}
+\loadmarkfile{strc-num}
+\loadmarkfile{strc-mar}
+\loadmarkfile{strc-sbe}
+\loadmkvifile{strc-lst}
+\loadmarkfile{strc-sec}
+\loadmarkfile{strc-pag} % hm, depends on core-num
+\loadmarkfile{strc-ren}
+\loadmarkfile{strc-xml}
+\loadmarkfile{strc-def} % might happen later
+\loadmkvifile{strc-ref}
+\loadmarkfile{strc-reg}
+\loadmkvifile{strc-lev} % experiment
+
+\loadmarkfile{spac-ali}
+\loadmarkfile{spac-hor}
+\loadmarkfile{spac-flr}
+\loadmarkfile{spac-ver}
+\loadmarkfile{spac-lin}
+\loadmarkfile{spac-pag}
+\loadmarkfile{spac-par}
+%loadmarkfile{spac-adj} % no longer needed
+\loadmarkfile{spac-def}
+\loadmarkfile{spac-grd}
+
+\loadmarkfile{anch-pos}
+
+\loadmkvifile{scrn-ini}
+\loadmkvifile{scrn-ref}
+
+\loadmarkfile{pack-obj}
+
+\loadmkvifile{strc-itm}
+
+\loadmkvifile{strc-con}
+\loadmkvifile{strc-des}
+\loadmkvifile{strc-enu}
+
+\loadmarkfile{strc-ind}
+\loadmarkfile{strc-lab}
+\loadmarkfile{strc-syn}
+
+\loadmarkfile{core-sys}
+
+\loadmarkfile{page-var}
+\loadmkvifile{page-otr}
+\loadmarkfile{page-ini}
+\loadmarkfile{page-ins}
+\loadmarkfile{page-fac}
+\loadmarkfile{page-brk}
+\loadmarkfile{page-col}
+\loadmarkfile{page-inf}
+\loadmarkfile{page-grd}
+\loadmarkfile{page-flt}
+\loadmarkfile{page-bck}
+\loadmarkfile{page-not}
+\loadmarkfile{page-one}
+\loadmarkfile{page-lay}
+\loadmkvifile{page-box}
+\loadmkvifile{page-txt}
+\loadmarkfile{page-sid} % when
+
+\loadmkvifile{strc-flt}
+
+\loadmarkfile{page-pst}
+\loadmkvifile{page-mbk}
+\loadmarkfile{page-mul} % partly overloaded
+\loadmarkfile{page-mix} % new
+\loadmarkfile{page-set}
+\loadmarkfile{pack-lyr}
+\loadmarkfile{pack-pos}
+\loadmkvifile{page-mak}
+
+\loadmarkfile{page-lin}
+\loadmarkfile{page-par}
+\loadmarkfile{typo-pag}
+\loadmarkfile{typo-mar}
+\loadmarkfile{typo-itm}
+
+\loadmarkfile{buff-ini}
+\loadmarkfile{buff-ver}
+\loadmkvifile{buff-par}
+
+\loadmarkfile{buff-imp-tex} % optional as also runtime if not loaded
+\loadmarkfile{buff-imp-mp} % optional as also runtime if not loaded
+\loadmarkfile{buff-imp-lua} % optional as also runtime if not loaded
+\loadmarkfile{buff-imp-xml} % optional as also runtime if not loaded
+
+\loadmarkfile{buff-imp-parsed-xml} % optional
+%loadmarkfile{buff-imp-parsed-lua} % optional
+
+\loadmarkfile{strc-blk}
+
+\loadmarkfile{page-imp}
+\loadmkvifile{page-sel} % optional
+\loadmkvifile{page-inj} % optional
+
+\loadmkvifile{scrn-pag}
+\loadmkvifile{scrn-wid}
+\loadmkvifile{scrn-but}
+\loadmkvifile{scrn-bar}
+
+\loadmarkfile{page-com} % optional (after scrn-pag)
+
+\loadmarkfile{strc-bkm} % bookmarks
+
+\loadmarkfile{tabl-com}
+\loadmarkfile{tabl-pln}
+
+\loadmarkfile{tabl-tab} % thrd-tab stripped and merged
+
+\loadmarkfile{tabl-tbl}
+\loadmarkfile{tabl-ntb}
+\loadmarkfile{tabl-nte}
+\loadmarkfile{tabl-ltb}
+\loadmarkfile{tabl-tsp}
+\loadmkvifile{tabl-xtb}
+\loadmarkfile{tabl-mis}
+
+\loadmarkfile{java-ini}
+
+\loadmkvifile{scrn-fld}
+\loadmkvifile{scrn-hlp}
+
+\loadmarkfile{char-enc} % will move up
+
+\loadmkvifile{font-lib} % way too late
+\loadmkvifile{font-fil}
+\loadmkvifile{font-var}
+\loadmkvifile{font-fea}
+\loadmkvifile{font-mat}
+\loadmkvifile{font-ini}
+\loadmkvifile{font-sym}
+\loadmkvifile{font-sty}
+\loadmkvifile{font-set}
+\loadmkvifile{font-emp}
+\loadmarkfile{font-pre}
+\loadmarkfile{font-unk}
+\loadmarkfile{font-tra}
+\loadmarkfile{font-chk}
+\loadmarkfile{font-uni}
+\loadmkvifile{font-col}
+\loadmkvifile{font-gds}
+\loadmkvifile{font-aux}
+
+\loadmarkfile{typo-lan}
+
+\loadmarkfile{lxml-css}
+
+\loadmarkfile{spac-chr} % depends on fonts
+
+\loadmarkfile{blob-ini} % not to be used, we only use a helper
+
+\loadmarkfile{trac-vis}
+\loadmarkfile{trac-jus}
+
+\loadmarkfile{typo-cln}
+\loadmarkfile{typo-spa}
+\loadmarkfile{typo-krn}
+\loadmkvifile{typo-itc}
+\loadmarkfile{typo-dir}
+\loadmarkfile{typo-brk}
+\loadmarkfile{typo-cap}
+\loadmarkfile{typo-dig}
+\loadmarkfile{typo-rep}
+\loadmkvifile{typo-txt}
+\loadmarkfile{typo-par}
+
+\loadmkvifile{type-ini}
+\loadmarkfile{type-set}
+
+\loadmarkfile{scrp-ini}
+
+\loadmarkfile{prop-ini} % only for downward compatibility
+
+\loadmarkfile{mlib-ctx}
+
+\loadmarkfile{meta-ini}
+\loadmarkfile{meta-tex}
+\loadmarkfile{meta-fun}
+\loadmarkfile{meta-pag}
+\loadmarkfile{meta-grd}
+
+\loadmarkfile{page-mrk} % depends on mp
+
+\loadmarkfile{page-flw}
+\loadmarkfile{page-spr}
+\loadmarkfile{page-plg}
+\loadmarkfile{page-str}
+
+\loadmarkfile{anch-pgr} % can be moved up (nicer for dependencies)
+\loadmkvifile{anch-bck}
+\loadmarkfile{anch-tab} % overloads tabl-tbl
+\loadmarkfile{anch-bar}
+%loadmarkfile{anch-snc} % when needed this one will be redone
+
+\loadmarkfile{math-ini}
+\loadmarkfile{math-pln}
+\loadmarkfile{math-for}
+\loadmarkfile{math-def}
+\loadmarkfile{math-ali}
+%loadmarkfile{math-arr}
+\loadmkvifile{math-stc}
+\loadmarkfile{math-frc}
+\loadmarkfile{math-mis}
+\loadmarkfile{math-scr}
+\loadmarkfile{math-int}
+\loadmarkfile{math-del}
+\loadmarkfile{math-fen}
+\loadmarkfile{math-inl}
+\loadmarkfile{math-dis}
+%loadmarkfile{math-lan}
+
+\loadmarkfile{phys-dim}
+
+\loadmarkfile{strc-mat}
+
+\loadmarkfile{chem-ini}
+\loadmarkfile{chem-str}
+
+\loadmarkfile{typo-scr}
+
+\loadmarkfile{node-rul}
+\loadmkvifile{font-sol} % font solutions
+
+\loadmkvifile{strc-not}
+\loadmkvifile{strc-lnt}
+
+\loadmarkfile{pack-com}
+\loadmarkfile{typo-del}
+
+\loadmarkfile{grph-trf}
+\loadmarkfile{grph-inc}
+\loadmarkfile{grph-fig}
+\loadmarkfile{grph-raw}
+
+\loadmarkfile{pack-box}
+\loadmarkfile{pack-bar}
+\loadmarkfile{page-app}
+\loadmarkfile{meta-fig}
+
+\loadmarkfile{lang-spa} % will become obsolete
+
+\loadmarkfile{bibl-bib}
+\loadmarkfile{bibl-tra}
+
+%loadmarkfile{x-xtag} % no longer preloaded
+
+\loadmarkfile{meta-xml}
+
+\loadmarkfile{cont-log}
+
+\loadmarkfile{task-ini}
+
+\loadmarkfile{cldf-ver} % verbatim, this can come late
+\loadmarkfile{cldf-com} % commands, this can come late
+
+\loadmarkfile{core-ctx} % this order might change but we need to check depedencies / move to another namespace
+
+\loadmarkfile{core-def}
+
+%usemodule[x][res-04] % xml resource libraries
+%usemodule[x][res-08] % rlx runtime conversion
+%usemodule[x][res-12] % rli external indentification
+
+% now we hook in backend code (needs checking)
+
+\loadmarkfile{back-pdf} % actually, this one should load the next three using document.arguments.backend
+\loadmarkfile{mlib-pdf}
+\loadmarkfile{mlib-pps}
+\loadmarkfile{meta-pdf}
+\loadmarkfile{grph-epd}
+
+\loadmarkfile{back-exp}
+
+\setupcurrentlanguage[\defaultlanguagetag]
+
+\prependtoks
+ \ctxlua{statistics.starttiming(statistics)}%
+\to \everyjob
+
+\appendtoks
+ \ctxlua{statistics.stoptiming(statistics)}%
+\to \everyjob
+
+\appendtoks
+ \ctxlua{statistics.savefmtstatus("\jobname","\contextversion","context.mkiv","\contextkind")}% can become automatic
+\to \everydump
+
+\errorstopmode \dump \endinput
diff --git a/Master/texmf-dist/tex/context/base/data-exp.lua b/Master/texmf-dist/tex/context/base/data-exp.lua
index 90659e57e7f..8a2fd0320a7 100644
--- a/Master/texmf-dist/tex/context/base/data-exp.lua
+++ b/Master/texmf-dist/tex/context/base/data-exp.lua
@@ -201,7 +201,7 @@ end
-- This one strips quotes and funny tokens.
-local expandhome = P("~") / "$HOME" -- environment.homedir
+local expandhome = P("~") / "$HOME" -- environment.homedir or "home:"
local dodouble = P('"')/"" * (expandhome + (1 - P('"')))^0 * P('"')/""
local dosingle = P("'")/"" * (expandhome + (1 - P("'")))^0 * P("'")/""
diff --git a/Master/texmf-dist/tex/context/base/data-pre.lua b/Master/texmf-dist/tex/context/base/data-pre.lua
index e48a5aa8cee..f2f5bddc44c 100644
--- a/Master/texmf-dist/tex/context/base/data-pre.lua
+++ b/Master/texmf-dist/tex/context/base/data-pre.lua
@@ -21,7 +21,7 @@ resolvers.prefixes = prefixes
local cleanpath, findgivenfile, expansion = resolvers.cleanpath, resolvers.findgivenfile, resolvers.expansion
local getenv = resolvers.getenv -- we can probably also use resolvers.expansion
-local P, S, R, C, Cs, lpegmatch = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Cs, lpeg.match
+local P, S, R, C, Cs, Cc, lpegmatch = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.match
local joinpath, basename, dirname = file.join, file.basename, file.dirname
local getmetatable, rawset, type = getmetatable, rawset, type
@@ -165,6 +165,12 @@ end
local pattern = Cs((C(R("az")^2) * P(":") * C((1-S(" \"\';,"))^1) / _resolve_ + P(1))^0)
+local prefix = C(R("az")^2) * P(":")
+local target = C((1-S(" \"\';,"))^1)
+local notarget = (#S(";,") + P(-1)) * Cc("")
+
+local pattern = Cs(((prefix * (target + notarget)) / _resolve_ + P(1))^0)
+
local function resolve(str) -- use schemes, this one is then for the commandline only
if type(str) == "table" then
local t = { }
diff --git a/Master/texmf-dist/tex/context/base/data-res.lua b/Master/texmf-dist/tex/context/base/data-res.lua
index 32e19cf130b..74ec53f0daa 100644
--- a/Master/texmf-dist/tex/context/base/data-res.lua
+++ b/Master/texmf-dist/tex/context/base/data-res.lua
@@ -95,33 +95,41 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf-context/web2c
-- selfautoparent:texmf/web2c
-if environment.default_texmfcnf then
- -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
- resolvers.luacnfspec = environment.default_texmfcnf
-else
- -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
- resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
-end
-
-resolvers.luacnfspec = 'home:texmf/web2c;' .. resolvers.luacnfspec
-
--- which (as we want users to use the web2c path) be can be simplified to this:
+-- -- Till 2013 we had this:
+--
+-- if environment.default_texmfcnf then
+-- -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
+-- resolvers.luacnfspec = environment.default_texmfcnf
+-- else
+-- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,-dist,}/web2c"
+-- -- resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,-dist,}/web2c}"
+-- end
+--
+-- resolvers.luacnfspec = 'home:texmf/web2c;' .. resolvers.luacnfspec
+--
+-- -- which (as we want users to use the web2c path) be can be simplified to this:
--
-- if environment and environment.ownpath and string.find(environment.ownpath,"[\\/]texlive[\\/]") then
-- resolvers.luacnfspec = 'selfautodir:/texmf-local/web2c,selfautoparent:/texmf-local/web2c,selfautoparent:/texmf/web2c'
-- else
-- resolvers.luacnfspec = 'selfautoparent:/texmf-local/web2c,selfautoparent:/texmf/web2c'
-- end
+--
+-- -- But I gave up on that after the change to texmf-dist (why-oh-why), so we stick to:
+
+resolvers.luacnfspec = {
+ "home:texmf/web2c",
+ "selfautoparent:/texmf-local/web2c",
+ "selfautoparent:/texmf-context/web2c",
+ "selfautoparent:/texmf-dist/web2c",
+ "selfautoparent:/texmf/web2c",
+}
---~ -- not yet, some reporters expect strings
+-- not yet table, some reporters expect strings
---~ resolvers.luacnfspec = {
---~ "selfautoparent:/texmf-local", -- is actually a user mistake
---~ "selfautoparent:/texmf-local/web2c",
---~ "selfautoparent:/texmf", -- idem
---~ "selfautoparent:/texmf/web2c",
---~ "selfautoparent:", -- idem
---~ }
+if type(resolvers.luacnfspec) == "table" then
+ resolvers.luacnfspec = concat(resolvers.luacnfspec,";")
+end
local unset_variable = "unset"
@@ -340,6 +348,7 @@ local function identify_configuration_files()
if cnfspec == "" then
cnfspec = resolvers.luacnfspec
resolvers.luacnfstate = "default"
+-- resolvers.setenv("TEXMFCNF",cnfspec) -- for running texexec etc
else
resolvers.luacnfstate = "environment"
end
diff --git a/Master/texmf-dist/tex/context/base/data-tmp.lua b/Master/texmf-dist/tex/context/base/data-tmp.lua
index 525698d1e86..5025a8a0ad8 100644
--- a/Master/texmf-dist/tex/context/base/data-tmp.lua
+++ b/Master/texmf-dist/tex/context/base/data-tmp.lua
@@ -23,7 +23,7 @@ luatools with a recache feature.</p>
--ldx]]--
local format, lower, gsub, concat = string.format, string.lower, string.gsub, table.concat
-local serialize, serializetofile = table.serialize, table.tofile
+local concat, serialize, serializetofile = table.concat, table.serialize, table.tofile
local mkdirs, isdir, isfile = dir.mkdirs, lfs.isdir, lfs.isfile
local addsuffix, is_writable, is_readable = file.addsuffix, file.is_writable, file.is_readable
local formatters = string.formatters
@@ -163,20 +163,27 @@ local function identify()
return writable, readables
end
-function caches.usedpaths()
+function caches.usedpaths(separator)
local writable, readables = identify()
if #readables > 1 then
local result = { }
+ local done = { }
for i=1,#readables do
local readable = readables[i]
- if usedreadables[i] or readable == writable then
- result[#result+1] = formatters["readable: %a (order %s)"](readable,i)
+ if readable == writable then
+ done[readable] = true
+ result[#result+1] = formatters["readable+writable: %a"](readable)
+ elseif usedreadables[i] then
+ done[readable] = true
+ result[#result+1] = formatters["readable: %a"](readable)
end
end
- result[#result+1] = formatters["writable: %a"](writable)
- return result
+ if not done[writable] then
+ result[#result+1] = formatters["writable: %a"](writable)
+ end
+ return concat(result,separator or " | ")
else
- return writable
+ return writable or "?"
end
end
diff --git a/Master/texmf-dist/tex/context/base/font-mat.mkvi b/Master/texmf-dist/tex/context/base/font-mat.mkvi
index 165b644d2a6..eb2225d202a 100644
--- a/Master/texmf-dist/tex/context/base/font-mat.mkvi
+++ b/Master/texmf-dist/tex/context/base/font-mat.mkvi
@@ -194,13 +194,16 @@
\def\font_helpers_preset_math_family_indeed#fam#familytag%
{\expandafter\let\expandafter\v_font_math_one\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname
\ifx\v_font_math_one\relax
- \writestatus{fonts}{math: unset for global bodyfont \fontclass\space at \fontbody}%
+ \font_helpers_preset_math_family_warning
\else
\scriptscriptfont#fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-3\endcsname
\scriptfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-2\endcsname
\textfont #fam\v_font_math_one
\fi}
+\def\font_helpers_preset_math_family_warning
+ {\writestatus{fonts}{math: unset for global bodyfont \fontclass\space at \fontbody}}
+
\let\font_helpers_reset_fontclass_math_families\gobbleoneargument
% It would be nice if characters could be defined in a neutral way (say fam 255) and
diff --git a/Master/texmf-dist/tex/context/base/lpdf-nod.lua b/Master/texmf-dist/tex/context/base/lpdf-nod.lua
index 0ce589c3208..60d3fcd5b2a 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-nod.lua
+++ b/Master/texmf-dist/tex/context/base/lpdf-nod.lua
@@ -126,7 +126,7 @@ function nodepool.pdfdestination(w,h,d,name,view,n)
local s = copy_node(pdfsave)
local m = copy_node(pdfsetmatrix)
local r = copy_node(pdfrestore)
- m.data = format("1 0 0 1")
+ m.data = "1 0 0 1"
s.next = m m.next = t t.next = r
m.prev = s t.prev = m r.prev = t
return s -- a list
diff --git a/Master/texmf-dist/tex/context/base/math-ali.mkiv b/Master/texmf-dist/tex/context/base/math-ali.mkiv
index 0d9d38e200c..db960de26eb 100644
--- a/Master/texmf-dist/tex/context/base/math-ali.mkiv
+++ b/Master/texmf-dist/tex/context/base/math-ali.mkiv
@@ -242,8 +242,16 @@
\let\stopalign\relax
- \let\startalignment\startalign
- \let\stopalignment \stopalign
+ \unexpanded\def\startalignment
+ {\ifmmode
+ \let\stopalignment\align_math_normal_stop % cannot be an unexpanded def ... lookahead in align
+ \expandafter\align_math_normal_start
+ \else
+ \let\stopalignment\align_text_normal_stop
+ \expandafter\align_text_normal_start
+ \fi}
+
+ \let\stopalignment\relax
\fi
diff --git a/Master/texmf-dist/tex/context/base/math-fen.mkiv b/Master/texmf-dist/tex/context/base/math-fen.mkiv
index 9080ffedf53..f7edc582e32 100644
--- a/Master/texmf-dist/tex/context/base/math-fen.mkiv
+++ b/Master/texmf-dist/tex/context/base/math-fen.mkiv
@@ -41,9 +41,9 @@
\let\setupmathfences\setupmathfence
\setupmathfences
- [\c!left="002E,
- \c!right="002E,
- \c!middle="002E,
+ [\c!left=0x2E,
+ \c!right=0x2E,
+ \c!middle=0x2E,
\c!mathstyle=,
\c!color=,
\c!command=]
@@ -96,12 +96,12 @@
\let\fenced\math_fenced_fenced
\to \everymathematics
-\definemathfence [parenthesis] [\c!left="0028,\c!right="0029]
-\definemathfence [bracket] [\c!left="005B,\c!right="005D]
-\definemathfence [braces] [\c!left="007B,\c!right="007D]
-\definemathfence [bar] [\c!left="007C,\c!right="007C]
-\definemathfence [doublebar] [\c!left="2016,\c!right="2016]
-\definemathfence [angle] [\c!left="003C,\c!right="003E]
+\definemathfence [parenthesis] [\c!left=0x28,\c!right=0x29]
+\definemathfence [bracket] [\c!left=0x5B,\c!right=0x5D]
+\definemathfence [braces] [\c!left=0x7B,\c!right=0x7D]
+\definemathfence [bar] [\c!left=0x7C,\c!right=0x7C]
+\definemathfence [doublebar] [\c!left=0x2016,\c!right=0x2016]
+\definemathfence [angle] [\c!left=0x3C,\c!right=0x3E]
%definemathfence [fancybracket] [bracket] [command=yes,color=red]
diff --git a/Master/texmf-dist/tex/context/base/math-frc.lua b/Master/texmf-dist/tex/context/base/math-frc.lua
new file mode 100644
index 00000000000..4f531a5307a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/math-frc.lua
@@ -0,0 +1,51 @@
+if not modules then modules = { } end modules ['math-frc'] = {
+ version = 1.001,
+ comment = "companion to math-frc.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local utfchar = utf.char
+
+local context = context
+local variables = interfaces.variables
+
+local v_no = variables.no
+local v_yes = variables.yes
+
+local resolved = {
+ [0x007B] = "\\{",
+ [0x007D] = "\\}",
+}
+
+table.setmetatableindex(resolved, function(t,k)
+ local v = utfchar(k)
+ t[k] = v
+ return v
+end)
+
+local normalatop = context.normalatop
+local normalover = context.normalover
+
+function commands.math_frac(how,left,right,width)
+ if how == v_no then
+ if left == 0x002E and right == 0x002E then
+ normalatop()
+ else
+ context("\\atopwithdelims%s%s",resolved[left],resolved[right])
+ end
+ elseif how == v_yes then
+ if left == 0x002E and right == 0x002E then
+ context("\\normalabove%ssp",width)
+ else
+ context("\\abovewithdelims%s%s%ssp",resolved[left],resolved[right],width)
+ end
+ else -- v_auto
+ if left == 0x002E and right == 0x002E then
+ normalover()
+ else
+ context("\\overwithdelims%s%s",resolved[left],resolved[right])
+ end
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/math-frc.mkiv b/Master/texmf-dist/tex/context/base/math-frc.mkiv
index ea3a737aa81..e11e79e8230 100644
--- a/Master/texmf-dist/tex/context/base/math-frc.mkiv
+++ b/Master/texmf-dist/tex/context/base/math-frc.mkiv
@@ -19,6 +19,8 @@
%D This module is reimplemented in \MKIV\ style.
+\registerctxluafile{math-frc}{1.001}
+
%D \macros
%D {frac, xfrac, xxfrac}
%D
@@ -89,53 +91,68 @@
\installcorenamespace{mathfractions}
\installcorenamespace{mathfractionstyle}
-\installcorenamespace{mathfractionalign}
\installcorenamespace{mathfractionalternative}
\installcommandhandler \??mathfractions {mathfraction} \??mathfractions
\let\setupmathfractions\setupmathfraction
+% color only applies to rule, use regular color for rest
+
\setupmathfractions
- [\c!mathstyle=\v!auto,
- \c!align=\v!normal,
+ [\c!mathstyle=,
\c!alternative=\v!inner,
- \c!command=\normalover] % beware a <arg 1><command><arg 2> variant
+ \c!rulethickness=.25\exheight,
+ \c!left=0x2E,
+ \c!right=0x2E,
+ \c!rule=\v!auto]
\appendtoks
\setuevalue{\currentmathfraction}{\math_frac{\currentmathfraction}}%
\to \everydefinemathfraction
-\letvalue{\??mathfractionalign\v!normal}\mathstylehbox
-\letvalue{\??mathfractionalign\v!lohi }\mathstylevcenteredhbox
-
-\def\math_frac_align
- {\expandnamespaceparameter\??mathfractionalign\mathfractionparameter\c!align\v!normal}
-
\unexpanded\def\math_frac#1%
{\begingroup
\edef\currentmathfraction{#1}%
- \expandnamespaceparameter\??mathfractionstyle\mathfractionparameter\c!mathstyle\s!math}
+ \edef\p_math_fractions_color{\mathfractionparameter\c!color}%
+ \ifx\p_math_fractions_color\empty
+ \expandafter\math_frac_normal
+ \else
+ \expandafter\math_frac_colored
+ \fi}
+
+\unexpanded\def\math_frac_colored#1#2%
+ {\savecolor
+ \colo_helpers_activate\p_math_fractions_color
+ \math_frac_normal{\restorecolor#1}{\restorecolor#2}}
+
+\unexpanded\def\math_frac_normal
+ {\expandnamespaceparameter\??mathfractionalternative\mathfractionparameter\c!alternative\v!inner}
-\setvalue{\??mathfractionalternative\v!inner}#1#2#3%
- {\math_frac_align{\Ustack{{#1{#2}}\mathfractionparameter\c!command{#1{#3}}}}%
- \endgroup}
+% we use utfchar anyway so we can as well do all at the lua end
-\setvalue{\??mathfractionalternative\v!outer}#1#2#3%
- {\math_frac_align{\Ustack{{#1{{#2}\mathfractionparameter\c!command{#3}}}}}%
- \endgroup}
+\def\math_frac_command
+ {\ctxcommand{math_frac(%
+ "\mathfractionparameter\c!rule",%
+ \number\mathfractionparameter\c!left,%
+ \number\mathfractionparameter\c!right,%
+ \number\dimexpr\mathfractionparameter\c!rulethickness%
+ )}}
-\def\math_frac_alternative
- {\expandnamespaceparameter\??mathfractionalternative\mathfractionparameter\c!alternative\v!inner}
+\setvalue{\??mathfractionalternative\v!inner}#1#2%
+ {\Ustack{%
+ {\usemathstyleparameter\mathfractionparameter{#1}}% we should store this one
+ \math_frac_command
+ {\usemathstyleparameter\mathfractionparameter{#2}}% and reuse it here
+ }\endgroup}
-\setvalue{\??mathfractionstyle\v!auto }{\math_frac_alternative\firstofoneargument} % was: 0
-\setvalue{\??mathfractionstyle\s!display }{\math_frac_alternative\displaystyle} % was: 1
-\setvalue{\??mathfractionstyle\s!text }{\math_frac_alternative\textstyle} % was: 2
-\setvalue{\??mathfractionstyle\s!script }{\math_frac_alternative\scriptstyle} % was: 3
-\setvalue{\??mathfractionstyle\s!scriptscript}{\math_frac_alternative\scriptscriptstyle} % was: 4
-\setvalue{\??mathfractionstyle\s!math }{\math_frac_alternative\mathstyle} % was: else
+\setvalue{\??mathfractionalternative\v!outer}#1#2%
+ {\Ustack{%
+ \usemathstyleparameter\mathfractionparameter
+ {{#1}\math_frac_command{#2}}%
+ }\endgroup}
-\definemathfraction[frac][\c!mathstyle=\v!auto]
+\definemathfraction[frac][\c!mathstyle=]
\unexpanded\def\xfrac {\begingroup\let\xfrac\xxfrac\math_frac_alternative\scriptstyle}
\unexpanded\def\xxfrac{\begingroup \math_frac_alternative\scriptscriptstyle}
@@ -157,6 +174,18 @@
%D \typebuffer
%D \getbuffer
+% $$
+% {{a}\over{b}} +
+% {{a}\overwithdelims(){b}} +
+% {{a}\atopwithdelims(){b}} +
+% {{a}\abovewithdelims()\zeropoint{b}} +
+% \left({{a}\over{b}}\right)
+% $$
+
+% \dorecurse {10} { % weird
+% $$ {{a}\abovewithdelims()#1pt{b}} $$
+% }
+
% \unexpanded\def\dfrac #1#2{{\displaystyle {{#1}\normalover {#2}}}}
% \unexpanded\def\tfrac #1#2{{\textstyle {{#1}\normalover {#2}}}}
@@ -164,8 +193,6 @@
\definemathfraction[tfrac][\c!alternative=\v!outer,\c!mathstyle=\s!text]
\definemathfraction[sfrac][\c!alternative=\v!outer,\c!mathstyle=\s!script]
-\def\normaloverbinum{\normalabovewithdelims()\zeropoint}
-
% \definemathfraction[ddfrac][\c!mathstyle=\s!display]
% \definemathfraction[ttfrac][\c!mathstyle=\s!text]
% \definemathfraction[ssfrac][\c!mathstyle=\s!script]
@@ -174,9 +201,9 @@
% \unexpanded\def\dbinom#1#2{{\displaystyle{{#1}\normalabovewithdelims()\zeropoint{#2}}}}
% \unexpanded\def\tbinom#1#2{{\textstyle {{#1}\normalabovewithdelims()\zeropoint{#2}}}}
-\definemathfraction[binom] [\c!alternative=\v!outer,\c!command=\normaloverbinum,\c!mathstyle=\s!auto]
-\definemathfraction[dbinom][\c!alternative=\v!outer,\c!command=\normaloverbinum,\c!mathstyle=\s!display]
-\definemathfraction[tbinom][\c!alternative=\v!outer,\c!command=\normaloverbinum,\c!mathstyle=\s!text]
+\definemathfraction[binom] [\c!alternative=\v!outer,\c!rule=\v!no,\c!left=0x28,\c!right=0x29,\c!mathstyle=\s!auto]
+\definemathfraction[dbinom][\c!alternative=\v!outer,\c!rule=\v!no,\c!left=0x28,\c!right=0x29,\c!mathstyle=\s!display]
+\definemathfraction[tbinom][\c!alternative=\v!outer,\c!rule=\v!no,\c!left=0x28,\c!right=0x29,\c!mathstyle=\s!text]
%D \macros
%D {cfrac}
diff --git a/Master/texmf-dist/tex/context/base/math-ini.mkiv b/Master/texmf-dist/tex/context/base/math-ini.mkiv
index 89116084791..72daa83415c 100644
--- a/Master/texmf-dist/tex/context/base/math-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/math-ini.mkiv
@@ -1057,7 +1057,7 @@
#1}}
\def\triggermathstyle#1% #1 is number
- {\ifcase#1\relax
+ {\ifcase\numexpr#1\relax
\displaystyle \or
\crampeddisplaystyle \or
\textstyle \or
@@ -1070,7 +1070,7 @@
\fi}
\def\mathstylefont#1% #1 is number (\normalmathstyle)
- {\ifcase#1\relax
+ {\ifcase\numexpr#1\relax
\textfont \or
\textfont \or
\textfont \or
@@ -1083,7 +1083,7 @@
\fi\zerocount} % hm, can ie other value as well
\def\mathsmallstylefont#1% #1 is number (\normalmathstyle)
- {\ifcase#1\relax
+ {\ifcase\numexpr#1\relax
\scriptfont \or
\scriptfont \or
\scriptfont \or
@@ -1096,7 +1096,7 @@
\fi\zerocount} % hm, can ie other value as well
\def\mathstyleface#1% #1 is number (\normalmathstyle)
- {\ifcase#1
+ {\ifcase\numexpr#1\relax
\textface \or
\textface \or
\textface \or
@@ -1109,7 +1109,7 @@
\fi}
\def\mathsmallstyleface#1% #1 is number (\normalmathstyle)
- {\ifcase#1
+ {\ifcase\numexpr#1\relax
\scriptface \or
\scriptface \or
\scriptface \or
@@ -1122,7 +1122,7 @@
\fi}
\def\mathstylecommand#1#2#3%
- {\ifcase\normalmathstyle
+ {\ifcase\numexpr\normalmathstyle\relax
\expandafter#1\or
\expandafter#1\or
\expandafter#1\or
diff --git a/Master/texmf-dist/tex/context/base/mlib-run.lua b/Master/texmf-dist/tex/context/base/mlib-run.lua
index 0d7b5aa6dd1..4ff16b18efe 100644
--- a/Master/texmf-dist/tex/context/base/mlib-run.lua
+++ b/Master/texmf-dist/tex/context/base/mlib-run.lua
@@ -56,6 +56,8 @@ metapost.collapse = true -- currently mplib cannot deal with begingroup/endg
metapost.texerrors = false
metapost.exectime = metapost.exectime or { } -- hack
+-- metapost.collapse = false
+
directives.register("mplib.texerrors", function(v) metapost.texerrors = v end)
trackers.register ("metapost.showlog", function(v) metapost.showlog = v end)
diff --git a/Master/texmf-dist/tex/context/base/mult-def.mkiv b/Master/texmf-dist/tex/context/base/mult-def.mkiv
index 069d48d2186..22b3880f631 100644
--- a/Master/texmf-dist/tex/context/base/mult-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mult-def.mkiv
@@ -53,6 +53,7 @@
\def\c!up {up}
\def\c!down {down}
\def\c!instance {instance}
+\def\c!database {database}
\def\v!compressseparator{compressseparator}
\def\v!notation {notation}
diff --git a/Master/texmf-dist/tex/context/base/node-pro.lua b/Master/texmf-dist/tex/context/base/node-pro.lua
index ab5b77f908c..24351b5b861 100644
--- a/Master/texmf-dist/tex/context/base/node-pro.lua
+++ b/Master/texmf-dist/tex/context/base/node-pro.lua
@@ -105,10 +105,10 @@ function processors.hpack_filter(head,groupcode,size,packtype,direction)
else
tracer("hpack","unchanged",head,groupcode,before,after,true)
end
- return (done and head) or true
+ return done and head or true
else
local head, done = actions(head,groupcode,size,packtype,direction)
- return (done and head) or true
+ return done and head or true
end
elseif trace_callbacks then
local n = nodes.count(head,false)
@@ -149,10 +149,10 @@ function processors.post_linebreak_filter(head,groupcode)
else
tracer("post_linebreak","unchanged",head,groupcode,before,after,true)
end
- return (done and head) or true
+ return done and head or true
else
local head, done = actions(head,groupcode)
- return (done and head) or true
+ return done and head or true
end
end
diff --git a/Master/texmf-dist/tex/context/base/pack-rul.lua b/Master/texmf-dist/tex/context/base/pack-rul.lua
index cd2e809e725..c91dec09cc2 100644
--- a/Master/texmf-dist/tex/context/base/pack-rul.lua
+++ b/Master/texmf-dist/tex/context/base/pack-rul.lua
@@ -14,7 +14,66 @@ local texsetdimen, texsetcount, texbox = tex.setdimen, tex.setcount, tex.box
local hpack, free, copy, traverse_id = node.hpack, node.free, node.copy_list, node.traverse_id
local texdimen, texcount = tex.dimen, tex.count
--- fastrepack
+local hlist_code = nodes.nodecodes.hlist
+local node_dimensions = node.dimensions
+
+-- function commands.doreshapeframedbox(n)
+-- local box = texbox[n]
+-- local noflines = 0
+-- local firstheight = nil
+-- local lastdepth = nil
+-- local lastlinelength = 0
+-- local minwidth = 0
+-- local maxwidth = 0
+-- local totalwidth = 0
+-- if box.width ~= 0 then
+-- local list = box.list
+-- if list then
+-- for h in traverse_id(hlist_code,list) do -- no dir etc needed
+-- if not firstheight then
+-- firstheight = h.height
+-- end
+-- lastdepth = h.depth
+-- noflines = noflines + 1
+-- local l = h.list
+-- if l then
+-- local p = hpack(copy(l))
+-- lastlinelength = p.width
+-- if lastlinelength > maxwidth then
+-- maxwidth = lastlinelength
+-- end
+-- if lastlinelength < minwidth or minwidth == 0 then
+-- minwidth = lastlinelength
+-- end
+-- totalwidth = totalwidth + lastlinelength
+-- free(p)
+-- end
+-- end
+-- if firstheight then
+-- if maxwidth ~= 0 then
+-- for h in traverse_id(hlist_code,list) do
+-- local l = h.list
+-- if l then
+-- -- if h.width ~= maxwidth then -- else no display math handling (uses shift)
+-- h.list = hpack(l,maxwidth,'exactly',h.dir)
+-- h.shift = 0 -- needed for display math
+-- h.width = maxwidth
+-- -- end
+-- end
+-- end
+-- end
+-- box.width = maxwidth
+-- end
+-- end
+-- end
+-- -- print("reshape", noflines, firstheight or 0, lastdepth or 0)
+-- texsetcount("global","framednoflines", noflines)
+-- texsetdimen("global","framedfirstheight", firstheight or 0)
+-- texsetdimen("global","framedlastdepth", lastdepth or 0)
+-- texsetdimen("global","framedminwidth", minwidth)
+-- texsetdimen("global","framedmaxwidth", maxwidth)
+-- texsetdimen("global","framedaveragewidth", noflines > 0 and totalwidth/noflines or 0)
+-- end
function commands.doreshapeframedbox(n)
local box = texbox[n]
@@ -28,7 +87,7 @@ function commands.doreshapeframedbox(n)
if box.width ~= 0 then
local list = box.list
if list then
- for h in traverse_id('hlist',list) do -- no dir etc needed
+ for h in traverse_id(hlist_code,list) do -- no dir etc needed
if not firstheight then
firstheight = h.height
end
@@ -36,8 +95,7 @@ function commands.doreshapeframedbox(n)
noflines = noflines + 1
local l = h.list
if l then
- local p = hpack(copy(l))
- lastlinelength = p.width
+ lastlinelength = node_dimensions(l)
if lastlinelength > maxwidth then
maxwidth = lastlinelength
end
@@ -45,15 +103,17 @@ function commands.doreshapeframedbox(n)
minwidth = lastlinelength
end
totalwidth = totalwidth + lastlinelength
- free(p)
end
end
if firstheight then
if maxwidth ~= 0 then
- for h in traverse_id('hlist',list) do
+ for h in traverse_id(hlist_code,list) do
local l = h.list
if l then
-- if h.width ~= maxwidth then -- else no display math handling (uses shift)
+ -- challenge: adapt glue_set
+ -- h.glue_set = h.glue_set * h.width/maxwidth -- interesting ... doesn't matter much
+ -- h.width = maxwidth
h.list = hpack(l,maxwidth,'exactly',h.dir)
h.shift = 0 -- needed for display math
h.width = maxwidth
@@ -82,7 +142,7 @@ function commands.doanalyzeframedbox(n)
if box.width ~= 0 then
local list = box.list
if list then
- for h in traverse_id('hlist',list) do
+ for h in traverse_id(hlist_code,list) do
if not firstheight then
firstheight = h.height
end
diff --git a/Master/texmf-dist/tex/context/base/s-pre-17.tex b/Master/texmf-dist/tex/context/base/s-pre-17.mkii
index 7e8310a537e..7e8310a537e 100644
--- a/Master/texmf-dist/tex/context/base/s-pre-17.tex
+++ b/Master/texmf-dist/tex/context/base/s-pre-17.mkii
diff --git a/Master/texmf-dist/tex/context/base/s-pre-17.mkiv b/Master/texmf-dist/tex/context/base/s-pre-17.mkiv
new file mode 100644
index 00000000000..9505faa6b76
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/s-pre-17.mkiv
@@ -0,0 +1,408 @@
+%D \module
+%D [ file=s-pre-17,
+%D version=1999.08.20,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 17,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\setupbodyfont
+ [dejavu,11pt,ss]
+
+\setupsystem
+ [random=medium]
+
+\setupbackgrounds
+ [state=repeat]
+
+\setupbackgrounds
+ [page]
+ [background={page,forward}]
+
+\setupbackgrounds
+ [text][text]
+ [background=blowdown]
+
+\setupinteraction
+ [state=start,
+% click=off,
+ color=TitleColor,
+ contrastcolor=TitleColor]
+
+\setupinteractionscreen
+ [option=max]
+
+\setuptolerance
+ [verytolerant,stretch]
+
+\definecolor [BackColor] [s=.30]
+\definecolor [PageColor] [g=1]
+\definecolor [FrameColor] [r=1]
+\definecolor [TitleColor] [y=1]
+\definecolor [ArrowColor] [b=1]
+
+\defineoverlay [title] [\useMPgraphic{title}]
+\defineoverlay [page] [\useMPgraphic{page}]
+\defineoverlay [blowup] [{\hboxreference[whatever:\CurrentBlaBla]{\overlaybutton{whatever:\CurrentBlaBla}}}]
+\defineoverlay [blowdown] [{\hboxreference[page:\realfolio]{\overlaybutton{page:\realfolio}}}]
+\defineoverlay [forward] [\overlaybutton{forward}]
+
+\startMPinclusions
+ input "mp-abck.mpiv" ;
+\stopMPinclusions
+
+\startMPpositiongraphic{mppos:connection}
+ path pa, pb, pc ; pair ca, cb ;
+ initialize_box(\MPpos{\MPvar{self}}) ; pa := pxy ; ca := cxy ;
+ initialize_box(\MPpos{\MPvar{prev}}) ; pb := pxy ; cb := cxy ;
+ pickup pencircle scaled .5pt ;
+ pa := pa enlarged 10pt ;
+ pb := pb enlarged 10pt ;
+ for i=1 upto 10 :
+ draw pa randomized 20pt withcolor \MPcolor{FrameColor} ;
+ endfor ;
+ if \MPp{\MPvar{prev}} > 0 :
+ pair a, b, c, d ;
+ for i=1 upto 25 :
+ a := .5[ulcorner pa,urcorner pa] randomized (10pt,10pt) ;
+ b := .5[llcorner pb,lrcorner pb] randomized (20pt,10pt) ;
+ c := .5[a,b] rotatedaround(a,-25) randomized (5pt,5pt) ;
+ d := .5[a,b] rotatedaround(a,+25) randomized (5pt,5pt) ;
+ draw (a--b) withcolor \MPcolor{ArrowColor} ;
+ draw (d--a--c) withcolor \MPcolor{ArrowColor} ;
+ endfor ;
+ fi ;
+ anchor_box(\MPanchor{\MPvar{self}}) ;
+\stopMPpositiongraphic
+
+\startuseMPgraphic{title}
+ pickup pencircle scaled .5pt ;
+ for i=1 upto 10 :
+ draw fullsquare
+ xyscaled(OverlayWidth,OverlayHeight)
+ enlarged 10pt randomized 20pt
+ withcolor \MPcolor{TitleColor} ;
+ endfor ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{page}
+ StartPage ;
+ pickup pencircle scaled .5pt ;
+ fill Page withcolor \MPcolor{BackColor} ;
+ for i=1 upto 20 :
+ draw Page enlarged -50pt randomized 50pt withcolor \MPcolor{PageColor} ;
+ endfor ;
+ StopPage ;
+\stopuseMPgraphic
+
+\newcounter\CurrentBlaBla
+
+\defineframedtext
+ [ZoomText]
+ [before=,
+ after=,
+ width=fit,
+ align=flushleft,
+ frame=off,
+ foregroundcolor=white]
+
+\starttexdefinition StartText
+ \begingroup
+ \getrandomdimen\scratchdimen{250pt}{350pt}
+ \edef\TextWidth{\the\scratchdimen}
+ \setbox\scratchbox\hbox\bgroup
+ \hsize\TextWidth
+ \ZoomText\bgroup
+\stoptexdefinition
+
+\starttexdefinition StartTextSimple
+ \begingroup
+ \setbox\scratchbox\hbox\bgroup
+ \framed [
+ frame=off,
+ foregroundcolor=white
+ ]
+ \bgroup
+\stoptexdefinition
+
+\starttexdefinition StopTextSimple
+ \StopText
+\stoptexdefinition
+
+\starttexdefinition StopText
+ \egroup
+ \egroup
+ \doglobal\increment\CurrentBlaBla
+ \let\PrevBlaBla\CurrentBlaBla \doglobal\decrement\PrevBlaBla
+ \let\NextBlaBla\CurrentBlaBla \doglobal\increment\NextBlaBla
+ \setMPpositiongraphic {
+ connection:\CurrentBlaBla
+ }{
+ mppos:connection
+ }{
+ seed=\CurrentBlaBla,
+ prev=connection:\PrevBlaBla,
+ next=connection:\NextBlaBla
+ }
+ \hbox to 600pt \bgroup
+ \setupinteraction[focus=fitr]
+ \getrandomdimen\scratchdimen{50pt}{75pt}
+ \hskip0pt plus \scratchdimen minus \scratchdimen
+ \hpos {
+ connection:\CurrentBlaBla
+ }{
+ \framed [
+ frame=off,
+ offset=overlay,
+ backgroundoffset=50pt,
+ background=blowup
+ ] {
+ \box\scratchbox
+ }
+ }
+ \getrandomdimen\scratchdimen{50pt}{75pt}
+ \hskip0pt plus \scratchdimen minus \scratchdimen
+ \egroup
+ \getrandomdimen\scratchdimen{75pt}{125pt}
+ \vskip\scratchdimen
+ \endgroup
+\stoptexdefinition
+
+\dontcomplain
+
+\disablemode[SpreadPage]
+
+\starttexdefinition StartPage #1
+ \doglobal\increment(\CurrentBlaBla,100)%
+ \setvariables[StartPage][title={#1}]
+ \setbox\scratchbox\hbox\bgroup
+ \valign\bgroup
+ \ignorespaces
+ \alignmark\alignmark
+ \vss
+ \cr
+\stoptexdefinition
+
+\starttexdefinition StopPage
+ \cr
+ \egroup
+ \egroup
+ \setbox\scratchbox\vbox\bgroup
+ \vskip100pt
+ \doifmodeelse {SpreadPage} {
+ \hbox spread 200pt
+ } {
+ \hbox to \wd\scratchbox
+ }
+ \bgroup
+ \setupinteraction[focus=fitr]
+ \hss
+ \switchtobodyfont[big]%
+ \bfd
+ \doglobal\increment\CurrentBlaBla
+ \setupinterlinespace
+ \hpos {
+ title:\realfolio
+ }{
+ \framed [
+ frame=off,
+ offset=overlay,
+ backgroundoffset=50pt,
+ background=blowup
+ ] {
+ \framed [
+ frame=off,
+ align=middle,
+ foregroundcolor=white,
+ background=title
+ ] {
+ \getvariable{StartPage}{title}
+ }
+ }
+ }
+ \hss
+ \egroup
+ \vskip100pt
+ \box\scratchbox
+ \egroup
+ \normalexpanded {
+ \definepapersize [
+ MasterPage
+ ] [
+ width=\the\dimexpr\wd\scratchbox+100pt\relax,
+ height=\the\dimexpr\ht\scratchbox+\dp\scratchbox+100pt\relax
+ ]
+ }
+ \setuppapersize
+ [MasterPage]
+ [MasterPage]
+ \setuplayout [
+ topspace=25pt,
+ backspace=25pt,
+ width=middle,
+ header=0pt,
+ footer=0pt,
+ height=middle
+ ]
+ \centerbox {
+ \box\scratchbox
+ }
+ \page
+\stoptexdefinition
+
+\starttexdefinition StartTopic #1
+ \removeunwantedspaces
+ \cr
+ \doglobal\increment(\CurrentBlaBla,100)%
+ \vbox\bgroup
+ \vskip100pt
+ \bgroup
+ \definecolor[FrameColor][TitleColor]
+ \switchtobodyfont[big]
+ \bfd
+ \setupinterlinespace
+ \StartTextSimple
+ \ignorespaces
+ #1
+ \removeunwantedspaces
+ \StopTextSimple
+ \vskip25pt
+ \egroup
+\stoptexdefinition
+
+\starttexdefinition StopTopic
+ \vskip-\lastskip
+ \vskip100pt
+ \egroup
+ \ignorespaces
+\stoptexdefinition
+
+\starttexdefinition TitlePage #1
+ \begingroup
+ \def\\{\vskip1ex\bfc\def\\{\vskip1ex\bfb}}
+ \enablemode[SpreadPage]
+ \StartPage{#1}
+ \StopPage
+ \endgroup
+\stoptexdefinition
+
+\continueifinputfile{s-pre-17.mkiv}
+
+\starttext
+
+\nopdfcompression
+
+\TitlePage{About Text\\Today's Talk\\Hans Hagen}
+
+\StartPage{The First Page}
+
+ \StartTopic{Some Text}
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StartText \input knuth \StopText
+ \StopTopic
+
+ \StartTopic{Another Text}
+ \StartText \input tufte \StopText
+ \StartText \input zapf \StopText
+ \StartText \input knuth \StopText
+ \StopTopic
+
+ \StartTopic{Some More Text}
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StartText \input tufte \StopText
+ \StopTopic
+
+ \StartTopic{Some Text Again}
+ \StartText \input tufte \StopText
+ \StartText \input zapf \StopText
+ \StartText \input knuth \StopText
+ \StartText \input tufte \StopText
+ \StopTopic
+
+\StopPage
+
+\StartPage{The Second Page}
+
+ \StartTopic{Some Text}
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StopTopic
+
+ \StartTopic{Another Text}
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StopTopic
+
+ \StartTopic{Some Nice Text}
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StartText \input tufte \StopText
+ \StartText \input tufte \StopText
+ \StopTopic
+
+ \StartTopic{Some Funny Text}
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StopTopic
+
+ \StartTopic{Quite Some Text}
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StopTopic
+
+ \StartTopic{Even More Text}
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StopTopic
+
+\StopPage
+
+\StartPage{The Third Page}
+
+ \StartTopic{Some Short Text}
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StopTopic
+
+ \StartTopic{Some Minimal Text}
+ \StartText \input tufte \StopText
+ \StartText \input zapf \StopText
+ \StopTopic
+
+ \StartTopic{Some More Text}
+ \StartText \input tufte \StopText
+ \StartText \input knuth \StopText
+ \StartText \input zapf \StopText
+ \StartText \input tufte \StopText
+ \StartText \input tufte \StopText
+ \StopTopic
+
+\StopPage
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/spac-ver.mkiv b/Master/texmf-dist/tex/context/base/spac-ver.mkiv
index 7323230a7ed..ee78d89640a 100644
--- a/Master/texmf-dist/tex/context/base/spac-ver.mkiv
+++ b/Master/texmf-dist/tex/context/base/spac-ver.mkiv
@@ -763,8 +763,15 @@
\setnormalbaselines
\setstrut}
-\unexpanded\def\forgetverticalstretch % \forgetspacing
- {\spacing\plusone}
+% \unexpanded\def\forgetverticalstretch % \forgetspacing
+% {\spacing\plusone}
+
+\unexpanded\def\forgetverticalstretch
+ {\let\spacingfactor \plusone
+ \let\systemtopskipfactor \topskipfactor
+ \let\systemmaxdepthfactor\maxdepthfactor
+ \setnormalbaselines
+ \setstrut}
\appendtoks
\forgetverticalstretch
diff --git a/Master/texmf-dist/tex/context/base/status-files.pdf b/Master/texmf-dist/tex/context/base/status-files.pdf
index f43bcdc4e75..bbeb36c4574 100644
--- a/Master/texmf-dist/tex/context/base/status-files.pdf
+++ b/Master/texmf-dist/tex/context/base/status-files.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/status-lua.pdf b/Master/texmf-dist/tex/context/base/status-lua.pdf
index f34d626b751..9a8da370ab6 100644
--- a/Master/texmf-dist/tex/context/base/status-lua.pdf
+++ b/Master/texmf-dist/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/status-mkiv.lua b/Master/texmf-dist/tex/context/base/status-mkiv.lua
index f08b2ec6333..be26a2030e8 100644
--- a/Master/texmf-dist/tex/context/base/status-mkiv.lua
+++ b/Master/texmf-dist/tex/context/base/status-mkiv.lua
@@ -3738,6 +3738,12 @@ return {
},
{
category = "lua",
+ filename = "math-frc",
+ loading = "math-frc",
+ status = "okay",
+ },
+ {
+ category = "lua",
comment = "could be made look nicer, but who cares",
filename = "math-dim",
loading = "math-ini",
diff --git a/Master/texmf-dist/tex/context/base/strc-ref.mkvi b/Master/texmf-dist/tex/context/base/strc-ref.mkvi
index 54f180d8e01..c82a09d20d1 100644
--- a/Master/texmf-dist/tex/context/base/strc-ref.mkvi
+++ b/Master/texmf-dist/tex/context/base/strc-ref.mkvi
@@ -259,12 +259,26 @@
\fi}
\def\strc_references_set_page_only_destination_box_attribute#cs#labels%
- {\strc_references_set_page_only_destination_attribute{#labels}%
- \ifnum\lastdestinationattribute>\zerocount
- \edef#cs{attr \destinationattribute\number\lastdestinationattribute}%
- \else
- \let#cs\empty
- \fi}
+ {\strc_references_set_page_only_destination_attribute{#labels}%
+ \ifnum\lastdestinationattribute>\zerocount
+ \edef#cs{attr \destinationattribute\number\lastdestinationattribute}%
+ \else
+ \let#cs\empty
+ \fi}
+
+%D It's about time to clean up references .. stable enough now.
+
+\unexpanded\def\boxreference[#1]%
+ {\begingroup
+ \dowithnextbox
+ {\strc_references_set_page_only_destination_attribute{#1}%
+ \hbox
+ \ifnum\lastdestinationattribute=\attributeunsetvalue\else attr \destinationattribute \lastdestinationattribute \fi
+ {\box\b_strc_destination_nodes\box\nextbox}%
+ \endgroup}}
+
+\unexpanded\def\hboxreference[#1]{\boxreference[#1]\hbox}
+\unexpanded\def\vboxreference[#1]{\boxreference[#1]\vbox}
% \ifx\currentdestinationattribute\empty
% \begingroup\attribute\destinationattribute\currentdestinationattribute\emptyhbox\endgroup % todo
diff --git a/Master/texmf-dist/tex/context/base/tabl-xtb.lua b/Master/texmf-dist/tex/context/base/tabl-xtb.lua
index 59cfadbf210..3ffe8a2196a 100644
--- a/Master/texmf-dist/tex/context/base/tabl-xtb.lua
+++ b/Master/texmf-dist/tex/context/base/tabl-xtb.lua
@@ -646,13 +646,15 @@ function xtables.construct()
local list = drc.list
if list then
list.shift = list.height + list.depth
--- list = hpack_node_list(list) -- is somehow needed
--- list.width = 0
--- list.height = 0
--- list.depth = 0
-local h = new_hlist()
-h.list = list
-list = h
+ -- list = hpack_node_list(list) -- is somehow needed
+ -- list.width = 0
+ -- list.height = 0
+ -- list.depth = 0
+ -- faster:
+ local h = new_hlist()
+ h.list = list
+ list = h
+ --
if start then
stop.next = list
list.prev = stop
diff --git a/Master/texmf-dist/tex/context/base/trac-vis.lua b/Master/texmf-dist/tex/context/base/trac-vis.lua
index 88d2c886e47..f68da632fb2 100644
--- a/Master/texmf-dist/tex/context/base/trac-vis.lua
+++ b/Master/texmf-dist/tex/context/base/trac-vis.lua
@@ -300,7 +300,7 @@ local c_skip_a_d = "trace:dc"
local c_skip_b_d = "trace:dm"
local c_glyph_d = "trace:do"
-local function sometext(str,layer,color)
+local function sometext(str,layer,color) -- we can just paste verbatim together .. no typesteting needed
local text = fast_hpack_string(str,usedfont)
local size = text.width
local rule = new_rule(size,2*exheight,exheight/2)
diff --git a/Master/texmf-dist/tex/context/base/util-lib.lua b/Master/texmf-dist/tex/context/base/util-lib.lua
index 601f2fb1d9f..7d43e6c97b2 100644
--- a/Master/texmf-dist/tex/context/base/util-lib.lua
+++ b/Master/texmf-dist/tex/context/base/util-lib.lua
@@ -201,10 +201,14 @@ local function requireswiglib(required,version)
if trace_swiglib then
report_swiglib("found: %a",found_library)
end
- library = package.loadlib(found_library,"luaopen_" .. required_base)
- if type(library) == "function" then
+ local message = nil
+ local opener = "luaopen_" .. required_base
+ library, message = package.loadlib(found_library,opener)
+ local libtype = type(library)
+ if libtype == "function" then
library = library()
else
+ report_swiglib("load error: %a returns %a, message %a",opener,libtype,message or "no message")
library = false
end
dir.pop()
diff --git a/Master/texmf-dist/tex/context/base/util-mrg.lua b/Master/texmf-dist/tex/context/base/util-mrg.lua
index 78b23dcbbff..690188ef879 100644
--- a/Master/texmf-dist/tex/context/base/util-mrg.lua
+++ b/Master/texmf-dist/tex/context/base/util-mrg.lua
@@ -77,36 +77,43 @@ end
-- -- saves some 20K .. ldx comments
-- data = gsub(data,"%-%-%[%[ldx%-%-.-%-%-ldx%]%]%-%-","")
-local space = patterns.space
-local eol = patterns.newline
-local equals = P("=")^0
-local open = P("[") * Cg(equals,"init") * P("[") * P("\n")^-1
-local close = P("]") * C(equals) * P("]")
-local closeeq = Cmt(close * Cb("init"), function(s,i,a,b) return a == b end)
-local longstring = open * (1 - closeeq)^0 * close
-
-local quoted = patterns.quoted
-local emptyline = space^0 * eol
-local operator1 = P("<=") + P(">=") + P("~=") + P("..") + S("/^<>=*+%%")
-local operator2 = S("*+/")
-local operator3 = S("-")
-local separator = S(",;")
-
-local ignore = (P("]") * space^1 * P("=") * space^1 * P("]")) / "]=[" +
- (P("=") * space^1 * P("{")) / "={" +
- (P("(") * space^1) / "(" +
- (P("{") * (space+eol)^1 * P("}")) / "{}"
-local strings = quoted -- / function (s) print("<<"..s..">>") return s end
-local longcmt = (emptyline^0 * P("--") * longstring * emptyline^0) / ""
-local longstr = longstring
-local comment = emptyline^0 * P("--") * P("-")^0 * (1-eol)^0 * emptyline^1 / "\n"
-local pack = ((eol+space)^0 / "") * operator1 * ((eol+space)^0 / "") +
- ((eol+space)^0 / "") * operator2 * ((space)^0 / "") +
- ((eol+space)^1 / "") * operator3 * ((space)^1 / "") +
- ((space)^0 / "") * separator * ((space)^0 / "")
-local lines = emptyline^2 / "\n"
-local spaces = (space * space) / " "
------ spaces = ((space+eol)^1 ) / " "
+local space = patterns.space
+local eol = patterns.newline
+local equals = P("=")^0
+local open = P("[") * Cg(equals,"init") * P("[") * P("\n")^-1
+local close = P("]") * C(equals) * P("]")
+local closeeq = Cmt(close * Cb("init"), function(s,i,a,b) return a == b end)
+local longstring = open * (1 - closeeq)^0 * close
+
+local quoted = patterns.quoted
+local digit = patterns.digit
+local emptyline = space^0 * eol
+local operator1 = P("<=") + P(">=") + P("~=") + P("..") + S("/^<>=*+%%")
+local operator2 = S("*+/")
+local operator3 = S("-")
+local operator4 = P("..")
+local separator = S(",;")
+
+local ignore = (P("]") * space^1 * P("=") * space^1 * P("]")) / "]=[" +
+ (P("=") * space^1 * P("{")) / "={" +
+ (P("(") * space^1) / "(" +
+ (P("{") * (space+eol)^1 * P("}")) / "{}"
+local strings = quoted -- / function (s) print("<<"..s..">>") return s end
+local longcmt = (emptyline^0 * P("--") * longstring * emptyline^0) / ""
+local longstr = longstring
+local comment = emptyline^0 * P("--") * P("-")^0 * (1-eol)^0 * emptyline^1 / "\n"
+local optionalspaces = space^0 / ""
+local mandatespaces = space^1 / ""
+local optionalspacing = (eol+space)^0 / ""
+local mandatespacing = (eol+space)^1 / ""
+local pack = digit * space^1 * operator4 * optionalspacing +
+ optionalspacing * operator1 * optionalspacing +
+ optionalspacing * operator2 * optionalspaces +
+ mandatespacing * operator3 * mandatespaces +
+ optionalspaces * separator * optionalspaces
+local lines = emptyline^2 / "\n"
+local spaces = (space * space) / " "
+----- spaces = ((space+eol)^1 ) / " "
local compact = Cs ( (
ignore +