samcarter
I have the following arara header:
```
% !TeX program = arara %
% arara: latexmk: {
% arara: --> engine: pdflatex,
% arara: --> options: [
% arara: --> '-pretex="\\AtBeginDocument{\\pagecolor{red}}\\input{document}"',
% arara: --> '-usepretex'
% arara: --> ]
% arara: --> }
\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\begin{document}
\tikz \draw circle (0.1);
\end{document}
```
Is it possible to access the fillname of my `.tex` from within this header? I would like to replace the hard coded `document` in the example above.
Top Answer
samcarter
Ben Frank, from the ["Island of TeX" project](https://islandoftex.gitlab.io/), helped me out: one can use `@{getOriginalReference()}` to access the name.
```
% !TeX program = arara %
% arara: latexmk: {
% arara: --> engine: pdflatex,
% arara: --> options: [
% arara: --> '-pretex="\\AtBeginDocument{\\pagecolor{red}}\\input{@{getOriginalReference()}}"',
% arara: --> '-usepretex'
% arara: --> ]
% arara: --> }
\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\begin{document}
\tikz \draw circle (0.1);
\end{document}
```