[OS X TeX] utf8 problem and one TeXShop bug

Herbert Schulz herbs at wideopenwest.com
Wed Apr 18 10:27:35 EDT 2007

On Apr 16, 2007, at 9:21 PM, Chabot Denis wrote:

> Hi,
> More and more I'm using
> \usepackage[utf8]{inputenc}
> instead of
> \usepackage[latin1]{inputenc}
> because I often combine output from R (open source stats package  
> that prefers utf8 on mac) with LaTeX.
> I had a document that compiled well when it was set to iso latin 1,  
> but fails after I converted all the components to uft8 (no BOM)  
> with TextWrangler.
> To be precise, one table fails.
> I have made a short document for the list.
> %&program=pdflatex
> \documentclass[12pt]{article}
> \usepackage{geometry} % see geometry.pdf on how to lay out the  
> page. There's lots.
> \usepackage[T1]{fontenc}
> \usepackage[full]{textcomp}
> \usepackage{txfonts}  % au lieu de lmodern, pour avoir Times Roman
> %\usepackage{lmodern}
> %\usepackage[latin1]{inputenc}
> \usepackage[utf8]{inputenc}
> \usepackage[french,english]{babel}
> \usepackage{array}   % me permet de faire des colonnes "p"  
> justifiées à gauche dans Tab.x
> \usepackage{booktabs} % ``Proper'' table layout
> ...


The problem might be that TeXShop isn't OPENING the file in UTF-8,  
it's assuming the default you have set.

Put the lines

%%!TEX TS-program = pdflatex
%%!TEX encoding = UTF-8 Unicode

and it will automatically be saved and opened as unicode. Actually  
the first line should replace the


line since that notation is deprecated because of conflicts when  
using TeXShop engines and some compilers.

I too have had problems with TeXShop 2.10beta8 not opening files with  
the chosen encoding when using the Open... command. :-(

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)

------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/

More information about the MacOSX-TeX mailing list