Take the 2-minute tour ×
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.

I'm trying to keep all my .tex macros in a single folder, so I don't have different versions of these macros.

Texlipse allows you to create a "linked resource" which mirrors a file outside the project folder. I can successfully link to a file, and I see the shortcut in the project window. However, when I try to build the project, Texlipse cannot locate the .tex file. Has anyone got this to work?

An alternative would be to store macros as .sty files in Miktex, but this would be difficult to sync across computers (I need to sync a work and home computer)

Mirroring a file from the command line is not a possibility as at work I'm on Windows without admin rights. Also, using LaTeX itself to locate the file outside the project folder (e.g. \input{../../../file.tex}) appears to be incompatible with Texlipse.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

As far as i know (and tested) using Linked Resources does not work with TeXlipse.

Instead, you might consider using the import package, which allows using absolute and relative paths to include files. It is also able to deal with server addresses (if you sync your files via a server) like //srv01/files/tex.

Example:

\documentclass{article}

\usepackage{import}

\begin{document}

\import*{C:/}{test.tex}
\import*{../../../}{test.tex}

\end{document}

The first argument specifies the path, the second one the filename.

The * after the import command tells the import package not to search the TEXINPUTS path. If you use import{...}, MiKTeX will ask you every time whether you want to install the 'missing package' test.tex (or whatever you are importing).

For full documentation on the import package, see the package's CTAN page.

share|improve this answer
add comment

Your Answer

 
discard

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

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