Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Here's the path where my tex file stands :

/home/me/documents/foo.tex

I also have one import file here :

/home/me/texmf/tex/latex/personal/bar.tex

However for security purpose I also include it here locally :

/home/me/documents/bar.tex

When I input it in my tex file, e.g. :

\input{bar}

I noticed the local file is used over the remote one (latex personal directory)

My question is : how can I manage the following statement ?

  • If the distant file exists then include it over the local one.
  • If the distant file is none then include the local one.
share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.