latex 环境配置

编译器可选 miktex和 tex live

① miktex 下载地址

Portable 版本用的也是 Installer版的安装程序 basic-miktex-24.1-x64.exe,但是需要修改文件名为 miktex-portable.exe

shell 复制代码
├──texmfs
│    ├─config
│    ├─data
│    └─install
│       └─miktex/bin/x64/tex.exe  # 加入环境变量
└─miktex-portable.cmd  # miktex console

console 默认是缩小到任务栏,右键还原,检查更新(不更新没法用)


② Perl 下载地址 。运行 latexmk 需要依赖 perl

perl 两个版本,strawberry开源官网打不开很奇怪,activestate收费(试用七天)

同样是添加到环境变量

tex 复制代码
\documentclass{article}
% 注释
\begin{document}
Hello, world! 你好世界~
\end{document}

vscode config

vscode "latex workshop "插件不需要配置路径,应该是通过 tex 命令

Shift+P ,settings.json

json 复制代码
	// 取消自动编译
	"latex-workshop.latex.autoBuild.run": "never",
    // 每次编译后删除辅助文件
    "latex-workshop.latex.autoClean.run": "onBuilt",
    // 默认使用上一次的编译方案
    "latex-workshop.latex.recipe.default": "pdflatex_bib",
    // LaTeX Workshop - 根据加载包自动加载自动补全
    "latex-workshop.intellisense.package.enabled": true,
    // 默认使用内置pdf阅读器进行 PDF 预览
    "latex-workshop.view.pdf.viewer": "tab",
    //右键菜单
    "latex-workshop.showContextMenu": true,

Reference: https://blog.csdn.net/qq_15950515/article/details/121372896

error

package description
\usepackage{lmodern} LaTeX Font: Font shape `OMX/cmex/m/n' in size <10.53937> not available
\usepackage[UTF8]{ctex} 不支持中文

Reference:

相关推荐
山登绝顶我为峰 3(^v^)36 天前
如何录制带备注的演示文稿(LaTex Beamer + Pympress)
c++·线性代数·算法·计算机·密码学·音视频·latex
秋窗79 天前
Mac 部署Latex OCR并优化体验(打包成App并支持全局快捷键)
macos·ocr·latex
八一考研数学竞赛24 天前
第十七届全国大学生数学竞赛初赛模拟试题
学习·数学·latex·全国大学生数学竞赛
momo8701 个月前
当你安装TeX Live 2025 却遇到中文用户名时。。。
latex
星夜钢琴手1 个月前
缩小 IEEE 会议论文 LaTeX 模板标题、作者信息和正文的间距
latex·ieee conference
cnkeysky1 个月前
vscode 配置 latex
vscode·latex
磁悬浮青蛙呱呱呱1 个月前
xdvipdfmx:fatal: File ended prematurely. No output PDF file written.
latex
EtherWanderer2 个月前
Markdown 到 LaTeX:Overleaf 学习笔记
笔记·学习·latex
hallo-ooo2 个月前
【LaTex】基础语法入门
latex
伊织code2 个月前
LaTeX OCR - 数学公式识别系统
python·ai·ocr·latex·数学公式识别