TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I store my TeX source files in dropbox for backup and synchronization. Of course, it's annoying when you compile to have dropbox upload and download the changes to the temporary files, so you want to put these somewhere else. Since I use Mac OS X and Linux, I chose /var/tmp/texBuild as my output directory for these files. My Makefile includes simply:

TMPDIR = /var/tmp/texBuild
FC = pdflatex -output-directory $(TMPDIR)

When creating a nomenclature, it complained that it was not authorized to write to that directory. A quick search gave me an answer: edit the texmf.cnf to change the variable openout_any from p to a. However I then found this question: Open a file whose name start with a dot and other strangely named files? where it is suggested to not do that system wide. Where can I set this environment variable? In my Makefile? Should I rather pick another output directory than /var/tmp? I realize I could have just made a comment to that other question but hopefully my question is sufficiently different to warrant its own question.

share|improve this question
This is a possible duplicate. See this question for which texmf.cnf to alter. – qubyte Dec 10 '11 at 16:32
Oh I see what you mean. I didn't even consider that there was multiple texmf I could edit. I just edited the one in /usr/local/texlive/2010 and it worked. Was that the correct choice? Could I instead set the openout_any variable for a given document? – FrenchKheldar Dec 10 '11 at 17:15
If you edited the wrong one, then it will work, but there is some chance that a later update to LaTeX will overwrite the file. If you use the correct one, it will not be overwritten. At least, this is my understanding. I'm not sure about setting the output for a particular document. – qubyte Dec 10 '11 at 17:23
up vote 3 down vote accepted

It's not necessary to alter a texmf.cnf file and it's not recommendable either.

A call such as

openout_any=a pdflatex file

(assuming Bash or similar shell) will override the setting of the variable for the current job. I believe that this can be easily implemented in a Makefile.

Altering a texmf.cnf file exposes you to security issues. Also this way of doing is not safe, but it's more controllable, as only the current process (and its children, if any) will "see" that setting of the environment variable.

share|improve this answer
OK so I added export openout_any=a pdflatex file to my Makefile and it solves that problem. I have another problem with how bibtex handles \@input but this might require another question. – FrenchKheldar Dec 10 '11 at 19:13
Looks like it is related with the openout_any too: see the discussion here bugs.archlinux.org/task/17978 Can I just add something like openout_any=a bibtex file? – FrenchKheldar Dec 10 '11 at 19:16
Argh that still doesn't work, even if I put back openout_any=a in the texmf file or if I set TEXMFOUTPUT to my temp directory: The top-level auxiliary file: /var/tmp/texBuild/Masquelet_AIAA2012_LOXPSU.aux I couldn't open auxiliary file introduction.aux ---line 18 of file /var/tmp/texBuild/Masquelet_AIAA2012_LOXPSU.aux : \@input{introduction.aux : } – FrenchKheldar Dec 10 '11 at 19:21

Your Answer


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.