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

I can see how to use special characters in ENTRY statement but how do I do the same for the axis label coming from variable label or LABEL= option in LAYOUT OVERLAY.

ENTRY 'R' {sup '2'};

This works but I tried similar in LABEL, but the above syntax is not correct for LABEL.

1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

DN,  You'll have to lookup the character but, as long as their is a unicode equivalent for the sup script digits you want to include, the doc states:

And, there is a unicode superscript 2, see: http://www.fileformat.info/info/unicode/char/b2/index.htm

The {UNICODE}, {SUB}, and {SUP} text commands apply only to the ENTRY, ENTRYTITLE, and ENTRYFOOTNOTE statements. However, strings that are assigned to axis labels, curve labels, legend labels, and so on, can present Unicode characters using what is called "in-line formatting." To use this special formatting, you embed within the string an ODS escape sequence followed by a text command. Specifically, whenever you include (*ESC*) in a quoted string, it signals that the next token represents a text command. Currently, only the {UNICODE} text command is recognized, not {SUB} or {SUP}.

View solution in original post

2 REPLIES 2
art297
Opal | Level 21

DN,  You'll have to lookup the character but, as long as their is a unicode equivalent for the sup script digits you want to include, the doc states:

And, there is a unicode superscript 2, see: http://www.fileformat.info/info/unicode/char/b2/index.htm

The {UNICODE}, {SUB}, and {SUP} text commands apply only to the ENTRY, ENTRYTITLE, and ENTRYFOOTNOTE statements. However, strings that are assigned to axis labels, curve labels, legend labels, and so on, can present Unicode characters using what is called "in-line formatting." To use this special formatting, you embed within the string an ODS escape sequence followed by a text command. Specifically, whenever you include (*ESC*) in a quoted string, it signals that the next token represents a text command. Currently, only the {UNICODE} text command is recognized, not {SUB} or {SUP}.

data_null__
Jade | Level 19

Thanks Art I did not find that section in the online doc.

So using (*ESC*){unicode beta} works well in label  there are keywords for all the upper and lower case Greek letters.  I could not figure out how to inter Unicode strings like \u00b2 which I think represents something that in many fonts looks like a superscript 2.

I was successful entering the character directly using BYTE(178).  Or I could use 'b2'x but I embedded the character in a double quoted string using %SYSFUNC(BYTE(178),$1.).

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 3198 views
  • 0 likes
  • 2 in conversation