![](https://secure.gravatar.com/avatar/979fe3921b1d1f005c8156d1a955c28a.jpg?s=120&d=mm&r=g)
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. 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
![](https://secure.gravatar.com/avatar/60f3cc97f94fa3690ba406f8c1a7fc4f.jpg?s=120&d=mm&r=g)
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 ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/60f3cc97f94fa3690ba406f8c1a7fc4f.jpg?s=120&d=mm&r=g)
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 ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/979fe3921b1d1f005c8156d1a955c28a.jpg?s=120&d=mm&r=g)
Hi Henri,
Thanks for your suggestions, they are very instructive.
However, my request is not a smart way of displaying matrices
but to know why \bmatrix and \vmatrix are not provided
in core part of ConTeXt although \pmatrix is provided already
in math-pln.mkiv
About matrices, I first found commands in your first email in
http://dl.contextgarden.net/myway/context-latex-math.pdf
(like \startpmatrix \NC A\NC B\NR \NC C\NC D\NR\stoppmatrix)
and then browsing ma-cb-en.pdf I noticed another command
like \pmatrix{A&B\cr C&D\cr}.
Now by your email, I know a command \pmatrix{A, B; C, D}
One might say ConTeXt is flexible but I've an impression
that ConTeXt is in a state of confusion/disorder.
I think it is better if a standard command is provided
by core ConTeXt or by a module etc.
Or is it ConTeXt way that each user defines his/her own commands
in setup area and uses them in text area?
I'm afraid consistency and/or portability is lost in such scenario.
BTW, I constantly convert Beamer documents into ConTeXt's
simpleslide documents recently and it is very convenient
if I can use \pmatrix{a&b\cr c&d\cr} style because it is similar
to LaTeX documents.
2019年7月3日(水) 15:42 Henri Menke
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
___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/60f3cc97f94fa3690ba406f8c1a7fc4f.jpg?s=120&d=mm&r=g)
The existing definition of \pmatrix in math-pln.mkiv is the original Plain TeX definition, because in the very early days ConTeXt used to be compatible with Plain. This tradition has prevailed until today. You will find other remnants of Plain TeX in ConTeXt, e.g. \eqalign, but it is better not to use them. Just like Plain TeX, ConTeXt does not provide \bmatrix and \vmatrix. One reason is that they didn't exist in Plain, but another important reason is that Hans is not a mathematician. If I remember correctly ConTeXt was originally developed for typesetting of primary school textbooks and last I checked matrix algebra was not part of the curriculum. Other developers (Alan, Aditya, and others) have contributed math typesetting macros over time, but these follow the ConTeXt philosophy of providing strong defaults but trying to avoid feature creep. Therefore bmatrix, vmatrix, etc. are not defined by default, but as you saw from my last message it is trivial to define these, especially because templates (matrix:parentheses, etc.) for them already exist in the core. It would sometimes be nice if you could just copy and paste LaTeX code into a ConTeXt document and it just works™, but after all ConTeXt is not LaTeX. Cheers, Henri On 4/07/19 5:18 PM, Atsuhito Kohda wrote:
Hi Henri, Thanks for your suggestions, they are very instructive. However, my request is not a smart way of displaying matrices but to know why \bmatrix and \vmatrix are not provided in core part of ConTeXt although \pmatrix is provided already in math-pln.mkiv
About matrices, I first found commands in your first email in http://dl.contextgarden.net/myway/context-latex-math.pdf (like \startpmatrix \NC A\NC B\NR \NC C\NC D\NR\stoppmatrix) and then browsing ma-cb-en.pdf I noticed another command like \pmatrix{A&B\cr C&D\cr}. Now by your email, I know a command \pmatrix{A, B; C, D}
One might say ConTeXt is flexible but I've an impression that ConTeXt is in a state of confusion/disorder.
I think it is better if a standard command is provided by core ConTeXt or by a module etc.
Or is it ConTeXt way that each user defines his/her own commands in setup area and uses them in text area? I'm afraid consistency and/or portability is lost in such scenario.
BTW, I constantly convert Beamer documents into ConTeXt's simpleslide documents recently and it is very convenient if I can use \pmatrix{a&b\cr c&d\cr} style because it is similar to LaTeX documents.
2019年7月3日(水) 15:42 Henri Menke
: 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
___________________________________________________________________________________
___________________________________________________________________________________ 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 ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/979fe3921b1d1f005c8156d1a955c28a.jpg?s=120&d=mm&r=g)
Hi Henri, Thanks for your kind explanation. Generally I understand your point and the ConTeXt philosophy.
bmatrix, vmatrix, etc. are not defined by default, but as you saw from my last message it is trivial to define these, especially because templates (matrix:parentheses, etc.) for them already exist in the core.
If it is trivial to define bmatrix etc., then I think
it is not bad to provide them in ConTeXt itself but
it seems it violates the ConTeXt philosophy.
I feel it is too strict or too formalism, but this is
only my, very novice user's, naive impression.
Best regards,
Atsuhito Kohda
PS. I'm a Japanese and it takes a bit long time to write
an idea in English. Sorry for delay.
2019年7月4日(木) 14:48 Henri Menke
The existing definition of \pmatrix in math-pln.mkiv is the original Plain TeX definition, because in the very early days ConTeXt used to be compatible with Plain. This tradition has prevailed until today. You will find other remnants of Plain TeX in ConTeXt, e.g. \eqalign, but it is better not to use them.
Just like Plain TeX, ConTeXt does not provide \bmatrix and \vmatrix. One reason is that they didn't exist in Plain, but another important reason is that Hans is not a mathematician. If I remember correctly ConTeXt was originally developed for typesetting of primary school textbooks and last I checked matrix algebra was not part of the curriculum.
Other developers (Alan, Aditya, and others) have contributed math typesetting macros over time, but these follow the ConTeXt philosophy of providing strong defaults but trying to avoid feature creep. Therefore bmatrix, vmatrix, etc. are not defined by default, but as you saw from my last message it is trivial to define these, especially because templates (matrix:parentheses, etc.) for them already exist in the core.
It would sometimes be nice if you could just copy and paste LaTeX code into a ConTeXt document and it just works™, but after all ConTeXt is not LaTeX.
Cheers, Henri
___________________________________________________________________________________ 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
___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Thu, 4 Jul 2019, Atsuhito Kohda wrote:
Hi Henri, Thanks for your suggestions, they are very instructive. However, my request is not a smart way of displaying matrices but to know why \bmatrix and \vmatrix are not provided in core part of ConTeXt although \pmatrix is provided already in math-pln.mkiv
Henri has already answered this. [ ... ]
One might say ConTeXt is flexible but I've an impression that ConTeXt is in a state of confusion/disorder.
I think it is better if a standard command is provided by core ConTeXt or by a module etc.
Or is it ConTeXt way that each user defines his/her own commands in setup area and uses them in text area? I'm afraid consistency and/or portability is lost in such scenario.
Let me provide an alternative point of view. The commands that you are suggesting are encode the _visual_ meaning: pmatrix is a matrix with parenthesis, bmatrix is a matrix with brackets, vmatrix is a matrix with vertical bars, and so on. One could also use _semantic_ commands: in my documents, I define a command called MATRIX for typesetting matrices, and DET for determinant of a matrix. So, I simply type \MATRIX{1, 2; 5, 6} and \DET{1, 2; 5, 6}, etc. Now, depending on the audience, I sometimes map \MATRIX to pmatrix and sometimes to bmatrix. I can simply copy paste the code without worrying about notation. If you take this view, then the predefined matrix:parentheses, matrix:brackets, and matrix:bars are sufficient.
BTW, I constantly convert Beamer documents into ConTeXt's simpleslide documents recently and it is very convenient if I can use \pmatrix{a&b\cr c&d\cr} style because it is similar to LaTeX documents.
You can create a private module with the definitions that you need. If these are general enough, then you can also release it as a third party module for others to use. I don't see the value of adding (and maintaining!) a module that provides LaTeX compatibility as part of the core. Aditya
![](https://secure.gravatar.com/avatar/6e50a7aa57f5569d881f204f124d96ef.jpg?s=120&d=mm&r=g)
On Thu, 4 Jul 2019 11:16:22 -0400 (EDT)
Aditya Mahajan
BTW, I constantly convert Beamer documents into ConTeXt's simpleslide documents recently and it is very convenient if I can use \pmatrix{a&b\cr c&d\cr} style because it is similar to LaTeX documents.
You can create a private module with the definitions that you need. If these are general enough, then you can also release it as a third party module for others to use. I don't see the value of adding (and maintaining!) a module that provides LaTeX compatibility as part of the core.
LaTeX compatibility is desired (by some) 1) when new to Context, coming from LaTeX and learning a new system; 2) for ConTeXt users who are *required* to sometimes use LaTeX, for example in submissions to journals etc. that accept LaTeX but cannot handle Context sources. One gets over the first case rather quickly and then there is no going back: the philosophies are so different. In the second case, I restrict myself to a strict use of the journal's own template (for example with revtex), never asking for anything more nor anything less. In a third situation of editors who give lip service to accepting TeX submissions, I give them plain text for they are going to re-key in everything in any case. I provide them with a pdf that they can use to correct their markup. Alan
![](https://secure.gravatar.com/avatar/979fe3921b1d1f005c8156d1a955c28a.jpg?s=120&d=mm&r=g)
Hi Alan,
1) when new to Context, coming from LaTeX and learning a new system; ... One gets over the first case rather quickly and then there is no going back: the philosophies are so different.
Hmm, I'll make an effort to be a LaTeX user and also ConTeXt user.
Best regards,
Atsuhito Kohda
2019年7月5日(金) 0:56 Alan Braslau
On Thu, 4 Jul 2019 11:16:22 -0400 (EDT) Aditya Mahajan
wrote: BTW, I constantly convert Beamer documents into ConTeXt's simpleslide documents recently and it is very convenient if I can use \pmatrix{a&b\cr c&d\cr} style because it is similar to LaTeX documents.
You can create a private module with the definitions that you need. If these are general enough, then you can also release it as a third party module for others to use. I don't see the value of adding (and maintaining!) a module that provides LaTeX compatibility as part of the core.
LaTeX compatibility is desired (by some) 1) when new to Context, coming from LaTeX and learning a new system; 2) for ConTeXt users who are *required* to sometimes use LaTeX, for example in submissions to journals etc. that accept LaTeX but cannot handle Context sources.
One gets over the first case rather quickly and then there is no going back: the philosophies are so different.
In the second case, I restrict myself to a strict use of the journal's own template (for example with revtex), never asking for anything more nor anything less.
In a third situation of editors who give lip service to accepting TeX submissions, I give them plain text for they are going to re-key in everything in any case. I provide them with a pdf that they can use to correct their markup.
Alan
___________________________________________________________________________________ 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
___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/979fe3921b1d1f005c8156d1a955c28a.jpg?s=120&d=mm&r=g)
Hi Aditya,
You can create a private module with the definitions that you need. If these are general enough, then you can also release it as a third party module for others to use. I don't see the value of adding (and maintaining!) a module that provides LaTeX compatibility as part of the core.
I began to learn ConTeXt since april and begin to write real
ConTeXt documents (mostly presentations) since june.
Please don't ask me too much.
My main request is not to provide LaTeX compatibility but
to provide not only one command of matrix but full set of commands
for various kind of matrices if possible.
Personally, it is true that I think LaTeX compatibility is useful
but it is not main issue.
Best regards,
Atsuhito Kohda
2019年7月5日(金) 0:18 Aditya Mahajan
On Thu, 4 Jul 2019, Atsuhito Kohda wrote:
Hi Henri, Thanks for your suggestions, they are very instructive. However, my request is not a smart way of displaying matrices but to know why \bmatrix and \vmatrix are not provided in core part of ConTeXt although \pmatrix is provided already in math-pln.mkiv
Henri has already answered this.
[ ... ]
One might say ConTeXt is flexible but I've an impression that ConTeXt is in a state of confusion/disorder.
I think it is better if a standard command is provided by core ConTeXt or by a module etc.
Or is it ConTeXt way that each user defines his/her own commands in setup area and uses them in text area? I'm afraid consistency and/or portability is lost in such scenario.
Let me provide an alternative point of view. The commands that you are suggesting are encode the _visual_ meaning: pmatrix is a matrix with parenthesis, bmatrix is a matrix with brackets, vmatrix is a matrix with vertical bars, and so on. One could also use _semantic_ commands: in my documents, I define a command called MATRIX for typesetting matrices, and DET for determinant of a matrix. So, I simply type
\MATRIX{1, 2; 5, 6} and \DET{1, 2; 5, 6}, etc.
Now, depending on the audience, I sometimes map \MATRIX to pmatrix and sometimes to bmatrix. I can simply copy paste the code without worrying about notation.
If you take this view, then the predefined matrix:parentheses, matrix:brackets, and matrix:bars are sufficient.
BTW, I constantly convert Beamer documents into ConTeXt's simpleslide documents recently and it is very convenient if I can use \pmatrix{a&b\cr c&d\cr} style because it is similar to LaTeX documents.
You can create a private module with the definitions that you need. If these are general enough, then you can also release it as a third party module for others to use. I don't see the value of adding (and maintaining!) a module that provides LaTeX compatibility as part of the core.
Aditya
___________________________________________________________________________________ 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
___________________________________________________________________________________
participants (4)
-
Aditya Mahajan
-
Alan Braslau
-
Atsuhito Kohda
-
Henri Menke