Skip to content

pdf greek letter typos

4 messages · Eduardo de Oliveira Horta, Brian Ripley, Philipp Pagel +1 more

#
Hi there,

yet on the topic of greek letters and pdf plotting: when I run the
following code

pdf(file="temp.pdf")
mu=seq(from=-pi, to=pi, length=100)
plot(mu, sin(mu^2),
     type="l",
     xlab=expression(mu%in%(list(-pi,pi))),
     ylab=expression(sin(mu^2)),
     main=expression((list(mu,sin(mu^2)))))
dev.off()

I get a "proportional to" symbol in place of a "mu" and a "not equal
to" in place of a "pi" (see attached file). If I run only

mu=seq(from=-pi, to=pi, length=100)
plot(mu, sin(mu^2),
     type="l",
     xlab=expression(mu%in%(list(-pi,pi))),
     ylab=expression(sin(mu^2)),
     main=expression((list(mu,sin(mu^2)))))

then the characters are displayed correctly.

I would like to know if there is any sort of fixes to this problem,
such as specifying the symbols font or embedding fonts into the pdf
file. Any help would be welcome.

Thanks in advance and best regards,

Eduardo Horta
-------------- next part --------------
A non-text attachment was scrubbed...
Name: temp.pdf
Type: application/pdf
Size: 5726 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110127/65b8ba1c/attachment.pdf>
#
Please do read the help page (and state your platform).  This is s 
known PDF viewer bug.  E.g.:

      If you see problems with PDF output, do remember that the problem
      is much more likely to be in your viewer than in R.  Try another
      viewer if possible.  Symptoms for which the viewer has been at
      fault are apparent grids on image plots (turn off graphics
      anti-aliasing in your viewer if you) and missing or incorrect
      glyphs in text (viewers silently doing font substitution).

See also the section on 'Cairo fonts' in ?X11, which has a diagnosis 
and workaround.
On Thu, 27 Jan 2011, Eduardo de Oliveira Horta wrote:

            

  
    
#
On Thu, Jan 27, 2011 at 01:29:31AM -0200, Eduardo de Oliveira Horta wrote:
In my PDF viewer (okular, debian LINUX) the file looks ok. This may
very well be a problem with your pdf viewer. E.g. at work, we are
running fedora and there I have experienced a number of problems like
yours caused by a problem with font substitution in some version of
the poppler library which is uses by many LINUX PDF viewers. Try to
view the file in acrobat reader and possibly other viewers. Also: the
files I had issues with printed correctly.

cu
	Philipp
#
Eduardo,
On 01/27/2011 12:53 PM, Philipp Pagel wrote:
I'm running Ubuntu, and uninstalling package ttf-symbols-replacement did the 
trick for evionce & Co. on my system (acrobat reader was never affected; but 
used to show pdfs with transparency quite ugly - there was a discussion with 
solutions to both problems on the ggplot2 list last fall).

HTH,

Claudia