How can I view .pdf file from subfolder? Command

"C:/Program Files/Adobe/Reader 11.0/Reader/AcroRd32.exe" ./subfolder/%.pdf

doesn't work and I get:

"Error: could not start the command"

On the other hand, command

"C:/Program Files/Adobe/Reader 11.0/Reader/AcroRd32.exe" %.pdf

works correctly (of course, if the .pdf file exists in parent directory). I use Texmaker. Thank you.

  • I don't use Windows or Texmaker but my guess is to leave out the leading ./ in the path – JPi Oct 15 '18 at 7:26
  • I use TeXstudio under Debian, but this solution should work on TeXmaker under Windows. I set pdflatex -synctex=1 -interaction=nonstopmode --shell-escape -jobname="./subfolder/%" %.tex for pdflatex compilation, and okular ./subfolder/%.pdf for displaying the pdf within okular. – NBur Oct 15 '18 at 7:30
  • This is my whole command: pdflatex -aux-directory=others -output-directory=pdfs %.tex|"C:/Program Files/Adobe/Reader 11.0/Reader/AcroRd32.exe" ./pdfs/%.pdf. Folders "others" and "pdfs" are created successfully, but command for view .pdf file from "pdfs" still not working. – Ron LaHire Oct 15 '18 at 7:40
  • Just to be sure: Your subfolder contains no spaces? (Else you need " around the pdf-path. – knut Oct 15 '18 at 8:18
  • I added " around pdf-path, but still same error. As you can see above, my subfolder name is "pdfs" without any spaces. – Ron LaHire Oct 15 '18 at 8:25

I tried Texstudio and command

pdflatex -aux-directory=others -output-directory=pdfs %.tex|txs:///view-pdf "C:/Users/.../pdfs/?rm.pdf"

finallly works but doesn't in Texmaker. So problem was with Texmaker. Maybe Texstudio is more sophisticated than Texmaker.

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.