[Tikzdevice-bugs] Special characters?

Matthieu Stigler matthieu.stigler at gmail.com
Wed Apr 20 15:55:03 CEST 2011


Hi

Can I ask a further related question?

How does one make expressions to be recognised? Like in:


library(tikzDevice)
tikz("~/temp/examT.tex", standAlone=TRUE)
plot(runif(100), main=expression(rho==1))
dev.off()

does not come in greek... I looked in manual, did not find, maybe still 
section 4.5.5?

Thanks!

Matthieu

Le 20/04/2011 15:22, Cameron Bracken a écrit :
> Hi Matthieu-
>
> You are right, not verbose indeed ;), I will update that, thanks!
>
> You have two options:
>
> 1. Us the `sanitizeTexString()` function (recommended)
>
>      tikz('prob.tex')
>      plot(runif(100), main=sanitizeTexString("Unit: us$/t"))
>      dev.off()
>
> 2. Or for cases where you might not have direct access to the string
> use the `sanitize` option
>
>      tikz('prob.tex',sanitize=T)
>      plot(runif(100), main="Unit: us$/t")
>      dev.off()
>
> This option can be dangerous since it might sanitize characters that
> you do not expect. See ?sanitizeTexString for the default characters
> that are replaced and how to set your own replacement characters if
> you need to.
>
> Cheers,
> -Cameron
>
>
>
> On Wed, Apr 20, 2011 at 6:56 AM, Matthieu Stigler
> <matthieu.stigler at gmail.com>  wrote:
>> Hi
>>
>> I have a trouble with special characters... Hoped to find answers in sec
>> 4.5.5 but seems not so verbose :-)
>>
>> Problem is simply I have characters that have latex meaning:
>>
>> library(tikzDevice)
>>
>> tikz('prob.tex')
>>
>> plot(runif(100), main="Unit: us$/t")
>> dev.off()
>>
>> How can I solve this?
>>
>> Thanks!!
>>
>> Matthieu
>> _______________________________________________
>> Tikzdevice-bugs mailing list
>> Tikzdevice-bugs at lists.r-forge.r-project.org
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tikzdevice-bugs
>>



More information about the Tikzdevice-bugs mailing list