* align question
@ 2006-07-15 5:07 David Arnold
2006-07-15 5:21 ` Aditya Mahajan
0 siblings, 1 reply; 7+ messages in thread
From: David Arnold @ 2006-07-15 5:07 UTC (permalink / raw)
Cc: Bruce Wagner
On another matter, I'm having some alignment issues. Consider the
following code:
\starttext
\startformula
\startalign[n=4,{left, middle, middle, middle}]
aaa&b&cccc&d\\
a&bbb&c&ddd
\stopalign
\stopformula
\stoptext
Compile this and you will notice that the alignment parameters {left,
middle, middle, middle} are ignored. And you can change these to
anything else (left, middle, right), with absolutely no change. Any
idea what is going on here?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: align question
2006-07-15 5:07 align question David Arnold
@ 2006-07-15 5:21 ` Aditya Mahajan
2006-07-15 5:56 ` Bruce H. Wagner
0 siblings, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2006-07-15 5:21 UTC (permalink / raw)
Cc: Bruce Wagner
On Fri, 14 Jul 2006, David Arnold wrote:
> On another matter, I'm having some alignment issues. Consider the
> following code:
>
> \starttext
>
> \startformula
> \startalign[n=4,{left, middle, middle, middle}]
> aaa&b&cccc&d\\
> a&bbb&c&ddd
> \stopalign
> \stopformula
>
> \stoptext
>
> Compile this and you will notice that the alignment parameters {left,
> middle, middle, middle} are ignored. And you can change these to
> anything else (left, middle, right), with absolutely no change. Any
> idea what is going on here?
Wrong syntax. It should be
\startalign[n=4,align={left,....}]
I would strongly suggest to use
\NC aaaa \NC bb \NC d \NR
instead of "raw" & and \\.
Aditya
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: align question
2006-07-15 5:21 ` Aditya Mahajan
@ 2006-07-15 5:56 ` Bruce H. Wagner
2006-07-16 5:36 ` Aditya Mahajan
2006-07-17 9:48 ` Hans Hagen
0 siblings, 2 replies; 7+ messages in thread
From: Bruce H. Wagner @ 2006-07-15 5:56 UTC (permalink / raw)
Cc: mailing list for ConTeXt users, david-arnold
At 10:21 PM -0700 7/14/06, Aditya Mahajan wrote:
>On Fri, 14 Jul 2006, David Arnold wrote:
>
>> On another matter, I'm having some alignment issues. Consider the
>> following code:
>>
>> \starttext
>>
>> \startformula
>> \startalign[n=4,{left, middle, middle, middle}]
>> aaa&b&cccc&d\\
>> a&bbb&c&ddd
>> \stopalign
>> \stopformula
>>
>> \stoptext
>>
> > Compile this and you will notice that the alignment parameters {left,
> > middle, middle, middle} are ignored. And you can change these to
>> anything else (left, middle, right), with absolutely no change. Any
>> idea what is going on here?
>
>Wrong syntax. It should be
>
>\startalign[n=4,align={left,....}]
>
>I would strongly suggest to use
>
>\NC aaaa \NC bb \NC d \NR
>
>instead of "raw" & and \\.
>
>
>Aditya
The "align=" seems to make no difference. In fact, I had tried
including it before.
Also, I'm finding that the {left,middle, middle, middle} parameters
are still ignored when using the Context syntax \NC \NR, as in:
\startformula
\startalign[n=4,align={left, middle, middle, middle}]
\NC aaa\NC b\NC cccc\NC d\NR
\NC a\NC bbb\NC c\NC ddd\NR
\stopalign
\stopformula
Interestingly enough, the alignment is slightly different than I get
when using the LaTeX syntax, but I still can't get alignment to work
correctly.
Incidentally, the reason I am using the LaTeX syntax is that we are
translating LaTeX code into Context automatically using a perl
script, and it's therefore much easier to stick to whatever LaTeX
code works. Basically, I just want something comparable to the array
environment in LaTeX, which works very nicely.
Thanks,
Bruce
--
__________________________________________________________________________
Bruce H. Wagner e-mail: bruce-wagner@redwoods.edu
Department of Mathematics phone: 707-476-4207
College of the Redwoods fax: 707-476-4424
7351 Tompkins Hill Road WWW:
http://online.redwoods.edu/instruct/bwagner
Eureka, CA 95501
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: align question
2006-07-15 5:56 ` Bruce H. Wagner
@ 2006-07-16 5:36 ` Aditya Mahajan
2006-07-17 9:48 ` Hans Hagen
1 sibling, 0 replies; 7+ messages in thread
From: Aditya Mahajan @ 2006-07-16 5:36 UTC (permalink / raw)
Cc: mailing list for ConTeXt users, david-arnold
On Fri, 14 Jul 2006, Bruce H. Wagner wrote:
> At 10:21 PM -0700 7/14/06, Aditya Mahajan wrote:
>> On Fri, 14 Jul 2006, David Arnold wrote:
>>
>>> On another matter, I'm having some alignment issues. Consider the
>>> following code:
>>>
>>> \starttext
>>>
>>> \startformula
>>> \startalign[n=4,{left, middle, middle, middle}]
>>> aaa&b&cccc&d\\
>>> a&bbb&c&ddd
>>> \stopalign
>>> \stopformula
>>>
>>> \stoptext
>>>
>> > Compile this and you will notice that the alignment parameters {left,
>> > middle, middle, middle} are ignored. And you can change these to
>>> anything else (left, middle, right), with absolutely no change. Any
>>> idea what is going on here?
>>
>> Wrong syntax. It should be
>>
>> \startalign[n=4,align={left,....}]
>>
>> I would strongly suggest to use
>>
>> \NC aaaa \NC bb \NC d \NR
>>
>> instead of "raw" & and \\.
>>
>>
>> Aditya
>
>
> The "align=" seems to make no difference. In fact, I had tried including it
> before.
>
> Also, I'm finding that the {left,middle, middle, middle} parameters are still
> ignored when using the Context syntax \NC \NR, as in:
>
> \startformula
> \startalign[n=4,align={left, middle, middle, middle}]
> \NC aaa\NC b\NC cccc\NC d\NR
> \NC a\NC bbb\NC c\NC ddd\NR
> \stopalign
> \stopformula
Strange. This works perfectly here.
> Interestingly enough, the alignment is slightly different than I get when
> using the LaTeX syntax, but I still can't get alignment to work correctly.
Can you send me your context file and pdf offlist?
> Incidentally, the reason I am using the LaTeX syntax is that we are
> translating LaTeX code into Context automatically using a perl script, and
> it's therefore much easier to stick to whatever LaTeX code works. Basically,
> I just want something comparable to the array environment in LaTeX, which
> works very nicely.
There is \startmathmatrix \stopmathmatrix which is equivalent to latex
array environment. This reminds me that I need to update myway on
startalign to include the matrix features.
Aditya
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: align question
2006-07-15 5:56 ` Bruce H. Wagner
2006-07-16 5:36 ` Aditya Mahajan
@ 2006-07-17 9:48 ` Hans Hagen
2006-07-18 15:12 ` Aditya Mahajan
1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2006-07-17 9:48 UTC (permalink / raw)
Cc: david-arnold
Bruce H. Wagner wrote:
>
>
> Incidentally, the reason I am using the LaTeX syntax is that we are
> translating LaTeX code into Context automatically using a perl
> script, and it's therefore much easier to stick to whatever LaTeX
> code works. Basically, I just want something comparable to the array
> environment in LaTeX, which works very nicely.
>
Aditya is in more or less charge of the specification/tryout part of the math extensions and taco/myself implement things based on that input, so i suggest that the two of you come up with specs
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] 7+ messages in thread
* Re: align question
2006-07-17 9:48 ` Hans Hagen
@ 2006-07-18 15:12 ` Aditya Mahajan
2006-07-18 18:40 ` Bruce H. Wagner
0 siblings, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2006-07-18 15:12 UTC (permalink / raw)
Cc: mailing list for ConTeXt users, bruce-wagner, david-arnold
On Mon, 17 Jul 2006, Hans Hagen wrote:
> Bruce H. Wagner wrote:
>>
>>
>> Incidentally, the reason I am using the LaTeX syntax is that we are
>> translating LaTeX code into Context automatically using a perl script, and
>> it's therefore much easier to stick to whatever LaTeX code works.
>> Basically, I just want something comparable to the array environment in
>> LaTeX, which works very nicely.
>>
> Aditya is in more or less charge of the specification/tryout part of the math
> extensions and taco/myself implement things based on that input, so i suggest
> that the two of you come up with specs
Context supports everything that latex array provides, with a slightly
different syntax. Some extract from the update on myway on alignment
(I am still working on it)
% \def\ShowExample
% {\hairline
% \typebuffer
% \hairline
% \getbuffer}
\CONTEXT\ provides \tex{startmatrix} for generic alignment mechanism.
\startbuffer
\startformula
\startmatrix
\NC A \NC B \NC C \NR
\NC a \NC b \NC c \NR
\NC 1 \NC 2 \NC 3 \NR
\stopmatrix
\stopformula
\stopbuffer
\ShowExample
It can take a \type<<left=>> and \type<<right=>> option which can be
used to
typeset matrices
\startbuffer
\startformula
I = \startmatrix[left={\left(\,},right={\,\right)}]
\NC 1 \NC 0 \NC 0 \NR
\NC 0 \NC 1 \NC 0 \NR
\NC 0 \NC 0 \NC 1 \NR
\stopmatrix
\stopformula
\stopbuffer
\ShowExample
It is possible to \tex{definemathmatrix} to use the construct
repeatedly.
\startbuffer
% Paranthesis
\definemathmatrix
[pmatrix]
[left={\left(\,},right={\,\right)}]
% Brackets
\definemathmatrix
[bmatrix]
[left={\left[\,},right={\,\right]}]
% Curly braces
\definemathmatrix
[Bmatrix]
[left={\left\{\,},right={\,\right\}}]
% vertical bars
\definemathmatrix
[vmatrix]
[left={\left\vert\,},right={\,\right\vert}]
% double vertical bars
\definemathmatrix
[Vmatrix]
[left={\left\Vert\,},right={\,\right\Vert}]
\startformula
I = \startpmatrix
\NC 1 \NC 0 \NC 0 \NR
\NC 0 \NC 1 \NC 0 \NR
\NC 0 \NC 0 \NC 1 \NR
\stoppmatrix
= \startbmatrix
\NC 1 \NC 0 \NC 0 \NR
\NC 0 \NC 1 \NC 0 \NR
\NC 0 \NC 0 \NC 1 \NR
\stopbmatrix
= \startBmatrix
\NC 1 \NC 0 \NC 0 \NR
\NC 0 \NC 1 \NC 0 \NR
\NC 0 \NC 0 \NC 1 \NR
\stopBmatrix
\stopformula
\startformula
\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
\stopbuffer
\ShowExample
It is possible to change the alignment of columns using \type{align=}
option.
\startbuffer
\startformula
\text{Let } A = \startpmatrix[align={left,right}]
\NC 1 \NC 2 \NR
\NC 3 \NC -5 \NR
\stoppmatrix
\stopformula
\stopbuffer
\ShowExample
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: align question
2006-07-18 15:12 ` Aditya Mahajan
@ 2006-07-18 18:40 ` Bruce H. Wagner
0 siblings, 0 replies; 7+ messages in thread
From: Bruce H. Wagner @ 2006-07-18 18:40 UTC (permalink / raw)
Cc: mailing list for ConTeXt users, Hans Hagen, Wagner, Bruce,
Arnold, David
Aditya,
Thanks for the information. Since you indicated that \startalign
worked correctly on your system, I decided that I should first check
to see if I had the latest Context. After updating, the problems that
I was having disappeared. So you'll be glad to know that \startalign
does indeed appear to work as it should. Sorry about the false alarm.
I'll try out the \startmatrix options as well to see if those will
fit my needs better for some constructions. Thanks for the detailed
syntax.
---Bruce
At 8:12 AM -0700 7/18/06, Aditya Mahajan wrote:
>On Mon, 17 Jul 2006, Hans Hagen wrote:
>
>> Bruce H. Wagner wrote:
>>>
>>>
>>> Incidentally, the reason I am using the LaTeX syntax is that we are
>>> translating LaTeX code into Context automatically using a perl
>script, and
>>> it's therefore much easier to stick to whatever LaTeX code works.
>>> Basically, I just want something comparable to the array environment
>in
>>> LaTeX, which works very nicely.
>>>
>> Aditya is in more or less charge of the specification/tryout part of
>the math
>> extensions and taco/myself implement things based on that input, so i
>suggest
>> that the two of you come up with specs
>
>Context supports everything that latex array provides, with a slightly
>different syntax. Some extract from the update on myway on alignment
>(I am still working on it)
>
>% \def\ShowExample
>% {\hairline
>% \typebuffer
>% \hairline
>% \getbuffer}
>
>
>\CONTEXT\ provides \tex{startmatrix} for generic alignment mechanism.
>\startbuffer
>\startformula
> \startmatrix
> \NC A \NC B \NC C \NR
> \NC a \NC b \NC c \NR
> \NC 1 \NC 2 \NC 3 \NR
> \stopmatrix
>\stopformula
>\stopbuffer
>\ShowExample
>
>It can take a \type<<left=>> and \type<<right=>> option which can be
>used to
>typeset matrices
>\startbuffer
>\startformula
> I = \startmatrix[left={\left(\,},right={\,\right)}]
> \NC 1 \NC 0 \NC 0 \NR
> \NC 0 \NC 1 \NC 0 \NR
> \NC 0 \NC 0 \NC 1 \NR
> \stopmatrix
>\stopformula
>\stopbuffer
>\ShowExample
>
>It is possible to \tex{definemathmatrix} to use the construct
>repeatedly.
>\startbuffer
>% Paranthesis
>\definemathmatrix
> [pmatrix]
> [left={\left(\,},right={\,\right)}]
>
>% Brackets
>\definemathmatrix
> [bmatrix]
> [left={\left[\,},right={\,\right]}]
>
>% Curly braces
>\definemathmatrix
> [Bmatrix]
> [left={\left\{\,},right={\,\right\}}]
>
>% vertical bars
>\definemathmatrix
> [vmatrix]
> [left={\left\vert\,},right={\,\right\vert}]
>
>% double vertical bars
>\definemathmatrix
> [Vmatrix]
> [left={\left\Vert\,},right={\,\right\Vert}]
>
>\startformula
> I = \startpmatrix
> \NC 1 \NC 0 \NC 0 \NR
> \NC 0 \NC 1 \NC 0 \NR
> \NC 0 \NC 0 \NC 1 \NR
> \stoppmatrix
> = \startbmatrix
> \NC 1 \NC 0 \NC 0 \NR
> \NC 0 \NC 1 \NC 0 \NR
> \NC 0 \NC 0 \NC 1 \NR
> \stopbmatrix
> = \startBmatrix
> \NC 1 \NC 0 \NC 0 \NR
> \NC 0 \NC 1 \NC 0 \NR
> \NC 0 \NC 0 \NC 1 \NR
> \stopBmatrix
>\stopformula
>\startformula
> \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
>\stopbuffer
>\ShowExample
>
>It is possible to change the alignment of columns using \type{align=}
>option.
>\startbuffer
>\startformula
> \text{Let } A = \startpmatrix[align={left,right}]
> \NC 1 \NC 2 \NR
> \NC 3 \NC -5 \NR
> \stoppmatrix
>\stopformula
>\stopbuffer
>\ShowExample
--
__________________________________________________________________________
Bruce H. Wagner e-mail: bruce-wagner@redwoods.edu
Department of Mathematics phone: 707-476-4207
College of the Redwoods fax: 707-476-4424
7351 Tompkins Hill Road WWW:
http://online.redwoods.edu/instruct/bwagner
Eureka, CA 95501
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-07-18 18:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-15 5:07 align question David Arnold
2006-07-15 5:21 ` Aditya Mahajan
2006-07-15 5:56 ` Bruce H. Wagner
2006-07-16 5:36 ` Aditya Mahajan
2006-07-17 9:48 ` Hans Hagen
2006-07-18 15:12 ` Aditya Mahajan
2006-07-18 18:40 ` Bruce H. Wagner
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).