LaTeX 安装
对于刚入门latex的新手,安装latex就想弃坑了。
以下是在windows下安装latex的步骤
在安装texlive前,请先将杀毒软件关闭。
step1:下载texlive
在ios镜像文件中下载texlive2022-20220321.iso。
将其放在X:\Y目录下
step2:环境变量
使用win+R键并输入cmd,点击确定,打开黑窗口。
在黑窗口中输入echo %path:;=&echo.%,查看环境变量。
若其中没有 C:\Windows\system32环境,则step3手动添加。如果有则step4.
step3:添加环境变量
按win+s搜索高级系统设置,点击打开。
点击环境变量
先点击path,然后点击编辑,在空白处加入
C:\texlive\2022\bin\win32
然后一直点击确定直至退出。
step4:安装包检验
在黑窗口中输入
cd /d X:\Y
<回车>
certutil -hashfile texlive2021.iso md5
若显示
1 MD5 的 texlive2021.iso 哈希:
2 2893d180f1559a7bf80dfc0740f6b889
3 CertUtil: -hashfile 命令成功完成
则表示镜像文件正常。
step5:
在你要安装的目录下创建文件夹(注意文件夹路径名称为不带空格的英文)。
然后,将下载的iso文件装载,获得一个虚拟磁盘,每个人的磁盘名称不同,我的是E盘。
在该磁盘上输入cmd,进入该目录的黑窗口。
在黑窗口中输入 E:\install-tl-windows.bat --no-gui
将看到如下结果
1 =====================> TeX Live installation procedure <=====================
2
3 ======> Letters/digits in <angle brackets> indicate <=======
4 ======> menu items for actions or customizations <=======
5 = help> https://tug.org/texlive/doc/install-tl.html <=======
6
7 Detected platform: Windows
8
9 <B> set binary platforms: 1 out of 6
10
11 <S> set installation scheme: scheme-full
12
13 <C> set installation collections:
14 41 collections out of 41, disk space required: 7155 MB
15
16 <D> set directories:
17 TEXDIR (the main TeX directory):
18 C:/texlive/2021
19 TEXMFLOCAL (directory for site-wide local files):
20 C:/texlive/texmf-local
21 TEXMFSYSVAR (directory for variable and automatically generated data):
22 C:/texlive/2021/texmf-var
23 TEXMFSYSCONFIG (directory for local config):
24 C:/texlive/2021/texmf-config
25 TEXMFVAR (personal directory for variable and automatically generated data):
26 ~/.texlive2021/texmf-var
27 TEXMFCONFIG (personal directory for local config):
28 ~/.texlive2021/texmf-config
29 TEXMFHOME (directory for user-specific files):
30 ~/texmf
31
32 <O> options:
33 [ ] use letter size instead of A4 by default
34 [X] allow execution of restricted list of programs via \write18
35 [X] create all format files
36 [X] install macro/font doc tree
37 [X] install macro/font source tree
38 [X] adjust search path
39 [1] add menu items, shortcuts, etc.
40 [1] update file associations
41 [X] install TeXworks front end
42 [X] after install, set CTAN as source for package updates
43
44 <V> set up for portable installation
45
46 Actions:
47 <I> start installation to hard disk
48 <P> save installation profile to 'texlive.profile' and exit
49 <Q> quit
50
51 Enter command:
这里我们选择I将texli安装在默认位置(C:\texlive\2022)。
该安装过程比较漫长,请耐心等待。
step6:
待step5完成后,再次打开黑窗口输入 tex -v
,若显示
1 TeX 3.141592653 (TeX Live 2021/W32TeX)
2 kpathsea version 6.3.3
3 Copyright 2021 D.E. Knuth.
4 There is NO warranty. Redistribution of this software is
5 covered by the terms of both the TeX copyright and
6 the Lesser GNU General Public License.
7 For more information about these matters, see the file
8 named COPYING and the TeX source.
9 Primary author of TeX: D.E. Knuth.
则说明安装成功。