4

I'm trying Configure TeXStudio -> Preview -> Display Mode -> Show in embedded viewer and I've popped out the viewer to a separate window so I can place it on a separate screen. This seems like a good setup to me. Except any time the preview auto updates the preview window receives focus preventing further typing before toggling the focus back to the editor. Is there a way to prevent this?

  • Use "Compile" instead of "Build & View". If you have the viewer open, it will update automatically while the focus will be on the editor. – Ilbant Mar 13 at 13:00
2

Edit this is a bit more complex as one looks deeper

You are having an issue because TeXstudio's default presumption is that the windowed viewer needs to be focused to maintain synchronization, you may on occasion actually see it call synctex. You could stop the viewer synchronization in several ways to remove the focusing.

1) Apart from "INLINE" previews You could switch to the preview panel at the bottom but I have to presume you found that it was too limited?

enter image description here

2)Tried several viewer settings but with little or no success, removing sync in window returned it to embedded. The simplest workaround was to add an adjoining hotkey

To Inverse sync back (refocus editor) instantly add an alternative shortcut like ALt+O (just left of the Alt+P :-)

It needs to be added to the VIEWER MENUS PDF-VIEWER > WINDOW > FOCUS EDITOR Configuration as an Alternative see here

enter image description here

Thus my work-around suggestion is to

Hold down Alt then use P (to Preview) + O (for Onwards)

1

You should go to Options > Configure TeXstudio:

enter image description here

Choose "build":

enter image description here

The first option should be "build and view" (default to F5), you can change its behaviour clicking on the configure icon on the right:

enter image description here


alternative: just "compile" with F6 (multiple times if needed).


Note: this will also not "jump" to your current cursor location, useful when you're changing the preamble and testing something deeper in the document, where "compile & view" would jump to the title page every time. If you still want to jump to the current location in the document after compiling with "F6", you can press "F7".

  • I don't understand. Are you suggesting I should disable autoupdates for the preview and use F5 instead after having reconfigured what F5 does? – Sebastian Oberhoff Mar 13 at 14:28
  • You can either set "Build & View" (F5) command to do something else (like just compile), or simply use (F6) to compile without giving focus to the preview window. – Superuser27 Mar 13 at 15:35
  • But I don't want to compile. I'm working on a large document that takes several seconds to fully compile. I want to preview (Alt+P). Usually that's inline. But that's annoying because the preview will constantly disappear and reappear as I add and fix syntax errors in the LaTeX source. And that causes constant scrolling if I'm working at the bottom of the document. I'm showing the preview in the embedded viewer for the preview because that fixes this problem. But now I get constant loss of focus. – Sebastian Oberhoff Mar 13 at 15:43

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.