Math & Science ⇒ Multline in matrix cells
Multline in matrix cells
I have a rotation matrix with some particularly lengthy elements (lots of sin and cos terms). What I'd ideally like to do is to break these terms into two parts so that it's more compact, much like the multline environment. Of course, this environment can't be used if you're already in math mode. I'm currently using the ams-math bmatrix environment to lay out my matrix. Is there any way of breaking the matrix element over two lines?
Last edited by mrchemist on Wed Mar 17, 2010 12:59 pm, edited 1 time in total.
- Stefan Kottwitz
- Site Admin
- Posts: 10308
- Joined: Mon Mar 10, 2008 9:44 pm
Multline in matrix cells
Hi,
you could use \parbox inside the matrix, inside a \parbox you can use multiline math environments.
Stefan
you could use \parbox inside the matrix, inside a \parbox you can use multiline math environments.
Stefan
LaTeX.org admin
Re: Multline in matrix cells
Thanks for the hint. It gets close to what I want, however inserting another math environment screws up the numbering of the equations. I'll have a play and see if I can get it working...
Multline in matrix cells
Even with the starred versions?mrchemist wrote:Thanks for the hint. It gets close to what I want, however inserting another math environment screws up the numbering of the equations.
Multline in matrix cells
The starred versions take the numbering off the 'parent' equation.
In the end, I hacked together a macro using \raisebox and \makebox commands... it's not pretty, but it works:
In the end, I hacked together a macro using \raisebox and \makebox commands... it's not pretty, but it works:
Code: Select all
Code, edit and compile here:
\newcommand{\MatrixSplitEqn}[2]{\makebox{\raisebox{\height}{\makebox[0.4\width][l]{$#1$}}\raisebox{-\height}{\makebox{$#2$}}}\vspace{5pt}}