dimitriy
dimitriy

Reputation: 9460

ASCII Code for Uppercase/Capital R with a Tilde Character Above

I am trying to get the equivalent of LaTeX's $\tilde R$ in a Stata graph axis label. I don't thinks there's a SMCL way of doing that, but it's possible to use ASCII characters. However, there does not seem to be an ASCII code for an uppercase/capital R with a tilde above it.

Is there any way around that? Is it possible to combine ASCII characters somehow?

Upvotes: 2

Views: 728

Answers (2)

dimitriy
dimitriy

Reputation: 9460

In Stata 14, this can be accomplished with:

`=ustrunescape("\u0052\u0303")'

This combines the Unicode for capital R with the one for tilde.


MVE:

sysuse auto, clear
tw scatter price mpg, title(`=ustrunescape("\u0052\u0303")')

should produce something like this (modulo scheme):

enter image description here

Upvotes: 2

Nick Cox
Nick Cox

Reputation: 37233

EDIT: From Stata 14. Stata supports Unicode.

ORIGINAL ANSWER for versions up to Stata 13:

The user-written program asciiplot (SSC) displays those characters available to you via char(), depending on what alphabet you are using. Your mileage may differ, but I see no such character.

Stata does not, at this writing, support LaTeX or over-striking or combinations of ASCII characters.

Upvotes: 2

Related Questions