tI have Latex template to which I pass parameters using Pandoc. One parameter is $logopath$ where all the graphics are located and I'm able to set graphicspath properly, no problem.
\graphicspath{{$logopath$}} % this works
I decided to break my main template into parts so that I can load only necessary packages and contents from subtemplates and by doing that, I simplify my main template structure. When I use absolute path, input works as expected.
\input{/Users/pasi/Projects/dxss/endusers/a/sub1.tex} % this works
Since these templates are distributed to various systems and locations, it is mandatory to use same information as I have in graphicspath. Main template, subtemplates and graphics files are in the same directory and I can't "hard code" the absolute path. I recognize that this question/answer looks like a 100 % match, but I'm not able to make it work no matter what...
\makeatletter
\def\input@path{{$logopath$}} % this doesn't work
\makeatother
\makeatletter
\def\input@path{{/Users/pasi/Projects/dxss/endusers/a/}} % this works
\makeatother
When I try this:
\input{sub1.tex}
It fails, as all other variations except absolute paths.
UPDATE.
I just realized that my Projects directory is a symbolic link to "Machintosh HD 2/Projects". Somehow \graphicspath seems to accept path with white spaces, but \input@path doesn't. My program that passes $logopath$ variable to Pandoc inserts true path into that variable, not path with a symbolic link. White spaces are escaped.
Bug or feature with \input?
$logopath$is (an environment variable or something pandoc inserts into the tex file or ...) nor do you say what value it has) but if you add/Users/pasi/Projects/dxss//to your TEXINPUTS enviornment variable or web2c config file settings, then\inputand\includegraphicsshould find any file in any directory below that if just used as\input{sub1}or\includegraphics{mypic2}etc – David Carlisle Jan 05 '15 at 12:51/as required for graphicspath – David Carlisle Jan 05 '15 at 13:01input@pathto be{{/Users/pasi/Projects/dxss/endusers/a/}}? – David Carlisle Jan 05 '15 at 13:10\def\input@path{/Users/pasi/Projects/dxss/endusers/a/} % this worksworks but that should not work, the syntax should be\def\input@path{{/Users/pasi/Projects/dxss/endusers/a/}} % this workswith two{{and if that form works then\def\input@path{{$logopath$}}should be identical input to tex after pandoc has replaced$logopath$by/Users/pasi/Projects/dxss/endusers/a/– David Carlisle Jan 05 '15 at 13:25$logopath$by/Users/pasi/Projects/dxss/endusers/a/then the input to latex is the same so both should work. If if does not do the replacement then why not? (and that is presumably a pandoc question rather than a tex one, I don't have pandoc to test) – David Carlisle Jan 05 '15 at 13:40