[OS X TeX] Typesetting info for TeXShop 2.01 documents
Bruno Voisin
bvoisin at mac.com
Wed May 4 12:33:43 CEST 2005
Le 4 mai 05 à 01:16, Bruno Voisin a écrit :
> The syntax for the typesetting infos at the beginning of TeXShop
> document has changed. However, the instructions at <http://
> www.uoregon.edu/~koch/texshop/changes.html> or in the included file
> IMPORTANT_README are partly erroneous, in that, for XeLaTeX, the
> original syntax:
>
> %&program=xelatex
> %&encoding=UTF-8 Unicode
>
> becomes:
>
> %!TEX TS-program = xelatex
> %!TEX encoding = UTF-8Unicode
>
> Specifically:
>
> - The space before the "=" in the first line is mandatory
> (otherwise the default pdfeTeX is used). The instructions include
> this, but the mandatory character of the space isn't mentioned.
>
> - There is no space between UTF-8 and Unicode on the second line
> (otherwise the input encoding is considered to be TeXShop's
> default; generally MacOS Roman). The instructions include one.
Regarding the second remark, it turns out I was wrong. I don't
understand fully what happened, but it seems to be connected with
TeXShop no longer recognizing by default the older syntax:
%&program=xelatex
%&encoding=UTF-8 Unicode
I took a former XeLaTeX file of mine, in UTF-8 encoding and using
that syntax, and opened it in TeXShop, with MacOS Roman encoding as
the default (for these occasions when I'm not using XeTeX). Then I
replaced the above two lines by the new syntax:
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
and saved then typeset the file. However, because the modification
had taken place in a TeXShop not recognizing the former syntax, the
file has not been recognized as UTF-8 endoded upon opening, but as
MacOS Roman encoded, and finally not saved in the proper (UTF-8)
encoding.
When opened afterwards, because of the correct new syntax, the file
was identified as UTF-8 encoded, which its wasn't; hence the improper
XeLaTeX output, with esoteric (square root etc.) symbols where
accented letters should have been. If, on the other hand, the second
line "UTF-8 Unicode" was replaced by "UTF-8Unicode", as I did later,
then the file was not interpreted as UTF-8 input and yielded (oddly
enough) correct XeLaTeX output.
Two more things I tried:
- Taking the original file and modifying it this time in TextEdit
which is (in its default settings) encoding-agnostic. Then opening
the file in TeXShop and XeLaTeXing it yields correct output.
- Using the instructions at <http://www.uoregon.edu/~koch/texshop/
changes.html> to get TeXShop recognize the former syntax in addition
to the new one:
defaults write TeXShop UseOldHeadingCommands YES
Then the file can be modified and compiled in TeXShop, yielding
correct output.
In summary I think that, for the sake of compatibility, it would be
nicer to have the former syntax recognized by TeXShop in addition to
the new syntax.
Bruno--------------------- 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 macostex-archives
mailing list