VScode使用Latex注意(IEEE论文投稿)

VScode使用Latex注意(IEEE论文投稿)

VScode配置Latex可看 基于Visual Studio Code的 LaTeX环境配置及使用示例(超详细)

以下为个人使用时的一些问题及解决方案

1. VScode配置文件(setting.json)

通过VScode进入文件夹,在文件夹中按下 **ctrl+shift+P ** 打开首选项会出现一个setting.json文件,在文件夹中直接粘贴以下内容

{
    "latex-workshop.latex.autoBuild.run": "never",
    "latex-workshop.showContextMenu": true,
    "latex-workshop.intellisense.package.enabled": true,
    "latex-workshop.message.error.show": false,
    "latex-workshop.message.warning.show": false,
    "latex-workshop.latex.tools": [
    // 编译工具和命令
    {
            "name": "pdflatex",
            "command": "pdflatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOCFILE%"
            ]
    },

    {
        
        
        "name": "xelatex",
        "command": "xelatex",
        "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "-pdf",
            "%DOCFILE%"
        ]
    },

    {
        "name": "bibtex",
        "command": "bibtex",
        "args": [
            "%DOCFILE%"
        ]
    },
    {
    "name": "biber",
    "command": "biber",
    "args": [
        "%DOCFILE%"
    ]
    }
],
// 设置编译方法
"latex-workshop.latex.recipes": [
    {
        "name": "pdflatex",
        "tools": [
            "pdflatex"
        ]
    },
    {
        "name": "pdflatex -> bibtex -> pdflatex2",
        "tools": [
            "pdflatex",
            "bibtex",
            "pdflatex",
            "pdflatex"
        ]
    },
    {
        "name": "pdf->biber->pdf->pdf",
        "tools": [
            "pdflatex",
            "biber",
            "pdflatex",
            "pdflatex"
        ]
    },
    
    {
        "name": "xelatex",
        "tools": [
            "xelatex"
        ],
    },

    {
        "name": "xe->biber->xe->xe",
        "tools": [
            "xelatex",
            "biber",
            "xelatex",
            "xelatex"
        ]
    },

    {
        "name": "xe->bibtex->xe->xe",
        "tools": [
            "xelatex",
            "bibtex",
            "xelatex",
            "xelatex"
        ]
    }


],

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

"latex-workshop.latex.autoClean.run": "onFailed",
"latex-workshop.latex.recipe.default": "lastUsed",
"latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",

"latex-workshop.view.pdf.viewer": "external",
"latex-workshop.view.pdf.ref.viewer":"auto",
"latex-workshop.view.pdf.external.viewer.command": "C:/Users/19401/AppData/Local/SumatraPDF/SumatraPDF.exe", // 注意修改路径
"latex-workshop.view.pdf.external.viewer.args": [
    "%PDF%"
],
"latex-workshop.view.pdf.external.synctex.command": "C:/Users/19401/AppData/Local/SumatraPDF/SumatraPDF.exe", // 注意修改路径
"latex-workshop.view.pdf.external.synctex.args": [
    "-forward-search",
    "%TEX%",
    "%LINE%",
    "%PDF%"
]
}

以上内容包含配置外部pdf的代码

2. 使用外部pdf阅读器配置注意(SumatraPDF)

  • VScode内部配置:在setting.json末尾加入以下代码即可

    "latex-workshop.view.pdf.viewer": "external",
    "latex-workshop.view.pdf.ref.viewer":"auto",
    "latex-workshop.view.pdf.external.viewer.command": "C:/Users/19401/AppData/Local/SumatraPDF/SumatraPDF.exe", // 注意修改路径
    "latex-workshop.view.pdf.external.viewer.args": [
        "%PDF%"
    ],
    "latex-workshop.view.pdf.external.synctex.command": "C:/Users/19401/AppData/Local/SumatraPDF/SumatraPDF.exe", // 注意修改路径
    "latex-workshop.view.pdf.external.synctex.args": [
        "-forward-search",
        "%TEX%",
        "%LINE%",
        "%PDF%"
    ]
    

    “latex-workshop.view.pdf.external.viewer.command”: 以及**“latex-workshop.view.pdf.external.synctex.command”😗*此处路径使用最佳电脑安装SumatraPDF的实际位置,注意桌面快捷方式对应的文件保存位置非实际位置,一定是下载的位置

  • SumaPDF配置:打开 设置->高级选项 。对应位置修改为如下语句:

    InverseSearchCmdLine = "D:\Microsoft VS Code\Code.exe" --goto %f:%l
    EnableTeXEnhancements = true
    

    InverseSearchCmdLine一定要修改为最佳电脑实际VScode.exe实际位置,而非快捷方式位置

3. 编译时注意

编译IEEE文章需使用pdfLatex,使用texlive默认的xeLatex编译会报很多不符合论文的警告甚至报错,字体对不上则警告:Some font shapes were not available, defaults substituted.

IEEE警告原因及处理: LaTeX Warnings: Unused global option(s)

更多关于投稿IEEE文章的注意可看:

img

要是不要打开其他例如福昕PDF阅读器,WPS等除编辑器以及SumatraPDF软件之外的阅读PDF的阅读软件查看当前正在写的论文PDF文档,使用则会报以上错误

[外链图片转存中…(img-ePLHJAQk-1704797845124)]

  • 19
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

独吾

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值