Generalinclude .tex file only if it exist

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
pelle2005
Posts: 3
Joined: Fri Aug 01, 2008 11:59 am

include .tex file only if it exist

Post by pelle2005 »

Hi,
I would like to say if someone known if it exist a command in latex that "understand" if a .tex file exist.
What i would like to have, is the possibility to include in my document a file if it exist in a certain path.
I have note thet the command \include is able to do this because whn i compile the main file, if it not find a .tex file ( \include{myfile.tex} ) it ignore it. But the command \include begin a newpage, and i don't want it.
The command \input not start a new page, but it return an error in the compile phase..
So i would like to do is a sort of
\ifexist{myfile.tex}
\input{myfile.tex}
\fi
Thank you

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

T3.
Posts: 208
Joined: Fri Mar 14, 2008 12:58 pm

include .tex file only if it exist

Post by T3. »

See here.

Cheers,

Tomek
Last edited by T3. on Tue Aug 05, 2008 3:20 pm, edited 1 time in total.
pelle2005
Posts: 3
Joined: Fri Aug 01, 2008 11:59 am

Re: include .tex file only if it exist

Post by pelle2005 »

Thank you very much, exactly what i search!
I have explore the forum and also google this morning, but i haven't find this post.
Thank you
Post Reply