viernes, 8 de febrero de 2013

How to make Sweave work with accents


I couldn't write an.Rnw file in Rstudio with accents as part of the document. Say

\section{Introducción}

would produce a compilation error every time, so I had to write it like this:

                                         \section{Introducci\'on}

which is pretty annoying and time consuming.

I managed to make it work by reopening the .Rnw in Rstudio with the LATIN1 encoding.

I just clicked on Reopen with encoding in the File menu and checked the box saying Show all ecodings. There I clicked on LATIN1 and voilà! No I can write however I want.


Hope this helps somebody out there.

No hay comentarios:

Publicar un comentario