On 2012-08-21 08:28, Brian Kriegler wrote:
All of these suggestions are great.  Let me add one other dimension.
  Suppose I want to add curly quotations, italicize, underline, or bold
some of the words.  I can get this to work:

plot(-15:15,15:-15, pch=NA)
text(x=0, y=5,
expression(bold(This)~is~a~underline(test)^1~of~the~italic(Emergency)~Broadcast~System.))



I can also get this to work:


text(x=0, y=-5, dQuote("This is another test."))

But, I've wrestled getting curly quotes to work within expression().

Any suggestions are greatly appreciated.

-Brian

[....]

Font issues can be system-dependent. The following works for me on Windows.

Insert unicode characters in the appropriate places. For example,
to place double quotes around the word 'Broadcast' in your
example above:

 text(0, 5, expression(....~"\u201c"*Broadcast*"\u201d"~System))

Don't forget the '*' to concatenate the quote symbols with the word.

Peter Ehlers

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to