• TeX processing recognition flags

    From Peter Flynn@peter@silmaril.ie to comp.text.tex on Wed May 20 12:05:33 2026
    From Newsgroup: comp.text.tex

    On 18/05/2026 09:56, Dr Engelbert Buxbaum wrote:
    % !Mode:: "TeX:UK:UTF-8"
    % !TEX program = LuaLaTeX
    % !BIB program = biblatex

    I've been using a slightly different syntax but I forget where I got it:

    % !TEX encoding = UTF-8 Unicode
    % !TEX TS-program = LuaLaTeX

    Could someone please point me at the definitive source?

    Peter
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From ram@ram@zedat.fu-berlin.de (Stefan Ram) to comp.text.tex on Wed May 20 12:09:20 2026
    From Newsgroup: comp.text.tex

    Peter Flynn <peter@silmaril.ie> wrote or quoted:
    Could someone please point me at the definitive source?

    Could be TeX processing directives from editors like
    TeXShop or TeXworks.

    |Magic comments are comments of the form % !TEX or % !BIB that
    |can be used as directives in many tex editors, for example to
    |specify (from within the document body), which tex engine should
    |be used, the encoding, the language for spell checking etc.
    |
    |% !BIB TS-program = biber/bibtex The TS stands forTeXShop,
    . . .
    J. Chrin in the World-Wide Web

    |Mar 24, 2011
    |
    |The new TeXworks release adds a new 'magic comment' to the set
    |that the program knows. So I thought it might be useful to have
    |a list of those that currently work, and a typical setting for
    |each one.
    |
    |% !TeX program = LuaLaTeX
    . . .
    Joseph Wright in the World-Wide Web


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Peter Flynn@peter@silmaril.ie to comp.text.tex on Wed May 20 21:25:13 2026
    From Newsgroup: comp.text.tex

    On 20/05/2026 13:09, Stefan Ram wrote:
    Peter Flynn <peter@silmaril.ie> wrote or quoted:
    Could someone please point me at the definitive source?

    Could be TeX processing directives from editors like
    TeXShop or TeXworks.

    Yes, there is partial or full support in many of them, but I don't see anywhere that lists the full set independently of the editors, except
    the tex.se page at https://tex.stackexchange.com/a/84687/36296

    |% !BIB TS-program = biber/bibtex The TS stands forTeXShop,

    Thank you; missed that.

    Does anyone know of support for these magic comments in Emacs?

    P

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Dr Engelbert Buxbaum@engelbert_buxbaum@hotmail.com to comp.text.tex on Thu May 21 09:22:56 2026
    From Newsgroup: comp.text.tex

    In article <n75irtFbcjsU1
    @mid.individual.net>, peter@silmaril.ie
    says...

    On 18/05/2026 09:56, Dr Engelbert Buxbaum wrote:
    % !Mode:: "TeX:UK:UTF-8"
    % !TEX program = LuaLaTeX
    % !BIB program = biblatex

    I've been using a slightly different syntax but I forget where I got it:

    % !TEX encoding = UTF-8 Unicode
    % !TEX TS-program = LuaLaTeX

    Could someone please point me at the definitive source?

    That is editor-dependent, I am not aware of
    any standards. I use them mainly to inform my
    publisher what I have been doing, so these
    magic comments are for humans rather than for
    the computer. But WinEdt understands at least
    the mode command.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Peter Flynn@peter@silmaril.ie to comp.text.tex on Thu May 21 14:57:14 2026
    From Newsgroup: comp.text.tex

    On 21/05/2026 08:22, Dr Engelbert Buxbaum wrote:
    In article <n75irtFbcjsU1@mid.individual.net>, <peter@silmaril.ie>
    says...
    [...]
    Could someone please point me at the definitive source?

    That is editor-dependent, I am not aware of any standards. I use
    them mainly to inform my publisher what I have been doing, so these
    magic comments are for humans rather than for the computer.

    OK, thanks.

    But WinEdt understands at least the mode command.

    I haven't managed to find anything on their web site about this yet.

    Peter
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Ulrich D i e z@ud.usenetcorrespondence@web.de to comp.text.tex on Sat May 23 11:19:41 2026
    From Newsgroup: comp.text.tex

    Peter Flynn schrieb:

    On 21/05/2026 08:22, Dr Engelbert Buxbaum wrote:
    In article <n75irtFbcjsU1@mid.individual.net>, <peter@silmaril.ie>
    says...
    [...]
    Could someone please point me at the definitive source?

    That is editor-dependent, I am not aware of any standards. I use
    them mainly to inform my publisher what I have been doing, so these
    magic comments are for humans rather than for the computer.

    OK, thanks.

    But WinEdt understands at least the mode command.

    I haven't managed to find anything on their web site about this yet.

    Peter

    <https://www.winedt.com/doc/QuickGuide.pdf>,
    section "3.4 TeX and UTF-8", mentions so-called "pragma-comments".

    <https://www.winedt.com/doc/QuickGuide.pdf>,
    section "3.5 Modes and Submodes", says:

    | Instead of setting such modes through the Document Settings dialog or
    | adopting a practice to name your files with more than one filetype
    | (e.g. Paper.fr.tex) it is possible to enter submodes (as comments) in
    | the first (or second) line of a document. WinEdt modes can be
    | specified as a comment:
    |
    | % !Mode:: "Mode:Submode:Submode"
    |
    | WinEdt also recognizes mode specification as used by emacs:
    |
    | % -*- mode: TeX -*-
    | % -*- coding: utf-8 -*-
    |
    | It is also possible to specify mode and submode in a single comment:
    |
    | % -*- TeX:DE:Soft:UTF-8 -*-
    |
    | However, as Emacs might not recognize such specifications, it is
    | better to use WinEdtrCOs convention !Mode:: "TeX:DE:Soft:UTF-8" as
    | described above.


    Sincerely

    Ulrich
    --- Synchronet 3.22a-Linux NewsLink 1.2