xqms / graphicscache

Caching & DPI control for the LaTeX graphicx package
BSD 3-Clause "New" or "Revised" License
10 stars 5 forks source link

Temporary output folder #12

Closed Painkilla closed 3 years ago

Painkilla commented 3 years ago

The temporary output folder is created at the main file level instead in the defined level according to: latexmk -f -pdf -synctex=1 -interaction=nonstopmode -output-directory='./conf/tmp/' '$./conf/main/main.tex'

As a result i receive conf/main/main.tex conf/tmp/temp-files go here according to command from latexmk graphicscache/temp-files from graphicscache

I would like to have the files at conf/tmp/graphicscache/temp-files from graphicscache

xqms commented 3 years ago

Hey, thanks for the input :)

It seems this is not easy to achieve, as graphicscache creates the PDF files using shell commands. So it would need to know the location of the output directory, but there is no way to retrieve it: https://tex.stackexchange.com/questions/136012/output-directory-and-shell-commands

xqms commented 3 years ago

Also we had this suggested before: See #1.

Painkilla commented 3 years ago

Maybe you have a look at my second issue, there is the implementation for tikz. I had a look at the code. Maybe it is possible to define the output directory within latex and use it as a variable. It tried it first hardcoding in the .sty but i maybe missed some spots.

xqms commented 3 years ago

Hm yes, we could definitely support a package option that could be used like

\usepackage[cache=my_cache_dir]{graphicscache}

What I meant is somehow detecting the value of the -output-dir option passed to pdflatex - that is impossible.

Painkilla commented 3 years ago

exactly, this is what i was trying to hardcode in a quick and dirty session for a proof of concept before i try to implement it in the nice way.

xqms commented 3 years ago

Fixed in #14. Let me know if it doesn't work in your setup :)