[Tex/LaTex] Which encoding should I use with TeXShop on a Mac

input-encodingstexshop

TeXShop seems to default to 'Western (ISO Latin 9)', but a template I've been using is defaulting to 'Western (Mac OS Roman)'. I'm using a package

Which encoding should I use with TeXShop on a Mac?

NB I'm using TeXShop for undergraduate mathematics assignments in english only.

Best Answer

You can set the encoding for a file by adding a suitable string at the beginning:

MacOS Roman

% !TEX encoding = MacOSRoman

Latin-9

% !TEX encoding = IsoLatin9

UTF-8

% !TEX encoding = UTF-8 Unicode

If TeXShop sees one of these lines, it will not use the default encoding set in the preferences for the file, but the one specified. You need not remember them: go to the menu Macros>Encoding and choose the encoding you want in the window that appears.

They correspond, in the same order, to

\usepackage[applemac]{inputenc}
\usepackage[latin9]{inputenc}
\usepackage[utf8]{inputenc}

and the corresponding declaration must be issued in the LaTeX main document.

I recommend having the introductory string in the older files and then changing the default encoding to UTF-8.

Related Question