![](https://secure.gravatar.com/avatar/30ef4fea8acc9a4c7a392675260cfcb9.jpg?s=120&d=mm&r=g)
Hi, I'm ConTeXting a text that follows: %%%%%%%%%%%%%%%%% \setupwhitespace[big] \setupinterlinespace[line=2.5ex] \starttext The Leslie Matrix is a matrix $L[1:X, 1:X]$ of the form $$\left( {\matrix{ {a_1 } & {a_2 } & {a_3 } & \ldots & {a_X } \cr {b_1 } & 0 & 0 & 0 & 0 \cr 0 & {b_2 } & 0 & 0 & 0 \cr 0 & 0 & \ddots & 0 & 0 \cr 0 & 0 & 0 & {b_{X - 1} } & 0 \cr } } \right), $$ to build which we need to know $a_x$, {\em ability to reproduce}, an average number of offsprings within a time step from an individual of age class $x$, and $b_x$, {\em probability of surviving}, a fraction of individuals that survives from age class $x$ to age class $x+1$. \stoptext %%%%%%%%%%%% and a matrix has big spacing BEFORE and normal spacing AFTER. Interesting, but without two first setup lines, matrix glues to the subsequent text. Best, Vaytcheslav
![](https://secure.gravatar.com/avatar/18a41be2ef05341b04b9fdb56ec113e0.jpg?s=120&d=mm&r=g)
Try: \placeformula[-] \startformula \left( {\matrix{ {a_1 } & {a_2 } & {a_3 } & \ldots & {a_X } \cr {b_1 } & 0 & 0 & 0 & 0 \cr 0 & {b_2 } & 0 & 0 & 0 \cr 0 & 0 & \ddots & 0 & 0 \cr 0 & 0 & 0 & {b_{X - 1} } & 0 \cr } } \right), \stopformula On Feb 19, 2007, at 2:24 PM, Vyatcheslav Yatskovsky wrote:
$$\left( {\matrix{ {a_1 } & {a_2 } & {a_3 } & \ldots & {a_X } \cr {b_1 } & 0 & 0 & 0 & 0 \cr 0 & {b_2 } & 0 & 0 & 0 \cr 0 & 0 & \ddots & 0 & 0 \cr 0 & 0 & 0 & {b_{X - 1} } & 0 \cr } } \right), $$
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Tue, 20 Feb 2007, Vyatcheslav Yatskovsky wrote:
Hi, I'm ConTeXting a text that follows:
%%%%%%%%%%%%%%%%% \setupwhitespace[big] \setupinterlinespace[line=2.5ex] \starttext
The Leslie Matrix is a matrix $L[1:X, 1:X]$ of the form
$$\left( {\matrix{ {a_1 } & {a_2 } & {a_3 } & \ldots & {a_X } \cr {b_1 } & 0 & 0 & 0 & 0 \cr 0 & {b_2 } & 0 & 0 & 0 \cr 0 & 0 & \ddots & 0 & 0 \cr 0 & 0 & 0 & {b_{X - 1} } & 0 \cr } } \right), $$
to build which we need to know $a_x$, {\em ability to reproduce}, an average number of offsprings within a time step from an individual of age class $x$, and $b_x$, {\em probability of surviving}, a fraction of individuals that survives from age class $x$ to age class $x+1$.
\stoptext %%%%%%%%%%%%
and a matrix has big spacing BEFORE and normal spacing AFTER.
Change $$ ... $$ to \startformula \stopformula
Interesting, but without two first setup lines, matrix glues to the subsequent text.
The use of $$ ... $$ for display math will not give you correct spacing. Always use \startformula ... \stopformula BTW, there is also \startmathmatrix in ConTeXt which allows you to \definemathmatrix[pmatrix] [left={\left(\,}, right={\,\right)}] \startformula \startpmatrix \NC {a_1 } \NC {a_2 } \NC {a_3 } \NC \ldots \NC {a_X } \NR \NC {b_1 } \NC 0 \NC 0 \NC 0 \NC 0 \NR \NC 0 \NC {b_2 } \NC 0 \NC 0 \NC 0 \NR \NC 0 \NC 0 \NC \ddots \NC 0 \NC 0 \NR \NC 0 \NC 0 \NC 0 \NC {b_{X - 1} } \NC 0 \NR \stoppmatrix \stopformula and some other fun stuff also. See My Way on math-align http://dl.contextgarden.net/myway/mathalign.pdf Aditya
participants (3)
-
Aditya Mahajan
-
David Arnold
-
Vyatcheslav Yatskovsky