9

Is it possible to change the place, where TexStudio (I use last version of TEXStudio) on Windows 8) puts generated PDF file? By default all files (.tex and related .pdf, .aux etc.) are in the same folder. I would like to make a separate folder for PDf's, and make all PDF's be stored in it.

  • 2
    No because it is not texstudio who is generating the PDF. You might want to have a look as the output dir option for latex compilation and that configure texstudio to use that particular setting. I never use it so I cannot provide details. – daleif Jul 2 '14 at 17:55
  • @daleif Thanks for giving me a direction, where to search :) Now it seems to me, that what I want is impossible, although it may be possible to send all auxiliary files in separate folder (what is not bad too) – yukari Jul 3 '14 at 17:41
  • Have you tried running pdflatex --help in a dos prompt (if you're using win 8.1,then right click the windows logo and you can get a prompt from the popup menu). I would have sworn that there was an option to specify the output dir. But then again, I've never understood the need to place aux files or PDF in a separate dir. – daleif Jul 3 '14 at 18:47
  • It seems for TeXLive there is only the --output-directory=dir, there is no possibility to seperate PDF and AUX files. MikTeX has an --aux-dicectory=... option, TL does not. – daleif Jul 4 '14 at 11:49
  • @daleif Thanks again. I checked pdflatex --help as you said, and also see, that there is only option to change entire output directory. Why I need to place aus or pdf in a separate dir: I save my TeX projects in a cloud folder, and often need to open pdf from mobile device (often with slow internet connection), so I hoped to spare some time and traffic. :) – yukari Jul 4 '14 at 19:37
5

As stated in the comments above, TXS has no direct control on the placements of the PDF. That is determined by pdflatex and its options (which vary depending on the TeX distribution you use).

However, you can create a user command at Options -> Build

User command for copying the pdf file on windows

Command name (copypdf) and display name ('Copy PDF') are separated by a colon. The call executes a windows shell (cmd) and runs the copy command within (Linux and OSX users would have to adapt this to their shell respectively).

As a result, you'll have a new menu entry Tools -> User -> Copy PDF.

You can run it any time you like (and also assign a shortcut to it in the options). But you'll probably want an automatic solution and not care about copying the pdf at all. To do so, just extend the command of the default compiler in the following way (Note: You need to have the advanced options switched on - checkbox in bottom left corner):

Automatically copy the file after every compilation

This calls the internal copypdf commad, which we've just definded above, after every pdflatex run. Of course, you can replace the simple copy operation by a shell script if you need additional logic (e.g. determine the target dir depending on the source dir).

2

No need to copy the output PDF file since in MiKTeX manual under PDFLatex options, you can specify the output directory of your PDF file (by specifying the option --output-directory) in addition to your auxiliary files (through the option --aux-directory) if you wish.

You may follow this answer steps to know where you can input these options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.