# make tex glossaries files accessible for all documents across system

I created some rather big glossaries files with symbols, acronyms, ...

Glossary_Acronyms.tex
Glossary_Glossary.tex
Glossary_Symbols.tex

for a programming project with multiple tex documents as their documentation. Each glossaries file is a single tex file for reuse throughout the multiple documents of the project. I created a single common directory to store files that are used in all tex documents throughout the repository. I managed to access this common directory by definition of

\newcommand{\commonpath}{../Common}

and added the paths to the single documents relatively using this path statement.

\input{\commonpath/Glossary_Acronyms.tex}
\input{\commonpath/Glossary_Glossary.tex}
\input{\commonpath/Glossary_Symbols.tex}

The documents are part of a SVN repository. I am on Windows using MikTeX 2.9. I personally use Kile as IDE, but the IDE-dependent files are not part of the repository. I do not use xindy. I create the glossaries with a batch file using makeindex and imakeidx for indices for which I have the same problem. And I do not use command aggregation such as arara or latexmk yet, but thanks for the tip.

Now I want to write another new document as part of a another SVN repository and re-use the same glossaries files. I could of course copy the files to the new project. However, I want to keep one common "language" throughout all of my documents. Thus, I would rather work and change one single file at a single location rather than to keep multiple files synchronized. For my local installation I now the relative positioning of the two repositories and their tex documents with respect to each other, so I could do

\input{../[THEORIGINALPROJECT]/Common/Glossary_Acronyms.tex}
\input{../[THEORIGINALPROJECT]/Common/Glossary_Glossary.tex}
\input{../[THEORIGINALPROJECT]/Common/Glossary_Symbols.tex}

. However, if a 3rd person checks out both SVN repositories, I cannot assure that they use the same relative path of the 2 repository checkouts.

Now my question is, is there a possibility to add the absolute positioning of \commonpath to the LaTeX search path? How can I access the unique glossaries files from multiple projects?

Is there a possibility to make single tex files available throughout the system, e.g. via the directories path of the MikTeX Console? Or is it preferable to pack the files into a new package to deploy myself? I do know that I can add directories having sty or cls files by generating a local texmf-like directory. But does this also work for tex files?

Can someone please give me some hints? What is the best way?

• Answer updated to easiest solution I found – user170109 Mar 18 at 0:51

There are those much better qualified than me to answer, so feel free to accept a later answer however you asked for hints and there is perhaps too much for mere comments.

I am still unsure where the files are checked out "to" by your SVN transactions, but it should be easy to keep a single copy for common download after updates. Beware mapped drives or folder paths that have underlying spaces accents etc. sometimes these can cause issues.

I see you are querying the use of arara and that may have an effect.

MiKTeX will respect TEXINPUTS= and when I put your glossary files there, then there is NO need for a folder path or extension in the inputs.

simply place in all preambles

\input{Glossary_Acronyms}
\input{Glossary_Glossary}
\input{Glossary_Symbols}

How do you handle build directories are all aux files in the same directory as the main.tex This may have an effect on the declaration of mixed relative and absolute paths. Note the ; syntax is slightly different as for windows but the paths should be *nix/style so on ALL machines

set TEXINPUTS=.;..//;directory/on/user/machine;directory/on/server;etc

Your specific query for glossaries is perhaps suited to section 7.3 in https://en.wikibooks.org/wiki/LaTeX/Glossary#Glossary_definitions

and for a related acronyms Question/Answer here
Create separate list of acronyms and glossary

• +1 for helping him/her after so much time... But adding also a way as an example like using a non-relative but an absolute path would make your question better and reviewers would not recommend deletion in any case ;) (But I haven't really understood the question enough) – koleygr Mar 17 at 0:26
• @koleygr I am trying not to ask in 20 different comments what type of relative / absolute path we are dealing with I have absolutely no experience with e.g. docker – user170109 Mar 17 at 0:28
• I mean that possibly adding \newcommand{\commonpath}{/home/<username>/Common} could solve the problem and you don't have to be specific here... Just shared the idea... But again.. I didn't understood the problem in the question yet. (I just think that some answer similar to any answer of this tex.stackexchange.com/q/1137/120578 could be a possible answer as far as I can understand the question) – koleygr Mar 17 at 0:37
• @koleygr I agree for sty files there are many answers but xindy has its own variables and AFAIK glossaries as built at compilation time by the tex file cannot be easily collated from a central location, but I have not tried out glossaries enough to do otherwise :-) – user170109 Mar 17 at 0:45
• Thanks... didn't noticed that... Actually I don't have the needed experience with glossaries too. – koleygr Mar 17 at 0:49