为了方便,以下方案均在wsl2中进行
安装latex
安装必要依赖
sudo apt update
sudo apt install perl wget build-essential下载脚本
cd /tmp
# 下载官方安装包(使用清华源链接以加速)
wget https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet/install-tl-unx.tar.gz
# 解压
tar -zxf install-tl-unx.tar.gz
# 进入解压后的文件夹(文件夹名字通常带日期,用 * 通配符自动进入)
cd install-tl-20*执行安装
sudo perl install-tl -repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet/会提示类似
======================> TeX Live installation procedure <=====================
======> Letters/digits in <angle brackets> indicate <=======
======> menu items for actions or customizations <=======
= help> https://tug.org/texlive/doc/install-tl.html <=======
Detected platform: GNU/Linux on x86_64
<B> set binary platforms: 1 out of 15
<S> set installation scheme: scheme-full
<C> set installation collections:
40 collections out of 41, disk space required: 9274 MB (free: 729040 MB)
<D> set directories:
TEXDIR (the main TeX directory):
/usr/local/texlive/2025
TEXMFLOCAL (directory for site-wide local files):
/usr/local/texlive/texmf-local
TEXMFSYSVAR (directory for variable and automatically generated data):
/usr/local/texlive/2025/texmf-var
TEXMFSYSCONFIG (directory for local config):
/usr/local/texlive/2025/texmf-config
TEXMFVAR (personal directory for variable and automatically generated data):
~/.texlive2025/texmf-var
TEXMFCONFIG (personal directory for local config):
~/.texlive2025/texmf-config
TEXMFHOME (directory for user-specific files):
~/texmf
<O> options:
[ ] use letter size instead of A4 by default
[X] allow execution of restricted list of programs via \write18
[X] create all format files
[X] install macro/font doc tree
[X] install macro/font source tree
[ ] create symlinks to standard directories
<V> set up for portable installation
Actions:
<I> start installation to hard disk
<P> save installation profile to 'texlive.profile' and exit
<Q> quit
Enter command:输入大写的I然后回车
配置环境变量
nano ~/.bashrc# Add TeX Live 2025 to PATH
export PATH=/usr/local/texlive/2025/bin/x86_64-linux:$PATH
export MANPATH=/usr/local/texlive/2025/texmf-dist/doc/man:$MANPATH
export INFOPATH=/usr/local/texlive/2025/texmf-dist/doc/info:$INFOPATHsource ~/.bashrc验证
tex --versionvscode插件
vscode可以安装LaTeX Workshop插件方便后续使用
fork仓库
https://github.com/SYSU-SCC/sysu-thesis
选择use as template创建私有仓库
然后clone到本地