GeneralGetting the value of the output directory from with Latex

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
fundagain
Posts: 3
Joined: Thu Sep 20, 2012 10:19 pm

Getting the value of the output directory from with Latex

Post by fundagain »

Hello.

Is there a technique for getting the value of the output directory from within Latex?

Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Getting the value of the output directory from with Latex

Post by cgnieder »

Hi fundagain,

Welcome to the LaTeX community!

One possibility is the currfile package by Martin Scharrer:

Code: Select all

% arara: pdflatex: { options: --recorder }
% arara: pdflatex
\documentclass{article}
\usepackage[abspath]{currfile}
\begin{document}
\getpwd\thepwd
\end{document}
You need to run it once with the option --recorder to enable it to write the path to a file with the extension fls. In a second run the data are read from that file.

Regards
site moderator & package author
fundagain
Posts: 3
Joined: Thu Sep 20, 2012 10:19 pm

Re: Getting the value of the output directory from with Late

Post by fundagain »

Thank you.

That is perfect.
fundagain
Posts: 3
Joined: Thu Sep 20, 2012 10:19 pm

Re: Getting the value of the output directory from with Late

Post by fundagain »

I do not think the package currfile will help me with my current problem (although I am pleased to now know about it).

The package currfile returns information regarding the current file.

I seek the package output directory, i.e., the value of the command line option -output-directory.

My package needs to locate an auxiliary file generated by a external tool run against the document and the output directory is the only place to store the auxiliary in an independent manner.

Thanks
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Re: Getting the value of the output directory from with Late

Post by cgnieder »

Ah sorry, I misunderstood the question (or rather answered too fast without thinking :( ) I'm not aware of a way which doesn't mean there isn't one. I guess LuaTeX could propably provide means but that's really not my expertise...

Regards
site moderator & package author
Post Reply