LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 21 Mar 2007 11:48:48 +1100
Reply-To:     "Johnson, David" <David.Johnson@CBA.COM.AU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Johnson, David" <David.Johnson@CBA.COM.AU>
Subject:      Re: font assignment from ODS for RTF destinations,
              was: how ot make this happen in RTF
Content-Type: text/plain; charset="us-ascii"

When writing text in a proportional font; "1" always requires (and is given) less room than "4". The layout process is called "kerning". You'll find this described in many places including in the font sections of the SAS/Graph manuals on line.

To avoid this proportional spacing, we use a non proportional font such as SAS Monospace, which is what generally applies to the SAS Listing destination. This gives us neatly aligned columns of numbers we can scan and interpret.

When you send to RTF, the selected font changes, and usually that will be a proportional font, since these are generally used for documents.

To change your font definitions, look at your style. Steven Feder in his paper 088-29 spent some time laying out and presenting data that has some similarities to yours.

Many detailed exploration of ODS styles can be found including Jeff Cartier's in 147-28, where he details specification of documentation fonts and produces a very attractive table with the RSVP style. I have no doubt Lauren Haworth's insightful papers will also provide valuable guidance here.

If that is unsatisfactory, look at the online doc for "Example 16: Specifying Style Elements for ODS Output in Multiple Statements". It is very specific about defining fonts and font attributes at column and row level.

Looking at style for a generalised solution is preferable to a specific solution in your code if you anticipate you might reuse the style at some time in the near future. A little more effort now will save repeating yourself ad nauseam.

Kind regards


The Moving Finger writes; and, having writ, Moves on: nor all your Piety nor Wit Shall lure it back to cancel half a Line, Nor all your Tears wash out a Word of it

Omar Khayyam (trans: Edward Fitzgerald)

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Yu Zhang Sent: Wednesday, 21 March 2007 11:09 AM To: SAS-L@LISTSERV.UGA.EDU Subject: how ot make this happen in RTF


the exmaple below will demostrate the probelm I am having, bascically I want display the N(%) format string in a table using pro report. I created two picture format for interger and decimal number. I want the string aligned ( decimal alignment). the listing out looks excatly what I need, jowever when i output the table to RTF file, the output is not aligned well. I feel like I didn't pick up the right font to display the number in a evenly-space format. for example, 1 always need less room than 4.

Does anyone know I how fix it?


proc format;

picture pctfmt (round) low-high='000.9%)' (fill=' ' ); picture intfmt low-high='000' (fill=' ');


ods rtf file='c:\test.rtf'; data a; input cnt num; b=trim(put(cnt,intfmt.))|| ' (' ||put(num, pctfmt.); cards; 10 1.2 1 2.34 34 12.45 ; run;

proc report nowd; column b; define b/display style={just=center}; run; ods rtf close;

************** IMPORTANT MESSAGE ***************************** This e-mail message is intended only for the addressee(s) and contains information which may be confidential. If you are not the intended recipient please advise the sender by return email, do not use or disclose the contents, and delete the message and any attachments from your system. Unless specifically indicated, this email does not constitute formal advice or commitment by the sender or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. We can be contacted through our web site: If you no longer wish to receive commercial electronic messages from us, please reply to this e-mail by typing Unsubscribe in the subject line. **************************************************************

Back to: Top of message | Previous page | Main SAS-L page