Inline styles in ODS PRINTER output

0 Posted by
Posted in Programming

Controlling formatting of ODS PRINTER (PDF/RTF) outputs has always seemed like a bit of a black art to me, but there are usually ways of getting around potential issues if you know where to look. With SAS V9.2, there are some new and probably unknown features, including the use of ‘inline styles’.

For a good introduction to this I recommend having a look at this SAS document “How to Add a Little Spice to Your PDF Output“.

As a quick example, you need to specify an escape character eg. “^” or “¬”.
ods escapechar="^" ;
Then, you can use that escape character “^” in a number of elements such as a title or PROC REPORT ‘LINE’ statement:
title1 "Colour ^{style [color=red] red} and ^{style [color=blue] blue}";
There are a couple of useful new functions NBSPACE and NEWLINE.
Example:
title1 "First line^{newline 2}and this line after 2 blank lines";

Other useful ODS PRINTER/ODS PDF documents:

Tagged: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>