I'm using LyX for my document writing. Some of my inline mathmode formulas go out the page margin (see attached fig). I wonder how can I force these formulas to stay inside the page margin. Thanks in advance for your help and time.
Edit Code
where $vec\left(\mathbf{Y}\right)=vec\left(\begin{bmatrix}\mathbf{y}^{\left(1\right)} & \ldots & \mathbf{y}^{\left(j\right)} & \ldots & \mathbf{y}^{\left(t\right)}\end{bmatrix}\right)\equiv\mathbf{y}^{*}$;
$\mathbf{I}\otimes\mathbf{X}\equiv\mathbf{X}^{*}$; $vec\left(\mathbf{B}\right)=vec\left(\begin{bmatrix}\boldsymbol{\beta}^{\left(1\right)} & \ldots & \boldsymbol{\beta}^{\left(j\right)} & \ldots & \boldsymbol{\beta}^{\left(t\right)}\end{bmatrix}\right)\equiv\mathrm{\bm{\beta}}^{*}$;
$\mathbf{I}\otimes\mathbf{Z}\equiv\mathbf{Z}^{*}$; $vec\left(\mathbf{U}\right)=vec\left(\begin{bmatrix}\mathbf{u}^{\left(1\right)} & \ldots & \mathbf{u}^{\left(j\right)} & \ldots & \mathbf{u}^{\left(t\right)}\end{bmatrix}\right)\equiv\mathbf{u}^{*}$;
and $vec\left(\mathbf{E}\right)=vec\left(\begin{bmatrix}\mathbf{e}^{\left(1\right)} & \ldots & \mathbf{e}^{\left(j\right)} & \ldots & \mathbf{e}^{\left(t\right)}\end{bmatrix}\right)\equiv\mathbf{e}^{*}$.
Thus the univariate linear mixed model involving all variables can
be obtained from multivariate linear mixed model
Best Answer
The
;
andand
are really part of the sentence structure, not the mathematics,so TeX can do a better job if you code this as a sentence with multiple inline fragments. Also it still is hard so I have used\sloppy
to tell LaTeX to allow white space to stretch more than usual. It still looks pretty hard to read and I would definitely consider setting this as a display using an AMS alignment, but to get it inline: