8

Often, I would like to have two different views of the pdf file associated to a tex file.

A typical use case is: you wrote a mathematical paper including several theorems, and the proofs are in an appendix at the end of the paper. To check that the proofs are correct, you often need to go back and forth between the main text containing the theorem statements and the appendix containing the proofs.

A possibility would be to open an external pdf viewer, but this "locks" the file and prevents TeXstudio from compiling and updating the pdf file.

The ideal solution would be to have a three-subwindow split view in TeXstudio, with the source tex file in one subwindow and the pdf file in the other two, so you could see different pages in the two views of the pdf file.

Any ideas?

  • 6
    In the likely event that this is not yet implemented in TeXstudio, you should probably direct this at the developers as a feature request. There is not a lot we can do here. You could, however, use a PDF reader that does not lock the file, on Windows I use SumatraPDF. – moewe Jul 27 '18 at 10:19
  • 8
    If you really have to go back and forth a lot, a reader of your proof will have to do this too, so you should perhaps reconsider your text. Beside: when I have to do complicated checks on a text, I print it and do it with a pencil. – Ulrike Fischer Jul 27 '18 at 10:32
  • 7
    On Linux, Okular works flawlessly as well. It doesn't lock the pdf, even keeps the position in the document and automatically reloads the pdf if it changes. – nox Jul 27 '18 at 10:36
  • @nox: This is a limitation of the file system on Windows. All the file systems used on Linux can write files while they are open. – problemofficer Jul 27 '18 at 14:07
  • 1
    @problemofficer It's not a limitation of Windows, only of some programs. For example, GSView on Windows allows the ps file to be written, and automatically updates the view accordingly – Luis Mendo Jul 27 '18 at 14:46
3

TeXstudio can have dozens of viewing windows (though I guess about 5 would be more than enough), so unclear as to reason for the question. Here is a dual screen shot with only two open. In addition from ANY of them you can open another external viewer. Here I show SumatraPDF as a lightweight example but it could have been Edge or any PDF handler such as evince Okular etc. Just add your choice to the Options Configure Commands External PDF viewer (simply point it at your executable) then you simply hit the red book Icon in the window you want duplicated.

enter image description here

If you do not want the additional windows to track the same editing position you need to (in that secondary window) toggle Configure > Ignore for synchronisation.

enter image description here

It gets a little more complicated for twin editing windows but the system is basically the same, even if a bit confusing. enter image description here

For other ways to run dual compile using split editor and viewers see
https://tex.stackexchange.com/a/473233/170109 (dual sessions/instances)
https://tex.stackexchange.com/a/472480/170109 (split editor) and
https://tex.stackexchange.com/a/472806/170109 (split editor and viewers)

  • Thanks. However, if I do as you say (Window > New Window from the pdf viewer, for which I first have to unlock it from the TexStudio main window), the two views of the pdf are synchronized: when I scroll in one of them, the other goes to (approximately) the same place in the document. I need to view different parts of the document in the different windows – Luis Mendo Jan 21 at 14:31
  • @LuisMendo I will update answer to show how in the window you don't want synchronised you set it so – user170109 Jan 21 at 15:11
  • Thank you! Now this is exactly what I needed. Only that I would prefer to keep all pdf views docked within the main window, but that's not important – Luis Mendo Jan 21 at 15:25
12

I would like to point out that the SumatraPDF viewer does not lock the pdf file. This means that you can keep your pdf file open when you recompile it.

Furthermore, it provides an inverse search, meaning that you can double-click on your pdf file and it will open your tex file (even on the position).

  • 2
    +1 for SumatraPDF – sporc Jul 27 '18 at 11:03
8

I dont know about the other viewers, but on Linux, the 'document-viewer' of Debian doesn't lock the file and auto-updates the view when the file is changed.


Update: Okular reloads the file too.

  • 2
    Yup. I've always used Evince document viewer (also the default on Ubuntu), and it's never locked the file. – TRiG Jul 27 '18 at 13:33
  • I'm not sure even Adobe locks files on Linux. As I understand it, it is a function of the file system and common (all?) file systems for Linux don't support the 'feature'. – cfr Jul 28 '18 at 0:00

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.