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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 5 replies
  • 470 views
  • 0 likes
  • 3 in conversation