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.

6
  • 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
    Commented Feb 5, 2012 at 9:16
  • 2
    Close, or possibly a duplicate of tex.stackexchange.com/q/38348/9043. This may even answer your question.
    – qubyte
    Commented Feb 5, 2012 at 9: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
    Commented Feb 5, 2012 at 9:35
  • Perhaps delegating the decisions to latexmkwould solve your problem? Commented Feb 5, 2012 at 9: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
    Commented Feb 5, 2012 at 10:01

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .