win11 vscode 本地 latex 编译(Elsevier举例)

win11 vscode 本地 latex 编译

    • 准备
    • [1. 安装步骤](#1. 安装步骤)
    • [2. 应用举例(Elsevier)](#2. 应用举例(Elsevier))

准备

名称 版本
操作系统 win11(win10也可以的)
texlive 2025
vscode NaN

1. 安装步骤

  1. 安装Tex Live
    下载连接:https://tug.org/texlive/windows.html
    点击安装(耗时会蛮久的,我等了1个小时)
    安装完成后测试下(正常的话会如下图):
bash 复制代码
tex -v
latex -v
pdflatex -v
  1. VSCode安装必要的插件 LaTeXLaTeX Workshop

    可以先编译下试试,如果不能 直接编译成pdf,可在所在的文件夹在新建 setting.json,内容可以参考下面:
json 复制代码
{
    "latex-workshop.latex.recipes": [
      {
        "name": "xelatex -> biber -> xelatex*2",
        "tools": [
            "xelatex",
            "biber",
            "xelatex",
            "xelatex"
        ]
      },
      {
        "name": "latexmk (biber)",
        "tools": [
          "pdflatex",
          "biber",
          "pdflatex",
          "pdflatex"
        ]
      }
    ],
    "latex-workshop.latex.tools": [
      {
        "name": "pdflatex",
        "command": "pdflatex",
        "args": [
          "-synctex=1",
          "-interaction=nonstopmode",
          "-file-line-error",
          "-output-directory=build",
          "%DOC%"
        ]
      },
      {
        "name": "biber",
        "command": "biber",
        "args": [
          "--output-directory=build", 
          "%DOCFILE%"
        ]
      }
    ],
    "latex-workshop.latex.outDir": "./build",
    "latex-workshop.view.pdf.viewer": "tab"  
  }

elsevier的模板似乎不需要写这个 setting.json 就可以编译。

2. 应用举例(Elsevier)

解压 elsevier 的 latex zip压缩包解压后可以看到:

能编译的只有 .tex 文件,
elsarticle-template-harv.tex
elsarticle-template-num.tex
elsarticle-template-num-names.tex

尾缀就是不同的reference格式。

例如使用 elsarticle-template-harv.tex ,注意 \cite{}\citep{} 的区别。

This is a citation test \cite{lamport94}. This is a citation test \citep{lamport94}.
This is a citation test Lamport (1994). This is a citation test (Lamport, 1994).
相关推荐
持敬chijing5 小时前
PHP开发-环境搭建-安装phpstudy-vscode工具
开发语言·vscode·php
csdn_aspnet5 小时前
Copilot能换成本地吗?VSCode接本地大模型本地化接入方案
ide·vscode·ai·ollama
青 春 记 忆8 小时前
零基础入门python04:用注册校验理解字典、集合和条件判断
开发语言·vscode·python·python3.11
00后程序员张11 小时前
有没有更轻量的 iOS 开发环境?快蝎kxapp轻量化路径与构成
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
buhuizhiyuci13 小时前
【Linux 网络篇】数据的 “循环系统“:协议认识与网络传输的流程
linux·运维·服务器·网络·vscode
iCxhust2 天前
8088单板机VScode集成开发环境使用方法
ide·笔记·vscode·编辑器·微机原理·8088单板机
如何原谅奋力过但无声2 天前
现代化Python工具:uv、Ruff、Pyright、Rich(只讲重点版)
vscode·python·uv
Molesidy2 天前
【VSCode】基于win10系统老版本和VSCode最新版本下出现的VSCode内置的终端窗口不能运行的问题的解决方案
ide·vscode·编辑器
James5062 天前
VSCode+CodeX扩展,无法启动
ide·vscode·codex
W_chuanqi3 天前
VSCode + Claude Code + DeepSeek:打造 AI 编程神器
ide·vscode·编辑器·ai编程