5

Some LaTeX editors (TeXShop and TeXworks, for instance) allow a special comment line to define a default engine to use with a current document, like this :

% !TEX TS-program = pdflatex

It's really useful when working on the main document but question comes when I need to call other commands (Biber, MakeIndex, etc.).

Concrete situation : I typeset a pdfLaTeX document, but I sometimes need to call Biber, MakeIndex, etc. If a % !TEX TS-program = pdflatex comment is present, compiling will run pdfLaTeX engine, even if I asked for Biber or MakeIndex. I have to remove temporarily this special comment to use another engine.

Is it a way to temporarily bypass that special command without removing it each time I want to use Biber or MakeIndex on that document ? In other words, how could I keep the comfort of the % !TEX TS-program =... system while being able to sometimes run other commands ?

I guess LaTeXmk (or a makefile) is a solution, but I would like to know if other solutions are possible.

Thanks for your ideas.

Jonas Stein
  • 8,909
user11208
  • 199
  • 4
    Which editor and version are you using? In TeXworks, the 'magic comment' only sets the default to run. You can happily change the program to be run after loading a file. – Joseph Wright Feb 05 '12 at 09:16
  • 2
    Close, or possibly a duplicate of http://tex.stackexchange.com/q/38348/9043. This may even answer your question. – qubyte Feb 05 '12 at 09:16
  • Thanks. Indeed, this line in TeXworks selects the specified engine in the dropdown menu, but I'm free to change it if needed. Unfortunately, this is not the case with TeXShop. – user11208 Feb 05 '12 at 09:35
  • Perhaps delegating the decisions to latexmkwould solve your problem? – Brent.Longborough Feb 05 '12 at 09:59
  • With TeXShop you simply choose the program you need from the dropdown menu (BibTeX or MakeIndex). But it seems not to be working with Biber. – egreg Feb 05 '12 at 10:01
  • Yes, BibTeX or makeindex built-in engines are working, but custom engines are not (I have to use custom engines for lilypond-book, for instance). I'll try to find my way with latexmk. Thanks to all – user11208 Feb 05 '12 at 16:20

1 Answers1

3

Which editor and version are you using? In TeXworks, the 'magic comment' only sets the default to run. You can happily change the program to be run after loading a file.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036