e: [OS X TeX] utf8 problem and one TeXShop bug

Chabot Denis chabotd at globetrotter.net
Thu Apr 19 03:49:16 CEST 2007


Hi Herb and Peter,

 From Herb
> Howdy,
>
> 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
>
> %&program=pdflatex
>
> 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
>
thanks for the tip about the first 2 lines of a TeXShop file. I'll do  
this in the future. It will help when I do \input{}.

But in this example, I took care of setting the encoding to utf8 in  
preferences before opening this file, and all the accented vowels and  
degree signs etc. display just fine in TeXShop. It is the compilation  
that fails. Adding the two lines you and Peter suggest (%%!TEX  
encoding = UTF-8 Unicode) did not help, I still get the error.

 From Peter:
> Since TeXShop does not seem to be reliably working with UTF-8, can
> you try again on command line or in some other tool? And can you then
> make sure that no other output from your LaTeX file exists,
> particularly no AUX file? This could cause also a problem.

It still refuses to compile when all aux, log, etc. files are removed.

>
> I can *provoke* a similiar error when I comment
>
> 	\usepackage[full]{textcomp}

> ...

> When this package is loaded, the log and the output are both fine.
>
I get the error whether this line is commented or not.


>
> Thinking further, it seems TeXShop makes some error that leads to
> some invisible character in your message. This invisible character
> can only exist in an encoding in which the "8 bit control characters"
> in the range of decimal 128-159 are used to encode useful characters.
> This happens in Mac Roman, NeXT, and some MS Windows Code Pages.
>
>
> BTW, which are your Unicode characters? I can only see some ISO
> Latin-1/ISO 8859-1 entities, that the textcomp encoding can easily
> handle: ° É à è é î.
>
>
iso Latin 1 can handle my text just fine. In fact the above example  
compiles fine when encoding is iso latin 1. My pdf output did not  
make it to the list, you can see the file here instead:
http://207.134.209.235:88/temp/test2_latin.pdf

I don't see any character in this text that should provoke an error.  
This example came from a 100 page report that compiled fine when  
encoding was iso Latin 1. It still compile fine if I remove this  
small table. I don't see what is special about this table.

For now I'll keep this document in iso Latin 1, it is just more  
confusing when some of my files are in one encoding and others are in  
another. With R and Sweave (which allow me to combine R commands  
within a LaTeX document), I need UTF8 and I thought I'd standardize  
on this. I guess I can't do this until I understand better what fails  
with my example.

Denis
------------------------- 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 macostex-archives mailing list