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

I'm getting warning in log when using superscript 'Monotype Shorts" font symbol in the footnote.

Ex. 

ods rtf ;
footnote1 height=5 PCT justify=left
font='Monotype Sorts' color=CX009900 ^{super '6E'X} font=Ariel  " Point 1";
data a;
    a='a';
run;

proc print; run;
ods rtf close;

Log: 

WARNING: The FOOTNOTE statement is ambiguous due to invalid options or unquoted text.

If I try to quote i.e. "^{super '6E'X}", It displays some different symbols. Tried to store in macro variable however didn't work. Any solution ? Please don't ask to use different font. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Quentin
Super User

That last example with letter n I posted works for me on PC SAS 9.4M4:

 

ods escapechar='^' ;

ods rtf file='c:\junk\me.rtf'; footnote1 height=5 PCT justify=left font='Monotype Sorts' color=CX009900 "^{super n}" font=Arial " Point 1"; data a; a='a'; run; proc print; run; ods rtf close;

Quentin_0-1587748205966.png

There are no nested quotes, so all of the quotes have the usual meaning, to define a text string.

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

View solution in original post

10 REPLIES 10
Quentin
Super User

Edit: Sorry, below is wrong. : )

 

Hi,

The quoted font name with a space is fine.  The problem is the superscript part is text for the title, so it needs to be in quotes, e.g.:

 

footnote1 height=5 PCT justify=left
font='Monotype Sorts' color=CX009900 "^{super '6E'X}" font=Arial  " Point 1";

 

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Lenith
Obsidian | Level 7
Thanks for reply, however that doesn't work. It displays a set of symbols instead of desired one because quote itself taken as a keypunch for a symbol.
Quentin
Super User

Gotcha, I see what you're doing now.  It's not a font problem. This code works:

 

footnote1 "AAA"  "^{super foo}" "BBB";

You need the ^{super foo} part inside quotes so that SAS knows it is part of the title value, and not an option for the title statement.

 

But you're trying to put a hex code in there, like:

footnote1 "AAA"  "^{super '6E'X}" "BBB";

And when you do that, SAS sees '6E'x as a 5-character string, instead of a hex value.  

 

Someone else will know a solution. I thought maybe:

footnote1 "AAA"  '^{super ''6E''X}' "BBB";

But that gives the same results as above.

 

Maybe there's some other way to encode '6E'X that doesn't require quotes?   Wait, isn't '6E'x just the character n?  

 

Looks like I get the result you want with just:

footnote1 height=5 PCT justify=left
font='Monotype Sorts' color=CX009900 "^{super n}" font=Arial  " Point 1";

 

 

 

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Lenith
Obsidian | Level 7
Tried with 'n' letter but that also didn't work. It prints 6 different symbols before "Point 1".
Lenith
Obsidian | Level 7
As soon as we put quotes after font "Monotype Sorts'is declared, quotes are interpreted as symbols, and that's problem i believe.
Quentin
Super User

That last example with letter n I posted works for me on PC SAS 9.4M4:

 

ods escapechar='^' ;

ods rtf file='c:\junk\me.rtf'; footnote1 height=5 PCT justify=left font='Monotype Sorts' color=CX009900 "^{super n}" font=Arial " Point 1"; data a; a='a'; run; proc print; run; ods rtf close;

Quentin_0-1587748205966.png

There are no nested quotes, so all of the quotes have the usual meaning, to define a text string.

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Lenith
Obsidian | Level 7
Oh yes, That worked. May be I did something wrong last time.
Thanks alot @Quentin 🙂
Tom
Super User Tom
Super User

Not that if you did want to use hexcode that did not happen to be something simple like a lowercase letter you could use the byte function to generate it as a string.

"^{super %qsysfunc(byte(06Ex))}"
Lenith
Obsidian | Level 7
Thank you @Tom . It did work as well. I was under impression that byte function works with numbers 1-255 only.
Tom
Super User Tom
Super User
BYTE() should work with numbers from zero to 255. Or in hexadecimal notation from 0x to 0FFx.

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
  • 10 replies
  • 2631 views
  • 5 likes
  • 3 in conversation