Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a relatively large but sparse matrix (say 20x20). Maple has no problem displaying it on a screen because maple does not force the columns to be aligned when the matrix is large enough : element 6,3 might not be directly underneath element 5,3.

In LaTeX, on the other hand, the width of a matrix is at least the sum of the widths of the widest elements in each column. This does not fit on a paper at all.

So, is there a way to make "maple-style" matrices in LaTeX?

this

|1 0 0 0 (very wide element) |
|(very wide element) 0 0 0 0 |

instead of

|1                   0 0 0 (very wide element) |
|(very wide element) 0 0 0         0           |
share|improve this question

1 Answer 1

From the example given, it looks as though there's no common alignment between the rows. In which case, all you really want is a list of numbers with a decent separation between and the appropriate braces either side. So the following would do that (using amsmath for nice matrices):

\begin{bmatrix} % or pmatrix or what ever
3.1415926538 \; 0 \; 0 \; 1 \\
0 \; 0 \; 2.718281828459045 \; 0
\end{bmatrix}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.