First time to hear that. 
I wasn’t aware of it 8-0. 
Will need to recheck my projects and settings to see what I was accidentally doing right… in the sense that it was working as intended…

Thx/PA

PS: once again I’ll go to sleep and will have learnt something new (as the Spanish proverb goes)

Enviado desde mi iPhone

El 6 jul 2022, a las 9:49, emacs@vergauwen.me escribió:



>>> Hi, adding an "input" type of header is one option. What about adding a
>>> call to resolve relative file names instead, thus solving maybe other
>>> needs in addition?
>>>
>> That was my second approach. I was concerned that forcing all imports with
>> an absolute path could break existing exports? Correct me if I'm wrong.
>> Using the :header syntax external files can be loaded in via the old way,
>> whereas using :inputs all relative paths are resolved.
>> The downside of course is that we clutter the export settings with a new
>> parameter.
>
>Rather than changing paths to absolute, we can simply play with the
>working directly for latex process and set it to the directory of the
>.org file (unless :dir argument is passed to the latex source block).
>This is probably the most expected behavior.
>
>Best,
>Ihor

Just my .01 cents...

For Latex stuff I'm using just

#+HEADER: \input{preamble}

and have my preamble.tex in the working directory. (For Beamer stuff it goes in a LATEX_HEADER).

Changing that to

#+HEADER :inputs '("preamble")

well, would be a matter of taste.
Ox-beamer (ox-latex) executes all latex commands at the current directory of 
your org file, whereas ob-latex uses a temporary file to do its thing. 
(with-temp-file FILE &rest BODY)
I think this is mostly done to prent metafiles from cluttering your current 
directory. 

Different export types, or different user included packages, generate different
metafiles. This makes an automated cleanup process afterwards a bit more
complicated I think, if not impossible. 

The temporary file makes it hard to add files to the working directory.