11

TeXStudio can open several tabs in one window which comes in very handy when one is working on project-preamble.tex and project-content.tex at the same time. But when I am working on several projects at the same time, it would be nice if I could open one window for all files in project1 and another window for all files from project2. I cannot get this done under my Linux Mint machine. TeXStudio always just switches to the instance which is already running. What can I do?

Mefitico
  • 135

1 Answers1

12

If you ask your terminal for texstudio --help it will show:

Usage: texstudio [options] [file]

Options:
  --config DIR            use the specified settings directory
  --master                define the document as explicit root document
  --line LINE[:COL]       position the cursor at line LINE and column COL
  --insert-cite CITATION  inserts the given citation
  --start-always          start a new instance, even if TXS is already running
  --pdf-viewer-only       run as a standalone pdf viewer without an editor
  --page PAGENUM          display a certain page in the pdf viewer
  --no-session            do not load/save the session at startup/close
  --version               show version number

Therefore you will see the option --start-always which exactly does what you want it to do.

Edit: As kdb notes in the comments you may encounter some issues with this option:

  • TeXStudio will not manage sessions across windows.
  • SyncTeX reverse synchronization (PDF to TeX) will not always target the correct window.
TeXnician
  • 33,589
  • Sadly, --start-always has several downsides. The ones I noticed predominantly: (1) Automatic session management is largely lost. (2) SyncTeX with external viewers can't target a specific session. – kdb Mar 14 '19 at 10:52
  • @kdb Thanks for pointing it out. While these effects are quite logical and predictable I think it is worth mentioning and have included it into my post :) – TeXnician Mar 14 '19 at 15:36
  • If you have two editor sessions with separate start-ups It may be possible to sync the two sessions separately The Question asks for a Linux answer and my experience is predominantly windows and TeXstudio is called via texstudio.exe so would need two copies texstudio1.exe and texstudio2.exe such a system would be no problem for 1 copy of sumatraPDF if there were separate -appdata settings files since one would inverse search to texstudio1.exe "%f" -line %l and the other to texstudio2.exe "%f" -line %l the main issue is if the two TeXstudio.exes are competing for their own common resources –  Mar 14 '19 at 19:57