17

I'm trying to write a document with a bibliography, and none of the default Quick Build presets have a BibTex parsing step. It's easy enough to make a sequence of commands that run PdfLaTeX, BibTex, PdfLaTeX, PdfLaTeX, but I cannot see how to use the internal PDF viewer to then display the generated PDF file.

I saw that someone else reported this same problem on the TexMaker issue tracker but the author appears to have just dismissed it as already implemented. I've tried calling view %.pdf, view pdf, view pdf %.pdf (as the person who originally reported the issue tired) and had about the same results. Calling viewpdf with or without arguments gives the exact same results (nothing).

I can easily just click "View PDF" in the toolbar after the build process has finished but it's extra interaction required on my part that should easily be avoidable...

Does anyone know what command I need to use in the user defined quick build section in order to launch the built in PDF viewer automatically?

I'm running TexMaker 3.0.2 on Windows 7 with MikTex 2.9. I also use TexMaker on Ubuntu 10.10 so something that will work cross platform would be great.

1

1 Answer 1

16

It may sound quite strange, but you have to use exactly the same command as you use to open the external PDF viewer! This is because the code to run the external programs (the function Texmaker::RunCommand located in texmaker.cpp, ll.5433-5596 in the sources) checks if the command to be executed is the PDF viewer, and runs the internal viewer instead of the external program if it is activated.

In order to use the internal PDF viewer, you have to select Pdf Viewer->Built-in Viewer and disable the Embed checkbox in the Options->Configure Texmaker->Commands menu. Now you'll be able to launch Texmaker's viewer by using the same command in the Quick Build->User input field as stated in Commands->Pdf Viewer->External Viewer.

No program you use in your Quick Build command line must exit with an error, otherwise the execution will be aborted and the viewer won't be shown.

9
  • 3
    Wow. That is more than a little confusing :P. It works though, so thanks. I have left the PDF Viewer embedded and it is opening without issue.
    – Ephphatha
    Commented Apr 30, 2011 at 17:37
  • Good job, diabonas.
    – Wok
    Commented Feb 21, 2013 at 14:18
  • 1
    It works also with the "Embed" enabled.
    – user44155
    Commented Jan 14, 2014 at 14:07
  • 4
    also worth noting: exactly means exactly. so no spaces between the command separator “|” and the command: “… | evince %.pdf” != “…|evince %.pdf” Commented Dec 8, 2014 at 9:04
  • 1
    @flyingsheep 's comment is incredibly important! If you add extra spaces, it will open evince externally. Thank you for pointing this out.
    – nukeguy
    Commented Jul 20, 2017 at 16:46

You must log in to answer this question.

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