[Tex/LaTex] Search path for pgfplotstable

pgfplotstable

I'm creating some tables reading values from .dat files. All these files are placed in a subfolder. Is there a way to tell \pgfplotstabletypeset the search path to that subfolder? Something similar to \graphicspath?

Extra info: I have my files organized in subfolders but I'm trying to submit a paper to a journal and I cannot create subfolders on their build servers (I have to upload the files one by one and they end up in a single folder). I also cannot set TEXINPUTS (unless there's a way to do it from the main .tex file).

PS: I find it frustrating that scientific journals have retarded tex build servers.

Best Answer

There is no such builtin feature in pgfplotstable. In fact, this question resembles an old feature request.

While thinking about alternatives, I got the following idea:

You could place some dummy text file like thisisremuspc.file in your aside of your local directory structure and add something like

\IfFileExists{thisisremuspc.file}{\def\todirectory##1{##1}}{\def\todirectory##1{}}

to your preamble. Whenever you load a data file, you could write

\addplot table {\todirectory{my/local/sub/dir/}file.dat};

I have had no time to test this approach, but it should work (up to, maybe, magic due to the # characters). The idea is that todirectory would expand to an empty string if you magic file is missing. Would that do the job (assuming it works)?

Related Question