Re: [Rd] Rnw file generated strange symbols in pdf file

From: Ben Bolker <>
Date: Tue, 24 Jan 2012 16:44:54 +0000

Zhu Wang <Zwang <at>> writes:

> I found my Rnw file generated strange symbols in pdf file.
> For instance, on page 4 of the following file,

> you can see Belcher et~al on line 2, and Figure~1 on line 5. The
> symbol ~ should not appear in the pdf file although the symbol was
> in the original Rnw file (something like Figure~\ref{...},
> section~\ref{...}). On page 1, the symbol ~ also appears after
> Keywords but in my original Rnw file I have \Keywords{continuous
> time autoregressive model, state space model, Kalman filter, Kalman
> smoothing, \proglang{R}}.

> The symbol ~ didn't appear in the generated pdf file with the early
> R version before 2.14, if my memory serves me correctly. So what's
> wrong here and how to correct it rather than modifying my original
> Rnw file?

  This has come up before, I'm not sure what the current status is, not what gets run on CRAN. I know that if I use texi2pdf on my (now fairly old) 10.04 version of Ubuntu, I get the 'tilde problem' if I use texi2pdf but not if I use pdflatex. If I \usepackage[english]{babel} the problem also goes away.

References: says: If you use both natbib and babel packages, load natbib before babel to prevent tilde showing up in citations. Loading natbib after babel and using citep-command will make “et al.” shown as “et~al.”. mailing list Received on Tue 24 Jan 2012 - 17:04:59 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 24 Jan 2012 - 17:40:12 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive