[NTG-context] feature request

Aditya Mahajan adityam at umich.edu
Thu Jul 4 17:16:22 CEST 2019


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



More information about the ntg-context mailing list