3
votes
1answer
295 views

Relative paths for \input and building from different directories

The minimal example If I have a directory containing my main LaTeX source file and it uses \input to incorporate some data in another file, I can use a relative pathname. E.g., with these files: ...
8
votes
3answers
854 views

How can I properly resolve relative paths in `\usepackage`?

I have a dedicated directory for my project; within that are nested directories source/, output/ and styles/ that contain the .tex, .pdf and .sty files. I was surprised to find that while ...
2
votes
1answer
134 views

How to include symlinked graphics with spaces?

I symlink to images and reference the symlink in the code. This works well as long the filename ends in an extension. However, the method I use to create symlinks creates symlinked files with the ...
3
votes
1answer
687 views

Reference file relative to the home directory

How can I refer to a file (e.g. in \includegraphics{}) that lives in my home directory (I am on linux)? \documentclass{article} \usepackage{graphicx} \begin{document} not working: $\sim$/foo.png ...
48
votes
2answers
14k views

How to include graphics with spaces in their path?

I want to import graphics into my main input file using the macro \includegraphics. It does not work if the filename contains spaces. Include image with spaces in path directory to be processed with ...
8
votes
1answer
3k views

How to make \lstinputlisting applicable to file paths with spaces?

I am using the listings package and the path to the source code contains some spaces. For example, the path can be /some dir/sub dir/file 1.txt and \lstinputlisting{/some dir/sub dir/file 1.txt} does ...