[R] Sweave (R?) font encoding problems

Friedrich.Leisch@tuwien.ac.at Friedrich.Leisch at tuwien.ac.at
Sat Oct 29 04:17:28 CEST 2005


>>>>> On Mon, 31 Oct 2005 16:46:24 +0100,
>>>>> Luís Torgo (LT) wrote:

  > Dear R list,
  > I'm having some problems with font encodings when using R+Sweave+Latex in my 
  > native language: Portuguese.

  > My environment:
  > Kubuntu 5.10 Linux
  > $> uname -a
  > Linux nassa 2.6.12-9-686 #1 Mon Oct 10 13:25:32 BST 2005 i686 GNU/Linux

  R> R.version
  >          _                
  > platform i486-pc-linux-gnu
  > arch     i486             
  > os       linux-gnu        
  > system   i486, linux-gnu  
  > status                    
  > major    2                
  > minor    1.1              
  > year     2005             
  > month    06               
  > day      20               
  > language R  
  R> Sys.getlocale()
  > [1] 
  > "LC_CTYPE=pt_PT.utf-8;LC_NUMERIC=C;LC_TIME=pt_PT.utf-8;LC_COLLATE=pt_PT.utf-8;LC_MONETARY=pt_PT.utf-8;LC_MESSAGES=pt_PT.utf-8;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C"
  R> localeToCharset()
  > [1] "ISO8859-1"


  > Here is a small example trying to replicate my problems:

  > File:exp.Rnw
  > ================================
  > \documentclass[10pt,twoside]{article}
  > \usepackage[dvips]{graphicx}
  > \usepackage[portuges]{babel}
  > \usepackage[latin1]{inputenc}
  > \usepackage[T1]{fontenc}

You use a UTF-8 locale but load latin1 input encoding in latex -> that
cannot work.

Try

\usepackage[utf8]{inputenc}

and no special fontenc setting -> works for me for Austrian German.

HTH,

-- 
-------------------------------------------------------------------
                        Friedrich Leisch 
Institut für Statistik                     Tel: (+43 1) 58801 10715
Technische Universität Wien                Fax: (+43 1) 58801 10798
Wiedner Hauptstraße 8-10/1071
A-1040 Wien, Austria             http://www.ci.tuwien.ac.at/~leisch




More information about the R-help mailing list