* about \startformula\startalign error
@ 2012-07-22 12:21 dalyoung
2012-07-22 13:59 ` Aditya Mahajan
0 siblings, 1 reply; 5+ messages in thread
From: dalyoung @ 2012-07-22 12:21 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 1743 bytes --]
Dear all,
In the following sample file, an error occurs in \startformula\startalign ... \stopalign\stopformula.
The similar error occurs if I use \startformula\startmathcases.
but \startmatrix works well.
Did I do something wrong?
Thank you for reading.
Best regards,
Dalyoung
%%%%%%%%%%%%%%
\starttext
\starttable[|c|c|w4cm|w4cm|]
\HL
\NC A \VL B \VL C \VL D \NC\SR
\HL
\NC $x$ \VL \startmatrix
\NC x' = \NC \NR
\NC y' = \NC \NR
\stopmatrix \VL \VL \NC\FR
\HL
\NC $y$ \VL \startformula\startalign
\NC x' = \NC \NR
\NC y' = \NC \NR
\stopalign\stopformula \VL \VL \NC\LR
\HL
\stoptable
\stoptext
%%%%%%%%%%%%
Log file
mtx-context | run 1: luatex --fmt="/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en" --jobname="test1" --lua="/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:input="./test1.tex" --c:kindofrun=1 "cont-yes.mkiv"
This is LuaTeX, Version beta-0.70.2-2012052309 (TeX Live 2012)
...
...
fonts > fallback modern rm 12pt is loaded
! Missing } inserted.
system > tex > error on line 16 in file test1.tex: Missing ...
6 \starttable[|c|c|w4cm|w4cm|]
7 \HL
8 \NC A \VL B \VL C \VL D \NC\SR
9 \HL
10 \NC $x$ \VL \startmatrix
11 \NC x' = \NC \NR
12 \NC y' = \NC \NR
13 \stopmatrix \VL \VL \NC\FR
14 \HL
15 \NC $y$ \VL \startformula\startalign
16 >> \NC x' = \NC \NR
17 \NC y' = \NC \NR
18 \stopalign\stopformula \VL \VL \NC\LR
19 \HL
20 \stoptable
<inserted text>
}
<to be read again>
\halign
\math_both_eqalign_no_aligned ...fi \fi #1\halign
\ifcase \eqalignmode \or t...
<to be read again>
\NC
l.16 \NC
x' = \NC \NR
? x
mkiv lua stats > used config file
[-- Attachment #1.2: Type: text/html, Size: 9669 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: about \startformula\startalign error
2012-07-22 12:21 about \startformula\startalign error dalyoung
@ 2012-07-22 13:59 ` Aditya Mahajan
0 siblings, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2012-07-22 13:59 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 2012-07-22, at 8:21 AM, dalyoung <haksan@me.com> wrote:
> Dear all,
>
> In the following sample file, an error occurs in \startformula\startalign ... \stopalign\stopformula.
> The similar error occurs if I use \startformula\startmathcases.
>
> but \startmatrix works well.
>
> Did I do something wrong?
>
> Thank you for reading.
>
> Best regards,
>
> Dalyoung
>
> %%%%%%%%%%%%%%
> \starttext
> \starttable[|c|c|w4cm|w4cm|]
> \HL
> \NC A \VL B \VL C \VL D \NC\SR
> \HL
> \NC $x$ \VL \startmatrix
> \NC x' = \NC \NR
> \NC y' = \NC \NR
> \stopmatrix \VL \VL \NC\FR
> \HL
> \NC $y$ \VL \startformula\startalign
> \NC x' = \NC \NR
> \NC y' = \NC \NR
> \stopalign\stopformula \VL \VL \NC\LR
> \HL
> \stoptable
> \stoptext
> %%%%%%%%%%%
\startformula must occur inside a vbox. So, use a matrix environment as you are doing, or wrap the formula inside a \framed[align=normal].
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: about \startformula\startalign error
[not found] <mailman.103.1343035435.2216.ntg-context@ntg.nl>
@ 2012-07-23 22:55 ` dalyoung
0 siblings, 0 replies; 5+ messages in thread
From: dalyoung @ 2012-07-23 22:55 UTC (permalink / raw)
To: ntg-context
Dear Aditya,
Using "\framed[]{}", I got a good output.
As you said, it might be better to define a macro for it.
Thank you.
Best regards,
Dalyoung
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: about \startformula\startalign error
2012-07-22 22:21 ` dalyoung
@ 2012-07-23 1:30 ` Aditya Mahajan
0 siblings, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2012-07-23 1:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Mon, 23 Jul 2012, dalyoung wrote:
> I have two more questions.
>
> 1. In the output of the following code, 'x' in the first column is
> vertically centered, but matrix in the second column is not(located at
> top). What option can solve this?
Normally matrices are centered on the math axis (and their location can be
controlled by location=(low|lohi|high) keys, but for some reason that is
not working in a table.
> \starttable[|c|c|w4cm|w4cm|]
The normal syntax is w(4cm) ...
> \HL
> \NC A \VL B \VL C \VL D \NC\SR
> \HL
> \NC $x$ \VL \startmatrix
> \NC x' = \NC \NR
> .\NC y' = \NC \NR
> \stopmatrix \VL \VL \NC\SR
The matrix should be in math mode $\startmatrix ... \stopmatrix$
> \HL
> \stoptable
>
>
> 2. In the output of the following code, the matrix in the second column is vertically centered, but 'x' in the first column is located at the bottom.
>
> \starttext
> \starttable[|c|c|w4cm|w4cm|]
> \HL
> \NC A \VL B \VL C \VL D \NC\SR
> \HL
> \NC $y$ \VL {\framed[frame=off, align=normal]{\startformula\startalign
> \NC x' = \NC \NR
> \NC y' = \NC \NR
> \stopalign\stopformula}} \VL \VL \NC\LR
> \HL
> \stoptable
> \stoptext
>
> Both of them are good for compiling, but need a slight touch.
Use the \frame aligning options (better to hide this in a macro):
\starttext
\starttable[|c|c|]
\HL
\NC A \VL B \VL \SR
\HL
\NC $x$ \VL \framed[frame=no,height=fit, strut=no,
location=lohi,align=normal]{
\setupformula[spacebefore=,spaceafter=]
\startformula \startalign
\NC x' \NR
\NC y' \NR
\stopalign \stopformula} \VL \SR
\HL
\stoptable
\stoptext
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: about \startformula\startalign error
[not found] <mailman.91.1342972474.2216.ntg-context@ntg.nl>
@ 2012-07-22 22:21 ` dalyoung
2012-07-23 1:30 ` Aditya Mahajan
0 siblings, 1 reply; 5+ messages in thread
From: dalyoung @ 2012-07-22 22:21 UTC (permalink / raw)
To: ntg-context
Dear Aditya,
> \startformula must occur inside a vbox. So, use a matrix environment as you are doing, or wrap the formula inside a \framed[align=normal].
>
Thank you for your solution.
\framed[frame=off,align=normal]{\startformula\startalign ... \stopalign\stopformula}
is working.
I have two more questions.
1. In the output of the following code, 'x' in the first column is vertically centered, but matrix in the second column is not(located at top). What option can solve this?
\starttable[|c|c|w4cm|w4cm|]
\HL
\NC A \VL B \VL C \VL D \NC\SR
\HL
\NC $x$ \VL \startmatrix
\NC x' = \NC \NR
\NC y' = \NC \NR
\stopmatrix \VL \VL \NC\SR
\HL
\stoptable
2. In the output of the following code, the matrix in the second column is vertically centered, but 'x' in the first column is located at the bottom.
\starttext
\starttable[|c|c|w4cm|w4cm|]
\HL
\NC A \VL B \VL C \VL D \NC\SR
\HL
\NC $y$ \VL {\framed[frame=off, align=normal]{\startformula\startalign
\NC x' = \NC \NR
\NC y' = \NC \NR
\stopalign\stopformula}} \VL \VL \NC\LR
\HL
\stoptable
\stoptext
Both of them are good for compiling, but need a slight touch.
Would you please tell me how to set all columns vertical centered?
Best regards,
Dalyoung
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-23 22:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-22 12:21 about \startformula\startalign error dalyoung
2012-07-22 13:59 ` Aditya Mahajan
[not found] <mailman.91.1342972474.2216.ntg-context@ntg.nl>
2012-07-22 22:21 ` dalyoung
2012-07-23 1:30 ` Aditya Mahajan
[not found] <mailman.103.1343035435.2216.ntg-context@ntg.nl>
2012-07-23 22:55 ` dalyoung
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).