首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从Visual代码(macOS)中直接以浏览方式打开PDF文件

从Visual代码(macOS)中直接以浏览方式打开PDF文件
EN

Stack Overflow用户
提问于 2021-12-21 12:21:20
回答 1查看 1.1K关注 0票数 2

我试图用Visual代码中的撇除打开我的PDF文档。我希望View LaTeX PDF file命令在浏览我的PDF文档中打开并自动更新它。不幸的是,当我点击视图LaTeX PDF文件按钮时,它不会打开浏览。

我被迫:

  • 打开浏览我自己;
  • 然后打开PDF文件;

当我这么做的时候,一切都很好。每次保存LaTeX文件时,该文件都会正确更新。

因此,我希望能够直接从Visual代码打开PDF文档。就像我在视频开始时所做的那样。

请注意,我已经阅读了这些问题SyncTex与浏览pdf查看器?Visual Studio代码中的PDF预览文献资料

我的配置如下:

  • macOS (12.1)
  • 代码(1.63.0)
  • LaTeX工作室插件(v8.22.0)。
  • 脱脂1.6.7 (137)
  • pdfTeX 3.141592653-2.6-1.40.22 (TeX Live2021)
  • Latexmk,John Collins,2020年9月29日。4.70b版
  • settings.json
代码语言:javascript
复制
{
    "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
}
EN

回答 1

Stack Overflow用户

发布于 2021-12-25 12:09:47

So...In事实是,问题不是来自设置文件。它是正确的和有效的。问题是蒙特雷12.1中的脚本支持错误。sdef解析器无法处理同义词。这已被记录为这里

等待更新的解决方法是编辑文件/Applications/Skim.app/Contents/Resources/Skim.sdef并注释这些代码行

代码语言:javascript
复制
<!-- <synonym name="selection for"/> -->

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

这不是我喜欢的解决方案,但同时,它在这里起作用。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70435394

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档