TransWikia.com

Stop opening PDF file in new window after compile [VS Code]

TeX - LaTeX Asked by user217679 on March 13, 2021

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.

One Answer

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"
    ]

Correct answer by user217679 on March 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP