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'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.

share|improve this question
    
If instead of using "..", you used the full path to the parent directory, does it work? –  Willie Wong Mar 1 '11 at 17:06
    
Same question but about latexmk instead: "Specify -output-directory when using latexmk". –  Martin Scharrer Mar 1 '11 at 17:06
    
@brianjd Do you use a batch file in order to execute texify, or do you call it manually on the command line? –  diabonas Mar 1 '11 at 17:09
    
@diabonas: I'm calling it from the command line –  lowndrul Mar 1 '11 at 17:30
    
@Martin: seems that at least with latexmk there's a jobname switch specifically built to handle this sort of thing. There doesn't seem to be anything like that for texify. Guess that's what the --tex-option switch is for but it just doesn't seem to be working in my case. –  lowndrul Mar 1 '11 at 17:34

3 Answers 3

up vote 2 down vote accepted

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.

share|improve this answer
    
Just tried it and it didn't work. Good suggestion though. It's sounding like writing a batch file is my only option here. –  lowndrul Mar 1 '11 at 19:54

For security reasons it is not possible to write to locations which use a absolute path or includes the parent directory (..). You can change this security setting through an environment variable (I think MIKTEX_ALLOWUNSAFEOUTPUTFILES=1) but I advise you strongly not to do it.

share|improve this answer
    
I'm using the aux-directory option with a downstream folder, but I still get this error. Any thoughts? –  Ali Mehrizi Jun 18 '12 at 1:49

I'm using MikTeX 2.9 on XP, and with a bit help of your post (I've learned about --tex-option= option) I was able to solve my (and yours) problem - use this: --tex-option="-output-directory=.." to have output in a parent directory.

share|improve this answer

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.