If the ODS ESCAPECHAR statement is used in conjunction with one or more of the following inline functions in a TITLE or FOOTNOTE statement, or inside data, headers, or ODS TEXT= text, the results appear double spaced in the PCL, PDF, or PostScript (PS) output created by ODS:
To circumvent the problem, use the SUB inline function, use hexadecimal values to insert the desired symbols, or change the fonts used by the ODS PRINTER destination as shown in the sample code below.
Solution 1 shows a problematic set of TITLE statements with workaround code illustrated in the FOOTNOTE statements. Solution 2 shows a font change to the Titlefont and Titlefont1 elements to prevent double spacing in the titles.
/* Solution 1 */
options nodate nonumber;
ods escapechar="^";
ods pdf file="solution1.pdf" notoc;
proc print data=sashelp.class;
/* Titles appear double spaced */
title "^{super 1}testing";
title2 "^{super 2}another test";
/* Footnotes appear single spaced */
footnote "B9"x "testing";
footnote2 "^{sub 2}another test";
run;
ods pdf close;
/* Solution 2 */
proc template;
define style styles.myprinter;
parent = styles.printer;
class 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' = ("SAS Monospace, Courier",6.7pt)
'FixedFont' = ("Courier",9pt)
'headingEmphasisFont' = ("Times",11pt,bold italic)
'headingFont' = ("Times",11pt,bold)
'docFont' = ("Times",10pt);
end;
run;
footnote;
options nodate nonumber;
ods escapechar='^';
ods pdf file="solution2.pdf" notoc style=styles.myprinter;
proc print data=sashelp.class;
/* Titles appear single spaced */
title "^{super 1}testing";
title2 "^{super 2}another test";
run;
ods pdf close;