BookmarkSubscribeRSS Feed
gzr2mz39
Quartz | Level 8
How do I increase the size of text when using ods rtf text?
Also, is it possible to move rtf text vertically on a page?
So far I have been able to do this, but font_size did not work.
ods escapechar="^";
ods rtf text="^S={outputwidth=100% just=c font_weight=bold}Test";
Thank you.
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
I only see font_weight in your syntax, not font_size. This works for me:

[pre]
ods path work.temp(update) sashelp.tmplmst(read);

proc template;
define style styles.utext;
parent=styles.rtf;
style usertext from usertext /
just=center
font_size=20pt
font_weight=bold
foreground=purple;
end;
run;

ods rtf file='c:\temp\usetext2.rtf' style=styles.utext;

proc print data=sashelp.class(obs=3);
run;

ods rtf text='Test';
ods rtf close;
[/pre]

I find it more reliable to ensure alignment with a style template change to the UserText element. As long as I am using a style template, I just move all the other changes for UserText into the template instead of using ODS ESCAPECHAR.

cynthia
ballardw
Super User
Depending on what you mean by move vertically one option that may help is to use the TOPMARGIN= element in the style section. This will move the first line of text down from the top of the page the amount specified. Example: TOPMARGIN=2in starts 2 inches from the top of the page.

If you need blank spaces between sections of text the function is NEWLINE

^{newline 3} inserts 3 blank lines BEFORE then next printable character .

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 851 views
  • 0 likes
  • 3 in conversation