BookmarkSubscribeRSS Feed
christyh
Calcite | Level 5
Hi there,

I currently have the following code:

TITLE5 italic j=left underlin=1 colour=black height=9pt "Definition: &def" j=center "Most Recent Observation: &recent"
j=right "Date/Time: &sysdate / &systime";

What I would like to do is have the word "Definition" either underlined or bolded and then the actual definition (&def) not underlined or bolded. Is there a way to do this?

Thanks,
Christy
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
The font_weight of the title is automatically bold, so what you have to do is turn off the bolding (via a style override) for the words you DON'T want bolded. This is using ODS ESCAPECHAR to provide a style override for the piece of the string where you want to turn bolding off.

http://www2.sas.com/proceedings/forum2007/099-2007.pdf (paper about ODS ESCAPECHAR in SAS 9.1 with a preview of ESCAPECHAR in 9.2)
http://www.nesug.org/proceedings/nesug08/np/np10.pdf (more about Escapechar in 9.2)

cynthia

[pre]

%let def = xxxxxxxx;
%let recent = 99999;

ods html file='c:\temp\testunder.html' style=sasweb;

ods escapechar='^';
proc print data=sashelp.class;
TITLE5 italic j=left colour=black height=9pt "Definition: ^S={font_weight=medium} &def"
j=center " Most Recent Observation: ^S={font_weight=medium}&recent"
j=right "Date/Time: ^S={font_weight=medium}&sysdate / &systime";
run;
ods _all_ close;
[/pre]
christyh
Calcite | Level 5
Thanks Cynthia! This is exactly what I was trying to do.

Cheers,
Christy

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
  • 2557 views
  • 0 likes
  • 2 in conversation