summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-12-14 19:36:30 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-12-14 19:36:30 +0100
commit19750b667c23a9f276032837d6c517063376bd0c (patch)
treefa92ece037f551b13b1ac73c59efa4b22b74b49b /tex
parentfe714093ebb95e4a870282782e2124cff2e546e5 (diff)
downloadcontext-19750b667c23a9f276032837d6c517063376bd0c.tar.gz
2021-12-14 19:19:00
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/mult-ro.mkii1
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context-error.lmx4
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/mult-low.lua1
-rw-r--r--tex/context/base/mkiv/spac-ali.mkiv3
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24770 -> 24763 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin257675 -> 257684 bytes
-rw-r--r--tex/context/base/mkiv/syst-ini.mkiv6
-rw-r--r--tex/context/base/mkiv/typo-del.mkiv9
-rw-r--r--tex/context/base/mkiv/util-jsn.lua8
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl2
-rw-r--r--tex/context/base/mkxl/mlib-scn.lmt4
-rw-r--r--tex/context/base/mkxl/node-nut.lmt1
-rw-r--r--tex/context/base/mkxl/spac-ali.mkxl3
-rw-r--r--tex/context/base/mkxl/spac-ver.lmt14
-rw-r--r--tex/context/base/mkxl/spac-ver.mkxl7
-rw-r--r--tex/context/base/mkxl/strc-itm.mklx18
-rw-r--r--tex/context/base/mkxl/supp-box.mkxl5
-rw-r--r--tex/context/base/mkxl/trac-deb.lmt10
-rw-r--r--tex/context/base/mkxl/typo-del.mkxl9
-rw-r--r--tex/context/interface/mkii/keys-ro.xml1
-rw-r--r--tex/context/modules/mkiv/m-circuitikz.mkiv138
-rw-r--r--tex/context/modules/mkiv/m-tikz.mkiv155
-rw-r--r--tex/context/modules/mkxl/m-circuitikz.mkxl89
-rw-r--r--tex/context/modules/mkxl/m-tikz.mkxl87
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
30 files changed, 408 insertions, 179 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 801541637..bbd1c93f6 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2021.12.10 11:29}
+\newcontextversion{2021.12.14 19:16}
%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/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index 2aa9cee0d..560c4107c 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.12.10 11:29}
+\edef\contextversion{2021.12.14 19:16}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-ro.mkii b/tex/context/base/mkii/mult-ro.mkii
index 5db4797e4..65c52c639 100644
--- a/tex/context/base/mkii/mult-ro.mkii
+++ b/tex/context/base/mkii/mult-ro.mkii
@@ -1282,6 +1282,7 @@
\setinterfaceconstant{tab}{tab}
\setinterfaceconstant{text}{text}
\setinterfaceconstant{textalign}{textalign}
+\setinterfaceconstant{textalternative}{textalternative}
\setinterfaceconstant{textcolor}{culoaretext}
\setinterfaceconstant{textcommand}{comandatext}
\setinterfaceconstant{textdistance}{textdistance}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 1b143ffb7..d61d0887e 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2021.12.10 11:29}
+\newcontextversion{2021.12.14 19:16}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkiv/context-error.lmx b/tex/context/base/mkiv/context-error.lmx
index d1a758b05..60579f4a0 100644
--- a/tex/context/base/mkiv/context-error.lmx
+++ b/tex/context/base/mkiv/context-error.lmx
@@ -51,9 +51,7 @@
</div></div>
<div id="bottom"><div id="bottom-one"><div id="bottom-two">
Job Name: <?lua p(environment.jobname) ?> &nbsp;&nbsp;&nbsp;
- ConTeXt Version: <?lua p(environment.version) ?> &nbsp;&nbsp;&nbsp;
- Real Page: <?lua p(tracers.cs('c:realpageno')) ?> &nbsp;&nbsp;&nbsp;
- Page: <?lua p(tracers.cs('c:pageno')) ?> &nbsp;&nbsp;&nbsp;
+ ConTeXt Version: <?lua p(environment.version) ?>
</div></div></div>
</body>
</html>
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 7c32ed6d8..4675386c8 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -49,7 +49,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.12.10 11:29}
+\edef\contextversion{2021.12.14 19:16}
%D Kind of special:
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index baf85eb04..9c4c35037 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -538,6 +538,7 @@ return {
"lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft",
"synchronizelayoutdirection","synchronizedisplaydirection","synchronizeinlinedirection",
"dirlre", "dirrle", "dirlro", "dirrlo",
+ "rtltext", "ltrtext",
--
"lesshyphens", "morehyphens", "nohyphens", "dohyphens", "dohyphencollapsing", "nohyphencollapsing",
"compounddiscretionary",
diff --git a/tex/context/base/mkiv/spac-ali.mkiv b/tex/context/base/mkiv/spac-ali.mkiv
index 2467f8352..a54c44b72 100644
--- a/tex/context/base/mkiv/spac-ali.mkiv
+++ b/tex/context/base/mkiv/spac-ali.mkiv
@@ -184,6 +184,9 @@
\unexpanded\def\leftorrightvbox{\ifconditional\displaylefttoright\expandafter\lefttorightvbox\else\expandafter\righttoleftvbox\fi}
\unexpanded\def\leftorrightvtop{\ifconditional\displaylefttoright\expandafter\lefttorightvtop\else\expandafter\righttoleftvtop\fi}
+\unexpanded\def\rtltext{\groupedcommand{\dontleavehmode\righttoleft\ignorespaces}\removeunwantedspaces}
+\unexpanded\def\ltrtext{\groupedcommand{\dontleavehmode\lefttoright\ignorespaces}\removeunwantedspaces}
+
% Tolerance and hyphenation
\ifdefined\lesshyphens \else \let\lesshyphens\relax \fi
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index a7f20d3e8..708b6ffd2 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 43b1fbf13..10f855c72 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv
index 488f16e16..568912a33 100644
--- a/tex/context/base/mkiv/syst-ini.mkiv
+++ b/tex/context/base/mkiv/syst-ini.mkiv
@@ -1251,4 +1251,10 @@
\let\partokenname\gobbleoneargument
\fi
+%D In case we load \LMTX\ code.
+
+\ifdefined\autoparagraphmode \else
+ \newcount\autoparagraphmode
+\fi
+
\protect \endinput
diff --git a/tex/context/base/mkiv/typo-del.mkiv b/tex/context/base/mkiv/typo-del.mkiv
index 9720326be..726c6d4ba 100644
--- a/tex/context/base/mkiv/typo-del.mkiv
+++ b/tex/context/base/mkiv/typo-del.mkiv
@@ -525,10 +525,11 @@
\usedelimitedtextstyleandcolor\c!style\c!color
%
\begingroup
- \edef\p_delimited_left {\delimitedtextparameter{\c!left}}%
- \edef\p_delimited_right {\delimitedtextparameter{\c!right}}%
- \edef\p_delimited_nextleft {\delimitedtextparameter{\c!nextleft}}%
- \edef\p_delimited_nextright{\delimitedtextparameter{\c!nextright}}%
+ \usealignparameter\delimitedtextparameter
+ \edef\p_delimited_left {\delimitedtextparameter\c!left}%
+ \edef\p_delimited_right {\delimitedtextparameter\c!right}%
+ \edef\p_delimited_nextleft {\delimitedtextparameter\c!nextleft}%
+ \edef\p_delimited_nextright{\delimitedtextparameter\c!nextright}%
%
\leftdelimitedtextmark
%
diff --git a/tex/context/base/mkiv/util-jsn.lua b/tex/context/base/mkiv/util-jsn.lua
index 8da351897..c1048b00a 100644
--- a/tex/context/base/mkiv/util-jsn.lua
+++ b/tex/context/base/mkiv/util-jsn.lua
@@ -17,6 +17,10 @@ if not modules then modules = { } end modules ['util-jsn'] = {
--
-- Upgraded for handling the somewhat more fax server templates.
+if utilities and utilities.json then
+ return json
+end
+
local P, V, R, S, C, Cc, Cs, Ct, Cf, Cg = lpeg.P, lpeg.V, lpeg.R, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.Ct, lpeg.Cf, lpeg.Cg
local lpegmatch = lpeg.match
local format, gsub = string.format, string.gsub
@@ -440,4 +444,8 @@ end
-- inspect(l)
-- print(s==l.s)
+-- if not package.loaded.json then
+-- package.loaded.json = json
+-- end
+
return json
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index bd8833c4e..28c8d3bf6 100644
--- a/tex/context/base/mkxl/cont-new.mkxl
+++ b/tex/context/base/mkxl/cont-new.mkxl
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2021.12.10 11:29}
+\newcontextversion{2021.12.14 19:16}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl
index 81310b47a..93c7f1d69 100644
--- a/tex/context/base/mkxl/context.mkxl
+++ b/tex/context/base/mkxl/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\immutable\edef\contextformat {\jobname}
-\immutable\edef\contextversion{2021.12.10 11:29}
+\immutable\edef\contextversion{2021.12.14 19:16}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/mlib-scn.lmt b/tex/context/base/mkxl/mlib-scn.lmt
index fcf9e73c3..eb34d2b2e 100644
--- a/tex/context/base/mkxl/mlib-scn.lmt
+++ b/tex/context/base/mkxl/mlib-scn.lmt
@@ -331,14 +331,14 @@ local function collectnames()
local t = scantoken(true)
-- (1) not really needed
if t == numeric_code then
- n = n + 1 l[n] = scannumeric(1)
+ n = n + 1 l[n] = scannumeric(1) -- so a float even if it is an index
elseif t == string_code then
n = n + 1 l[n] = scanstring(1)
elseif t == nullary_code then
n = n + 1 l[n] = scanboolean(1)
elseif t == leftbracket_code then
scantoken() -- leftbacket
- n = n + 1 l[n] = scaninteger(1)
+ n = n + 1 l[n] = scaninteger(1) -- forces an index
scantoken() -- rightbacket
elseif t == leftdelimiter_code or t == tag_code or t == capsule_code then
t = scanexpression(true)
diff --git a/tex/context/base/mkxl/node-nut.lmt b/tex/context/base/mkxl/node-nut.lmt
index 0cd6eb051..dfa89e4ab 100644
--- a/tex/context/base/mkxl/node-nut.lmt
+++ b/tex/context/base/mkxl/node-nut.lmt
@@ -266,6 +266,7 @@ local nuts = {
-- getxyoffsets = direct.getxyoffsets,
getspeciallist = direct.getspeciallist,
setspeciallist = direct.setspeciallist,
+ getusedattributes = direct.getusedattributes,
}
nodes.nuts = nuts
diff --git a/tex/context/base/mkxl/spac-ali.mkxl b/tex/context/base/mkxl/spac-ali.mkxl
index e196b0c03..6e16614aa 100644
--- a/tex/context/base/mkxl/spac-ali.mkxl
+++ b/tex/context/base/mkxl/spac-ali.mkxl
@@ -192,6 +192,9 @@
\permanent\protected\def\leftorrightvbox{\ifconditional\displaylefttoright\expandafter\lefttorightvbox\else\expandafter\righttoleftvbox\fi}
\permanent\protected\def\leftorrightvtop{\ifconditional\displaylefttoright\expandafter\lefttorightvtop\else\expandafter\righttoleftvtop\fi}
+\permanent\protected\def\rtltext{\groupedcommand{\dontleavehmode\righttoleft\ignorespaces}\removeunwantedspaces}
+\permanent\protected\def\ltrtext{\groupedcommand{\dontleavehmode\lefttoright\ignorespaces}\removeunwantedspaces}
+
% Tolerance and hyphenation
\ifdefined\lesshyphens \else \let\lesshyphens\relax \fi
diff --git a/tex/context/base/mkxl/spac-ver.lmt b/tex/context/base/mkxl/spac-ver.lmt
index fcb1b7e7f..3faa15c77 100644
--- a/tex/context/base/mkxl/spac-ver.lmt
+++ b/tex/context/base/mkxl/spac-ver.lmt
@@ -2472,8 +2472,18 @@ do
-- check if in mvl
if texgetnest("ptr") == 0 then
-- this flushes the contributions
- while getspeciallist("contributehead") do
- triggerbuildpage()
+ local prev = nil
+ local cycle = 1
+ while cycle <= 10 do
+ local head = getspeciallist("contributehead")
+ if head == prev then
+ -- This can happen .. maybe 10 is already too much ... e.g.
+ -- extreme side float case in m4all.
+ cycle = cycle + 1
+ else
+ triggerbuildpage()
+ prev = head
+ end
end
-- now we consult the last line (if present)
local head, tail = getspeciallist("pagehead")
diff --git a/tex/context/base/mkxl/spac-ver.mkxl b/tex/context/base/mkxl/spac-ver.mkxl
index e2fa75133..3f40d98cf 100644
--- a/tex/context/base/mkxl/spac-ver.mkxl
+++ b/tex/context/base/mkxl/spac-ver.mkxl
@@ -1353,6 +1353,13 @@
\frozen#1\numexpr#2+\plusone\relax\space\doexpandedrecurse{\the\numexpr#2\relax}{ #3}\zerocount\relax
\fi}
+% to be tested:
+%
+% \permanent\protected\def\setpenalties#1#2#3%
+% {\ifdefined#1% space before #3 prevents lookahead problems, needed when #3=text
+% \frozen#1\numexpr#2+\plusone\relax\space\expandedloop\plusone\numexpr#2\relax\plusone{ #3}\zerocount\relax
+% \fi}
+
%D \macros
%D {keeplinestogether}
%D
diff --git a/tex/context/base/mkxl/strc-itm.mklx b/tex/context/base/mkxl/strc-itm.mklx
index 65df80f32..ba21733c5 100644
--- a/tex/context/base/mkxl/strc-itm.mklx
+++ b/tex/context/base/mkxl/strc-itm.mklx
@@ -1314,16 +1314,18 @@
\settrue\c_strc_itemgroups_txt
\startitemgroupitem}
-% \protected\def\strc_itemgroups_start_head
-% {\settrue\c_strc_itemgroups_head
-% \startitemgrouphead}
+% \protected\tolerant\def\strc_itemgroups_start_items_indeed[#1]%
+% {\strc_itemgroups_start_edge
+% {\dorecurse{0\itemgroupparameter\c!items}{\strc_itemgroups_used_symbol\hss}%
+% \unskip}}
-\protected\def\strc_itemgroups_start_items
- {\dosingleempty\strc_itemgroups_start_items_indeed}
-
-\protected\def\strc_itemgroups_start_items_indeed[#whatever]% something got lost
+\protected\tolerant\def\strc_itemgroups_start_items_indeed[#1]%
{\strc_itemgroups_start_edge
- {\dorecurse{0\itemgroupparameter\c!items}{\strc_itemgroups_used_symbol\hss}%
+ {\localcontrolledloop
+ \plusone
+ \ifchknum#1\or#1\else0\itemgroupparameter\c!items\fi
+ \plusone
+ {\strc_itemgroups_used_symbol\hss}%
\unskip}}
\protected\permanent\def\startspecialitemgroupitem[#name]% todo: frozen
diff --git a/tex/context/base/mkxl/supp-box.mkxl b/tex/context/base/mkxl/supp-box.mkxl
index 87660df49..2ad067002 100644
--- a/tex/context/base/mkxl/supp-box.mkxl
+++ b/tex/context/base/mkxl/supp-box.mkxl
@@ -2481,8 +2481,11 @@
%D
%D A funny (but rather stupid) one, plus a redefinition.
+% \permanent\protected\def\removebottomthings
+% {\dorecurse\plusfive{\unskip\unkern\unpenalty}}
+
\permanent\protected\def\removebottomthings
- {\dorecurse\plusfive{\unskip\unkern\unpenalty}}
+ {\localcontrolledloop\plusone\plusfive\plusone{\unskip\unkern\unpenalty}}
\permanent\protected\def\removelastskip % \ifvmode the plain tex one \fi, overloaded to \permanent in spac-ver
{\ifvmode\ifzeropt\lastskip\else\vskip-\lastskip\fi\fi}
diff --git a/tex/context/base/mkxl/trac-deb.lmt b/tex/context/base/mkxl/trac-deb.lmt
index 6ac0f3e16..9cf122d32 100644
--- a/tex/context/base/mkxl/trac-deb.lmt
+++ b/tex/context/base/mkxl/trac-deb.lmt
@@ -135,7 +135,7 @@ local nop = function() end
local resetmessages = status.resetmessages or nop
local function processerror(offset,errortype)
- local readstate = status.readstate
+ local readstate = status.getreadstate()
local filename = readstate.filename
local linenumber = readstate.linenumber
local skiplinenumber = readstate.skiplinenumber
@@ -317,7 +317,7 @@ local function reportback(lmxname,default,variables)
end
local function showerror(lmxname)
- local readstate = status.readstate()
+ local readstate = status.getreadstate()
local filename = readstate.filename
local linenumber = tonumber(readstate.linenumber) or 0
local errorcontext = ""
@@ -329,7 +329,7 @@ local function showerror(lmxname)
end
local variables = {
['title'] = 'ConTeXt Error Information',
- ['errormessage'] = status.errorstatus.error or "?",
+ ['errormessage'] = status.geterrorstate().error or "?",
['linenumber'] = linenumber,
['color-background-one'] = lmx.get('color-background-yellow'),
['color-background-two'] = lmx.get('color-background-purple'),
@@ -347,8 +347,8 @@ function lmx.overloaderror(v)
usescitelexer = true
end
callback.register('show_error_message', function() showerror() end)
- callback.register('intercept_lua_error', function() showerror() end)
- callback.register('intercept_tex_error', function() showerror() end)
+-- callback.register('intercept_lua_error', function() showerror() end)
+-- callback.register('intercept_tex_error', function() showerror() end)
end
directives.register("system.showerror", lmx.overloaderror)
diff --git a/tex/context/base/mkxl/typo-del.mkxl b/tex/context/base/mkxl/typo-del.mkxl
index dc26b4295..f322b4f48 100644
--- a/tex/context/base/mkxl/typo-del.mkxl
+++ b/tex/context/base/mkxl/typo-del.mkxl
@@ -514,10 +514,11 @@
\usedelimitedtextstyleandcolor\c!style\c!color
%
\begingroup
- \edef\p_delimited_left {\delimitedtextparameter{\c!left}}%
- \edef\p_delimited_right {\delimitedtextparameter{\c!right}}%
- \edef\p_delimited_nextleft {\delimitedtextparameter{\c!nextleft}}%
- \edef\p_delimited_nextright{\delimitedtextparameter{\c!nextright}}%
+ \usealignparameter\delimitedtextparameter
+ \edef\p_delimited_left {\delimitedtextparameter\c!left}%
+ \edef\p_delimited_right {\delimitedtextparameter\c!right}%
+ \edef\p_delimited_nextleft {\delimitedtextparameter\c!nextleft}%
+ \edef\p_delimited_nextright{\delimitedtextparameter\c!nextright}%
%
\leftdelimitedtextmark
%
diff --git a/tex/context/interface/mkii/keys-ro.xml b/tex/context/interface/mkii/keys-ro.xml
index ead51a685..3516282e1 100644
--- a/tex/context/interface/mkii/keys-ro.xml
+++ b/tex/context/interface/mkii/keys-ro.xml
@@ -1288,6 +1288,7 @@
<cd:constant name='tab' value='tab'/>
<cd:constant name='text' value='text'/>
<cd:constant name='textalign' value='textalign'/>
+ <cd:constant name='textalternative' value='textalternative'/>
<cd:constant name='textcolor' value='culoaretext'/>
<cd:constant name='textcommand' value='comandatext'/>
<cd:constant name='textdistance' value='textdistance'/>
diff --git a/tex/context/modules/mkiv/m-circuitikz.mkiv b/tex/context/modules/mkiv/m-circuitikz.mkiv
new file mode 100644
index 000000000..27ef72642
--- /dev/null
+++ b/tex/context/modules/mkiv/m-circuitikz.mkiv
@@ -0,0 +1,138 @@
+%D \module
+%D [ file=m-circuitikz,
+%D version=2021.12.03,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=CURCUITIKZ support,
+%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.
+
+%D A fixed variant of the t-curcuitikz module distributed with tikz. This one
+%D is for \LMTX.
+
+\usemodule[m][tikz]
+
+\startmodule[circuitikz]
+
+\usetikzlibrary[calc]
+\usetikzlibrary[arrows.meta]
+\usetikzlibrary[bending]
+\usetikzlibrary[fpu] % may be needed for use fpu reciprocal (v1.0.1)
+
+\tikzinputfile{pgfcirc.defines.tex}
+\tikzinputfile{pgfcircutils.tex}
+\tikzinputfile{pgfcircpath.tex}
+
+\tikzinputfile{pgfcircshapes.tex}
+\tikzinputfile{pgfcircmonopoles.tex}
+\tikzinputfile{pgfcircbipoles.tex}
+\tikzinputfile{pgfcirctripoles.tex}
+\tikzinputfile{pgfcircquadpoles.tex}
+\tikzinputfile{pgfcircmultipoles.tex}
+
+\tikzinputfile{pgfcirclabel.tex}
+\tikzinputfile{pgfcircvoltage.tex}
+\tikzinputfile{pgfcirccurrent.tex}
+\tikzinputfile{pgfcircflow.tex}
+
+\ifdefined\pgfcircversion \else \def\pgfcircversion {0.0.0} \fi
+\ifdefined\pgfcircversiondate \else \def\pgfcircversiondate {1010/01/01} \fi
+
+% defaults
+
+\setupmodule
+ [current=european,
+ voltage=european,
+ resistor=american,
+ inductor=cute,
+ logic=american,
+ %siunitx=true,
+ arrowmos=false]
+
+% can be done nicer ... todo
+
+\processaction
+ [\currentmoduleparameter{voltage}]
+ [european=>\ctikzset{voltage=european},
+ american=>\ctikzset{voltage=american}]
+
+\processaction
+ [\currentmoduleparameter{current}]
+ [european=>\ctikzset{current=european},
+ american=>\ctikzset{current=american}]
+
+\processaction
+ [\currentmoduleparameter{label}]
+ [straight=>\ctikzset{label/align=straight},
+ align=>\ctikzset{label/align=rotate},
+ smart=>\ctikzset{label/align=smart}]
+
+\processaction
+ [\currentmoduleparameter{resistor}]
+ [european=>\ctikzset{resistor=european},
+ american=>\ctikzset{resistor=american}]
+
+\processaction
+ [\currentmoduleparameter{inductor}]
+ [european=>\ctikzset{inductor=european},
+ american=>\ctikzset{inductor=american},
+ cute=>\ctikzset{inductor=cute}]
+
+\processaction
+ [\currentmoduleparameter{diode}]
+ [ full=>\ctikzset{diode=full},
+ empty=>\ctikzset{diode=empty}]
+
+\processaction
+ [\currentmoduleparameter{logic}]
+ [european=>\ctikzset{logic ports=european},
+ american=>\ctikzset{logic ports=american}]
+
+% hm, we have units since '97 so one can load the units module in mkii or
+% assume it is present (mkiv and therefore lmtx)
+%
+% \processaction
+% [\currentmoduleparameter{siunitx}]
+% [true=>\def\SI #1#2{#1\,#2}
+% \def\ampere {\rm{A}}
+% \def\volt {\rm{V}}
+% \def\ohm {\Omega}
+% \def\siemens {\rm{S}}
+% \def\farad {\rm{F}}
+% \def\henry {\rm{H}}
+% \def\second {\rm{s}}
+% \def\coulomb {\rm{C}}
+% \def\siemens {\rm{S}}
+% \def\radians {\rm{rad}}
+% \def\milli {\rm{m}}
+% \def\micro {\mu}
+% \def\nano {\rm{n}}
+% \def\pico {\rm{p}}
+% \def\kilo {\rm{k}}
+% \def\mega {\rm{M}}
+% \def\giga {\rm{G}}
+% \def\tera {\rm{T}}]
+
+\unprotect
+
+\processaction
+ [\currentmoduleparameter{arrowmos}]
+ [true=>\pgf@circuit@mos@arrowstrue,
+ false=>\pgf@circuit@mos@arrowsfalse]
+
+\protect
+
+\ctikzset{tripoles/op amp/font/.initial=\switchtobodyfont[small]}
+
+\aliased\let\stopcircuitikz\relax
+
+\permanent\protected\def\startcircuitikz#1\stopcircuitikz
+ {\starttikzpicture#1\stoptikzpicture}
+
+\stopmodule
+
+\endinput
diff --git a/tex/context/modules/mkiv/m-tikz.mkiv b/tex/context/modules/mkiv/m-tikz.mkiv
index 536ab554a..221c074ad 100644
--- a/tex/context/modules/mkiv/m-tikz.mkiv
+++ b/tex/context/modules/mkiv/m-tikz.mkiv
@@ -11,86 +11,115 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D A fixed variant of the t-tikz module distributed with tikz. For
-%D practical reasons per 2021 we split the module for \MKIV\ and
-%D \LMTX. (Maybe some day I'll optimize TIKZ a bit.)
+%D A fixed variant of the t-tikz module distributed with tikz. For practical reasons
+%D per 2021 we split the module for \MKIV\ and \LMTX. (Maybe some day I'll optimize
+%D TIKZ a bit.)
+%D
+%D All these t-* modules in the tikz distribution make no sense as we can just load
+%D them here which is way cleaner. There is also some mkii filename mapping going on
+%D that is not needed on todays systems (windows has no 8.3 limitation and on unix
+%D tds finally adopted a case insensitive approach.)
+
+%D Just in case someone does a hard input ...
+
+\ifdefined\pgfdefined \endinput \fi
+\ifdefined\pgfcoredefined\endinput \fi
+
+%D ... but normally we end up here:
+
+\startmodule[tikz]
\ifdefined\pdflastxpos \else
\unprotect
- \frozen\overloaded\protected\def\pdflastxpos{\numexpr\clf_lastxpos\relax}
- \frozen\overloaded\protected\def\pdflastypos{\numexpr\clf_lastypos\relax}
+ \unexpanded\def\pdflastxpos{\numexpr\clf_lastxpos\relax}
+ \unexpanded\def\pdflastypos{\numexpr\clf_lastypos\relax}
\protect
\fi
-\pushcatcodetable
-
- \setcatcodetable\texcatcodes
-
- \catcode`\@=11
- \catcode`\|=12
- \catcode`\!=12
+\permanent\protected\def\starttikzinput
+ {\pushcatcodetable
+ \setcatcodetable\texcatcodes
+ \catcode`\@=11
+ \catcode`\|=12
+ \catcode`\!=12
+ \relax}
- \input t-pgf.tex
- \input t-pgffor.tex
- \input tikz.code.tex
+\permanent\protected\def\stoptikzinput
+ {\relax
+ \popcatcodetable}
-\popcatcodetable
+\permanent\protected\def\tikzinputfile#1%
+ {\starttikzinput
+ \input{#1}\relax
+ \stoptikzinput}
\permanent\protected\def\tikzerrormessage#1#2#3%
{\writestatus{#1}{#2}}
-\let\starttikzsettings\relax
-\let\stoptikzsettings \relax
+% For now we need this but we need to educate the user to wrap settings in the
+% wrappers. So some day the next line will go. I need to check what commands are
+% possible outside a picture.
+
+\protected\def\starttikzsettings
+ {}
+
+\protected\def\stoptikzsettings
+ {}
\protected\def\starttikzpicture
- {% \dontleavehmode
- \begingroup
+ {\dontleavehmode
+ \hbox\bgroup
\ifdefined\PackageError\else \let\PackageError\tikzerrormessage \fi
\tikzpicture}
-\protected\def\stoptikzpicture
+\permanent\protected\def\stoptikzpicture
{\endtikzpicture
- \endgroup}
-
-% \input t-pgf.tex
-
-\ifx\pgfdefined\undefined
-
- \let\pgfdefined\relax
-
- % \input t-pgfcor.tex
-
- \ifx\pgfcoredefined\undefined
-
- \let\pgfcoredefined=\relax
-
- \input t-pgfsys.tex
-
- \edef\pgfcoreatcode {\the\catcode`\@}
- \edef\pgfcorebarcode {\the\catcode`\|}
- \edef\pgfcoreexclaimcode{\the\catcode`\!}
-
- \catcode`\@=11
- \catcode`\|=12
- \catcode`\!=12
-
- \input pgfcore.code.tex
-
- \catcode`\@=\pgfcoreatcode
- \catcode`\|=\pgfcorebarcode
- \catcode`\!=\pgfcoreexclaimcode
-
- \let\startpgfpicture \pgfpicture \let\stoppgfpicture \endpgfpicture
- \let\startpgfscope \pgfscope \let\stoppgfscope \endpgfscope
- \let\startpgflowlevelscope \pgflowlevelscope \let\stoppgflowlevelscope \endpgflowlevelscope
- \let\startpgfinterruptpath \pgfinterruptpath \let\stoppgfinterruptpath \endpgfinterruptpath
- \let\startpgfinterruptpicture \pgfinterruptpicture \let\stoppgfinterruptpicture \endpgfinterruptpicture
- \let\startpgfinterruptboundingbox\pgfinterruptboundinbox \let\stoppgfinterruptboudingbox\endpgfinterruptboundingbox
-
- \fi
-
- \usepgfmodule[shapes,plot]
-
-\fi
+ \egroup}
+
+\let\pgfdefined \relax
+\let\pgfcoredefined\relax
+
+\tikzinputfile{pgfutil-common.tex}
+\tikzinputfile{pgfutil-context.def}
+\tikzinputfile{pgfrcs.code.tex}
+\tikzinputfile{pgfsys.code.tex}
+\tikzinputfile{pgfkeys.code.tex}
+\tikzinputfile{pgfsyssoftpath.code.tex}
+\tikzinputfile{pgfsysprotocol.code.tex}
+\tikzinputfile{pgfcore.code.tex}
+\tikzinputfile{pgffor.code.tex}
+\tikzinputfile{pgfmoduleplot.code.tex}
+\tikzinputfile{tikz.code.tex}
+
+\let\startpgfpicture \pgfpicture \let\stoppgfpicture \endpgfpicture
+\let\startpgfscope \pgfscope \let\stoppgfscope \endpgfscope
+\let\startpgflowlevelscope \pgflowlevelscope \let\stoppgflowlevelscope \endpgflowlevelscope
+\let\startpgfinterruptpath \pgfinterruptpath \let\stoppgfinterruptpath \endpgfinterruptpath
+\let\startpgfinterruptpicture \pgfinterruptpicture \let\stoppgfinterruptpicture \endpgfinterruptpicture
+\let\startpgfinterruptboundingbox\pgfinterruptboundinbox \let\stoppgfinterruptboudingbox\endpgfinterruptboundingbox
+
+\let\normalusepgfmodule \usepgfmodule
+\let\normalusepgflibrary\usepgflibrary
+
+\unexpanded\def\usepgfmodule {\doifelsenextoptional\dousepgfmoduleyes \dousepgfmodulenop }
+\unexpanded\def\usepgflibrary{\doifelsenextoptional\dousepgflibraryyes\dousepgflibrarynop}
+
+\def\dousepgfmodulenop #1{\dousepgfmoduleyes [#1]}
+\def\dousepgflibrarynop#1{\dousepgflibraryyes[#1]}
+
+\def\dousepgfmoduleyes[#1]%
+ {\starttikzinput
+ \normalusepgfmodule[#1]%
+ \stoptikzinput}
+
+\def\dousepgflibraryyes[#1]%
+ {\starttikzinput
+ \normalusepgflibrary[#1]%
+ \stoptikzinput}
+
+\usepgfmodule[shapes]
+\usepgfmodule[plot]
+\usepgfmodule[matrix]
+\usepgfmodule[decorations]
\stopmodule
diff --git a/tex/context/modules/mkxl/m-circuitikz.mkxl b/tex/context/modules/mkxl/m-circuitikz.mkxl
index 9a105ff09..27ef72642 100644
--- a/tex/context/modules/mkxl/m-circuitikz.mkxl
+++ b/tex/context/modules/mkxl/m-circuitikz.mkxl
@@ -18,11 +18,9 @@
\startmodule[circuitikz]
-\def\pgfcircversion {1.4.4}
-\def\pgfcircversiondate {2021/10/31}
-
\usetikzlibrary[calc]
-\usetikzlibrary[arrows.meta, bending]
+\usetikzlibrary[arrows.meta]
+\usetikzlibrary[bending]
\usetikzlibrary[fpu] % may be needed for use fpu reciprocal (v1.0.1)
\tikzinputfile{pgfcirc.defines.tex}
@@ -41,6 +39,9 @@
\tikzinputfile{pgfcirccurrent.tex}
\tikzinputfile{pgfcircflow.tex}
+\ifdefined\pgfcircversion \else \def\pgfcircversion {0.0.0} \fi
+\ifdefined\pgfcircversiondate \else \def\pgfcircversiondate {1010/01/01} \fi
+
% defaults
\setupmodule
@@ -49,7 +50,7 @@
resistor=american,
inductor=cute,
logic=american,
- siunitx=true,
+ %siunitx=true,
arrowmos=false]
% can be done nicer ... todo
@@ -61,60 +62,60 @@
\processaction
[\currentmoduleparameter{current}]
- [european=>\ctikzset{ current=european},
- american=>\ctikzset{ current=american}]
+ [european=>\ctikzset{current=european},
+ american=>\ctikzset{current=american}]
\processaction
[\currentmoduleparameter{label}]
- [straight=>\ctikzset{label/align = straight},
- align=>\ctikzset{label/align = rotate},
- smart=>\ctikzset{label/align = smart}]
+ [straight=>\ctikzset{label/align=straight},
+ align=>\ctikzset{label/align=rotate},
+ smart=>\ctikzset{label/align=smart}]
\processaction
[\currentmoduleparameter{resistor}]
- [european=>\ctikzset{ resistor=european},
- american=>\ctikzset{ resistor=american}]
+ [european=>\ctikzset{resistor=european},
+ american=>\ctikzset{resistor=american}]
\processaction
[\currentmoduleparameter{inductor}]
- [european=>\ctikzset{ inductor=european},
- american=>\ctikzset{ inductor=american},
- cute=>\ctikzset{ inductor=cute}]
+ [european=>\ctikzset{inductor=european},
+ american=>\ctikzset{inductor=american},
+ cute=>\ctikzset{inductor=cute}]
\processaction
[\currentmoduleparameter{diode}]
- [full=>\ctikzset{ diode=full},
- empty=>\ctikzset{ diode=empty}]
+ [ full=>\ctikzset{diode=full},
+ empty=>\ctikzset{diode=empty}]
\processaction
[\currentmoduleparameter{logic}]
- [european=>\ctikzset{ logic ports=european},
- american=>\ctikzset{ logic ports=american}]
-
-% hm, we have units built in and in mkii one can load the units module
-% ... always been so ...
-
-\processaction
- [\currentmoduleparameter{siunitx}]
- [true=>\def\SI #1#2{#1\,#2}
- \def\ampere {\rm{A}}
- \def\volt {\rm{V}}
- \def\ohm {\Omega}
- \def\siemens {\rm{S}}
- \def\farad {\rm{F}}
- \def\henry {\rm{H}}
- \def\second {\rm{s}}
- \def\coulomb {\rm{C}}
- \def\siemens {\rm{S}}
- \def\radians {\rm{rad}}
- \def\milli {\rm{m}}
- \def\micro {\mu}
- \def\nano {\rm{n}}
- \def\pico {\rm{p}}
- \def\kilo {\rm{k}}
- \def\mega {\rm{M}}
- \def\giga {\rm{G}}
- \def\tera {\rm{T}}]
+ [european=>\ctikzset{logic ports=european},
+ american=>\ctikzset{logic ports=american}]
+
+% hm, we have units since '97 so one can load the units module in mkii or
+% assume it is present (mkiv and therefore lmtx)
+%
+% \processaction
+% [\currentmoduleparameter{siunitx}]
+% [true=>\def\SI #1#2{#1\,#2}
+% \def\ampere {\rm{A}}
+% \def\volt {\rm{V}}
+% \def\ohm {\Omega}
+% \def\siemens {\rm{S}}
+% \def\farad {\rm{F}}
+% \def\henry {\rm{H}}
+% \def\second {\rm{s}}
+% \def\coulomb {\rm{C}}
+% \def\siemens {\rm{S}}
+% \def\radians {\rm{rad}}
+% \def\milli {\rm{m}}
+% \def\micro {\mu}
+% \def\nano {\rm{n}}
+% \def\pico {\rm{p}}
+% \def\kilo {\rm{k}}
+% \def\mega {\rm{M}}
+% \def\giga {\rm{G}}
+% \def\tera {\rm{T}}]
\unprotect
diff --git a/tex/context/modules/mkxl/m-tikz.mkxl b/tex/context/modules/mkxl/m-tikz.mkxl
index df8d44f49..394709c3c 100644
--- a/tex/context/modules/mkxl/m-tikz.mkxl
+++ b/tex/context/modules/mkxl/m-tikz.mkxl
@@ -11,9 +11,23 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D A fixed variant of the t-tikz module distributed with tikz. For
-%D practical reasons per 2021 we split the module for \MKIV\ and
-%D \LMTX. (Maybe some day I'll optimize TIKZ a bit.)
+%D A fixed variant of the t-tikz module distributed with tikz. For practical reasons
+%D per 2021 we split the module for \MKIV\ and \LMTX. (Maybe some day I'll optimize
+%D TIKZ a bit.)
+%D
+%D All these t-* modules in the tikz distribution make no sense as we can just load
+%D them here which is way cleaner. There is also some mkii filename mapping going on
+%D that is not needed on todays systems (windows has no 8.3 limitation and on unix
+%D tds finally adopted a case insensitive approach.)
+
+%D Just in case someone does a hard input ...
+
+\ifdefined\pgfdefined \endinput \fi
+\ifdefined\pgfcoredefined\endinput \fi
+
+%D ... but normally we end up here:
+
+\startmodule[tikz]
\ifdefined\pdflastxpos \else
\unprotect
@@ -26,7 +40,6 @@
{\pushoverloadmode
\pushcatcodetable
\setcatcodetable\texcatcodes
- \unprotect
\catcode`\@=11
\catcode`\|=12
\catcode`\!=12
@@ -34,7 +47,6 @@
\permanent\protected\def\stoptikzinput
{\autoparagraphmode\plusone
- \protect
\popcatcodetable
\popoverloadmode}
@@ -43,10 +55,6 @@
\input{#1}\relax
\stoptikzinput}
-\tikzinputfile{t-pgf.tex}
-\tikzinputfile{t-pgffor.tex}
-\tikzinputfile{tikz.code.tex}
-
\permanent\protected\def\tikzerrormessage#1#2#3%
{\writestatus{#1}{#2}}
@@ -77,37 +85,44 @@
% \popoverloadmode
\egroup}
-\ifx\pgfdefined\undefined
-
- \let\pgfdefined\relax
-
- \ifx\pgfcoredefined\undefined
-
- \let\pgfcoredefined\relax
-
- \tikzinputfile{pgfsys.code.tex}
- \tikzinputfile{pgfsyssoftpath.code.tex}
- \tikzinputfile{pgfsysprotocol.code.tex}
- \tikzinputfile{pgfcore.code.tex}
-
- \let\startpgfpicture \pgfpicture \let\stoppgfpicture \endpgfpicture
- \let\startpgfscope \pgfscope \let\stoppgfscope \endpgfscope
- \let\startpgflowlevelscope \pgflowlevelscope \let\stoppgflowlevelscope \endpgflowlevelscope
- \let\startpgfinterruptpath \pgfinterruptpath \let\stoppgfinterruptpath \endpgfinterruptpath
- \let\startpgfinterruptpicture \pgfinterruptpicture \let\stoppgfinterruptpicture \endpgfinterruptpicture
- \let\startpgfinterruptboundingbox\pgfinterruptboundinbox \let\stoppgfinterruptboudingbox\endpgfinterruptboundingbox
+\let\pgfdefined \relax
+\let\pgfcoredefined\relax
+
+\tikzinputfile{pgfutil-common.tex}
+\tikzinputfile{pgfutil-context.def}
+\tikzinputfile{pgfrcs.code.tex}
+\tikzinputfile{pgfsys.code.tex}
+\tikzinputfile{pgfkeys.code.tex}
+\tikzinputfile{pgfsyssoftpath.code.tex}
+\tikzinputfile{pgfsysprotocol.code.tex}
+\tikzinputfile{pgfcore.code.tex}
+\tikzinputfile{pgffor.code.tex}
+\tikzinputfile{pgfmoduleplot.code.tex}
+\tikzinputfile{tikz.code.tex}
- \fi
+\let\startpgfpicture \pgfpicture \let\stoppgfpicture \endpgfpicture
+\let\startpgfscope \pgfscope \let\stoppgfscope \endpgfscope
+\let\startpgflowlevelscope \pgflowlevelscope \let\stoppgflowlevelscope \endpgflowlevelscope
+\let\startpgfinterruptpath \pgfinterruptpath \let\stoppgfinterruptpath \endpgfinterruptpath
+\let\startpgfinterruptpicture \pgfinterruptpicture \let\stoppgfinterruptpicture \endpgfinterruptpicture
+\let\startpgfinterruptboundingbox\pgfinterruptboundinbox \let\stoppgfinterruptboudingbox\endpgfinterruptboundingbox
- \let\normalusepgfmodule\usepgfmodule
+\let\normalusepgfmodule\usepgfmodule
+\let\normalusepgflibrary\usepgflibrary
- \protected\def\usepgfmodule[#1]%
- {\starttikzinput
- \normalusepgfmodule[#1]%
- \stoptikzinput}
+\tolerant\protected\def\usepgfmodule[#1]#;#2% somehow both variants are used
+ {\starttikzinput
+ \normalusepgfmodule[#1#2]%
+ \stoptikzinput}
- \usepgfmodule[shapes,plot]
+\tolerant\protected\def\usepgflibrary[#1]#;#2% somehow both variants are used
+ {\starttikzinput
+ \normalusepgflibrary[#1#2]%
+ \stoptikzinput}
-\fi
+\usepgfmodule[shapes]
+\usepgfmodule[plot]
+\usepgfmodule[matrix]
+\usepgfmodule[decorations]
\stopmodule
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 2427e3389..f3e33db69 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 2021-12-10 11:29
+-- merge date : 2021-12-14 19:16
do -- begin closure to overcome local limits and interference