Under Options > Configure TeXstudio > Commands I changed PdfLateX to use the -output-directory=tex option. I checked Show Advanced Options in the bottom right corner and set all additional search paths under Build to the used directory name.

Everything works (I can compile to PDF and preview it in the internal PDF viewer) but I don't know how I should change the External PDF Viewer command so that it opens the PDF from the subdirectory.

2 Answers 2


This worked for me (on Windows 7, note that I use PDFViewer, not Adobe Reader):

External PDF Viewer command (where 'build' is my custom output directory):

"C:\Program Files\Tracker Software\PDF Viewer\PDFXCview.exe" ".\build\?m.pdf"

Notice the quotes around the argument; they are needed if there are any spaces in the file/sub-directory name.


I think a more generic solution would be to set the External PDF Viewer value in Options > Configure TeXstudio > Commands to:


For example mine is:

"C:/Program Files (x86)/Adobe/Acrobat DC/Acrobat/Acrobat.exe"  "?am.pdf"
  • 1
    Thanks! It works perfectly! Could you please explain what does "?am.pdf" stand for?
    – Tropilio
    Nov 30, 2019 at 18:55
  • For me, this auto-translated to main.pdf, so I think it means whichever PDF is open when you click the button.
    – Sterling
    Nov 8, 2022 at 23:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .