[OS X Emacs] %^M in Mac-produced .tex file

Peter Dyballa Peter_Dyballa at Web.DE
Wed Jan 16 15:50:03 EST 2008


Am 16.01.2008 um 20:44 schrieb David Romano:

> If I simply remove the ^M without introducing a newline, then all  
> is well, but the file is still humanly unreadable.  I'm loath to  
> include any snippets of the file since I don't know if I'll include  
> the right one, but if anyone has any insight into what is going on,  
> it would be much appreciated!


Try this approach for the files:

• set coding system for next command: C-x RET c <some value-mac> RET
• open that file with any method
• if the file does not have a set of local variables like that below  
from AUCTeX at its end

	%%% Local Variables:
	%%% mode: latex
	%%% TeX-master: t
	%%% coding: utf-8-mac
	%%% TeX-command-default: "XeLaTeX"
	%%% End:

then add a block similiar to this to the file. Be sure to use the  
right values, delete TeX-command-default when it's a simple pdftex or  
such.

Do you see the symbol for the buffer's encoding? Select it with the  
mouse cursor. If the description is right, then save the file. When  
you'll open it, it will look right.

You can also decide to change the file's encoding. It is simple:  
either correct the -mac encoding in the block, or set the coding  
system for the saving this buffer to some non-mac value. Now save.  
Emacs will silently change the line endings. The coding value will be  
used by Emacs next you open the file.


You can also use the Options menu. It has in the "Mule (Multilingual  
Environment)" sub-menu another sub-menu, "Set Coding Systems," from  
which you can select the commands.

--
Greetings

   Pete

When you meet a master swordsman,
show him your sword.
When you meet a man who is not a poet,
do not show him your poem.
		– Rinzai, ninth century Zen master






More information about the MacOSX-Emacs mailing list