# Trying to use TexShop project with alias to input macro file

I'm coauthoring a book and we use DropBox. I need to work on little test projects that use the same macro files as the main project. Ideally I would like to link to them using aliases so as not to have to make copies of the macro files, which is an obviously painful and limited solution. I've tried using an absolute path instead of an alias, but even that doesn't work.

I've created a mini project to demonstrate.

project.tex

\documentclass[10pt,a5paper]{book}

\input{macros.tex}

\begin{document}

$\srf$

\end{document}


macros.tex

% special relativity factor
\def\srf{\gamma\hskip1pt}


I put macros.tex in the folder above project.tex to simulate a differently located include file and created an alias. Here's the console output when I try to typeset.

Here's the console output when I use the full absolute path to macros.text instead.

Am I doing something wrong; is there a better method; can anyone help?

# The Problem

I have seen that this question does come up a lot in various guises with a mixed bag of specific answers and not always all the detail. I believe the question I have asked, with the only limitation that it applies specifically to Mac users, with a full answer on creating symlinks (symbolic links) and the difference between aliases and symlinks would be valuable.

An alias is not the same as a symlink. The alias is a facility provided for general OSX users. They are handled differently to symlinks which are a unix level facility, hence the need to use Terminal to create them. Any software using unix under the hood, such as TeXShop indirectly because it uses the underlying TeX distribution in this case, which uses specific unix methods, so symlinks will work when aliases won't.

If you're new to symlinks you need to know that they are hard coded in the sense that you can change the original file as much as you like but you can't rename or move it without breaking the symlink. You'd need to create another symlink with the new name and/or location.

Aliases are provided at the GUI level to automatically adjust when a file is moved and/or renamed. That's amazing, right, so why all the fuss about symlinks? Because, as mentioned above, whichever application you use to manage your TeX or LaTeX projects, such as TeXShop, the underlying TeX distribution uses unix facilities and must be provided with symlinks.

Open Terminal and use the following command:

ln -s path/to/original/file path/to/symlink/directory


If any of your path elements has spaces in the names you must either escape them with a backslash \, or, either surround each element including spaces with quotes, or just surround the whole path with quotes, which is the simplest in my opinion.

ln -s "the path/to/the original/file" "the path/to/the symlink/directory"


If you leave out the destination path, it will use the current directory. Note that it easy to get paths from files in the finder by typing Command-I to get the info window for the file and you can then just copy its path from there. Same with the info window for the destination folder.

Finally I will mention the solution I am now trying, in case you don't like messing around with Terminal, which is a system service created by Nick Zitzmann and can be found at