[OS X TeX] encoding and special characters in TexShop

Robert Spence spence at saar.de
Sun Sep 17 12:10:18 CEST 2006


On 17 Sep 2006, at 09:36 , Alex Hamann wrote:

>
> Am 14.09.2006 um 11:50 schrieb Bruno Voisin:
>
>> Le 14 sept. 06 à 11:08, Alex Hamann a écrit :
>>
>>> 1. Encoding:
>>> when choosing a given way of encoding my tex documents can that  
>>> make calling the inputenc package obsolet?
>>> to be precise: can I not call the inputenc package when encoding  
>>> a german document with isolatin?
>>
>> No, you must call it (with option [latin1] in your case).  
>> Otherwise LaTeX won't know what to do with your non-ASCII input.  
>> See, for ISO Latin 1, the file /Library/teTeX/share/texmf.tetex/ 
>> tex/latex/base/latin1.def which tells LaTeX, when calling  
>> inputenc, how to interpret your non-ASCII input.
>>
> Works fine but only when calling the [applemac].
>  [latin1] leeds to the following problem:
>
> ! Package inputenc Error: Keyboard character used is undefined
> (inputenc)                in inputencoding `latin1'.
>
> why is this so? I thought latin1 and applemac were interchangable  
> on a mac.

No no! They're quite different!  [latin1] is ISO 8859-1, which works  
OK for most Western European languages, and is probably what your  
collaborators are using under Windows (if that's what they're using)  
and which they may be using under Linux (or under Mac OS, now that  
it's Mac OS X).  [applemac] is the Macintosh (standard, i.e. not  
Central European) encoding, which you'll only really find useful on a  
Mac; there's no real reason to keep on using it unless you have old  
documents created, say, under Mac OS 9 or earlier.  Which text editor  
are you using to create your own input text, and which encoding is it  
set to by default?  If it's set to "Western (Mac OS Roman)", i.e. the  
Macintosh (standard) encoding, then you'll always need \usepackage 
[applemac]{inputenc} in your preamble.  But what text editors do your  
collaborators use, on which platform?

Any chance of persuading everyone to work in UTF-8 encoding, as Bruno  
suggested?

>> An alternative is to switch to XeTeX, which expects UTF-8 input  
>> natively: you just have to select UTF-8 encoding in TeXShop, and  
>> XeTeX will process your input text directly without needing any  
>> dedicated LaTeX package to do so.

A quick search of my bulging mailboxes showed that Peter Dyballa, on  
the XeTeX list, discussed some ways of converting the input encoding  
of .tex files, using (of course) Emacs, back on 11 Jul 2006
(Subject line was
Re: [XeTeX] Converting legacy encodings to utf-8
),
and then there was a thread started back on 13 Jan 2006 by Bastian  
Philipps
(Subject line was
[OS X TeX] Suggestions about input encoding - utf-8, latin1, latin9??
),
which referred to an earlier thread entitled "Textencoding MacOS  
Roman vs UTF-8".

It might be a good idea to make an extra set of backups of all your  
files before starting to play around with converting them from one  
encoding to another.
;-)

Good luck...

-- Rob Spence------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list