BookmarkSubscribeRSS Feed
MattR
Calcite | Level 5

Hi,

I have some superscripts on a report which I am running in both rtf and pdf formats. The superscripts work just fine, but the problem is that the pdf superscript defaults to a huge font (larger than the heading text). The rtf remains smaller than the heading text, but is actually a bit TOO small and could probably be made larger.

For example:

Code:

"Heading^{super a}"

RTF:

rtf.jpg

PDF:

pdf.jpg

I have searched for a fix but can't find anything. Does anyone know if there is a way to change the font size for superscripts?

Thanks much!

6 REPLIES 6
Reeza
Super User

Try the style options?

ods pdf text= "^{style [just=c fontsize=14pt font_face=arial font_weight=bold] This is my text}";
MattR
Calcite | Level 5

Thanks for the reply. Yes, this works for rtf output if I nest it in the superscript code:

  "Heading^{super ^{style [just=c fontsize=10pt font_face=arial] a}}"

But for some reason it doesn't work the same for pdf. When I use the same code in a pdf, it ignores the superscript instruction and makes the whole line change font. Not sure what's going on with that.

Cynthia_sas
SAS Super FREQ

Hi:

  Well, I'm not entirely certain that this is the cause and you might want to open a track with Tech Support. It was my understanding that Adobe did not use or "like" Arial -- which is a Microsoft specific font (read this article for the background info: The Scourge of Arial.) I believe that if you change the font and/or restructure your statement, that the output will look better.

  I tried the code below (in SAS 9.3) and got better results. I think that you can fix most of the issue by setting an explicit font size for the word "Heading" and then a separate (non-Arial font) for the size and the superscript. Personally, I like to keep the ^{super } escapechar function as self-contained -- so I would have done the style change first and then the super invocation.

cynthia

ods listing close;

ods escapechar='^';

ods pdf file='c:\temp\testsuper.pdf' notoc;

ods rtf file='c:\temp\testsuper.rtf';

ods html file='c:\temp\testsuper.html';

 

title1 "^{style[just=c font_size=14pt font_face=Courier]Heading}^{style [just=c font_size=12pt font_face=Courier]^{super a}}";

proc print  data=sashelp.class (obs=2);

run;

ods _all_ close;

MattR
Calcite | Level 5

Thanks Cynthia. The font of Arial isn't critical at all; just used it for testing. Smiley Happy  Courier will probably work better, actually.

Your code revision fixed the problem of SAS changing the "Heading" font, which looks much better! But still the superscript won't change size. I tried everything from font_size=6pt to 24pt and it is always the same size (in pdfs, that is). So, yep, maybe this is a tech support issue?

Thanks again,

Matt

MattR
Calcite | Level 5

Ok, got a reply from the help desk, which I'll re-post in case anyone else has a similar problem. They stated that there isn't a way to size superscripts on a pdf at the moment. As a quick fix, they recommended I try unicode:

     "Heading^{unicode 00AA}";

Which happened to work great for what I needed, which is only a superscript "a". However, it doesn't solve the problem because there is no unicode superscript for any other letters.

Hopefully this will be fixed in future SAS versions!

SasUser2004
Calcite | Level 5

Has this been addressed in the later versions of Sas. What is the fix now for other superscripts in PDF report?

 

Thanks.

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
  • 3626 views
  • 6 likes
  • 4 in conversation