# (How) can I include the file somedir/file.tex in the file somedir/subdir/anotherfile.tex

I know that it is possible to include somedir/subdir/anotherfile.tex in somedir/file.tex by using \include{subdir/file}. Is it possible to do it the other way around?

A Linux workaround that I'm aware of is a symbolic link of somedir/file.tex to somedir/subdir/file.tex.

-

Use \include{../file}.

.. is UNIX for the parent directory, which Tex uses. See Kpathsea: Path searching.

Postscript

Lev Bishop notes that this won't allow you to write to the parent directory, and that \include typically wants to write to a *.aux file in the parent directory. You can workaround the absence of write permission by setting TEXMFOUTPUT: on a Unix system, env TEXMFOUTPUT=.. latex mydoc will allow Latex to write (and overwrite) any file in the parent directory or any of its subdirectories when it compiles mydoc.tex.

This is somewhat safer than allowing overwriting everywhere the Tex binary has permission, and should work with Pdftex on both Texlive and Miktex (I'm not sure if TEXMFOUT is supported by Xetex).

-