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
Diamond | Level 26
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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 3327 views
  • 0 likes
  • 2 in conversation