summaryrefslogtreecommitdiff
path: root/tex/context/base
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2007-01-23 13:32:00 +0100
committerHans Hagen <pragma@wxs.nl>2007-01-23 13:32:00 +0100
commit8cb3c59f58c0d69f99c451485eaabcb9f5347372 (patch)
treea360072a833e831832a525d9730e4e61f9fe5847 /tex/context/base
parentff1d9ea45aeb4b9a0bc12a40b38621b6d7e8eed0 (diff)
downloadcontext-8cb3c59f58c0d69f99c451485eaabcb9f5347372.tar.gz
stable 2007.01.23 13:32
Diffstat (limited to 'tex/context/base')
-rw-r--r--tex/context/base/cont-new.tex26
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/lang-sla.tex4
-rw-r--r--tex/context/base/m-gnuplot.tex159
-rw-r--r--tex/context/base/meta-pdf.mkii7
-rw-r--r--tex/context/base/syst-xtx.tex4
-rw-r--r--tex/context/base/type-enc.tex29
-rw-r--r--tex/context/base/x-newmml.tex70
-rw-r--r--tex/context/base/x-newmmo.tex80
-rw-r--r--tex/context/base/x-om2cml.xsl19
-rw-r--r--tex/context/base/xtag-stk.tex2
11 files changed, 179 insertions, 223 deletions
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 8f2e22e5c..930a2e28d 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -13,7 +13,7 @@
% it's about time to clean up this file ...
-\newcontextversion{2007.01.18 12:57}
+\newcontextversion{2007.01.23 13:32}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
@@ -29,6 +29,30 @@
\let\then\relax % \ifnum1>2\then -)
+\chardef\baselinegridmode=0 % option in layout / 1=permit_half_lines
+
+\def\dodosetupwhitespace
+ {\ifgridsnapping
+ \witruimteflexibelfalse
+ \ctxparskip1\ctxparskip
+ \ifdim\ctxparskip>\zeropoint
+ \ifcase\baselinegridmode
+ \ctxparskip\baselineskip % normal ! ! ! ! !!
+ \or
+ \ifdim\scratchdimen=\baselineskip % maybe range
+ \ctxparskip\baselineskip % normal ! ! ! ! !!
+ \else
+ \ctxparskip\numexpr\ctxparskip/\dimexpr.5\lineheight\relax\relax\dimexpr.5\lineheight\relax
+ \fi
+ \else
+ \ctxparskip\baselineskip % normal ! ! ! ! !!
+ \fi
+ \fi
+ \else
+ \ifwitruimteflexibel \else \ctxparskip1\ctxparskip \fi
+ \fi
+ \parskip\ctxparskip}
+
\def\defXMLexpanded#1#2%
{\begingroup
\let\getXMLentity\expandedXMLentity
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index f0fb49d7c..e21d66d43 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -42,7 +42,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2007.01.18 12:57}
+\edef\contextversion{2007.01.23 13:32}
%D For those who want to use this:
diff --git a/tex/context/base/lang-sla.tex b/tex/context/base/lang-sla.tex
index b9749d930..b5a9728ce 100644
--- a/tex/context/base/lang-sla.tex
+++ b/tex/context/base/lang-sla.tex
@@ -170,7 +170,7 @@
\setupheadtext [\s!cz] [\v!content=Obsah]
\setupheadtext [\s!sk] [\v!content=Obsah]
\setupheadtext [\s!hr] [\v!content=Sadr\zcaron aj]
-\setupheadtext [\s!sl] [\v!content=Vsebina]
+\setupheadtext [\s!sl] [\v!content=Kazalo]
\setupheadtext [\s!pl] [\v!tables=Tabele]
\setupheadtext [\s!cz] [\v!tables=Tabulek]
@@ -200,7 +200,7 @@
\setupheadtext [\s!cz] [\v!index=Rejst\rcaron\iacute k]
\setupheadtext [\s!sk] [\v!index=Zoznam]
\setupheadtext [\s!hr] [\v!index=Indeks]
-\setupheadtext [\s!sl] [\v!index=Kazalo]
+\setupheadtext [\s!sl] [\v!index=Stvarno kazalo]
\setupheadtext [\s!pl] [\v!abbreviations=Skr\oacute cenie]
\setupheadtext [\s!cz] [\v!abbreviations=Zkratky]
diff --git a/tex/context/base/m-gnuplot.tex b/tex/context/base/m-gnuplot.tex
deleted file mode 100644
index 5e612257f..000000000
--- a/tex/context/base/m-gnuplot.tex
+++ /dev/null
@@ -1,159 +0,0 @@
-%D \module
-%D [ file=m-gnuplot,
-%D version=2006.01.04,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=\GNUPLOT\ Inclusion,
-%D author={Tobias Burnus, Hans Hagen, Taco Hoekwater, Mojca Miklavec},
-%D date=\currentdate,
-%D copyright=\PRAGMA]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% todo: reuse (only if really needed)
-
-% \enablemode[demo]
-
-%D example:
-%D
-%D \starttyping
-%D texexec --pdf --mode=demo m-gnuplot
-%D \stoptyping
-
-\unprotect
-
-\ifx\operatingsystem\undefined \def\operatingsystem{unix} \fi % texexec will set that
-
-\newcounter\GNUPLOTnumber
-
-\def\startGNUPLOTinclusions
- {\bgroup
- \obeylines
- \catcode`\%=\@@letter
- \dostartGNUPLOTinclusions}
-
-\def\dostartGNUPLOTinclusions#1\stopGNUPLOTinclusions
- {\gdef\GNUPLOTinclusions{#1}%
- \egroup}
-
-\let\GNUPLOTinclusions\empty
-
-\def\startGNUPLOTgraphic#1%
- {\bgroup
- \obeylines
- \catcode`\%=\@@letter
- \dostartGNUPLOTgraphic{#1}}
-
-\def\dostartGNUPLOTgraphic#1#2\stopGNUPLOTgraphic
- {\doglobal\increment\GNUPLOTnumber
- \letgvalue{gpg:n:#1}\GNUPLOTnumber
- \setgvalue{gpg:d:\GNUPLOTnumber}{#2}%
- \egroup}
-
-\def\useGNUPLOTgraphic
- {\dodoubleempty\douseGNUPLOTgraphic}
-
-\def\douseGNUPLOTgraphic[#1][#2]%
- {\iffirstargument
- \@EA\dodouseGNUPLOTgraphic % like \externalfigure[name][optional args]
- \else
- \@EA\redouseGNUPLOTgraphic % like \useMPgraphic{name}
- \fi[#1][#2]}
-
-\def\redouseGNUPLOTgraphic[#1][#2]#3%
- {\dodouseGNUPLOTgraphic[#3][]}
-
-\newtoks\everyGNUPLOTgraphic
-
-% gnuplot only seems to handle lf so we cannot use \mappartolineend
-% also, in order to prevent fuzzy runs (or no runs) we add a ; to
-% each line
-
-\appendtoks
- \obeylines
- \def\obeyedline{;\outputnewlinechar}%
-\to \everyGNUPLOTgraphic
-
-\appendtoks
- \let\%\letterpercent
- \def\ {\letterbackslash\outputnewlinechar}%
-\to \everyGNUPLOTgraphic
-
-\def\dodouseGNUPLOTgraphic[#1][#2]%
- {\bgroup
- \doifdefined{gpg:n:#1}
- {\edef\GNUPLOTnumber{\getvalue{gpg:n:#1}}%
- \edef\GNUPLOTfile {\bufferprefix gnuplot-\GNUPLOTnumber}%
- \bgroup
- \the\everyGNUPLOTgraphic
- \immediate\openout\scratchwrite=\GNUPLOTfile.gpd
- \immediate\write\scratchwrite{set terminal \@@GNUPLOToutput\space\@@GNUPLOToption}%
- \doifnotempty
- {\GNUPLOTinclusions}{\immediate\write\scratchwrite{\GNUPLOTinclusions}}%
- \immediate\write\scratchwrite{set output "\GNUPLOTfile.\@@GNUPLOTsuffix"}%
- \immediate\write\scratchwrite{\getvalue{gpg:d:\GNUPLOTnumber}}%
- \immediate\write\scratchwrite{quit}%
- \immediate\closeout\scratchwrite
- \egroup
- \processGNUPLOTgraphic
- \convertGNUPLOTgraphic
- \externalfigure[\@@GNUPLOTresult][#2]}%
- \egroup}
-
-% we assume pdf inclusion, eps wil be implemented when applicable
-
-\def\setupGNUPLOT
- {\dodoubleempty\getparameters[@@GNUPLOT]}
-
-\def\processGNUPLOTgraphic
- {\doifelse\operatingsystem{mswin}
- {\executesystemcommand{start /MIN pgnuplot \GNUPLOTfile.gpd}} % start is needed else gp fails
- {\executesystemcommand{gnuplot \GNUPLOTfile.gpd}}}
-
-\def\convertGNUPLOTgraphic
- {\doifsomething\@@GNUPLOThandle{\executesystemcommand{\@@GNUPLOThandle}}}
-
-\def\defineGNUPLOThandle#1#2#3#4#5% name output suffix conversion-method result
- {\setvalue{@@GNUPLOT-#1}{{#2}{#3}{#4}{#5}}}
-
-\def\@@GNUPLOToutput{\filterfromvalue{@@GNUPLOT-\@@GNUPLOTmethod}41}
-\def\@@GNUPLOTsuffix{\filterfromvalue{@@GNUPLOT-\@@GNUPLOTmethod}42}
-\def\@@GNUPLOThandle{\filterfromvalue{@@GNUPLOT-\@@GNUPLOTmethod}43}
-\def\@@GNUPLOTresult{\filterfromvalue{@@GNUPLOT-\@@GNUPLOTmethod}44}
-
-\defineGNUPLOThandle{postscript}{postscript}{ps} {texmfstart newpstopdf --method=raw \GNUPLOTfile.ps}{\GNUPLOTfile.pdf}
-\defineGNUPLOThandle{ps} {postscript}{ps} {texmfstart newpstopdf --method=raw \GNUPLOTfile.ps}{\GNUPLOTfile.pdf}
-\defineGNUPLOThandle{pdf} {pdf} {pdf}{} {\GNUPLOTfile.pdf}
-\defineGNUPLOThandle{metapost} {mp} {mp} {texmfstart mptopdf \GNUPLOTfile.mp} {\GNUPLOTfile-0.pdf}
-\defineGNUPLOThandle{mp} {mp} {mp} {texmfstart mptopdf \GNUPLOTfile.mp} {\GNUPLOTfile-0.pdf}
-\defineGNUPLOThandle{png} {png} {png}{} {\GNUPLOTfile.png}
-
-\setupGNUPLOT[\c!method=ps,\c!option=]
-
-\protect \doifnotmode{demo}{\endinput}
-
-\starttext
-
-\startGNUPLOTinclusions
- set title "trigonometry"
-\stopGNUPLOTinclusions
-
-\startGNUPLOTgraphic{sin}
- plot sin(x)
-\stopGNUPLOTgraphic
-
-\startGNUPLOTgraphic{cos}
- plot cos(x)
-\stopGNUPLOTgraphic
-
-\useGNUPLOTgraphic{sin} \endgraf
-\useGNUPLOTgraphic{cos} \endgraf
-\useGNUPLOTgraphic[cos] \endgraf
-
-\setupGNUPLOT[method=ps] \useGNUPLOTgraphic[sin][object=no,height=2cm] \blank
-%setupGNUPLOT[method=pdf] \useGNUPLOTgraphic[sin][object=no,height=2cm] \blank
-\setupGNUPLOT[method=png] \useGNUPLOTgraphic[sin][object=no,height=2cm] \blank
-\setupGNUPLOT[method=mp] \useGNUPLOTgraphic[sin][object=no,height=2cm,option=color] \blank
-
-\stoptext
diff --git a/tex/context/base/meta-pdf.mkii b/tex/context/base/meta-pdf.mkii
index 3060de539..27774b34d 100644
--- a/tex/context/base/meta-pdf.mkii
+++ b/tex/context/base/meta-pdf.mkii
@@ -860,7 +860,7 @@
\resetMPmoveto
\PDFcode{\!MPgMPs1 \!MPgMPs2 \!MPgMPs3 \!MPgMPs4 \!MPgMPs5 \!MPgMPs6 c}%
\or
- \ifx\lastMPmoveX\empty \else % bugged
+ \ifx\lastMPmoveX\empty \else % we assume 0,0 rlineto
\flushMPmoveto
\PDFcode{\!MP\lastMPmoveX\space \!MP\lastMPmoveY\space l S}%
\resetMPmoveto
@@ -891,12 +891,13 @@
\PDFcode{\!MP\a\space\!MP\b\space
\!MP\c\space\!MP\d\space
\!MP\e\space\!MP\f\space c}%
- \or
+ \or % rather mp specific ... rline always has 0,0
\bgroup
\noMPtranslate
\flushMPconcatmoveto
+ % next should be \lastMPmoveX+\a,\lastMPmoveY+\b but we know it's 0,0
+ \PDFcode{\!MP\lastMPmoveX\space\!MP\lastMPmoveY\space l S}%
\resetMPmoveto
- \PDFcode{\!MP\a\space\!MP\b\space l S}%
\egroup
\or
% \flushMPconcatmoveto
diff --git a/tex/context/base/syst-xtx.tex b/tex/context/base/syst-xtx.tex
index 83a28d36d..ad8efa0a6 100644
--- a/tex/context/base/syst-xtx.tex
+++ b/tex/context/base/syst-xtx.tex
@@ -22,8 +22,8 @@
% patch needed for turkish
-\setcclcuc 201C 201C 201C
-\setcclcuc 201D 201D 201D
+\setcclcucx 201C 201C 201C
+\setcclcucx 201D 201D 201D
\ifx\XeTeXuseglyphmetrics\undefined \else
\XeTeXuseglyphmetrics=1
diff --git a/tex/context/base/type-enc.tex b/tex/context/base/type-enc.tex
index c416b3375..bf0145474 100644
--- a/tex/context/base/type-enc.tex
+++ b/tex/context/base/type-enc.tex
@@ -30,39 +30,10 @@
% fallbacks, no math in latin modern
-% \definefontsynonym[lmbsy10] [cmbsy10]
-% \definefontsynonym[lmbsy5] [cmbsy5]
-% \definefontsynonym[lmbsy6] [cmbsy7]
-% \definefontsynonym[lmbsy7] [cmbsy7]
-% \definefontsynonym[lmbsy8] [cmbsy7]
-% \definefontsynonym[lmbsy9] [cmbsy10]
\definefontsynonym[lmdunh10][cmdunh10]
-% \definefontsynonym[lmex10] [cmex10]
-% \definefontsynonym[lmex7] [cmex10]
-% \definefontsynonym[lmex8] [cmex10]
-% \definefontsynonym[lmex9] [cmex10]
\definefontsynonym[lmff10] [cmff10]
\definefontsynonym[lmfi10] [cmfi10]
\definefontsynonym[lmfib8] [cmfib8]
-% \definefontsynonym[lmmi10] [cmmi10]
-% \definefontsynonym[lmmi12] [cmmi12]
-% \definefontsynonym[lmmi5] [cmmi5]
-% \definefontsynonym[lmmi6] [cmmi6]
-% \definefontsynonym[lmmi7] [cmmi7]
-% \definefontsynonym[lmmi8] [cmmi8]
-% \definefontsynonym[lmmi9] [cmmi9]
-% \definefontsynonym[lmmib10] [cmmib10]
-% \definefontsynonym[lmmib5] [cmmib5]
-% \definefontsynonym[lmmib6] [cmmib7]
-% \definefontsynonym[lmmib7] [cmmib7]
-% \definefontsynonym[lmmib8] [cmmib7]
-% \definefontsynonym[lmmib9] [cmmib10]
-% \definefontsynonym[lmsy10] [cmsy10]
-% \definefontsynonym[lmsy5] [cmsy5]
-% \definefontsynonym[lmsy6] [cmsy6]
-% \definefontsynonym[lmsy7] [cmsy7]
-% \definefontsynonym[lmsy8] [cmsy8]
-% \definefontsynonym[lmsy9] [cmsy9]
\definefontsynonym[lmtex10] [cmtex10]
\definefontsynonym[lmtex8] [cmtex8]
\definefontsynonym[lmtex9] [cmtex9]
diff --git a/tex/context/base/x-newmml.tex b/tex/context/base/x-newmml.tex
index 803190ee4..97562daec 100644
--- a/tex/context/base/x-newmml.tex
+++ b/tex/context/base/x-newmml.tex
@@ -439,16 +439,17 @@
[csymbol]
[encoding=text,
definitionURL=]
- {}
+ {\doifsomething{\XMLop{definitionURL}}{\directsetup{mmc:csymbol:apply}}}
\startsetups mmc:csymbol:apply
\begingroup
\startsavingXMLelements
\rawXMLstacktext\plusone % still on stack, no check, just attr test
\stopsavingXMLelements
- % http://www.publisherswhodontcareaboutcosts.com/SomeName
- \doifsetupselse{mmc:csymbol:\XMLpar{csymbol}{definitionURL}{}} {
- \expanded{\endgroup\noexpand\directsetup{mmc:csymbol:\XMLpar{csymbol}{definitionURL}{}}}
+ % http://www.publishers.com/SomeName
+ \lowercasestring\XMLpar{csymbol}{definitionURL}{}\to\mmcSymbolURL
+ \doifsetupselse{mmc:csymbol:} {\mmcSymbolURL} {
+ \expanded{\endgroup\noexpand\directsetup{mmc:csymbol:\mmcSymbolURL}}
} {
% SomeName (fallback)
\splitfilename{\XMLpar{csymbol}{definitionURL}{}}
@@ -880,16 +881,20 @@
\defineXMLcommand [divide] {\directsetup{mmc:divide}}
-\setupMMLappearance [divide] [\c!level=\!!maxcard]
+\setupMMLappearance [divide] [\c!level=\!!maxcard,\c!alternative=\v!a]
\startsetups mmc:divide
\increment\MMLcDIVIDElevel
- \ifnum\MMLcDIVIDElevel>\@@MMLdividelevel\space
+ \doifelse \@@MMLdividealternative\v!b {
\getXMLstackdata\plustwo/\getXMLstackdata\plusthree
- \else
- \MMLcreset
- \frac{\MMLcreset\getXMLstackdata\plustwo}{\MMLcreset\getXMLstackdata\plusthree}%
- \fi
+ } {
+ \ifnum\MMLcDIVIDElevel>\@@MMLdividelevel\space
+ \getXMLstackdata\plustwo/\getXMLstackdata\plusthree
+ \else
+ \MMLcreset
+ \frac{\MMLcreset\getXMLstackdata\plustwo}{\MMLcreset\getXMLstackdata\plusthree}%
+ \fi
+ }
\decrement\MMLcDIVIDElevel
\stopsetups
@@ -2451,6 +2456,11 @@
\let\MMLdoL\donothing
\let\MMLdoR\donothing
+\startsetups mmc:apply:start
+ \begingroup
+ \startsavingXMLelements
+\stopsetups
+
\startsetups mmc:apply:stop
\stopsavingXMLelements
\MMLmathinner {
@@ -2472,9 +2482,11 @@
\doifelse {\getXMLstackname\plusone} {apply} {
% <apply> <apply> ... </apply> <ci> .. </ci> </apply>
\doifelseMMCfunctioninapply \plusone {plus,minus} {
+% [a]
% yet incomplete and rather untested
% <apply> <apply> <minus/> <tan/> <cos/> </apply> <ci>x</ci> </apply>
} {
+% [b]
\MMLcreset
}
\MMLdoL
@@ -2487,17 +2499,21 @@
\MMLdoR
} {
\doifelse {\getXMLstackname\plusone} {fn} {
+% [c]
% \MMLdoL/R are to be taken care of in the next setup
\directsetup{mmc:fn:apply}
} {
\doifelse {\getXMLstackname\plusone} {csymbol} {
% \MMLdoL/R are to be taken care of in the next setup
+% [d]
\directsetup{mmc:csymbol:apply}
} {
\doifelse {\getXMLstackname\plusone} {ci} {
+% [e]
% \MMLdoL/R are to be taken care of in the next setup
\directsetup{mmc:ci:apply}
} {
+% [f]
\MMLdoL
\getXMLstackdata\plusone
\MMLdoR
@@ -2520,43 +2536,55 @@
\doifelse {\getXMLstackname\plusone} {ci} {
\flattenXMLcontent{\getXMLstackdata\plusone}
\doifsetupselse{mmc:fn:\flattenedXMLcontent} {
-% \MMLdoL/MMLdoR to be handled in plugin
+ % \MMLdoL/MMLdoR to be handled in plugin
\global\defXMLstackdata\XMLfnoperator\plusone
\expanded{\endgroup\noexpand\directsetup{mmc:fn:\flattenedXMLcontent}}
} {
\endgroup
\MMLcreset
-\MMLdoL
+ \MMLdoL
\getXMLstackdata\plusone
\ifnum\XMLstacklevel>\plusone
\getXMLentity{NegThinSpace}
\left(\MMLcreset\flushXMLstackwith\plustwo{\MMLseparator,}\right)
\fi
-\MMLdoR
+ \MMLdoR
}
} {
\endgroup
\MMLcreset
-\MMLdoL
+ \MMLdoL
\getXMLstackdata\plusone
-\MMLdoR
+ \MMLdoR
}
\stopsetups
\startsetups mmc:csymbol:apply
\begingroup
- \startsavingXMLelements
- \rawXMLstacktext\plusone % still on stack, no check, just attr test
- \stopsavingXMLelements
+ \defineXMLsave[csymbol][definitionURL=,encoding=]
+ \rawXMLstackdata\plusone % was text % still on stack, no check, just attr test
% \MMLdoL/MMLdoR to be handled in plugin
- \doifsetupselse{mmc:csymbol:\XMLpar{csymbol}{definitionURL}{}} {
- \expanded{\endgroup\noexpand\directsetup{mmc:csymbol:\XMLpar{csymbol}{definitionURL}{}}}
+ \lowercasestring\XMLpar{csymbol}{definitionURL}{}\to\mmcSymbolURL
+ \doifsetupselse{mmc:csymbol:\mmcSymbolURL} {
+ \expanded{\endgroup\noexpand\directsetup{mmc:csymbol:\mmcSymbolURL}}
} {
\endgroup
- \XMLval{mmc:cs}{\XMLop{encoding}}{\firstofoneargument}
+ %\XMLval{mmc:cs}{\XMLop{encoding}}{\firstofoneargument}% fails when no content
+ \XMLval{mmc:cs}{\XMLop{encoding}}{}
}
\stopsetups
+\defineXMLsingular
+ [csymbol]
+ [encoding=text,
+ definitionURL=]
+ {\directsetup{mmc:csymbol:apply:singular}}
+
+\startsetups mmc:csymbol:apply:singular
+ \lowercasestring\XMLpar{csymbol}{definitionURL}{}\to\mmcSymbolURL
+ \directsetup{mmc:csymbol:\mmcSymbolURL}
+\stopsetups
+
\startsetups mmc:ci:apply
\getXMLstackdata\plusone
\ifnum\XMLstacklevel>\plusone
diff --git a/tex/context/base/x-newmmo.tex b/tex/context/base/x-newmmo.tex
index 5e05faae9..2dc5b9009 100644
--- a/tex/context/base/x-newmmo.tex
+++ b/tex/context/base/x-newmmo.tex
@@ -31,7 +31,7 @@
%D
%D \typebuffer \processXMLbuffer
-\startsetups mmc:csymbol:http://www.openmath.org/cd/nums1\string#rational
+\startsetups mmc:csymbol:http://www.openmath.org/cd/nums1\letterhash rational
\MMLcreset
\getXMLstackdata\plustwo/\getXMLstackdata\plusthree
\stopsetups
@@ -48,7 +48,7 @@
%D
%D \typebuffer \processXMLbuffer
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\string#diffquot
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash diffquot
\MMLcreset
\frac {
\Delta\getXMLstackdata\plustwo
@@ -97,7 +97,7 @@
%D
%D \typebuffer \processXMLbuffer
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\string#difference
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash difference
\MMLcreset
\Delta\getXMLstackdata\plustwo
\stopsetups
@@ -114,7 +114,7 @@
%D
%D \typebuffer \processXMLbuffer
-\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\string#diff
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash diff
\MMLcreset
\frac {
\mfunction{\getXMLentity{mathematicald}}\getXMLstackdata\plustwo
@@ -123,4 +123,76 @@
}
\stopsetups
+%D A unit mess.
+
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@second {\mr s}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@minute {\mr m}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@hour {\mr h}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@day {\mr d}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@week {\mr w}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@month {\mr m}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@year {\mr y}\stopsetups
+
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@meter {\mr m}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@gram {\mr g}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@liter {\mr l}\stopsetups
+
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@watt {\mr W}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@pascal {\mr P}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@kelvin {\mr K}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@celsius {\mr C}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@newton {\mr N}\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@byte {\mr B}\stopsetups
+
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@pico {\mr p}\getXMLstackdata\plustwo\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@micro \mu\getXMLstackdata\plustwo\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@milli {\mr m}\getXMLstackdata\plustwo\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@centi {\mr c}\getXMLstackdata\plustwo\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@deci {\mr d}\getXMLstackdata\plustwo\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@deca {\mr d}\getXMLstackdata\plustwo\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@hecto {\mr h}\getXMLstackdata\plustwo\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@kilo {\mr k}\getXMLstackdata\plustwo\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@mega {\mr m}\getXMLstackdata\plustwo\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@giga {\mr g}\getXMLstackdata\plustwo\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_siprefix1@tera {\mr t}\getXMLstackdata\plustwo\stopsetups
+
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash procent \procent\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash promille \promille\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash degree ^\circ\stopsetups
+
+% whatever
+
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash triangle
+ \Delta\,
+\stopsetups
+
+% crap
+
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@degree_celsius
+ \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@celsius}
+\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@degree_kelvin
+ \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@kelvin}
+\stopsetups
+
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@metre
+ \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@meter}
+\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@gramme
+ \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@gram}
+\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@litre
+ \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_metric1@liter}
+\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@calendar_month
+ \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@month}
+\stopsetups
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@calendar_year
+ \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash units_time1@year}
+\stopsetups
+
+\startsetups mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash degree_angle
+ \directsetup{mmc:csymbol:http://www.openmath.org/cd/mathadore\letterhash degree}
+\stopsetups
+
\protect \endinput
diff --git a/tex/context/base/x-om2cml.xsl b/tex/context/base/x-om2cml.xsl
index 4bc181807..570c54bb5 100644
--- a/tex/context/base/x-om2cml.xsl
+++ b/tex/context/base/x-om2cml.xsl
@@ -195,6 +195,13 @@
</xsl:otherwise>
</xsl:choose>
</xsl:when>
+ <xsl:when test="@name='divide'">
+ <xsl:choose>
+ <xsl:when test="../@style='inline'">
+ <xsl:attribute name='alternative'>b</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:when>
<xsl:otherwise>
<!-- forget about it -->
</xsl:otherwise>
@@ -1294,4 +1301,16 @@
</matrix>
</xsl:template>
+ <!-- <OMS cd="units_siprefix1" name="centi" cdbase="mathadore"/> -->
+ <!-- <OMS cd="units_metric1" name="metre" cdbase="mathadore"/> -->
+
+ <xsl:template match="om:OMS[contains(@cd,'units_')]">
+ <csymbol>
+ <xsl:attribute name="definitionURL">
+ <xsl:value-of select="concat(concat(concat(concat(
+ 'http://www.openmath.org/cd/mathadore','#'),@cd),'@'),@name)"/>
+ </xsl:attribute>
+ </csymbol>
+ </xsl:template>
+
</xsl:stylesheet>
diff --git a/tex/context/base/xtag-stk.tex b/tex/context/base/xtag-stk.tex
index 32b2b87df..193b47132 100644
--- a/tex/context/base/xtag-stk.tex
+++ b/tex/context/base/xtag-stk.tex
@@ -100,7 +100,7 @@
{\defXMLstackiddata#1\XMLstackid}
\def\showXMLstacknames
- {\hbox{[\space\dorecurse\XMLstacklevel{\getXMLstackname\recurselevel\space}]}}
+ {\hbox{[\space\dorecurse\XMLstacklevel{\recurselevel:\getXMLstackname\recurselevel\space}]}}
\def\flushXMLstackfrom#1%
{\dostepwiserecurse{#1}\XMLstacklevel\plusone