#### equal column width matrix?

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
David
2/3/2011 8:29:35 PM
comp.text.tex 37433 articles. 72 followers.

2 Replies
438 Views

Similar Articles

[PageSpeed] 31
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
David
2/3/2011 11:05:56 PM
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
GL
2/3/2011 11:33:37 PM
Similar Artilces:

Split data by column
Hello, I have a data file in which the fields are represented by columns. For instance the first field is from column 1 to column 30 and the second field is from column 31 to 44. How can I convert this file to a tilde delimited file. Thanks. On Mon, 16 Feb 2004 at 00:32 GMT, wane wrote: > Hello, > I have a data file in which the fields are represented by columns. For > instance the first field is from column 1 to column 30 and the second > field is from column 31 to 44. How can I convert this file to a tilde > delimited file. awk '{ printf "%s~", substr(... update a column based on a column in another table #2 Hi, I don't mind if the solution is in PROC SQL or datastep but I am struggling with how to do this:- a=tablea b=tableb update tablea set a.col1 = b.col1 where a.col2 = b.col2 Regards Lee Two operations. Perform the join first. Then perform the update. Data new; merge a b(keep=3Dcol2 col1); by col2; run; On Feb 25, 8:38=A0am, SAS User <sasuser2...@googlemail.com> wrote: > Hi, > I don't mind if the solution is in PROC SQL or datastep but I am > struggling with how to do this:- > > a=3Dtablea > b=3Dtableb > > update tablea > set a.col1 =3D b.col1... matrix similar line sum Greetings, please consider the array: o = 1 2 5 4 1 3 2 9 1 3 2 4 2 3 4 10 2 3 4 7 2 3 4 5 5 1 2 8 5 1 2 2 5 1 2 9 5 2 6 8 note that the 1st three columns are already sorted. The pursued function should take the array o and output an array y. Each line of o where the 1st 3 elements are equal to another line of o, the 4th is summed, but not the others. For example, the expected answer y for the array o should be: 1 2 5 4 1... Using a simple class with overridden .equals() for TreeSet.contains() doesn't work I have this class, which is defined as an inner class of another class (so it's not the most beautiful class ever, but I needed it for a really simple task): ####################################################################### class SimpleClass { String attrib_one; String attrib_two; String attrib_three; SimpleClass(String attrib_one, String attrib_two, String attrib_three) { this.attrib_one = attrib_one; this.attrib_two = attrib_two; attrib_three = attrib_three; } public boolean equals(Object obj) { if (obj instanceof SimpleClass) { SimpleClas... Hashcode and Equal import java.util.*; public class Qn353 { private String name; public Qn353(String name) { this.name = name; } public boolean equals(Object o) { if ( ! (o instanceof Qn353) ) return false; Qn353 p = (Qn353) o; return p.name.equals(this.name); } public static void main(String [] args) { HashSet<Object> hs = new HashSet<Object>(); hs.add(p1); hs.add(p2); System.out.pr... Two column layout OK... After a previous post, I've decided that the site layout will be two columns The layout will be: 1) Page 100% wide 2) Right column will be fixed 150px, left column will use the rest of the space 3) Left column needs a right border. A gap of 10px should be on both sides of the border. I've been playing around with this, but having issues with the fixed right column aligning correctly and when I add the border I end up with vertical scrollbars in firefox. Help would be appreciated. Thank you. Spondishy wrote: > OK... After a previous post, I'... blank text columns Hello, I have got problem with recive data from DB2. On Windows XP, I retrieve data from DB2 on OS400 V5R3M0. I have 'Client Access Express for Windows ver5 rel3' installed on my machine. I try to use this driver in my DSN ODBC to connect to DB2 on AS400 but I receive empty column where should be text description. In configuration ODBC I choose option 'Convert binary data (CCSID 65535) to text' but nothing changes. This data is part of the J.D. Edwards product Have you got any idea? Thanks in advance Rafal ... subarray equality? I'm a realtive newbie at matlab and I'm looking for a "trick". I have an array of numbers. Somewhere in that array is a sequence of numbers (in this case, 5 adjacent elements are all 0). I know how to do this "the hard way", but given all the other array manipulation that matlab has, there's got to be "a better way" to find the start of that sequence. Thanks! Bruce PS Despite the "it looks like homework" nature of the above, it's not. -- +-------------------+---------------------------------------------------+ Bruce... For Loop to Matrix Operation Hi all :) I was wondering if anyone can help me to convert a for loop to a matrix operation? One of pals is saying that it's gonna be faster to do matrix operations in matlab compared to doing for loops. Anyway, the code that I have basically turns green color into white, and non green into black. E.g. (assuming an HSV color image) for i = 1:imageHeight for j = 1:imageWidth if h(i,j) >= lowerGreenThold && h(i,j) <= upperGreenThold %% k is just another binary image with the same dimensions as the HSV image k(i,j) = 1; else ... Concatenated column in a report Hello I'm trying to concatenate fields in a report and display them. The fields coming in from the query are like this: A B C D E I want to display A AB ABC ABCD ABCDE It seems to me the simplest way would be to concatenate the incoming field to the existing value in a text box in the detail section of the report. But Access wipes this field out every time so no accumulation occurs. What's the best way to do this? Do I need to set up a temporary field in my code? Robert "Robert" <projecttoday@yahoo.com> wrote in message news:103afnkf2v81qe8@corp.supernews.co... Printing multi column Hello , i just want to ask your help guys. may problem is this.. how can i make a multi colum report. i want to create a report from my list of tables, wherein the page header is also from a table. im doing a dibursement report and im having this problem writing this report. please help me guys. tnx. sample ... Histogram equalization #5 Hello to everyone ! I'm a beginner in Matlab, seeking assistance (matlab algorithms, matlab codes) for: - 2-D equalization for I and S components in the HSI space; - Histogram Intersection; - Histogram Backprojection (Back-projection,segmentation); I operate with color images (RGB, 256 x 256 pixels, uint8). Please help me, your help is very important to me ! Thanks in advance ! "Peter Petrov" <achobg@gmail.com> wrote in message <i17k3j8fp$1@fred.mathworks.com>... > Hello to everyone ! > > I'm a beginner in Matlab, seeking assistance (matlab algori... Re: Splitting columns in mm/dd/yy format into 3 separate columns #2 Hi Michelle, 'Twould be easier to use SAS date functions to extract these. month = month(DATE); day = day(DATE); year = year(DATE); That last function will give you a four-digit year. If you really want a two-digit year (which you should think carefully about), I'm pretty sure there is a modulo function that you can use to get the remainder when dividing by 100 (e.g., 2009 mod 100 = 9). Best, Tim Tim Kynerd Computer Programmer/Analyst ECD/HOPE 4 Old River Place, Suite A Jackson, MS 39202 P: (601) 944-9308 F: (601) 944-0808 tkynerd@ecd.org -----Original Message----- From: SAS(r)... ODS RTF - Bold Columns Hi I was wondering if anyone had any advice on this.... I'm using SAS8.2, and am trying to produce a document that will look like this; Heading1 Heading2 Heading3 BOLD text text text text text I can get the headings bold and increase the font sizes, the problem I appear to be having is with emboldening certain data in the "Heading1" column. I have code that I believe will work but when I run it my MS Word (97) freezes. I did notice the SAS help files does say there is a problem with ODS taking a long time to output with 8.2 and is f... equal Hi everyone, I'm learning Lisp by myself using the book "Essential Lisp". In one of the exercises I'm asked to define equal in term of eql. This is my solution: (defun my-equal (x y) (cond ((eql x y) t) (t (my-equal-aux x y)))) (defun my-equal-aux (x y) (cond ((and (null x) (null y)) t) ((or (null x) (null y)) nil) ((listp (car x)) (and (my-equal (car x) (car y)) (my-equal (cdr x) (cdr y)))) ((not (eql (car x) (car y))) nil) (t (my-equal (cdr x) (cdr y))))) So far it behaves similar to the built-in equal. However I feel that my answer is verbose. This is... Re: Column Operation #3 Sumanta , What do you want to do, Delete Columns or rows or merely set the particular value for a observservation-column intersection to missing? Where are the compamy names at you wish to key off of? Variable names liek V1 or X5 etc... are bad you will want to definitly rename those as they imply 'unknown' in the world of programming. In Short you will need to provide use with a small exmaple data set to work with, what you would like this data to look like, and the rules you wish to apply to delete what ever from your data set. You said you have a huge data set, uhhh no you don... Fast way to set columns of sparse matrix to 0 Hi All, Here is an example to set several columns of a sparse matrix to 0: % create a sparse matrix X = sprandn(1e3,1e5,0.01); % count nonzero elements of each column nn = sum(spones(X)); % set the columns to 0 if they are short X(:,nn<10) = 0; %<--- slow, how to speed it up? Thanks, Mathew It is not slow to set one column one time: id_nn = find(nn<10); for i = 1:length(id_nn) X(:,id_nn(i)) = 0; end it takes about 0.3 seconds but X(:,nn<10) = 0; takes 134 seconds. is there any reason for that different? or it may be more fast way t... Matrix 8x8 #2 Hi Dear friend , I have defined a symbolic matrix A (8,8) .The matrix have many parameters that dependent form a uknow variable E. I would like to solution the equation det(A)=0 and find the various values for E. The problem is that the matrix that Matlab computes becomes very difficult to handle. I m wiating many hours and i have't any results. What should I do? Many thanks "george veropoulos" <veropgr@yahoo.gr> wrote in message <i05lc2$p5u$1@fred.mathworks.com>... > Hi Dear friend , > > I have defined a symbolic matrix A ... Single row labels in a column based report I have come accross the exact same problem as below. The address that was given as a solution cannot be found. Specifically, i need to be able to show labels in only the first column of a report! Could someone please help! ***************************************************** Message 6 in thread From: fredg (fgutkind@att.net) Subject: Re: Row headings in a column-based report View this article only Newsgroups: microsoft.public.access.reports Date: 2001-11-20 20:04:31 PST Travers, I think this is what you are looking for: Microsoft KnowldedgeBase Article: Q148397 'How to show... top vs ps Why total cpu is not equal ? Hi, could anyone tell me about ps and top behaviour ? p02:~# top -b | grep Cpu Cpu(s): 7.1% us, 3.8% sy, 0.0% ni, 84.1% id, 0.9% wa, 0.0% hi, 4.0% si Cpu(s): 70.1% us, 29.6% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.3% si Cpu(s): 70.2% us, 29.8% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si Cpu(s): 70.4% us, 29.2% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.3% si p02:~# for i in$(seq 1 50) ; do echo -n .; ps auxmh -L | grep -v 0.0 ; done ;echo ................................................... p02:~# top -b | grep Cpu Cpu(s): 7.1% us, 3.8% sy, 0.0% ni, 84.1% id, 0.9% w...

Dot matrix and Ruby !
Hi all, I´d like to do a class to print into a lx-300 printer ! i would send parameters like, coordenates X,Y, condensed, draft, roman etc. I have the printer´s manual, Is there a command in pure Ruby to send or redirect to printer ? Im searching without success ! thanks any help ! -- Posted via http://www.ruby-forum.com/. On 24.02.2007 11:34, Gug=E3o wrote: > Hi all, I=B4d like to do a class to print into a lx-300 printer ! i wou= ld > send parameters like, coordenates X,Y, condensed, draft, roman etc. I > have the printer=B4s manual, Is there a command in pure Ruby to...

How to order by non database columns in forms?
Hi, I'm having a problem in order by non database columns in oracle forms. Anybody have any solution for the same. TIA, Anil anil.lohithan@gmail.com wrote: > Hi, > > I'm having a problem in order by non database columns in oracle forms. > > Anybody have any solution for the same. > > TIA, > Anil Sure do. Pour high grade aviation fuel on your keyboard and apply a car flare after lighting it. Oh about your problem ... reread you post ... what problem? With what version of Oracle Forms? With what error message? -- Daniel A. Morgan University of Washingt...

Homography Matrix
Hi, I would like to ask a help at the forum to obtain a Homography Matrix. I am studying the subject at the paper and computer (MatLab), I am not implementing the things in C Language with OpenCV ... The goal is to learn the algorithm theory and after to use the OpenCV. Thus, who works with Computer Vision, Camera Calibration and MatLab, could, please, help me ? The situation: I got two views and 4 points at each view of a Chessboard with the help of 3D-StudioMax. The points are below: p_src | p_dst (pixels) | (meters) | Image_01 | Image_02 | ---------...

Changing the type of timestamp columns
Hi guys, Is it safe to update the atttypid of a timestamp column to be a timestamptz column? I wish to do this on a production database, so I need to be sure! Thanks, Chris ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > Is it safe to update the atttypid of a timestamp column to be a > timestamptz column? I wish to do this on a production database, so I > need to be sure! Oh, ...

Re: Not Equal #3
PC - All the v8 and v9 documentation is online at SAS http://v8doc.sas.com/sashtml/ http://support.sas.com/documentation/onlinedoc/sas9doc.html (User:SAS Pwd:onlinedoc) - PC 8^) -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Paul CARRENO Sent: Monday, June 14, 2004 2:15 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Not Equal Sorry, I just found a CD with Online Documentation with the info I needed. Thank you. PC ...