Ubuntu安装Texlive2020

2020-09-17
#Unix #Experiences

1.步骤

从中科大开源地址:Index of /CTAN/systems/texlive/Images/下载 texlive2020.iso 镜像。

安装图形化用户界面:

sudo apt-get install perl-tk

加载 .iso 镜像文件:

sudo mount -o loop texlive2020.iso /mnt

启动图形化安装配置:

cd /mnt/
sudo ./install-tl -gui 

安装完成后,卸载镜像文件:

cd /
sudo umount /mnt

字体配置:

sudo cp /usr/local/texlive/2020/texmf-var/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
sudo fc-cache -fsv

添加环境变量,在 ~/.bashrc 和 ~/.profile 中均添加如下变量:

export MANPATH=${MANPATH}:/usr/local/texlive/2020/texmf-dist/doc/man
export INFOPATH=${INFOPATH}:/usr/local/texlive/2020/texmf-dist/doc/info
export PATH=${PATH}:/usr/local/texlive/2020/bin/x86_64-linux

使添加变量立即生效:

source ~/.bashrc
source ~/.profile

全局变量配置 /etc/manpath.config 下添加:

sudo gedit /etc/manpath.config

MANPATH_MAP /usr/local/texlive/2020/bin/x86_64-linux /usr/local/texlive/2020/texmf-dist/doc/man

安装成功测试:

tex --version

显示:

TeX 3.14159265 (TeX Live 2019/Debian)
kpathsea version 6.3.1
Copyright 2019 D.E. Knuth.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the TeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the TeX source.
Primary author of TeX: D.E. Knuth.

2.参考