Sweave doesn't seem to get .Rnw file encoding right

后端 未结 1 1862
误落风尘
误落风尘 2020-12-21 08:51

This question arose out of the following question on tex.sx: Sweave generating invalid LaTeX. The problem seems to be that Sweave is not recognizing the encodin

相关标签:
1条回答
  • 2020-12-21 09:30

    Potential fix:

    Try putting

    export LANG=en_US.UTF-8
    

    in your TeXShop script.

    (Original idea was in the ~/.bashrc file, but apparently TeXShop doesn't load that.)

    EARLIER:

    What happens when you put sessionInfo() in the Rnw file?

    \documentclass{article}
    \usepackage[utf8]{inputenc}
    \begin{document}
    Some non-ascii text: éüáî
    <<>>=
    sessionInfo()
    @ 
    \end{document}
    
    0 讨论(0)
提交回复
热议问题