3
votes
1answer
101 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: ...
4
votes
1answer
150 views

Combining different projects into one (papers into PhD Thesis)

My question is similar to this one, but I have a problem with relative paths when including files. Assume I have three projects which all start with \documentclass[12pt,a4paper]{article} ...
12
votes
2answers
312 views

How can I easily use the same preamble on all my documents?

I use multiple computers (Mac and PC), so creating a path (e.g. \input{c:/folder/Preamble}) won't work. I really want to assign a URL (in Dropbox) to the file and input the file via the URL, but I ...
1
vote
1answer
420 views

epslatex: relative path issue

Please, how one could directly include epslatex graphics into main latex file, say main.tex? main.tex has its own template provided by a third party. I used this command within main.tex file to ...
1
vote
0answers
227 views

Input files relative to main file when using subfiles [closed]

I'm writing a report where I use the package subfiles to include different parts of my report. \input{misc/variables.tex} will include my variables file perfectly and render the subfiles. But if I ...
5
votes
1answer
650 views

Can a default path be set globally for \input{…} akin to \graphicspath{…}?

For the graphicx package, we can use \graphicspath{...} so that we can directly use filenames in the argument of \includegraphics{...}. Can a similar thing be done for directly using filenames in ...
1
vote
3answers
322 views

Relative image path in renewed \maketitle

To minimize the amount of copy-pasting I have to do between documents/projects, I've decided to create a separate file in which I renew the \maketitle command. This file (title.tex) should then be ...
14
votes
4answers
9k views

\input and absolute paths

Sometimes it is convenient to use an absolute path to include a preamble. To do so, I use the following "hack": \documentclass[a4paper, 12pt]{article} \newcommand{\folder}{/path/to/folder} ...
11
votes
2answers
2k views

How to make \include work with a quoted string path containing spaces?

In Windows, \input can work with a quoted string path containing spaces, but \include cannot. How to fix it? \documentclass{book} \begin{document} %\input works! \input{"Contents/Installing and ...
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 ...
26
votes
4answers
17k views

How to make the main file recognize relative paths used in the imported files?

I'm currently using doxygen to generate some documentation for a project, and doxygen generate some LaTeX code that then can be used to generate a nice pdf. But let's say I would like to write ...