linux安装LaTeX工具
安装texlive-full
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| dassein@pad:~$ sudo apt-get install texlive-full [sudo] password for dassein:
0 upgraded, 172 newly installed, 0 to remove and 182 not upgraded. Need to get 2,015 MB of archives. After this operation, 3,814 MB of additional disk space will be used. Do you want to continue? [Y/n] y Fetched 2,014 MB in 32min 22s (1,037 kB/s)
Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version update-alternatives: using /usr/bin/xdvi-xaw to provide /usr/bin/xdvi.bin (xdvi.bin) in auto mode update-alternatives: using /usr/bin/bibtex.original to provide /usr/bin/bibtex (bibtex) in auto mode Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version
Processing triggers for tex-common (6.05) ... texlive-base is not ready, delaying updmap-sys call texlive-base is not ready, skipping fmtutil --all call Setting up dvipng (1.15-0ubuntu1) ... Setting up texlive-base (2016.20160819-2) ... mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVEDIST... mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN... mktexlsr: Updating /var/lib/texmf/ls-R... Running mktexlsr /var/lib/texmf ... done.
Regenerating '/var/lib/texmf/fmtutil.cnf-DEBIAN'... done. Regenerating '/var/lib/texmf/fmtutil.cnf-TEXLIVEDIST'... done. update-fmtutil has updated the following file(s): /var/lib/texmf/fmtutil.cnf-DEBIAN /var/lib/texmf/fmtutil.cnf-TEXLIVEDIST If you want to activate the changes in the above file(s), you should run fmtutil-sys or fmtutil.
|
安装后测试一下
1 2 3
| dassein@pad:~$ latex This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=latex) restricted \write18 enabled.
|
安装编辑器texstudio
如果需要一个编辑器,建议texstudio,或者用vim也可以。这里安装texstudio
1
| sudo apt-get install texstudio
|
然后命令行, 即可使用
1
| dassein@pad:~$ texstudio
|
生成pdf
例子: 以stju论文模板为例
1
| git clone https://github.com/weijianwen/SJTUThesis.git
|
解压, 进入解压文件夹SJTUThesis-master
编辑./SJTUThesis-master/thesis.tex, 编辑用texstudio
进入SJTUThesis的文件夹中。在终端里输入
1 2
| cd ./SJTUThesis-master make clean thesis.pdf
|
如此,生成thesis.pdf