Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
1  
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
add comment

1 Answer

up vote 10 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
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 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
    
@robguinness It should work as described in this answer, the implementation is the same for all platforms. I just checked with the latest Texmaker version 4.0.1 on an Ubuntu 12.04 machine. –  diabonas Apr 29 '13 at 14:30
    
Ok, I was using a much earlier version of Texmaker (installed using apt-get on Ubuntu 10.04). I upgraded to Texmaker 3.2.2 and now the Commands menu looks similar to the one you described. –  robguinness Apr 30 '13 at 7:37
show 2 more comments

Your Answer

 
discard

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.