निरंजन
I am trying to follow [this](https://tex.stackexchange.com/a/22525) answer, but since I prefer using `arara` and don't compile from the terminal, I wanted a way to add something like this to the arara-setup. Is it possible? A non-working example is like follows:
```
% arara: lualatex "\PassOptionsToClass{handout}{beamer}\input{foo.tex}"
```
What is the `arara`-way of doing something like this?
Top Answer
निरंजन
Turned out to be much simpler than I thought it would be.
```
% arara: lualatex: { options: [
% arara: --> '"\PassOptionsToClass{handout}{beamer}\input{foo.tex}"'
% arara: --> ] }
```
(Assuming the file-name is `foo`. Unfortunately `\jobname` doesn't work.
After creating a sub-directory named `handouts/`, the following can be a better approach. It generates a file without overlays, move it to the handouts directory, generates a file without overlays and cleans the auxiliary files.
```
% arara: pdflatex: { options: [
% arara: --> '"\PassOptionsToClass{handout}{beamer}\input{foo}"'
% arara: --> ] }
% arara: pdflatex: { options: [
% arara: --> '"\PassOptionsToClass{handout}{beamer}\input{foo}"'
% arara: --> ] }
% arara: move: {
% arara: --> files: ['foo.pdf'],
% arara: --> target: 'handouts/foo.pdf'
% arara: --> }
% arara: pdflatex
% arara: pdflatex
% arara: clean: {
% arara: --> extensions: [
% arara: --> aux,log,toc,
% arara: --> snm,out,nav,
% arara: --> run.xml,tex~
% For biber+biblatex
% arara: --> bcf,bbl,blg,
% For makeglossaries
% arara: --> gls,glo,glg,
% arara: --> ]
% arara: --> }
```
Answer #2
samcarter
You could use the `latexmk` arara rule. This allows you to use the convenient `pretex` option:
(no need for hardcoded file names and it will safe you time as latex is called only as often as needed)
```
% !TeX program = txs:///arara
% arara: latexmk: {
% arara: --> engine: lualatex,
% arara: --> options: [
% arara: --> '-pretex="\\PassOptionsToClass{handout}{beamer}"',
% arara: --> '-usepretex'
% arara: --> ]
% arara: --> }
\documentclass{beamer}
\begin{document}
\begin{frame}
abc\pause efg
\end{frame}
\end{document}
```