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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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