1. 安装
1.1 安装 TexLive
1.1.1 从软件源安装
在终端执行以下代码,安装 TexLive 环境:
sudo pacman -S texlive-most
sudo pacman -S texlive-lang
【注】这样安装 TexLive 后无法在终端使用 texdoc 工具,会报错:/usr/local/texlive/2020/texmf-dist/doc/generic/pgf/pgfmanual.pdf。
1.1.2 从安装包安装
如果想要使用 texdoc 等其他工具,最好的办法还是到官网下载安装包进行在本地安装(在线安装包下载地址、离线安装包下载地址)。下面以本人安装为例:
cd install-tl-20200411
sudo ./install-tl
安装完后,会提示需要添加路径:
Add /usr/local/texlive/2020/texmf-dist/doc/man to MANPATH.
Add /usr/local/texlive/2020/texmf-dist/doc/info to INFOPATH.
Most importantly, add /usr/local/texlive/2020/bin/x86_64-linux
to your PATH for current and future sessions.
首先编辑 /etc/profile 文件:
sudo vim /etc/profile
然后刷新使之生效:
source /etc/profile
此时就安装好 TexLive 了,并且可以在终端使用 texdoc 工具。
【注】更多 TexLive 安装详情可参阅 ArchWiki 。
1.2 安装 TexStudio
在终端直接从软件源安装即可:
sudo pacman -S texstudio
1.3 配置 TexStudio
本人使用 XeTex 作为 LaTex 的编译引擎,故安装好 TexStudio 后,需要将默认编译器配置成 XeLaTex:【选项(options)】-> 【配置TexStudio(configure TexStudio)】

2. 管理
TexLive 提供了 Tex 宏包管理器 tlmgr,可以用来安装、删除、更新宏包,具体使用参见:
tlmgr --help
3. 文档
【注】使用LaTex写作过程中,若想查看某一宏包(XXX)的官方手册,可以在终端使用 texdoc 命令:
texdoc XXX