Hi, Minimal example: \definemathmatrix[pmatrix] [left={\left(\,},right={\,\right)}] \starttext Digueu quines de les matrius següents són regulars. Quan ho siguin, trobeu la inversa \startitemize[a,columns,four] \item \startpmatrix[n=2] \NC 2 \NC 3 \NR \NC 6 \NC 7 \NR \stoppmatrix \item \startpmatrix[n=3] \NC 3 \NC 2 \NC 1 \NR \NC 4 \NC 5 \NC 3 \NR \NC 5 \NC 0 \NC -2 \NR \stoppmatrix \item \startpmatrix[n=3] \NC 5 \NC 4 \NC 2 \NR \NC 2 \NC 2 \NC 3 \NR \NC 7 \NC 6 \NC 5 \NR \stoppmatrix \item \startpmatrix[n=4] \NC a \NC 0 \NC 0 \NC 0 \NR \NC 0 \NC b \NC 0 \NC 0 \NR \NC 0 \NC 0 \NC c \NC 0 \NR \NC 0 \NC 0 \NC 0 \NC d \NR \stoppmatrix \stopitemize \stoptext produces misalignment in last item (I attach pdf) Can anyone confirm that? Thanks, Xan
Looks like a bug; adding blank rows works around the problem (but looks terrible): \definemathmatrix[pmatrix] [left={\left(\,},right={\,\right)}] \starttext Digueu quines de les matrius següents són regulars. Quan ho siguin, trobeu la inversa \startitemize[a,columns,four] \item \startpmatrix[n=4] \NC \NR \NC 2 \NC 3 \NR \NC 6 \NC 7 \NR \NC \NR \stoppmatrix \item \startpmatrix[n=4] \NC 3 \NC 2 \NC 1 \NR \NC 4 \NC 5 \NC 3 \NR \NC 5 \NC 0 \NC -2 \NR \NC \stoppmatrix \item \startpmatrix[n=4] \NC 5 \NC 4 \NC 2 \NR \NC 2 \NC 2 \NC 3 \NR \NC 7 \NC 6 \NC 5 \NR \NC \stoppmatrix \item \startpmatrix[n=4] \NC a \NC 0 \NC 0 \NC 0 \NR \NC 0 \NC b \NC 0 \NC 0 \NR \NC 0 \NC 0 \NC c \NC 0 \NR \NC 0 \NC 0 \NC 0 \NC d \NR \stoppmatrix \stopitemize \stoptext
On 10/7/2014 8:06 PM, Thangalin wrote:
Looks like a bug; adding blank rows works around the problem (but looks terrible):
\definemathmatrix[pmatrix] [left={\left(\,},right={\,\right)}]
\starttext Digueu quines de les matrius següents són regulars. Quan ho siguin, trobeu la inversa
\startitemize[a,columns,four] \item \startpmatrix[n=4] \NC \NR \NC 2 \NC 3 \NR \NC 6 \NC 7 \NR \NC \NR \stoppmatrix
\item \startpmatrix[n=4] \NC 3 \NC 2 \NC 1 \NR \NC 4 \NC 5 \NC 3 \NR \NC 5 \NC 0 \NC -2 \NR \NC \stoppmatrix
\item \startpmatrix[n=4] \NC 5 \NC 4 \NC 2 \NR \NC 2 \NC 2 \NC 3 \NR \NC 7 \NC 6 \NC 5 \NR \NC \stoppmatrix
\item \startpmatrix[n=4] \NC a \NC 0 \NC 0 \NC 0 \NR \NC 0 \NC b \NC 0 \NC 0 \NR \NC 0 \NC 0 \NC c \NC 0 \NR \NC 0 \NC 0 \NC 0 \NC d \NR \stoppmatrix
\stopitemize
\stoptext
not a bug ... (1) the matrix is centered around the math axis and has equal height and depth so indeed in columns that will not align horizontally (2) there is no n|m key support in matrices so the n does nothing in this kind of matrix Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Thu, 9 Oct 2014, Hans Hagen wrote:
On 10/7/2014 8:06 PM, Thangalin wrote:
Looks like a bug; adding blank rows works around the problem (but looks terrible):
\definemathmatrix[pmatrix] [left={\left(\,},right={\,\right)}]
\starttext Digueu quines de les matrius següents són regulars. Quan ho siguin, trobeu la inversa
\startitemize[a,columns,four] \item \startpmatrix[n=4] \NC \NR \NC 2 \NC 3 \NR \NC 6 \NC 7 \NR \NC \NR \stoppmatrix
\item \startpmatrix[n=4] \NC 3 \NC 2 \NC 1 \NR \NC 4 \NC 5 \NC 3 \NR \NC 5 \NC 0 \NC -2 \NR \NC \stoppmatrix
\item \startpmatrix[n=4] \NC 5 \NC 4 \NC 2 \NR \NC 2 \NC 2 \NC 3 \NR \NC 7 \NC 6 \NC 5 \NR \NC \stoppmatrix
\item \startpmatrix[n=4] \NC a \NC 0 \NC 0 \NC 0 \NR \NC 0 \NC b \NC 0 \NC 0 \NR \NC 0 \NC 0 \NC c \NC 0 \NR \NC 0 \NC 0 \NC 0 \NC d \NR \stoppmatrix
\stopitemize
\stoptext
not a bug ...
(1) the matrix is centered around the math axis and has equal height and depth so indeed in columns that will not align horizontally
IIRC, we had added a `location=(high|middle|low)` key to change that behaviour. (Sorry, cannot test right now). Aditya
Hi Xan, It's not exactly what you want, but maybe it'll give you some other ideas: \definemathmatrix[pmatrix][ left={\left(\,}, right={\,\right)}, ] \definenumber[pmatrix] \resetnumber[pmatrix] \define\nextmatrix{ \incrementnumber[pmatrix] \getnumber[pmatrix]. } \define[2]\pmatrices{ \blank[big] \framed[frame=off]{ \startmixedcolumns[n=#1] #2 \stopmixedcolumns } } \starttext Digueu quines de les matrius següents són regulars. Quan ho siguin, trobeu la inversa \pmatrices{4}{ \nextmatrix \startpmatrix \NC 2 \NC 3 \NR \NC 6 \NC 7 \NR \stoppmatrix \column \nextmatrix \startpmatrix \NC 3 \NC 2 \NC 1 \NR \NC 4 \NC 5 \NC 3 \NR \NC 5 \NC 0 \NC -2 \NR \stoppmatrix \column \nextmatrix \startpmatrix \NC 5 \NC 4 \NC 2 \NR \NC 2 \NC 2 \NC 3 \NR \NC 7 \NC 6 \NC 5 \NR \stoppmatrix \column \nextmatrix \startpmatrix \NC a \NC 0 \NC 0 \NC 0 \NR \NC 0 \NC b \NC 0 \NC 0 \NR \NC 0 \NC 0 \NC c \NC 0 \NR \NC 0 \NC 0 \NC 0 \NC d \NR \stoppmatrix } \stoptext
Another bug. @Hans: At least for user view point it's a bug. @Thangalin: thanks. A bigskip will solve me problems, but thanks. \definemathmatrix[det] [left={\left\lvert\,},right={\,\right\rvert}] \starttext Calculeu els determinants següents: \startitemize[a,columns] \item $\startdet[n=4] \NC 1 \NC 1 \NC 1 \NC 1 \NR \NC 1 \NC 2 \NC 3 \NC 4 \NR \NC 1 \NC 3 \NC 6 \NC 10 \NR \NC 1 \NC 4 \NC 10 \NC 20 \NR \stopdet$ \item $\startdet[n=4] \NC 1 \NC -2 \NC 0 \NC 1 \NR \NC 1 \NC 1 \NC 0 \NC 2 \NR \NC 0 \NC 3 \NC -2 \NC -1 \NR \NC 1 \NC 1 \NC 1 \NC 3 \NR \stopdet$ \item $\startdet[n=5] \NC 1 \NC 2 \NC 3 \NC 4 \NC 5 \NR \NC 2 \NC 3 \NC 4 \NC 5 \NC 1 \NR \NC 3 \NC 4 \NC 5 \NC 1 \NC 2 \NR \NC 4 \NC 5 \NC 1 \NC 2 \NC 3 \NR \NC 5 \NC 1 \NC 2 \NC 3 \NC 4 \NR \stopdet$ \item $\startdet[n=3] \NC 1 \NC 2 \NC 3 \NR \NC 1 \NC 4 \NC 9 \NR \NC 1 \NC 8 \NC 27 \NR \stopdet$ \stopitemize Proveu, sense desenvolupar, que els determinants següents són nuls: \startitemize[a] \item $\startdet[n=3] \NC -\sqrt{3} \NC 3 \NR \NC 5 \NC -\sqrt{3}\cdot 5 \NR \stopdet$ \item $\startdet[n=3] \NC 2 \NC 1 \NC 3 \NR \NC 1 \NC 0 \NC 1 \NR \NC -3 \NC 2 \NC -1 \NR \stopdet$ \stopitemize \stoptext
and \item $\startdet[n=3] \NC yz \NC \frac{1}{x} \NC x \NR \NC zx \NC \frac{1}{y} \NC y \NR \NC xy \NC \frac{1}{z} \NC z \NR \stopdet$ puts x over 1 in the second row
On 10/12/2014 7:08 PM, Xan wrote:
and
\item $\startdet[n=3] \NC yz \NC \frac{1}{x} \NC x \NR \NC zx \NC \frac{1}{y} \NC y \NR \NC xy \NC \frac{1}{z} \NC z \NR \stopdet$
puts x over 1 in the second row
in a next beta ... \definemathmatrix[TheMatrixA][left={\left\lvert\,},right={\,\right\rvert}] \definemathmatrix[TheMatrixB][left={\left\lvert\,},right={\,\right\rvert},strut=1.25] \definemathmatrix[TheMatrixC][left={\left\lvert\,},right={\,\right\rvert},strut=1.50] \starttext $\startTheMatrixA[n=3] \NC yz \NC \frac{1}{x} \NC x \NR \NC zx \NC \frac{1}{y} \NC y \NR \NC xy \NC \frac{1}{z} \NC z \NR \stopTheMatrixA$ $\startTheMatrixB[n=3] \NC yz \NC \frac{1}{x} \NC x \NR \NC zx \NC \frac{1}{y} \NC y \NR \NC xy \NC \frac{1}{z} \NC z \NR \stopTheMatrixB$ $\startTheMatrixC[n=3] \NC yz \NC \frac{1}{x} \NC x \NR \NC zx \NC \frac{1}{y} \NC y \NR \NC xy \NC \frac{1}{z} \NC z \NR \stopTheMatrixC$ \stoptext upto you to wikify it ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Aditya Mahajan
-
Hans Hagen
-
Thangalin
-
Xan