4

I am trying to open my PDF document with Skim from Visual Studio Code. I would like the View LaTeX PDF file command to open in Skim my PDF document and update it automatically. Unfortunately, when I click on the View LaTeX PDF file button, it does not open Skim.

The View LaTeX PDF file command button

I am forced :

  • To open Skim myself;
  • And then to open the PDF file;

When I do this, everything works fine. The file updates correctly each time I save the LaTeX file.

I first try to open the file from the button in Visual Studio Code. It doesn't work, then I open skim to open the pdf file and it works

So I would like to be able to open Skim with the PDF document directly from Visual Studio Code. As I try to do at the beginning of the video.

Note that I have already read these questions SyncTex with Skim pdf viewer?, PDF Preview in Visual Studio Code and the documentation.

My configuration is the following:

  • macOS (12.1)
  • Visual Studio Code (1.63.0)
  • LaTeX Workshop plug-in (v8.22.0).
  • Skim 1.6.7 (137)
  • pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2021) kpathsea version 6.3.3
  • Latexmk, John Collins, 29 September 2020. Version 4.70b
  • settings.json
{
    "workbench.colorTheme": "Cobalt2",
    "editor.formatOnSave": true,
    "[javascript]": {
        "editor.formatOnSave": true
    },
    "[javascriptreact]": {
        "editor.formatOnSave": true
    },
    "prettier.disableLanguages": [
        "javascript",
        "javascriptreact"
    ],
    "workbench.startupEditor": "newUntitledFile",
    "latex-workshop.intellisense.package.enabled": true,
    "latex-workshop.intellisense.unimathsymbols.enabled": true,
    "latex-workshop.latex.recipes": [
        {
            "name": "latexmk 🔃",
            "tools": [
                "latexmk"
            ]
        },
        {
            "name": "pdflatex ➞ bibtex ➞ pdflatex`×2",
            "tools": [
                "pdflatex",
                "bibtex",
                "pdflatex",
                "pdflatex"
            ]
        }
    ],
    "latex-workshop.latex.tools": [
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": [
                "-shell-escape",
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-pdf",
                "-outdir=%OUTDIR%",
                "%DOC%"
            ],
            "env": {}
        },
        {
            "name": "pdflatex",
            "command": "pdflatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%"
            ],
            "env": {}
        },
        {
            "name": "bibtex",
            "command": "bibtex",
            "args": [
                "%DOCFILE%"
            ],
            "env": {}
        },
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": [
                "-xelatex",
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%"
            ]
        }
    ],
    "latex-workshop.latex.clean.subfolder.enabled": true,
    "git.autofetch": true,
    "terminal.integrated.fontFamily": "Inconsolata for Powerline",
    "latex-workshop.view.pdf.viewer": "external",
    "editor.minimap.enabled": false,
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "files.exclude": {
        "**/.classpath": true,
        "**/.project": true,
        "**/.settings": true,
        "**/.factorypath": true
    },
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "workbench.iconTheme": "material-icon-theme",
    "prolog.executablePath": "/Applications/SWI-Prolog.app/Contents/MacOS/swipl",
    "python.languageServer": "Microsoft",
    "editor.wordWrap": "on",
    "latex-workshop.view.pdf.zoom": "page-fit",
    "latex-workshop.view.pdf.external.viewer.args": [
        "0",
        "%PDF%"
    ],
    "latex-workshop.view.pdf.external.viewer.command": "/Applications/Skim.app/Contents/SharedSupport/displayline",
    "latex-workshop.view.pdf.external.synctex.command": "/Applications/Skim.app/Contents/SharedSupport/displayline",
    "latex-workshop.view.pdf.external.synctex.args": [
        "-r",
        "-b",
        "%LINE%",
        "%PDF%",
        "%TEX%"
    ],
    "latex-workshop.latex.autoBuild.cleanAndRetry.enabled": true,
    "latex-workshop.latex.autoClean.run": "onBuilt",
    "latex-workshop.latex.clean.fileTypes": [
        "*.aux",
        "*.bbl",
        "*.blg",
        "*.idx",
        "*.ind",
        "*.lof",
        "*.lot",
        "*.out",
        "*.toc",
        "*.acn",
        "*.acr",
        "*.alg",
        "*.glg",
        "*.glo",
        "*.gls",
        "*.ist",
        "*.fls",
        "*.log",
        "*.fdb_latexmk",
        "*.snm",
        "*.nav",
        "*.synctex.gz",
        "*.run.xml",
        "*.bcf",
        "__latexindent_temp.tex"
    ],
    "explorer.confirmDelete": false,
    "latex-workshop.latexindent.path": "/usr/local/texlive/2021/bin/universal-darwin/latexindent",
    "security.workspace.trust.untrustedFiles": "open",
    "editor.fontSize": 16
}

1 Answer 1

1

You should click on "View in external viewer" button.

enter image description here

1
  • 1
    @JasperHabicht I corrected that.
    – Yao Pan
    Jun 27, 2023 at 0:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .