Re: [NTG-context] feature request

2019-07-04 Thread 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\cr c\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
___


Re: [NTG-context] feature request

2019-07-04 Thread 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\cr c\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
___


Re: [NTG-context] mapping seeregister command to xml

2019-07-04 Thread Hans Hagen

On 7/4/2019 12:10 PM, Thomas A. Schmitz wrote:

Hi,

I'm having trouble mapping the seeregister command to an xml setup. 
Example (looks somewhat messy, but explains why I need it):

i'll send you a test file off list


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


[NTG-context] mapping seeregister command to xml

2019-07-04 Thread Thomas A. Schmitz

Hi,

I'm having trouble mapping the seeregister command to an xml setup. 
Example (looks somewhat messy, but explains why I need it):


\startbuffer[test]

  This is a test. IGRR 4, 988sort="IGRR4+988" target="TAM 2 677">IGRR 
4+988 = TAM 2, 677sort="TAM2+677">TAM 2+677


\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{#1}{*}{-}

\xmlsetsetup{#1}{document|p|inscription|seeinscription|emph|index}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:document
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:p
\xmlflush{#1} \par
\stopxmlsetups

\startxmlsetups xml:emph
{\em \xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:inscription
\expanded{\inscription[\xmlatt{#1}{sort}]{\xmlflush{#1}}}
\stopxmlsetups

\startxmlsetups xml:seeinscription

\expanded{\seeinscription[\xmlatt{#1}{sort}]{\xmlflush{#1}}{\xmlatt{#1}{target}}}
\stopxmlsetups

\defineregister[inscription][inscriptions]

\setupregister[inscription][pagestyle=,
textstyle=,
location=right,
prefix=none,
indicator=no]

\starttext
\xmlprocessbuffer{main}{test}{}
\blank [line]
\placeregister[inscription]
\stoptext

Maybe my problem is with expansion in index entries? I must admit that I 
haven't really grasped why the \expanded was necessary and what it does...


All best

Thomas
___
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
___