BookmarkSubscribeRSS Feed
PhilC
Rhodochrosite | Level 12

I don't know how to Google this; perhaps I'm getting this wrong.  The premise to the idea I'm wondering is this; is it that Proc Templates are suppose to work like CSS.  If I'm right, something like this can be done.  Or should I just use macros?

<[EDIT]>

What I am wanting to do below is to define a label "TitlePageTitle" for which I associate font attributes.  Later, in a (general) procedure, I wish to be able to call that label, using /STYLE=, and have all font attributes applied to the object in the statement.  Much like a class attribute in HTML.

proc template;                                                                
  define style Styles.F_Report;                                              
    parent = Styles.HTMLBW;  
    class fonts                                                             
         "Fonts used in the default style" /   
      'TitlePageTitle' = ( "Times New Roman",28pt,Bold Italic)
      'docFont'  = ("Arial Narrow, Helvetica, sans-serif",10pt);
   end;                                                                       
run;

ods PDF
  style=Styles.F_Report
  STARTPAGE=NEVER;

proc ODStext;
p "County Facilities" /STYLE={class=TitlePageTitle};
p "Average Population" /STYLE={class=TitlePageTitle};
p ;
p "[[Date here]]";		                 		/*October 2020*/
p ;
run;

 

5 REPLIES 5
Athenkosi
Obsidian | Level 7

What are you trying to achieve so that I can help you?

 

 

 

 

PhilC
Rhodochrosite | Level 12

Forgive me, I was not clear, I am editing the question.  Thanks for your patience.

ballardw
Super User

I would start with something like this:

proc template;
source styles.htmlbw;
run;

The LOG will show the definition of the Parent style.

You may have to trace this back a few levels depending on exactly what you want to modify.

 

That may get you the names of things you want to modify. The syntax is not the same as CSS

 

If you replace a "class" instead of modifying it you may "orphan" items set in the class that are used elsewhere. You may be looking to override specific class statements and the source will help given a specific parent.

 

 

 

 

 

 

 

PhilC
Rhodochrosite | Level 12

Thanks, and sorry, I complain quietly about the inability of others to write proper questions, and then I fail to do so myself.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 5 replies
  • 1373 views
  • 0 likes
  • 3 in conversation