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.

Ignore my other message, this is even better:

\definemathmatrix
  [pmatrix]
  [matrix:parentheses]
  [simplecommand=pmatrix]
 
\definemathmatrix
  [bmatrix]
  [matrix:brackets]
  [simplecommand=bmatrix]

\definemathmatrix
  [vmatrix]
  [matrix:bars]
  [simplecommand=vmatrix]

\definemathmatrix
  [Vmatrix]
  [left={\left\lVert\mskip\thinmuskip},
   right={\mskip\thinmuskip\right\rVert},
   align=middle,
   simplecommand=Vmatrix]

\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

\startformula
    \pmatrix{A, B; C, D}
    \quad 
    \bmatrix{A, B; C, D}
    \quad 
    \vmatrix{A, B; C, D}
    \quad 
    \Vmatrix{A, B; C, D}
\stopformula

\stoptext

> 
> By the way, I think it is critical to set
> \setupmathematics[ampersand=normal]
> 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
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to