[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference vaxuum::document_ft

Title:DOCUMENT T1.0
Notice:**New notesfile (DOCUMENT.NOTE) now available (see note 897)**
Moderator:CLOSET::ADLER
Created:Mon Feb 09 1987
Last Modified:Thu Oct 31 1991
Last Successful Update:Fri Jun 06 1997
Number of topics:897
Total number of notes:4397

331.0. "How do I align on the decimal point?" by NCADC1::PEREZ (The sensitivity of a dung beetle.) Fri May 01 1987 15:54

    I know this has been discussed before but:
    
    I have a 9 column table that has numbers in it that we need to have
    right aligned on the decimal point in the columns.  A sample is shown
    below: 
    
<TABLE>(Accounts and Revenue)      
<TABLE_SETUP>(9\14\7\7\7\7\7\7\7)
<TABLE_HEADS>(Account\Book\Pros\Total\+ or -\Book\Pros\Total\+ or -)  
<TABLE_ROW>(XX 1022\321.42\\1321.4\\1.4\\24)
<TABLE_ROW>(YY A1 (CC)\41.4\\238.9\\3.5\\14.7)
<TABLE_ROW>(ZZ DDP (DR)\5.1\\115.1\\22.7\\22.7)
<ENDTABLE>

    By default the table setup left justifies each entry as shown below:
    
_______________________________________________________
Table_1:_Accounts_and_Revenue__________________________
Account_________Book_____Pros_____Total____+_or_-___Book     Pros     Total    + or -
XX 1022         321.42           1321.4            1.4               24

YY A1 (CC)      41.4              238.9             3.5               14.7

ZZ DDP (DR)     5.1               115.1             22.7              22.7
_______________________________________________________

    This is definitely unsatisfactory as we need it to look like:

_______________________________________________________
Table_1:_Accounts_and_Revenue__________________________
Account_________Book_____Pros_____Total____+_or_-___Book     Pros  
XX 1022         321.42            1321.4            1.4            

YY A1 (CC)       41.4              238.9            3.5     

ZZ DDP (DR)       5.1              115.1           22.7           
_______________________________________________________
    
    We have tried both the <ALIGN_CHAR> and the <RIGHT_LINE> and neither
    fits the situation as this table is OVER 300 LINES LONG!!!
    
    Is there some way to tell DOCUMENT to right align the numeric fields on
    the decimal point and left align alpha fields?
    
    Dave
T.RTitleUserPersonal
Name
DateLines
331.1<align_char>VAXUUM::KOHLBRENNERFri May 01 1987 17:542
    There is no way to align a column on any character other
    than doing it with <align_char>.
331.2There has to be a better wayNCADC1::PEREZThe sensitivity of a dung beetle.Sun May 03 1987 00:1617
    ARRRGGGGHHHH!!!! (Long, loud, pained, primal scream)
    
    <insure flame off>
    
    Wrong answer!!!!!  I've got unit managers who (after a lengthy selling
    job) are trying to use DOCUMENT for some of their reports.  Quite often
    these include long, complicated tables that must appear "something"
    like what comes out of other products (DTR has been mentioned, etc.). 
    
    If I tell them that they have to manually align thousands of entries
    in tables, I/we/you can kiss off DOCUMENT for this (and possibly
    other) uses.  I've already got 2 units that selected DECPage instead
    of DOCUMENT because they felt it was "easier" to use.
    
    Dave
    
    P.S.  They were Sales Support units, not Delivery.
331.3Right alignment?BUNSUP::LITTLETodd Little NJCD SWS 323-4475Thu Jun 04 1987 14:178
    On a related topic, anyway to right align a column?  I've tried
    <RIGHT_LINE> but it places some vertical skip into the column.
    
    Something along the lines of a <TABLE_COLUMN_ATTRIBUTES> tag would
    be nice.  As I recall, the DSRPLUS tables utility had something
    similar to this.  Just a suggested wishlist item.
    
    -tl
331.4<align_number>CLOSET::ANKLAMTue Jun 23 1987 12:1013
    
    re: .0 through .2
    
    The resolution for V1.0 is not the best, but it does allow alignment
    of numbers on decimal points, including numbers with commas. It's
    called <ALIGN_NUMBER> and works like the <ALIGN_CHAR> tag, but
    sets the # and ; characters automatically as the place-holders.
    
    There have been many notes or questions on this issue, and we have
    enough information to start to design a better solution for the
    future.
    
    patti
331.5How about <TABLE_ALIGN>?57609::LONGTue Jun 23 1987 21:0714
    
    	Well, it's not a complete solution (what ever that is), but
    I would be happy with a tag like <TABLE_ALIGN>({L|C|R}[\...])
    which would allow me to specify for each column what alignment
    I required.  Default would be L(eft), as it is today.  Since you
    have to construct each little {\hbox{#n\hfill}} for each column
    entry, it doesn't sound like too much work to add that capability.
    Most folks with complex numeric tables will be using a spreadsheet
    to construct them, and it probably isn't too much to ask for them
    to use F(ixed) decimal notation, allowing R(ight) justification
    of all entries.  Folks who can't make up their minds can stick
    with C(enter)!
    
    Harold
331.6another good ideaCLOSET::ANKLAMThu Jun 25 1987 12:225
    
    I have heard some similar ideas; all will be considered in planning
    for the next version.