ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Feature Request: mathmatrix enhancement
@ 2006-03-21  1:43 Aditya Mahajan
  2006-03-21 13:48 ` Taco Hoekwater
  2006-03-21 15:44 ` Taco Hoekwater
  0 siblings, 2 replies; 5+ messages in thread
From: Aditya Mahajan @ 2006-03-21  1:43 UTC (permalink / raw)


Hi,

Is it possible to have allow math matrix column alignments to be 
configurable, on the lines of align={left,left} of \startalign.
I want to be albe to say

\startformula
  \startmatrix[align={right,left}]
   \NC x \NC = a + d \NR
   \NC y \NC = d     \NR
  \stopmatrix
\stopformula

to give me
  x = a + d
  y = d

This is a contrived example. The actual equation that I want to type 
is

\startformula
   \text{Let }{\cal R} = \bigcup_{P_{X_1},P_{X_2}} \left\{
   (R_1, R_2) :
   \startmatrix[distance=0.1em]
     \NC \hfill R_1       \NC < I(X_1 ; Y \mid X_2) \hfill \NR
     \NC \hfill R_2       \NC < I(X_2 ; Y \mid X_1) \hfill \NR
     \NC \hfill R_1 + R_2 \NC < I(X_1,X_2 ; Y) \hfill      \NR
   \stopmatrix\right\}
\stopformula

All these manual hfills look ugly.

Is matrix the wrong way to go about this? Should we rather have a 
aligned environment like amsmath? Or is there a simple alternative 
that I have overlooked?


Thanks
Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

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

* Re: Feature Request: mathmatrix enhancement
  2006-03-21  1:43 Feature Request: mathmatrix enhancement Aditya Mahajan
@ 2006-03-21 13:48 ` Taco Hoekwater
  2006-03-21 15:44 ` Taco Hoekwater
  1 sibling, 0 replies; 5+ messages in thread
From: Taco Hoekwater @ 2006-03-21 13:48 UTC (permalink / raw)




Aditya Mahajan wrote:
> Hi,
> 
> Is it possible to have allow math matrix column alignments to be 
> configurable, on the lines of align={left,left} of \startalign.
> I want to be albe to say
> 
>   \startmatrix[align={right,left}]

Ok, I'm on it.

Taco

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

* Re: Feature Request: mathmatrix enhancement
  2006-03-21  1:43 Feature Request: mathmatrix enhancement Aditya Mahajan
  2006-03-21 13:48 ` Taco Hoekwater
@ 2006-03-21 15:44 ` Taco Hoekwater
  2006-03-21 16:05   ` Aditya Mahajan
  2006-03-27 12:47   ` Hans Hagen
  1 sibling, 2 replies; 5+ messages in thread
From: Taco Hoekwater @ 2006-03-21 15:44 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]


Hi,

See attachment. The final value of the "align=" list is repeated
for any leftover columns, and align=middle is default, of course.

Cheers, taco

PS The alignment preamble uses \hskip instead of \tabskip, because
that was the only solution I could find that does all intercolumn
spacing correct while still allowing endlessly repeating columns.

Aditya Mahajan wrote:
> Hi,
> 
> Is it possible to have allow math matrix column alignments to be 
> configurable, on the lines of align={left,left} of \startalign.
> I want to be albe to say
> 
> \startformula
>   \startmatrix[align={right,left}]
>    \NC x \NC = a + d \NR
>    \NC y \NC = d     \NR
>   \stopmatrix
> \stopformula
> 
> to give me
>   x = a + d
>   y = d
> 
> This is a contrived example. The actual equation that I want to type 
> is
> 
> \startformula
>    \text{Let }{\cal R} = \bigcup_{P_{X_1},P_{X_2}} \left\{
>    (R_1, R_2) :
>    \startmatrix[distance=0.1em]
>      \NC \hfill R_1       \NC < I(X_1 ; Y \mid X_2) \hfill \NR
>      \NC \hfill R_2       \NC < I(X_2 ; Y \mid X_1) \hfill \NR
>      \NC \hfill R_1 + R_2 \NC < I(X_1,X_2 ; Y) \hfill      \NR
>    \stopmatrix\right\}
> \stopformula
> 
> All these manual hfills look ugly.
> 
> Is matrix the wrong way to go about this? Should we rather have a 
> aligned environment like amsmath? Or is there a simple alternative 
> that I have overlooked?
> 
> 
> Thanks
> Aditya
> 

[-- Attachment #2: mat.tex --]
[-- Type: application/x-tex, Size: 3520 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: Feature Request: mathmatrix enhancement
  2006-03-21 15:44 ` Taco Hoekwater
@ 2006-03-21 16:05   ` Aditya Mahajan
  2006-03-27 12:47   ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2006-03-21 16:05 UTC (permalink / raw)


> See attachment. The final value of the "align=" list is repeated
> for any leftover columns, and align=middle is default, of course.
>
> Cheers, taco

Thanks a lot! Works perfectly.

Aditya


>
> PS The alignment preamble uses \hskip instead of \tabskip, because
> that was the only solution I could find that does all intercolumn
> spacing correct while still allowing endlessly repeating columns.
>
> Aditya Mahajan wrote:
>> Hi,
>> 
>> Is it possible to have allow math matrix column alignments to be 
>> configurable, on the lines of align={left,left} of \startalign.
>> I want to be albe to say
>> 
>> \startformula
>>   \startmatrix[align={right,left}]
>>    \NC x \NC = a + d \NR
>>    \NC y \NC = d     \NR
>>   \stopmatrix
>> \stopformula
>> 
>> to give me
>>   x = a + d
>>   y = d
>> 
>> This is a contrived example. The actual equation that I want to type is
>> 
>> \startformula
>>    \text{Let }{\cal R} = \bigcup_{P_{X_1},P_{X_2}} \left\{
>>    (R_1, R_2) :
>>    \startmatrix[distance=0.1em]
>>      \NC \hfill R_1       \NC < I(X_1 ; Y \mid X_2) \hfill \NR
>>      \NC \hfill R_2       \NC < I(X_2 ; Y \mid X_1) \hfill \NR
>>      \NC \hfill R_1 + R_2 \NC < I(X_1,X_2 ; Y) \hfill      \NR
>>    \stopmatrix\right\}
>> \stopformula
>> 
>> All these manual hfills look ugly.
>> 
>> Is matrix the wrong way to go about this? Should we rather have a aligned 
>> environment like amsmath? Or is there a simple alternative that I have 
>> overlooked?
>> 
>> 
>> Thanks
>> Aditya
>> 
>

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

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

* Re: Feature Request: mathmatrix enhancement
  2006-03-21 15:44 ` Taco Hoekwater
  2006-03-21 16:05   ` Aditya Mahajan
@ 2006-03-27 12:47   ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2006-03-27 12:47 UTC (permalink / raw)


Taco Hoekwater wrote:
>
> Hi,
>
> See attachment. The final value of the "align=" list is repeated
> for any leftover columns, and align=middle is default, of course.
>
> Cheers, taco
>
> PS The alignment preamble uses \hskip instead of \tabskip, because
> that was the only solution I could find that does all intercolumn
> spacing correct while still allowing endlessly repeating columns.
>
> Aditya Mahajan wrote:
>> Hi,
>>
>> Is it possible to have allow math matrix column alignments to be 
>> configurable, on the lines of align={left,left} of \startalign.
>> I want to be albe to say
>>
>> \startformula
>>   \startmatrix[align={right,left}]
>>    \NC x \NC = a + d \NR
>>    \NC y \NC = d     \NR
>>   \stopmatrix
>> \stopformula
>>
>> to give me
>>   x = a + d
>>   y = d
>>
>> This is a contrived example. The actual equation that I want to type is
>>
>> \startformula
>>    \text{Let }{\cal R} = \bigcup_{P_{X_1},P_{X_2}} \left\{
>>    (R_1, R_2) :
>>    \startmatrix[distance=0.1em]
>>      \NC \hfill R_1       \NC < I(X_1 ; Y \mid X_2) \hfill \NR
>>      \NC \hfill R_2       \NC < I(X_2 ; Y \mid X_1) \hfill \NR
>>      \NC \hfill R_1 + R_2 \NC < I(X_1,X_2 ; Y) \hfill      \NR
>>    \stopmatrix\right\}
>> \stopformula
>>
>> All these manual hfills look ugly.
>>
>> Is matrix the wrong way to go about this? Should we rather have a 
>> aligned environment like amsmath? Or is there a simple alternative 
>> that I have overlooked?
>>
>>
>> Thanks
>> Aditya
>>
added

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

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

end of thread, other threads:[~2006-03-27 12:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-21  1:43 Feature Request: mathmatrix enhancement Aditya Mahajan
2006-03-21 13:48 ` Taco Hoekwater
2006-03-21 15:44 ` Taco Hoekwater
2006-03-21 16:05   ` Aditya Mahajan
2006-03-27 12:47   ` Hans Hagen

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).