BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SmithCJGVSU
Obsidian | Level 7

I am using SAS 9.4M2 on SYSSCP=LIN X64.

 

I am trying to create a custom template with all fonts as "Times New Roman". 

proc template ;

define style MyStyleRTF ;

parent=styles.rtf ;

style fonts /

'TitleFont' = ("Times New Roman",10pt)

'TitleFont2' = ("Times New Roman",10pt)

'headingFont' = ("Times New Roman",10pt,Bold)

'docFont' = ("Times New Roman",10pt)

'footFont' = ("Times New Roman",10pt)

'StrongFont' = ("Times New Roman",10pt,Bold)

'EmphasisFont' = ("Times New Roman",10pt,Italic)

'headingEmphasisFont'= ("Times New Roman",10pt,Italic)

'FixedFont' = ("Times New Roman",10pt)

'FixedEmphasisFont' = ("Times New Roman",10pt,Italic)

'FixedStrongFont' = ("Times New Roman",10pt,Bold)

'FixedHeadingFont' = ("Times New Roman",10pt)

'BatchFixedFont' = ("Times New Roman",10pt) ;

 

 

end;

run;

 

However, after the output is produced.  The Font is "Times" not "Times New Roman" throughout the titles, footnotes, and report. 

ODS LISTING CLOSE;

ODS tagsets.RTF FILE="/<yourpath>/tagsetsrtf.rtf" style=MyStyleRTF options(VSPACE="NO") startpage=no;

 

title1 'Title 1';

footnote1 'Footnote 1';

data test;

length col1 text $80.;

text='n'; col1=' 9'; output;

text='mean'; col1=' 21.22'; output;

text='std'; col1=' 1.234'; output;

text='Q1, Q3'; col1=' 1.1, 99.1'; output;

text='min, max'; col1='123.3, 134.5'; output;

run;

proc report data=test;

column text col1;

define text / 'text' ;

define col1 / 'active';

run;

ODS tagsets.RTF close;

 

What is happening?

1 ACCEPTED SOLUTION

Accepted Solutions
SmithCJGVSU
Obsidian | Level 7

Sorry for the confusion, I was continuing to play with different parent styles (statdoc) I think, to see if the issue persisted.

 

I contacted SAS Tech support and the issue might be related to the fonts available on the Linux server at the time of the RTF creation.  The possible resolution will require SAS Admin rights, which I don’t have.  I’d recommend anyone else experiencing this issue to also create a SAS support ticket.

 

I would agree with you that the fonts are very similar, but I’d suspect it would make a medical writer twitch a bit. Smiley Happy

 

Thank you again, Cynthia to your prompt responses.

 

 

View solution in original post

6 REPLIES 6
Cynthia_sas
SAS Super FREQ

Hi:

  When I try your code, I do get Times New Roman font used when I open the RTF file with Word. However, are you sure that Times New Roman is available on the system that is opening the RTF file???

tnr_used_mycode.png 

 

  What I notice is that if I specify a font that doesn't exist on my system, like Times OLD Roman, then I just get the Times font used in Word, which is probably some default in Word based on finding "Times" in the font name. However, if I specify a totally bogus font name like 'Mites New Roman' or 'Cynthia Font' in the style template, then when I open the file in Word, I get the Courier font used.

 

You might want to open a track with Tech Support if you can't figure it out.

 

Cynthia

SmithCJGVSU
Obsidian | Level 7

Thanks Cynthia,

 

Yes, Times New Roman is available.  For what it's worth, I am using Microsoft Word 2013.  In fact, when I open a document and put the cursor before the first paragraph line...

Untitled.png

 

 

 

...that shows "Times New Roman".  But the actual title text is just "Times".

 

Sounds like it is something with the Word application, but I'll open a ticket and see where it goes.

 

Thanks!

 

Chris

SmithCJGVSU
Obsidian | Level 7

Attached is the actual RTF file.  I've tried opening up on several different versions of Word (Microsoft Word 2010, 2013, Office 365) and it is has the same result.

 

Cursor before leading paragraph shows application has Times New Roman.

TNR.png

 

 

 

 

 

 

 

 

 

Putting cursor in the titles, footnotes, or body of table shows "Times".

T.png

 

 

 

 

Cynthia_sas
SAS Super FREQ
Hi:
Did you get template error messages in the SAS log? That is not how your output should look when you use a parent template. That's not how my output looked in the screen shot when I ran your code.
My guess is that this is a Word oddity and honestly, I don't see great differences between "Times" and Times New Roman" ,but I'm not a font person. But the gray and blue output should NOT be what you see unless somehow your template step failed.
Cynthia
SmithCJGVSU
Obsidian | Level 7

Sorry for the confusion, I was continuing to play with different parent styles (statdoc) I think, to see if the issue persisted.

 

I contacted SAS Tech support and the issue might be related to the fonts available on the Linux server at the time of the RTF creation.  The possible resolution will require SAS Admin rights, which I don’t have.  I’d recommend anyone else experiencing this issue to also create a SAS support ticket.

 

I would agree with you that the fonts are very similar, but I’d suspect it would make a medical writer twitch a bit. Smiley Happy

 

Thank you again, Cynthia to your prompt responses.

 

 

Cynthia_sas
SAS Super FREQ
Ah, but the beauty of RTF is that once opened in Word, it is a simple CTRL+A to highlight the whole document and then the file font can be changed in Word if Times makes them too twitchy. Then just save the document. RTF files are designed to be editable.
Cynthia

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
  • 6 replies
  • 5453 views
  • 0 likes
  • 2 in conversation