[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] Pass options to the TeX processor

From: Mosè Giordano
Subject: [AUCTeX-devel] Pass options to the TeX processor
Date: Thu, 20 Feb 2014 00:34:59 +0100

Hi list,

in AUCTeX there isn't an easy&flexible way to pass arbitrary options
to the TeX processor.  The most wanted option probably is
`-shell-escape'.  Another useful option can be `-fmt <format file>',
to select a format file, because in AUCTeX first line parsing is de
facto disabled.

Setting `{La,}TeX-command' locally (note that those variables aren't
safe by default as file-local variables) doesn't work with
`TeX-engine's different from `default', so this isn't flexible.

Another possibility is to add the options to `LaTeX-command-style' but
this isn't buffer-local by default, there is no corresponding variable
for plain TeX and it's definitely difficult to be remembered.

One could define a new engine in `TeX-engine-alist' combining an
existent engine with the relevant options, but defining a new engine
for all possible combinations of a TeX engine and options (think about
the `-fmt <format file>' option) isn't easy.

I'm sending a patch to address this problem.  It simply adds a new
safe file-local variable (`TeX-command-extra-options') which is the
string of options to be passed to the TeX-processor through a new
expander in `TeX-expand-list'.  In this way, eg, the shell escape can
be enabled with
    %%% TeX-command-extra-options: "-shell-escape"
in the list of local variables, and a format file can be picked up with
    %%% TeX-command-extra-options: "-fmt <format file>"

I tested the patch with plain TeX and LaTeX with default, luatex and
xelatex engines.  It works also with `TeX-command-region'.

Any thoughts?  Can I install the patch?


Attachment: extraopts.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]