1

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:

latex-workshop.view.pdf.viewer

I set it to tab but nothing changed.

1
  • 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

0

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": [
            "-f",
            "-gg",
            "-pv",
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "%DOC%"
          ]
        },
        {
          "name": "dvipdfmx",
          "command": "dvipdfmx",
          "args": [
            "%DOCFILE%.dvi"
          ]
        }
    ],
    "latex-workshop.latex.recipes": [
        {
          "name": "upLaTeX",
          "tools": [
            "Latexmk (upLaTeX)",
            "dvipdfmx"
          ]
        },
    ],
    "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": [
        "*.aux",
        "*.bbl",
        "*.blg",
        "*.idx",
        "*.ind",
        "*.lof",
        "*.lot",
        "*.out",
        "*.toc",
        "*.acn",
        "*.acr",
        "*.alg",
        "*.glg",
        "*.glo",
        "*.gls",
        "*.fls",
        "*.log",
        "*.fdb_latexmk",
        "*.snm",
        "*.synctex(busy)",
        "*.synctex.gz",
        "*.nav",
        "*.dvi"
    ]
0

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).

0

You must log in to answer this question.