[Tex/LaTex] Texify and `–output-directory`

foldersmiktexoptionsoutputtexify

I'd like to tell texify to place compiled output (i.e., .pdf in my case) in the parent directory (I'm using MikTeX 2.8 on Vista32). I run the following:

texify --pdf --clean --tex-option=--output-directory=".." main.tex

I keep getting an error reading:

texify: Windows API Error: The system cannot find the file specified

Things work fine without --tex-option=--output-directory="..". Omitting --pdf doesn't improve the situation

Q: How can I get texify to place compiled output in the parent directory using the --tex-option (or other) switch?

I have very little experience on the command line, so I suspect the answer may be a simple one.

Best Answer

How'bout if you add the switch -I ".." to the list of options passed to texify? (I'm groping around blindly here because I don't use the util myself.)

The reason for breakage, I think, is that --tex-option is only passed to pdflatex, which now deposits all output files, including the *.aux files required to run bibtex, in a different directory. So after the first pass, the program tries to run bibtex on main.aux to resolve any citation references, but since main.aux now sits in ../, it cannot be found and Windows throw an error.

The -I switch tells texify to search that directory first for input files, at least that's how I read the manual. So it may help in this instance.

If that doesn't work, your best bet is to write a batch file to first call texify and then mv the final PDF into the parent directory.