BookmarkSubscribeRSS Feed
MikeRhoads
Obsidian | Level 7
I would like to create a new template store that would contain 2 style templates:
(1) Printer92, which would be identical to Printer from sashelp.tmplmst,
(2) Printer, which would be identical to the original Printer except for the fonts.

The idea is that users could prepend the new template store in their ODS PATH statement, so they could get different fonts in their PDF output without having to specify style= on each ODS PDF statement, and without overwriting the SAS-supplied Printer style.

After looking into a number of ways to do this, the best (mentioned in a Tech Support note) seemed to be to use the EDIT statement in PROC TEMPLATE (full code below). This seems to work fine, and to be platform and version-independent. My only worry is that I don't see the EDIT statement in the 9.2 documentation for style templates. (I do see it for table templates.)

So, I'm wondering whether this use of EDIT has been deprecated with the 9.2 style syntax changes, and if there are some hidden dangers with it. (Or maybe I just missed it in the documentation?)

proc datasets library=work nolist nowarn;
delete pdf913 / memtype=itemstor;
quit;

proc template;
path work.pdf913 (UPDATE) sashelp.tmplmst (READ);
edit styles.printer as styles.printer92;
end;
edit styles.printer;
style fonts /
'TitleFont2' = ("Times",12pt,bold italic)
'TitleFont' = ("Times",13pt,bold italic)
'StrongFont' = ("Times",10pt,bold)
'EmphasisFont' = ("Times",10pt,italic)
'FixedEmphasisFont' = ("Courier",9pt,italic)
'FixedStrongFont' = ("Courier",9pt,bold)
'FixedHeadingFont' = ("Courier",9pt,bold)
'BatchFixedFont' = ("Courier",6.7pt)
'FixedFont' = ("Courier",9pt)
'headingEmphasisFont' = ("Times",11pt,bold italic)
'headingFont' = ("Times",11pt,bold)
'docFont' = ("Times",10pt);
end;
run;

ods path (prepend) work.PDF913 (READ);
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi, Mike:
I have only seen the EDIT statement used with TABLE templates...so I can't speak to the issue of whether 1) it ever worked with STYLE templates or 2) if it worked, whether it will continue to work with 9.2....

This might be a better question for the ODS folks in Tech Support.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 698 views
  • 0 likes
  • 2 in conversation