ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* underbrace under matrix
@ 2022-08-05  0:00 Jethro Djan via ntg-context
  2022-08-05  5:03 ` Mikael Sundqvist via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Jethro Djan via ntg-context @ 2022-08-05  0:00 UTC (permalink / raw)
  To: ntg-context; +Cc: Jethro Djan

Hello,

I want to get underbraces under matrices in a math alignment environment. I’ve reproduced my problem here:

 \definemathmatrix                                                                 
   [pmatrix]                                                                       
   [left={\left(\,},right={\,\right)}]           
                                  
 \starttext                                                                                                                                                           
 \placeformula[-]\startformula\startmathalignment                                  
   \NC\                                                                            
   A \NC=\underbrace{                                                              
   \startpmatrix                                                                   
     \NC 5\NC 5\NR                                                                 
     \NC -1\NC 7\NR                                                                
   \stoppmatrix}\NR                                                                
   \NC\NC=\underbrace{                                                             
   \startpmatrix                                                                   
     \NC 2\NC 1\NR                                                                 
     \NC 4\NC 2\NR                                                                 
  \stoppmatrix}\NR                                                                
 \stopmathalignment\stopformula                                                                                                                                     
  \stoptext      

How can I achieve this?

Jethro
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: underbrace under matrix
  2022-08-05  0:00 underbrace under matrix Jethro Djan via ntg-context
@ 2022-08-05  5:03 ` Mikael Sundqvist via ntg-context
  2022-08-05 15:12   ` Jethro Djan via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Mikael Sundqvist via ntg-context @ 2022-08-05  5:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mikael Sundqvist

On Fri, Aug 5, 2022 at 2:01 AM Jethro Djan via ntg-context
<ntg-context@ntg.nl> wrote:
>
> Hello,
>
> I want to get underbraces under matrices in a math alignment environment. I’ve reproduced my problem here:
>
>  \definemathmatrix
>    [pmatrix]
>    [left={\left(\,},right={\,\right)}]
>
>  \starttext
>  \placeformula[-]\startformula\startmathalignment
>    \NC\
>    A \NC=\underbrace{
>    \startpmatrix
>      \NC 5\NC 5\NR
>      \NC -1\NC 7\NR
>    \stoppmatrix}\NR
>    \NC\NC=\underbrace{
>    \startpmatrix
>      \NC 2\NC 1\NR
>      \NC 4\NC 2\NR
>   \stoppmatrix}\NR
>  \stopmathalignment\stopformula
>   \stoptext
>
> How can I achieve this?
>
> Jethro

Hi Jethro,

Temporary workaround: use the simplecommand.

\definemathmatrix[pmatrix][matrix:parentheses][
simplecommand=pmatrix,
]

\starttext
% \placeformula[-]
\startformula
\startalign
\NC A \NC = \underbrace{\pmatrix{5,5;-1,7}}_{B} \NR
\NC\NC = \underbrace{\pmatrix{2,1;4,2}}_{C} \NR
\stopalign
\stopformula

% \placeformula[-]
\startformula
A \alignhere=
\underbrace{\pmatrix{5,5;-1,7}}_{B}
\breakhere
=
\underbrace{\pmatrix{2,1;4,2}}_{C}
\stopformula
\stoptext

But the code you were using should in principle also work.

/Mikael
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: underbrace under matrix
  2022-08-05  5:03 ` Mikael Sundqvist via ntg-context
@ 2022-08-05 15:12   ` Jethro Djan via ntg-context
  2022-08-05 15:27     ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Jethro Djan via ntg-context @ 2022-08-05 15:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jethro Djan


[-- Attachment #1.1: Type: text/plain, Size: 969 bytes --]

Hello Mikael,

Thanks for your solution; it works just fine. I am not familiar with how you defined the pmatrix. Any links to manuals to learn such definitions? Also, this is the second thing I have tried to adapt from typesetting mathematics in plain TeX that didn’t work. I tried to draw commutative diagrams some time back using \diagram{…} which didn’t work(Got the idea from the book “A beginner’s book of TeX” pg. 161 by Seroul et al ). 

I guess what I am asking is that, what are the limits of what I can use out-of-the-box from Tex when typesetting mathematics? I have read Aditya’s ConTeXt-LaTeX tutorial which is fantastic. But the stuff illustrated there are quite limited. Are there any materials I can read on this?

Thanks for your help.

Jethro



> On 5 Aug 2022, at 5:03 AM, Mikael Sundqvist via ntg-context <ntg-context@ntg.nl> wrote:
> 
> \definemathmatrix[pmatrix][matrix:parentheses][
> simplecommand=pmatrix,
> ]


[-- Attachment #1.2: Type: text/html, Size: 3459 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: underbrace under matrix
  2022-08-05 15:12   ` Jethro Djan via ntg-context
@ 2022-08-05 15:27     ` Hans Hagen via ntg-context
  2022-08-05 15:35       ` Jethro Djan via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen via ntg-context @ 2022-08-05 15:27 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 8/5/2022 5:12 PM, Jethro Djan via ntg-context wrote:
> Hello Mikael,
> 
> Thanks for your solution; it works just fine. I am not familiar with how 
> you defined the pmatrix. Any links to manuals to learn such definitions? 
> Also, this is the second thing I have tried to adapt from typesetting 
> mathematics in plain TeX that didn’t work. I tried to draw commutative 
> diagrams some time back using \diagram{…} which didn’t work(Got the idea 
> from the book “A beginner’s book of TeX” pg. 161 by Seroul et al ).
> 
> I guess what I am asking is that, what are the limits of what I can use 
> out-of-the-box from Tex when typesetting mathematics? I have read 
> Aditya’s ConTeXt-LaTeX tutorial which is fantastic. But the stuff 
> illustrated there are quite limited. Are there any materials I can read 
> on this?
there is an extensive manual coming but you need to give us some time 
(as it goes hand-in-hand with updating / extending some of the math 
machinery)

if you have specific wishes, just let is know and we'll have a look if 
it can somehow fit in

Hans

-----------------------------------------------------------------
                                           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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: underbrace under matrix
  2022-08-05 15:27     ` Hans Hagen via ntg-context
@ 2022-08-05 15:35       ` Jethro Djan via ntg-context
  0 siblings, 0 replies; 5+ messages in thread
From: Jethro Djan via ntg-context @ 2022-08-05 15:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jethro Djan

Hi,

I will wait for the manual. With drawing commutative diagrams, I am sure learning how to use MetaFun/MetaPost better might help.

Thanks for the fantastic work.

Jethro

> On 5 Aug 2022, at 3:27 PM, Hans Hagen via ntg-context <ntg-context@ntg.nl> wrote:
> 
> On 8/5/2022 5:12 PM, Jethro Djan via ntg-context wrote:
>> Hello Mikael,
>> Thanks for your solution; it works just fine. I am not familiar with how you defined the pmatrix. Any links to manuals to learn such definitions? Also, this is the second thing I have tried to adapt from typesetting mathematics in plain TeX that didn’t work. I tried to draw commutative diagrams some time back using \diagram{…} which didn’t work(Got the idea from the book “A beginner’s book of TeX” pg. 161 by Seroul et al ).
>> I guess what I am asking is that, what are the limits of what I can use out-of-the-box from Tex when typesetting mathematics? I have read Aditya’s ConTeXt-LaTeX tutorial which is fantastic. But the stuff illustrated there are quite limited. Are there any materials I can read on this?
> there is an extensive manual coming but you need to give us some time (as it goes hand-in-hand with updating / extending some of the math machinery)
> 
> if you have specific wishes, just let is know and we'll have a look if it can somehow fit in
> 
> Hans
> 
> -----------------------------------------------------------------
>                                          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 / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-05 15:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05  0:00 underbrace under matrix Jethro Djan via ntg-context
2022-08-05  5:03 ` Mikael Sundqvist via ntg-context
2022-08-05 15:12   ` Jethro Djan via ntg-context
2022-08-05 15:27     ` Hans Hagen via ntg-context
2022-08-05 15:35       ` Jethro Djan via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).