[OS X Emacs] Migration from TeXShop to Aquamacs Emacs

Thomas Käufl kaeufl at ira.uka.de
Tue Jul 1 18:18:53 EDT 2008


Am 1. Jul 2008 um 13:22 schrieb Karim Barkati:

> ...
> I noticed AE doesn't seem to recognize mac-roman encoding, which is  
> the default
> encoding of TeXShop. I have to select 'Options -> Language -> Set  
> Coding Systems
> -> For Reverting This File Now', and then type 'mac-roman' to get  
> rid of all
> annoying '\216'-like sequences (AE finally prints 'M' in its bar),  
> even when I
> reopen the same file! I know there's the 'C-x RET r' shortcut, but  
> I still have
> to type 'mac-roman' for each file...

Add appropriate local variable definitions to your Tex files.
At the end (after \end{document}) add the subsequent lines:

%%% Local Variables:
%%% coding: mac-roman-mac
%%% mode: latex
%%% TeX-master: t
%%% End:

The first variable "coding" switches to the desired coding
system (also the line endings of the Mac will be used).
The next variable switches to the correct (major) mode.
This is useful when you have files to be included into
another document or added to another document using
\input. (If a file hasn't a Latex preamble, the Emacs
will not switch to the latex mode.)

As I assume you are using Auctex: TeX-master tells
that the doument is the ... . In the other case give
the name of master file at this place. (Useful when
you are using \include.)

> I looked for another solution: convert every file in utf8 (with  
> iconv), and that
> works (AE automaticaly displays 'u' in its bar, no '\216'-like  
> sequences but the
> right caracters are displayed). I will keep this solution if  
> there's no way to
> recognize mac-roman encoding for AE.

I do not know how this encoding works. But try the following:
In the math mode you can use ­ (for notequal, you see I have
already forgotten the Tex command) or ² (for \leq).

Thomas KŠufl

More information about the MacOSX-Emacs mailing list