[XeTeX] When to use which %!TEX

Peter Dyballa Peter_Dyballa at Web.DE
Wed Apr 13 11:21:16 CEST 2011

Am 13.04.2011 um 10:10 schrieb Pander:

> When to use
> %!TEX TS-program = xelatex
> Is it only for the file containing the \documentclass or also for all
> files which are included?
> When to use
> %!TEX encoding = UTF-8 Unicode
> I assume it is for all .tex files. Correct?

Isn't it documented in the TeXShop Help?

I'm not using TeXShop that much, so I can only tell you that it does  
*not* work to mix TeX files with different text (input) encodings. And  
since it does not work to compile in TeX just some included file, the  
"TS-program" header belongs only into the root document. All included  
files are processed by the same engine which starts to process the  
root file.

OTOH, it makes sense to tell TeXShop exactly that all files have a  
particular (input) encoding that TeXShop can display all files  
correctly. So the encoding header should be present in all files  
TeXShop might open to display.

BTW, the "%!" mark is (more or less) reserved for PostScript files.  
Better use "%%!" instead!



Remember: use logout to logout.

More information about the XeTeX mailing list