Hi,

I work on MacOS, trying to Sweave an UFT8 document.
AFAI remember R 2.14 used to render a warning when the encoding was not
declared when using Sweave.
With R 2.15 it seems to render an error.

Sweave("sim_pi.Rnw")
Error: 'sim_pi.Rnw' is not ASCII and does not declare an encoding

Declaring an encoding by adding a line like

\usepackage[utf8]{inputenc}

in the preamble does the job. In my case though the .Rnw document does no
have a preamble as it is just one chapter.
All chapters are Sweaved separately (due to computation time). Hence I
cannot inject the above line as LaTex will cause an error afterwards.
(usepackage{} is only allowed in the preamble which only appears once in
the main document, not in each chapter).

How can I get around this not using the terminal for Sweaving, like e.g.
R CMD Sweave --encoding=utf-8 sim_pi.Rnw  ?

Thanks
Mark

	[[alternative HTML version deleted]]

