summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkxl
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/modules/mkxl')
-rw-r--r--tex/context/modules/mkxl/m-circuitikz.mkxl89
-rw-r--r--tex/context/modules/mkxl/m-tikz.mkxl87
2 files changed, 96 insertions, 80 deletions
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