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).
相关推荐
2501_915918413 小时前
iOS编程用什么软件好?主流工具Xcode、AppCode、CodeRunner与新兴快蝎对比
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
__pop_10 小时前
VSCode Remote SSH 远程连接 glibc 高版本依赖问题
vscode
daxiangxm15 小时前
【趣味休息】“围住小猫在线玩”-“困住小猫”,又回来了
数据结构·人工智能·vscode·github·php
星光开发者15 小时前
基于Spring Boot的充电桩管理系统的设计与实现-计算机毕设【课程设计】57105
vue.js·spring boot·vscode·mysql·django·php·express
程序员允诺1 天前
内网/无网环境必备:VS Code Remote-SSH 离线包下载与手动部署教程
vscode
darin_ฅ( ̳• ◡ • ̳)ฅ11 天前
【开发工具】2026版-VScode&IDEA&Cursor插件安装及插件配置迁移
vscode·idea
别动我齐刘海1 天前
ROS2 Jazzy + C++ 实战路线——进阶学习3
c++·人工智能·vscode·python·算法·机器学习·机器人
xieliyu.2 天前
前端基础:常见CSS选择器用法
前端·css·笔记·vscode
别动我齐刘海2 天前
ROS2 Jazzy + C++ 实战路线——基础学习2
c++·人工智能·vscode·python·学习·机器学习·机器人
郝学胜-神的一滴3 天前
C++20模板元编程 05:吃透变参模板,解锁编译期万能参数能力
服务器·开发语言·c++·windows·vscode