5

I often see the following lines are included at the beginning of the tex files:

% !TEX TS-program = xelatex
% !TEX encoding = UTF-8 Unicode
% !Mode:: "TeX:UTF-8"

Directives started with % !TEX are explained thoroughly in this great answer, but I didn't find useful explanation about % !Mode::.

So I hope someone can explain:

  1. How the !Mode:: "TeX:UTF-8" directive works?
  2. What else we could fill in the double quotation marks besides TeX:UTF-8?
  3. When and why we should use (or not to use) % !Mode?
  4. What is the differences between % !Mode:: "TeX:UTF-8" and % !TEX encoding = UTF-8 Unicode
Jonas Stein
  • 8,909
YaOzI
  • 489
  • The first two are directives understood by TeXShop and TeXworks, the last one is for some other editor/front-end, I guess Kile (which doesn't understand directives starting with !TEX, as far as I know). – egreg Oct 23 '15 at 08:27
  • @egreg: The last one is (also? only?) winedt. – Ulrike Fischer Oct 23 '15 at 10:14
  • @UlrikeFischer I just made a fast google lookup, it's indeed possible that it is WinEdt and not Kile. You surely know that I'm not a user of the former and I tell you I'm not of the latter either. – egreg Oct 23 '15 at 10:28
  • @egreg: It is certainly winedt (I'm using it) but I don't know if other editors use this syntax too. – Ulrike Fischer Oct 23 '15 at 10:55

0 Answers0