<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>Is there any simple way to introduce spaces in matrix elements? \, , \; , \quad don't work. I would like my big matrix to be right-justified (currently it is center-justified). I tried to use the following in the header, which fixes the matrix but it messes up a longtable in the document (The header of the table with the column descriptions and the rest of the table don't line up):</span></div><div><span><br></span></div><div><span> \makeatletter<br>\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%</span></div><div><span>    \hskip -\arraycolsep<br>   \let\@ifnextchar\new@ifnextchar</span></div><div><span>   \array{#1}}<br>\makeatother</span></div><br><div><span>Thanks,</span></div><div><span>Sally<br></span></div><div><br></div><div style="font-family: arial,helvetica,sans-serif; font-size:
 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Steve Schwartz <s.schwartz@imperial.ac.uk><br><b><span style="font-weight: bold;">To:</span></b> Cong Ding <dingcongcs@gmail.com><br><b><span style="font-weight: bold;">Cc:</span></b> "texhax@tug.org" <texhax@tug.org>; when harry met sally <whenharry_metsally@yahoo.com><br><b><span style="font-weight: bold;">Sent:</span></b> Thursday, August 18, 2011 9:28 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [texhax] Multiline array elements<br></font><br>On Thu, 2011-08-18 at 15:54 +0200, Cong Ding wrote:<br>> no other solutions, i think<br>> <br>> because when you are writing a long algebraic expressions in general<br>> situation (not in table), it is impossible to split it into<br>> multi-lines automatically.<br><br>Not
 true if you use inline maths (i.e., not displaymath). The following<br>works:<br><br>=====================<br>\documentclass{article}<br>\newcommand\eqone{$a + b + c + d + e + f + g$}<br>\begin{document}<br>\[<br>\begin{array}{lcccr}<br>a && b && c \\[1ex]<br>d && e && f \\[1ex]<br>\hbox{abc} && \hbox{def} && \hbox{hij}\\[3ex]<br>\parbox{0.2\textwidth}{Hello Hello Hello Hello Hello} && H && I\\[6ex]<br>\parbox{0.2\textwidth}{\eqone} && \parbox{0.2\textwidth}{\eqone} &&<br>\parbox{0.2\textwidth}{\eqone}<br>\end{array}<br>\]<br>\end{document}<br><br>If you don't need it in an array environment, it would probably be<br>easier in tabularx. I've added extra columns and manually played with<br>the line spacing.<br><br>Steve<br><br>-- <br>+-------------------------------------------------------------------+<br>Professor Steven J Schwartz        Phone:
 +44-(0)20-7594-7660<br>Head, Space & Atmospheric Physics  Fax:   +44-(0)20-7594-7772<br>The Blackett Laboratory            E-mail: <a ymailto="mailto:s.schwartz@imperial.ac.uk" href="mailto:s.schwartz@imperial.ac.uk">s.schwartz@imperial.ac.uk</a><br>Imperial College London            Office: Huxley 6M67A <br>London SW7 2AZ, U.K.               Web: www.sp.ph.ic.ac.uk/~sjs<br>+-------------------------------------------------------------------+<br><br>_______________________________________________<br>TeX FAQ: <a href="http://www.tex.ac.uk/faq" target="_blank">http://www.tex.ac.uk/faq</a><br>Mailing list archives: <a href="http://tug.org/pipermail/texhax/" target="_blank">http://tug.org/pipermail/texhax/</a><br>More links: <a href="http://tug.org/begin.html" target="_blank">http://tug.org/begin.html</a><br><br>Automated subscription management: <a
 href="http://tug.org/mailman/listinfo/texhax" target="_blank">http://tug.org/mailman/listinfo/texhax</a><br>Human mailing list managers: <a ymailto="mailto:postmaster@tug.org" href="mailto:postmaster@tug.org">postmaster@tug.org</a><br><br><br></div></div></div></body></html>