I sometimes see \include{../foo} and \input{../bar.tex} in code examples online.

What does the ../ means? What does it changes? What are its advantages? How is it possible to use it?

  • LaTeX and TeX using Unix pathname protocols, even on MSDOS machines. – John Kormylo Mar 21 '19 at 4:20

Let us say you have the following structure:

LaTeXFiles (directory)
  test (directory)

Let us say you have the following line in file mwe.tex:


Then the file foo.tex in directory LaTeXFiles is included. So ../ means: go one directory back.

It simply used the path command available in windows with cd .. or cd test or cd LaTeXFiles/test or simular in unix/linux. Same with line


It means the file bar.tex in directory LaTeXFiles is used in file mwe.tex.

| improve this answer | |

../foo means that the file foo is located in the parent of the current working directory (one directory above it).


| improve this answer | |
  • You could also mention that in TeX this ../ relative syntax has some other beneficial uses such as with the file changed to an additional / e.g. with TeXINPUTS= the use of ..// means the parent all adjoining sibling subfolders and their child folders as well as this folders subfolders – user170109 Mar 20 '19 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.