TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
For anybody using the fork TeXstudio (formerly known as TexMakerX), the follow-up question How do I open the internal viewer in a custom Quick Build command with TeXStudio or TeXMaker? might be of interest. – diabonas Sep 25 '11 at 13:37
up vote 11 down vote accepted

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.

share|improve this answer
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 Apr 30 '11 at 17:37
Good job, diabonas. – Wok Feb 21 '13 at 14:18
How about your linux (e.g. Ubuntu) version of Texmaker? – robguinness Apr 29 '13 at 12:22
It works also with the "Embed" enabled. – user44155 Jan 14 '14 at 14:07
also worth noting: exactly means exactly. so no spaces between the command separator “|” and the command: “… | evince %.pdf” != “…|evince %.pdf” – flying sheep Dec 8 '14 at 9:04

Your Answer


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.