I am using Latex Workshop in VS Code to write my report.

When I compile .tex file, the output PDF file pops open in a new window which is annoying. I can view the PDF file in the VS Code tab, I don't want another app to open the same PDF, especially in a new window.

Even if I minimize the app, it automatically maximizes after compiling. How do I disable it? I went in the settings and found:


I set it to tab but nothing changed.

  • Welcome to TeX SE! Your question is fine for this site. :) I took the liberty to fix some formatting in your question, but the content is fine.
    – Alenanno
    Oct 26, 2020 at 8:37

2 Answers 2


Ok, I somehow figured it by myself.
Before, I was using latexmk to build tex file. Now I changed to uplatex-->dvipdfmx and that somehow fixed the problem.
Below is the fixed json file:

    "latex-workshop.latex.tools": [
          "name": "Latexmk (upLaTeX)",
          "command": "uplatex",
          "args": [
          "name": "dvipdfmx",
          "command": "dvipdfmx",
          "args": [
    "latex-workshop.latex.recipes": [
          "name": "upLaTeX",
          "tools": [
            "Latexmk (upLaTeX)",
    "latex-workshop.latex.magic.args": [
      "-f", "-gg", "-pv", "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%"

    "latex-workshop.latex.autoClean.run": "onBuilt",
    "latex-workshop.latex.autoBuild.run": "never",
    "latex-workshop.latex.autoBuild.interval": 0,
    "latex-workshop.view.pdf.viewer": "tab",
    "files.trimTrailingWhitespace": true,
    "latex-workshop.latex.clean.fileTypes": [

I have found the solution

  • find your latexmkrc file
  • open the file
  • add $pdf_previewer = ''; to the file
  • save and close

I looked at my console during compilation of tex file. I noticed " running 'start main.pdf'" ( something like that).


You must log in to answer this question.