summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-12-09 17:49:23 +0000
committerKarl Berry <karl@freefriends.org>2008-12-09 17:49:23 +0000
commit0ea10de1f23093bf6811f9fc7d6c72c13e7d8de7 (patch)
tree4844d288cebb83c52f439b2317367118ab08570d /Master/texmf-dist/tex
parent8cb97eed37c55304b594dbb55b3ad549586800f1 (diff)
context-mathsets update (8dec08)
git-svn-id: svn://tug.org/texlive/trunk@11566 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/context/third/mathsets/t-mathsets.tex40
1 files changed, 34 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/context/third/mathsets/t-mathsets.tex b/Master/texmf-dist/tex/context/third/mathsets/t-mathsets.tex
index d12a97deb31..70ab264027e 100644
--- a/Master/texmf-dist/tex/context/third/mathsets/t-mathsets.tex
+++ b/Master/texmf-dist/tex/context/third/mathsets/t-mathsets.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=t-mathsets,
-%D version=2008-07-03,
+%D version=2008-12-06,
%D title=Math Sets,
%D subtitle=\CONTEXT\ port of \filename{braket.sty},
%D author={Aditya Mahajan},
@@ -229,14 +229,21 @@
{\begingroup
\def\currentmathset{#1}
\edef\currentmathsetgrouplevel{\the\numexpr\currentgrouplevel+2\relax}
- \mathcode`\|32768
- \let|\mathsetmiddle
+ % Not here, else messes subscripts
+ % \mathcode`\|32768
+ % \let|\mathsetmiddle
\doifelsenothing{\mathsetparameter\c!text}
{\dodododefinemathset!notext}
{\doifelse{\mathsetparameter\c!text}{\v!no}
{\dodododefinemathset!notext}
{\docapturemathoplimits\dodododefinemathset!text}}}
+
+\def\setmathmiddle
+ {\mathcode`\|32768
+ \let|\mathsetmiddle}
+
+
%D \type|\docapturemathoplimits| is to capture limits that may follow
%D the text command. This allows the following to work
%D
@@ -249,9 +256,23 @@
%D \typebuffer
%D
%D \getbuffer[PR] \getbuffer
+%D We need to be a bit careful not to activate \type{|} to soon, as it can also
+%D occur in sub- and superscripts. For example
+%D \startbuffer
+%D \startformula
+%D \EXP_{X|Y}{f(X) | Y = y}
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D gives
+%D
+%D \getbuffer[EXP] \getbuffer
\def\dodododefinemathset!notext#1%
- {\mathopen{}\left\mathsetparameter\c!left
+ {\setmathmiddle
+ \mathopen{}\left\mathsetparameter\c!left
{#1}%
\right\mathsetparameter\c!right\mathclose{}%
\endgroup}
@@ -260,6 +281,7 @@
\def\dodododefinemathset!text#1#2%
{\mathop{\kern\zeropoint\mathsetparameter\c!text}\nolimits#1%
+ \setmathmiddle
\left\mathsetparameter\c!left
{#2}%
\right\mathsetparameter\c!right%
@@ -371,10 +393,16 @@
\definemathset[mathset]
-%D \section Changelog
+%D \section Change log
%D
%D \startitemize[n, reverse][headstyle=bold]
%D
+%D \head \date[d=6,m=12,y=2008]
+%D
+%D Defined a new macro \type{setmathmiddle}. Now \type{|} is made active after
+%D the subscripts, so that things still work when \type{|} is used in the
+%D subscripts.
+%D
%D \head \date[d=3,m=7,y=2008]
%D
%D Added \type{text=no} option, included an interface file, and cleaned up the
@@ -384,7 +412,7 @@
%D
%D Added \type|\docapturemathoplimits| macro. This prevents a
%D serious bug in the previous version, due to which things like
-%D \type{\mathset_{..}} did not work.
+%D \type{\mathset_{...}} did not work.
%D
%D \head \date[d=11,m=4,y=2007]
%D