Can you underline one word in an ods text = statement?
For example:
ods text= "^S={ font_face = 'Times New Roman' just=j fontweight=light fontsize=12pt color=black}Background:For this project, we are looking for..."
I would like to ONLY underline the word "Background" above.
Thanks!
Here are 2 options:
Option 1 using inline formatting:
ods text= "^S={ font_face = 'Times New Roman' just=j fontweight=light
fontsize=12pt color=black textdecoration=underline}Background
^S={font_face = 'Times New Roman' just=j fontweight=light
fontsize=12pt color=black}: For this project, we are looking for...";
Option 2 if you are using RTF then you can use RTF control words to control style:
ods rtf file="UnderlineOneWord.rtf";
ods text= "^S={ font_face = 'Times New Roman' just=j fontweight=light fontsize=12pt color=black protectspecialchars=off}
\ul{Background}\ul0 : For this project, we are looking for...";
ods rtf close;
Theoretically, you could use CSS styles and use a pseudo class:
p:first-word{text-decoration:underline;}
but I don't think that is supported.
I can do this:
ods listing;
ods html file="text.html" style=mystyle;
ods pdf file="text.pdf" startpage=never notoc style=mystyle;
ods rtf file="text_trad.rtf" style=mystyle;
ods escapechar='^';
title "January Orders ";
footnote " For All Employees";
ods text="My text 1";
ods text="^S={textdecoration=underline}My^S={} Text 2";
data grades;
input id grade1 grade2 grade3 grade4;
datalines;
1105 1 2 3 4
1106 2 2 2 2
1107 3 3 4 6
;
run;
proc print data=grades;
run;
ods text="My Text 3";
ods pdf close;
ods rtf close;
title;
footnote;
proc template;
delete mystyle;
run;
The key statement there is
ods escapechar='^';
and then its use with
^S={textdecoration=underline}My^S={}
See if that gets you anywhere.
Thank you, this helps!
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.