arara icon indicating copy to clipboard operation
arara copied to clipboard

Define a macro before running the file

Open NobbZ opened this issue 9 years ago • 2 comments

Hi there! Hi would like to suggest an option for /(pdf|lua|xe)?latex/ that allows to define a macro on run.

Lets say we have the following arara statement in main.tex:

% arara: xelatex: {macro: "quick"}

Which would then result in the following system call:

xelatex "\def\quick{t} \input{main.tex}"

Then we could use that, to react on this, and for example use some ifs, to have graphicx in draft mode for all runs but the last:

\ifdefined\quick
  \usepackage[draft]{graphicx}
\else
  \usepackage{graphicx}
\fi

This way we could probably speed up the overall build process dramatically depending on how much we can actually hold back for the very last run.

NobbZ avatar Jul 17 '14 10:07 NobbZ

Hello there!

Oh I got it. :) I might think of a pattern in order to \input the main file at the correct place, but the idea is surely doable. I'll put some effort on it.

Thanks!

cereda avatar Aug 09 '14 00:08 cereda

Adding to my TODO list. :)

cereda avatar Sep 13 '14 12:09 cereda