On 3/07/19 6:00 PM, Atsuhito Kohda wrote:
I've used LaTeX quite a long time but recently I begin to use ConTeXt too. So I'm very sorry if the following is well-known issue.
I find an example of \pmatrix in p.21 of "ConTeXt Mark IV an excursion" (ma-cb-en.pdf). And I notice it is defined in /usr/share/texmf/tex/context/base/mkiv/math-pln.mkiv (in Debian). But it seems \bmatrix, \vmatrix are not defined yet. Is there any reason why they are not defined? Similar commands or environments \begin{bmatrix}...\end{bmatrix}, \begin{vmatrix}...\end{vmatrix} are very often used in mathematical LaTeX documents. It is very useful if we can use \bmatrix and \vmatrix in ConTeXt documents, so please add \unexpanded\def\bmatrix#1% {\left[\matrix{#1}\right]} \unexpanded\def\vmatrix#1% {\left|\matrix{#1}\right|} in math-pln.mkiv or somewhere.
\definemathmatrix [pmatrix] [left={\left(},right={\right)}] \definemathmatrix [bmatrix] [left={\left[},right={\right]}] \definemathmatrix [vmatrix] [left={\left\lvert},right={\right\rvert}] \definemathmatrix [Vmatrix] [left={\left\lVert},right={\right\rVert}] \starttext \startformula \startpmatrix \NC A \NC B \NR \NC C \NC D \NR \stoppmatrix \quad \startbmatrix \NC A \NC B \NR \NC C \NC D \NR \stopbmatrix \quad \startvmatrix \NC A \NC B \NR \NC C \NC D \NR \stopvmatrix \quad \startVmatrix \NC A \NC B \NR \NC C \NC D \NR \stopVmatrix \stopformula \stoptext
By the way, I think it is critical to set \setupmathematics[ampersand=normal]
This should not be necessary in general. Just use \NC and \NR.
to use \matrix above but I can't find this setting in ma-cb-en.pdf It is great if this is added in ma-cb-en.pdf
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________