BookmarkSubscribeRSS Feed
jth128
Fluorite | Level 6

Hi all,

I am creating a style that should have the footnote font size as being different from that of the title yet they both are coming out as the same size. The style definition is below:

proc template;

    define style styles.c_rtf / store=work.templat;

    parent=styles.journal;

    replace fonts /

        'TitleFont' = ("Arial",12pt,Bold) /* Titles from TITLE statements */

        'TitleFont2' = ("Arial",12pt,Bold) /* Procedure titles ("The _____ Procedure")*/

        'StrongFont' = ("Arial",9pt,Bold)

        'EmphasisFont' = ("Arial",9pt,Italic)

        'headingEmphasisFont' = ("Arial",9pt,Bold)

        'headingFont' = ("Arial",9pt,Bold) /* Table column and row headings */

        'docFont' = ("Arial",9pt) /* Data in table cells */

        'footFont' = ("Arial",12pt,Bold) /* Footnotes from FOOTNOTE statements */

        'FixedEmphasisFont' = ("Courier",9pt,Italic)

        'FixedStrongFont' = ("Courier",9pt,Bold)

        'FixedHeadingFont' = ("Courier",9pt,Bold)

        'BatchFixedFont' = ("Courier",6.7pt)

        'FixedFont' = ("Courier",9pt)

    ;

    replace Body from Document /

        bottommargin = &bmargin.

        topmargin = &tmargin.

        rightmargin = &rmargin.

        leftmargin = &lmargin.

    ;

    replace Table from Output /

        frame = hsides /* outside borders: void, box, above/below, vsides/hsides, lhs/rhs */

        rules = groups /* internal borders: none, all, cols, rows, groups */

        cellpadding = 3pt /* the space between table cell contents and the cell border */

        cellspacing = 0pt /* the space between table cells, allows background to show */

        borderwidth = 1pt /* the width of the borders and rules */

    ;

    end;

run;

It is being called in as follows:

ods rtf startpage=yes bodytitle style=c_rtf body="file.rtf";

The titles are coming out correctly as 12pt but the footnotes are 12pt when they should be 9pt. SAS 9.3 is being used and the document body contains any titles and footnotes; none are in the document headers or footers and that is a house style requirement. Could there be anything that I should be doing differently?

Thanks in advance,

John

6 REPLIES 6
ballardw
Super User

Have you tried modifying

'footFont' = ("Arial",12pt,Bold)

to 9pt?

jth128
Fluorite | Level 6

Unfortunately, I did and got the same result. Sorry for not spotting that I made an error when copying code. Here's what it should have been:

proc template;

    define style styles.c_rtf / store=work.templat;

    parent=styles.journal;

    replace fonts /

        'TitleFont' = ("Arial",12pt,Bold) /* Titles from TITLE statements */

        'TitleFont2' = ("Arial",12pt,Bold) /* Procedure titles ("The _____ Procedure")*/

        'StrongFont' = ("Arial",9pt,Bold)

        'EmphasisFont' = ("Arial",9pt,Italic)

        'headingEmphasisFont' = ("Arial",9pt,Bold)

        'headingFont' = ("Arial",9pt,Bold) /* Table column and row headings */

        'docFont' = ("Arial",9pt) /* Data in table cells */

        'footFont' = ("Arial",9pt,Bold) /* Footnotes from FOOTNOTE statements */

        'FixedEmphasisFont' = ("Courier",9pt,Italic)

        'FixedStrongFont' = ("Courier",9pt,Bold)

        'FixedHeadingFont' = ("Courier",9pt,Bold)

        'BatchFixedFont' = ("Courier",6.7pt)

        'FixedFont' = ("Courier",9pt)

    ;

    replace Body from Document /

        bottommargin = &bmargin.

        topmargin = &tmargin.

        rightmargin = &rmargin.

        leftmargin = &lmargin.

    ;

    replace Table from Output /

        frame = hsides /* outside borders: void, box, above/below, vsides/hsides, lhs/rhs */

        rules = groups /* internal borders: none, all, cols, rows, groups */

        cellpadding = 3pt /* the space between table cell contents and the cell border */

        cellspacing = 0pt /* the space between table cells, allows background to show */

        borderwidth = 1pt /* the width of the borders and rules */

    ;

    end;

run;

ballardw
Super User

you may need to add and modify:

   style SystemFooter from TitlesAndFooters /

      font = Fonts('TitleFont'); /*change the font here to your footfont instead of titlefont

jth128
Fluorite | Level 6

Thanks for that . The following got me sorted and I now have what I need:

replace SystemFooter from TitlesAndFooters /
   font = Fonts('footFont') /* Ensure that footer font is not title font */

    ;

Cynthia_sas
SAS Super FREQ

Hi:

  Since SAS 9.2, the use of the REPLACE statement has not been recommended. In fact, the REPLACE statement now will work just like the CLASS or STYLE statement. Here's the paper from SUGI 31 (2005/2006) that explains how REPLACE was going away. http://www2.sas.com/proceedings/sugi31/053-31.pdf

The other thing you could have done is just bypass the font list and coded a direct font reference like this:
    

class SystemFooter /

    font = ("Courier, Helvetica, sans-serif",20pt,bold italic);

end;
   

The code below worked for me in SAS 9.4.

Cynthia


ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);

     

proc template;
define style styles.footbig;
parent=styles.htmlblue;
class SystemFooter /
    font = ("Courier, Helvetica, sans-serif",20pt,bold italic);
end;
run;
      
ods html file='c:\temp\footbig.html' style=styles.footbig;
     
proc print data=sashelp.class;
title 'My Title';
footnote 'My Footnote';
run;

ods html close;
title; footnote;

jth128
Fluorite | Level 6

Thanks Cynthia

PROC TEMPLATE is a little new to me so your advice is helpful. I have gone with you suggestions and they seem to work for me with a SAS 9.3 (DMS) system.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 6 replies
  • 3908 views
  • 8 likes
  • 3 in conversation