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?
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
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
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
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 -----------------------------------------------------------------
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<
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<
> and \type< > 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
participants (4)
-
Aditya Mahajan
-
Bruce H. Wagner
-
David Arnold
-
Hans Hagen