This is experimental in upcoming beta: \starttext \definemathfence [fancybracket] [bracket] [command=yes,color=blue] test $|x|$ test \par test $||x||$ test (replaced) \par test $a\left|\frac{1}{b}\right|c$ test \par test $a\left||\frac{1}{b}\right||c$ test (kept) \par \startbuffer test $a\fenced[bar]{\frac{1}{b}}c$ test \par test $a\fenced[doublebar]{\frac{1}{b}}c$ test \par test $a\fenced[bracket]{\frac{1}{b}}c$ test \par test $a\fancybracket{\frac{1}{b}}c$ test \par \stopbuffer \getbuffer \setupmathfences [color=red] \getbuffer \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Tue, 19 Feb 2013, Hans Hagen wrote:
This is experimental in upcoming beta:
\starttext
\definemathfence [fancybracket] [bracket] [command=yes,color=blue]
Some feature requests: 1. Can we choose asymmetric fences, for example bra and ket notation in quantum physics: \bra{x} = \lvert x \rangle \ket{x} = \langle x \rvert 2. Add scaling so that \fancybracket{...} = \left\{ ... \right\} 3. Add mathstyle key (I think that we need to slowly add this to all math comamnds) mathstyle=text|display|script|scriptscript|cramped At some stage I'll see if this can replace my old mathsets module. http://modules.contextgarden.net/dl/t-mathsets/doc/context/third/mathsets/ma... Aditya
On 2/19/2013 8:19 PM, Aditya Mahajan wrote:
On Tue, 19 Feb 2013, Hans Hagen wrote:
This is experimental in upcoming beta:
\starttext
\definemathfence [fancybracket] [bracket] [command=yes,color=blue]
Some feature requests:
1. Can we choose asymmetric fences, for example bra and ket notation in quantum physics:
\bra{x} = \lvert x \rangle \ket{x} = \langle x \rvert
by default we have this defined \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] to which I'll add: \definemathfence [angle] [\c!left="003C,\c!right="003E] so, you can define \definemathfence [bra] [left="007C,right="003E,command=yes] \definemathfence [ket] [left="003C,right="007C,command=yes] (the command=yes defines the command) \bra{x} = \lvert x \rangle
2. Add scaling so that
\fancybracket{...} = \left\{ ... \right\}
is already there
3. Add mathstyle key (I think that we need to slowly add this to all math comamnds)
mathstyle=text|display|script|scriptscript|cramped
ok, later as we probably need some adaptive relative mechanism .. basics already there the auto matching code will also be redone Hans -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Aditya Mahajan
-
Hans Hagen