BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jackieme
Calcite | Level 5

I am trying to center text in ods tagsets.rtf output, but the text is still left justified even with j=c.

 

 

ods escapechar="^";

ods tagsets.rtf file="&outpath.\table1.rtf";

ods text="^S={j=c fontsize=13pt fontweight=bold}First text on page.";

ods tagsets.rtf close;

 

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  You need to make a STYLE template change with PDF and RTF destinations to alter the justification of the ODS TEXT strings in the output. The style element that changes the ODS TEXT value is the USERTEXT style element. Here's an example, compared to changing title:

Cynthia_sas_0-1626877096260.png

 

You'll find more about changing style templates in this paper https://support.sas.com/resources/papers/proceedings10/033-2010.pdf  and about templates in general in this paper: https://support.sas.com/resources/papers/proceedings09/227-2009.pdf ..

 

Hope this helps,

Cynthia

View solution in original post

3 REPLIES 3
ballardw
Super User

You have to tell SAS how wide the text display area is. Add a Leftmargin= 1in and Rightmargin=1in or similar to the ODS Text. Pick your measurement as needed and you can use units of IN (inches) CM (centimeters) . There are other units but this are pretty easily understood.

 

 

Cynthia_sas
SAS Super FREQ

Hi:

  You need to make a STYLE template change with PDF and RTF destinations to alter the justification of the ODS TEXT strings in the output. The style element that changes the ODS TEXT value is the USERTEXT style element. Here's an example, compared to changing title:

Cynthia_sas_0-1626877096260.png

 

You'll find more about changing style templates in this paper https://support.sas.com/resources/papers/proceedings10/033-2010.pdf  and about templates in general in this paper: https://support.sas.com/resources/papers/proceedings09/227-2009.pdf ..

 

Hope this helps,

Cynthia

jackieme
Calcite | Level 5
Thank you for your help and linking the reference papers. This solved my issue!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 719 views
  • 1 like
  • 3 in conversation