Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Small-caps in R legend?

Tags:

text

r

smallcaps

This is a simple question.

I am trying to write a legend with text in small caps in R.

I can write the plot using tikzDevice and manually change the plot to small-caps in LaTex, but I want to know if it's possible in R itself?

Thanks.

This is the R code I am using so far:

legend("bottomright", inset=.05, c(expression(Delta*ZRT1), expression(Delta*ZRT2)), lty=1:2, pch=1:2)

This is the LaTex expression I am trying to get into the R legend:

\Delta Z\textsc{rt\oldstylenums{1}}

like image 336
Frank Zafka Avatar asked Jun 16 '11 09:06

Frank Zafka


1 Answers

The Unicode standard does define a number of "small capital" characters in the IPA extensions. E.g., using this Smallcaps Generator: http://fsymbols.com/generators/smallcaps/

plot(1L:10, main="Aʙᴄᴅᴇғɢʜɪᴊᴋʟᴍɴᴏᴘǫʀsᴛᴜᴠᴡxʏᴢ")
legend("bottomright", expression(\Delta Zʀᴛ1")

enter image description here

As of Unicode 5.1, the only characters missing to allow representation of the full Latin alphabet in small capital Unicode characters are small capital versions of Q and X. See also here: http://en.wikipedia.org/wiki/Small_caps#Unicode

like image 107
rcs Avatar answered Oct 20 '22 07:10

rcs