Re: [NTG-context] about \startformula\startalign error
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
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
participants (2)
-
Aditya Mahajan
-
dalyoung