[OS X TeX] TeXShop's %& ugly bug

Jérôme Laurens jerome.laurens at u-bourgogne.fr
Fri Sep 10 03:34:58 EDT 2004


Malcolm Ross says

"In TeXShop 1.35 the user has the option of setting the program and the 
encoding at the beginning of the .tex or .ltx file to be typeset, and I 
find it convenient to place the two lines below at the top of my file:

%&program=xelatex
%&encoding=UTF-8 Unicode"

I once asked the list for the best way to add this kind of meta data to 
the TeX source file.
I find intrusive this kind of policy and wanted to take advise from 
real users before deliberately polluting the source.

No one answered except Gerben Wierda who cleverly pointed out that the 
syntax of the meta data should in no way interfere with other existing 
stuff.
This is why iTeXMac defined its own syntax and replaced the %& prefix 
by the %!iTeXMac.

It seems that TeXShop developpers don't care about this kind of 
problems.
The choice of extending abusively the widely adopted %&format first 
line syntax is a really bad idea.
For example, ask latest OzTeX 5.2 to typeset the following Plain TeX 
file

%&encoding=whatever
Hello world
\bye

You will be answered

This is TeX, Version 3.14159 (no format preloaded)
**&encoding=UTF-8 Sans_titre.tex
Sorry, I can't find the format file: encoding=whatever.fmt

Memory allocated: 2784638 bytes.
Time elapsed: 0.0 seconds.

We cannot consider this is a bug in OzTeX, it is definitely TeXShop's 
preemptive, closed and selfish design.

So it might be advisable to avoid this new "feature" as long as it is 
not implemented in a safer way.

I am wondering if this kind of weird/bad implementation (amongst 
others) could not be avoided by the TeXShop developper team just by 
modestly taking advise from the rest of the world. For example, they 
probably had better participate to the TeX wrapper discussion we had 
last year.

--------------------- 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 Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list