COMPGROUPS.NET | Browse | Post Question | Groups | Users | Stream | About | |

### equal column width matrix?

• Email
• Follow

My supervisor would like his matrices to have equal column
width.   That means that a 0 entry would be centred in
enough blank space to make the column width as wide as
the widest entry in the matrix.   This can probably be
hacked by measuring the widest entry and having the
other entries centred in a hbox that wide.  But is there
a more elegant and automatic way to do this?

David

 0

See related articles to this posting

In article <dalton-B09DCC.16593403022011@news.eternal-september.org>,
David Dalton <dalton@nfld.com> wrote:

> My supervisor would like his matrices to have equal column
> width.   That means that a 0 entry would be centred in
> enough blank space to make the column width as wide as
> the widest entry in the matrix.   This can probably be
> hacked by measuring the widest entry and having the
> other entries centred in a hbox that wide.  But is there
> a more elegant and automatic way to do this?

I forgot to mention that we are using the array
environment in LaTeX.

David

 0

Le 04/02/2011 00:05, David Dalton a �crit :
> In article<dalton-B09DCC.16593403022011@news.eternal-september.org>,
>   David Dalton<dalton@nfld.com>  wrote:
>
>> My supervisor would like his matrices to have equal column
>> width.   That means that a 0 entry would be centred in
>> enough blank space to make the column width as wide as
>> the widest entry in the matrix.   This can probably be
>> hacked by measuring the widest entry and having the
>> other entries centred in a hbox that wide.  But is there
>> a more elegant and automatic way to do this?
>
> I forgot to mention that we are using the array
> environment in LaTeX.
>
> David

You can try the tabu package as in:

\documentclass{article}
\usepackage[delarray]{tabu}

\begin{document}\makeatletter
{

$\begin{tabu}spread 1in|{*4{X[$c]}}|
\alpha & \beta & \gamma & \delta \\
\sum_i \frac{a_i}{x_i} & 0 & \cdot & \cdot \\
\end{tabu}$} \end{document}\endinput But it still under development... It's not possible to give standard l, c, r columns a specific width, instead, embed your math content into a paragraph column >{$}m{width}<{$} This is what tabu does, measuring the widths to make them equal: "X[$c]" replaces
">{\centering\arraybackslash}}>{$}p{some dimen}<{$}"

....

 0

2 Replies
292 Views

Similar Articles

[PageSpeed] 27

• Email
• Follow

Similar Artilces:

Equal column widths in array environment
Hi all, Is there an *easy* (logical?) way of obtaining equal column widths in an array environment? This problem has been solved in a tabular environment, and there are numerous solutions. I'm looking for a solution in the following by any way of the following, if possible: [1] defining a new column type (that works in math mode) for columns that should be the same width (like p{..} for tabular); or [2] defining a new environment altogether, similar to array that works in math mode The above may be achieved either if the largest column width is known, or better, if it is not. One sol...

Treectrl
Hi all, I am using treectrl v2.1 to display a table of data. Is it possible to configure the table so that the columns all end up the same width? If I resize the window, I would like the extra space to be assigned equally amongst the columns so that they still remain of equal width. Is this possible? thanks, dan. > I am using treectrl v2.1 to display a table of data. Is it possible to > configure the table so that the columns all end up the same width? If I > resize the window, I would like the extra space to be assigned equally > amongst the columns so that they still remain ...

Making a matrix with equal rows and columns
I have a matrix value of 64 x 1 now I need to make this matrix as 8 x 8. How do I do that, if my matrix is 200 x 1 then How do i take a matrix of equal rows and columns. Please help me out . "vineet" <prasath_79@yahoo.com> wrote in message news:eeea9f2.-1@webx.raydaftYaTP... > I have a matrix value of 64 x 1 now I need to make this matrix as 8 x > 8. How do I do that, if my matrix is 200 x 1 then How do i take a > matrix of equal rows and columns. Please help me out . That's easy... make it 14.142135623731 by 14.142135623731. If that's not the answer, perhap...

tabular, columns centered with equal width
Hi there, I've got a little problem formatting tabulars. I want to use a tabular, say: \begin {tabular} {|c|c|c|} \hline 1& 2& 345 \\ \hline \end {tabular} The Problem occuring at this point is, that the last column is far wider than the other two. I want all columns to have the equal width, but be centered at the same time as well. The problem, in short, is that the options c and p{...} cannot e used all together. -- Johannes Reinhard Before God we are all equally wise - and equally foolish. Albert Einstein Got a solution using arry.sty and tabularx.sty \usepackage {a...

Equal column widths in array environment
Hi all, Is there an *easy* (logical?) way of obtaining equal column widths in an array environment? This problem has been solved in a tabular environment, and there are numerous solutions. I'm looking for a solution in the following by any way of the following, if possible: [1] defining a new column type (that works in math mode) for columns that should be the same width (like p{..} for tabular); or [2] defining a new environment altogether, similar to array that works in math mode The above may be achieved either if the largest column width is known, or better, if it is not. One sol...

tabular, columns centered with equal width
Hi there, I've got a little problem formatting tabulars. I want to use a tabular, say: \begin {tabular} {|c|c|c|} \hline 1& 2& 345 \\ \hline \end {tabular} The Problem occuring at this point is, that the last column is far wider than the other two. I want all columns to have the equal width, but be centered at the same time as well. The problem, in short, is that the options c and p{...} cannot e used all together. -- Johannes Reinhard Before God we are all equally wise - and equally foolish. Albert Einstein Got a solution using arry.sty and tabularx.sty \usepackage {a...

Normalizing matrix (rows AND columns equal to 1)
I'm working on a specific matrix and I need to normalize the sum of the elements in all the rows and all the columns to be equal to 1. I have managed to create the codes to do both separately but does anyone know how to obtain both simultaneously? thank you!!! On 11/21/2012 4:55 PM, zuzia wrote: > I'm working on a specific matrix and I need to normalize the sum of the > elements in all the rows and all the columns to be equal to 1. I have > managed to create the codes to do both separately but does anyone know > how to obtain both simultaneously? > thank you!!! ...

Normalizing matrix (rows AND columns equal to 1)
I'm working on a specific matrix and I need to normalize the sum of the elements in all the rows and all the columns to be equal to 1. I have managed to create the codes to do both separately but does anyone know how to obtain both simultaneously? thank you!!! On 11/21/2012 4:55 PM, zuzia wrote: > I'm working on a specific matrix and I need to normalize the sum of the > elements in all the rows and all the columns to be equal to 1. I have > managed to create the codes to do both separately but does anyone know > how to obtain both simultaneously? > thank you!!! ...