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);
... View more