Dear list, 

in the attachment you find a proposed patch to support including external files
when exporting a latex source block. Currently this was only possible by using a
:header argument. The problem with this approach is that, files needed to be
included with their absolute path.


My proposed change adds support for a :inputs header argument, which expands te
provided file paths to an absolute path before including them.


Example: 
#+HEADER: :file example.pdf
#+HEADER: :inputs '("./input/preamble.tex")
#+BEGIN_src latex
\begin{tikzpicture}
  \draw[->,custom-style] (-3,0) -- (-2,0)
    arc[radius=0.5cm,start angle=-180,endangle=0] (-1,0) -- (1,0)
    arc[radius=0.5cm,start angle=180,end angle=0] (2,0) -- (3,0);
    \filldraw (-1.5,0) circle[radius=1mm];
    \filldraw (1.5,0)circle[radius=1mm];
\end{tikzpicture}
#+END_src

Expands to 

\documentclass[article]
...
\input{absolute/path/to/input/preamble.tex}
\begin{document}
\begin{tikzpicture}
  \draw[->,custom-style] (-3,0) -- (-2,0)
    arc[radius=0.5cm,start angle=-180,endangle=0] (-1,0) -- (1,0)
    arc[radius=0.5cm,start angle=180,end angle=0] (2,0) -- (3,0);
    \filldraw (-1.5,0) circle[radius=1mm];
    \filldraw (1.5,0)circle[radius=1mm];
\end{tikzpicture}
\end{document}

Kind regards,
Bob