簡體   English   中英

從 Visual Studio Code (macOS) 在 Skim 中直接打開 PDF 文件

[英]Open directly PDF file in Skim from Visual Studio Code (macOS)

我正在嘗試使用 Visual Studio Code 中的 Skim 打開我的 PDF 文檔。 我想在瀏覽我的 PDF 文檔中打開View LaTeX PDF file命令並自動更新它。 不幸的是,當我單擊查看 LaTeX PDF 文件按鈕時,它沒有打開 Skim。

查看 LaTeX PDF 文件命令按鈕

我被迫:

  • 自己打開 Skim;
  • 然后打開PDF文件;

當我這樣做時,一切正常。 每次我保存 LaTeX 文件時,該文件都會正確更新。

我首先嘗試從 Visual Studio Code 中的按鈕打開文件。它不起作用,然后我打開skim打開pdf文件,它可以工作

所以我希望能夠直接從 Visual Studio Code 中打開帶有 PDF 文檔的 Skim。 正如我在視頻開頭嘗試做的那樣。

請注意,我已經使用 Skim pdf 查看器閱讀了這些問題 SyncTex? , PDF 預覽 Visual Studio 代碼文檔

我的配置如下:

  • macOS (12.1)
  • Visual Studio 代碼 (1.63.0)
  • LaTeX 車間插件(v8.22.0)。
  • 脫脂1.6.7 (137)
  • pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2021) kpathsea 版本 6.3.3
  • Latexmk,John Collins,2020 年 9 月 29 日。版本 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
}

所以……其實問題不在於設置文件。 它格式正確且有效。 問題是 Monterey12.1 中的腳本支持錯誤。 sdef 解析器無法處理同義詞。 這已在此處記錄。

等待更新時的解決方法是編輯文件/Applications/Skim.app/Contents/Resources/Skim.sdef並注釋這些代碼行

<!-- <synonym name="selection for"/> -->

<!-- <synonym name="get preferences"/> -->

這不是我喜歡的那種解決方案,但與此同時,它首先在這里完成了工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM