add tag
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}
```

This room is for discussion about this question.

Once logged in you can direct comments to any contributor here.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.