Linux 下使用 latex 的安装和使用

安装:

一、texlive2018 的安装

1、官网下载 :http://tug.org/texlive/

国内镜像:http://mirrors.cqu.edu.cn/CTAN/systems/texlive/Images/

本地下载

2、安装

sudo mount -o loop texlive2018-20180414.iso /mnt/
cd /mnt/
sudo ./install-tl

二、texstudio 安装

1、官网下载 :http://texstudio.sourceforge.net/

2、安装

sudo dpkg -i texstudio_2.12.8-1+18.1_amd64.deb
sudo apt install libpoppler-qt5-1
sudo apt --fix-broken install
sudo dpkg -i texstudio_2.12.8-1+18.1_amd64.deb

三、配置

1、配置用户个人配置文件

编辑shell配置文件,.bashrc 或.zshrc等

sudo gedit ~/.zshrc

添加:

#tex live 2018.6
export MANPATH=${MANPATH}:/usr/local/texlive/2018/texmf-dist/doc/man
export INFOPATH=${INFOPATH}:/usr/local/texlive/2018/texmf-dist/doc/info
export PATH=${PATH}:/usr/local/texlive/2018/bin/x86_64-linux

配置生效:

source ~/.zshrc

2、配置texstudio

Options >> Configure TeXstudio >> Commands

点击 Show Advanced Options

Latex:

"/usr/local/texlive/2018/bin/x86_64-linux/latex" -src -interaction=nonstopmode %.tex

PdfLatex:

"/usr/local/texlive/2018/bin/x86_64-linux/pdflatex" -synctex=1 -interaction=nonstopmode %.tex

XeLatex:

"/usr/local/texlive/2018/bin/x86_64-linux/xelatex" -synctex=1 -interaction=nonstopmode %.tex

LuaLatex:

"/usr/local/texlive/2018/bin/x86_64-linux/lualatex" -synctex=1 -interaction=nonstopmode %.tex

BibTex:

"/usr/local/texlive/2018/bin/x86_64-linux/bibtex" %.aux

 

Options >> Configure TeXstudio >> Build

Commands($PATH):

/usr/local/texlive/2018/bin/x86_64-linux

Comments are closed.