I am now working on Ubuntu 16.04 LTS installed on my laptop (ASUS K55VD, a 3.5 years old machine).
Now I wanna type Latex, so I have to set up the latex environment. According to CTAN, the best choice here is TEX Live, which contains many packages and programs. The TeX Live is freely available over the internet.
In the following part of this article, I'll record:
- installation for TeX Live 2016 on Ubuntu 16.04 and settings after installation
- evoke zathura to view the generated PDF file when editing tex in ST3
- use tlmgr
installation
TeX Live can be aquired in many ways. This time I choose to install over the internet, and to do so I should go to the above mentioned address to get a perl script which can be invoked within the command line to automatically download and install TeX Live into my computer.
The script is located at http://tug.org/texlive/acquire-netinstall.html . Download it and extract the .tar.gz file, and you will see the install-tl script.
Open terminal here and type sudo ./install-tl
, click Enter, input the passwd if required.
Now the installation begin, 3326 components in total will be installed.
mark@ASUS:~/Downloads/install-tl-20161022$ sudo install-tl
sudo: unable to resolve host ASUS
[sudo] password for mark:
sudo: install-tl: command not found
mark@ASUS:~/Downloads/install-tl-20161022$ sudo ./install-tl
sudo: unable to resolve host ASUS
Loading http://mirror.hust.edu.cn/CTAN/systems/texlive/tlnet/tlpkg/texlive.tlpdb
Installing TeX Live 2016 from: http://mirror.hust.edu.cn/CTAN/systems/texlive/tlnet (verified)
Platform: x86_64-linux => 'GNU/Linux on x86_64'
Distribution: net (downloading)
Using URL: http://mirror.hust.edu.cn/CTAN/systems/texlive/tlnet
Directory for temporary files: /tmp/f5ZzwrBZsN
======================> TeX Live installation procedure <=====================
======> Letters/digits in indicate <=======
======> menu items for commands or options <=======
Detected platform: GNU/Linux on x86_64
binary platforms: 1 out of 17
set installation scheme (scheme-full)
customizing installation collections
47 collections out of 48, disk space required: 4519 MB
directories:
TEXDIR (the main TeX directory):
/usr/local/texlive/2016
TEXMFLOCAL (directory for site-wide local files):
/usr/local/texlive/texmf-local
TEXMFSYSVAR (directory for variable and automatically generated data):
/usr/local/texlive/2016/texmf-var
TEXMFSYSCONFIG (directory for local config):
/usr/local/texlive/2016/texmf-config
TEXMFVAR (personal directory for variable and automatically generated data):
~/.texlive2016/texmf-var
TEXMFCONFIG (personal directory for local config):
~/.texlive2016/texmf-config
TEXMFHOME (directory for user-specific files):
~/texmf
options:
[ ] use letter size instead of A4 by default
[X] allow execution of restricted list of programs via \write18
[X] create all format files
[X] install macro/font doc tree
[X] install macro/font source tree
[ ] create symlinks to standard directories
set up for portable installation
Actions:
start installation to hard disk
help
quit
Enter command: I
Installing to: /usr/local/texlive/2016
Installing [0001/3326, time/total: ??:??/??:??]: 12many [376k]
Installing [0002/3326, time/total: 00:03/04:49:11]: 2up [66k]
Installing [0003/3326, time/total: 00:04/05:28:21]: Asana-Math [482k]
Installing [0004/3326, time/total: 00:07/04:34:26]: ESIEEcv [137k]
Installing [0005/3326, time/total: 00:07/03:59:05]: FAQ-en [4971k]
Installing [0006/3326, time/total: 00:41/04:05:53]: GS1 [1100k]
Installing [0007/3326, time/total: 00:49/04:08:32]: HA-prosper [266k]
Installing [0008/3326, time/total: 00:52/04:14:16]: IEEEconf [188k]
Installing [0009/3326, time/total: 00:54/04:17:30]: IEEEtran [1323k]
Installing [0010/3326, time/total: 01:05/04:23:55]: MemoirChapStyles [739k]
Installing [0011/3326, time/total: 01:09/04:18:42]: SIstyle [338k]
Installing [0012/3326, time/total: 01:13/04:24:27]: SIunits [284k]
Installing [0013/3326, time/total: 01:15/04:24:11]: Tabbing [217k]
Installing [0014/3326, time/total: 01:16/04:22:11]: Type1fonts [516k]
Installing [0015/3326, time/total: 01:20/04:23:02]: a0poster [119k]
Installing [0016/3326, time/total: 01:21/04:23:29]: a2ping [48k]
Installing [0017/3326, time/total: 01:21/04:22:22]: a2ping.x86_64-linux [1k]
Installing [0018/3326, time/total: 01:21/04:22:21]: a4wide [133k]
Installing [0019/3326, time/total: 01:22/04:22:29]: a5comb [91k]
Installing [0020/3326, time/total: 01:23/04:23:34]: aastex [1214k]
Installing [0021/3326, time/total: 01:29/04:15:24]: abbr [4k]
Installing [0022/3326, time/total: 01:29/04:15:20]: abc [288k]
.............(items have been removed for the lenggth limit of the article)........................
...................................................................................................
Installing [3321/3326, time/total: 03:09:33/03:09:39]: zlmtt [56k]
Installing [3322/3326, time/total: 03:09:35/03:09:40]: zwgetfdate [242k]
Installing [3323/3326, time/total: 03:09:39/03:09:43]: zwpagelayout [587k]
Installing [3324/3326, time/total: 03:09:45/03:09:46]: zxjafbfont [3k]
Installing [3325/3326, time/total: 03:09:45/03:09:46]: zxjafont [136k]
Installing [3326/3326, time/total: 03:09:48/03:09:48]: zxjatype [142k]
Time used for installing the packages: 189:50
running mktexlsr /usr/local/texlive/2016/texmf-dist ...
mktexlsr: Updating /usr/local/texlive/2016/texmf-dist/ls-R...
mktexlsr: Done.
writing fmtutil.cnf to /usr/local/texlive/2016/texmf-dist/web2c/fmtutil.cnf
writing updmap.cfg to /usr/local/texlive/2016/texmf-dist/web2c/updmap.cfg
writing language.dat to /usr/local/texlive/2016/texmf-var/tex/generic/config/language.dat
writing language.def to /usr/local/texlive/2016/texmf-var/tex/generic/config/language.def
writing language.dat.lua to /usr/local/texlive/2016/texmf-var/tex/generic/config/language.dat.lua
running mktexlsr /usr/local/texlive/2016/texmf-var /usr/local/texlive/2016/texmf-config /usr/local/texlive/2016/texmf-dist ...
mktexlsr: Updating /usr/local/texlive/2016/texmf-config/ls-R...
mktexlsr: Updating /usr/local/texlive/2016/texmf-dist/ls-R...
mktexlsr: Updating /usr/local/texlive/2016/texmf-var/ls-R...
mktexlsr: Done.
running updmap-sys --nohash ...done
re-running mktexlsr /usr/local/texlive/2016/texmf-var /usr/local/texlive/2016/texmf-config ...
mktexlsr: Updating /usr/local/texlive/2016/texmf-config/ls-R...
mktexlsr: Updating /usr/local/texlive/2016/texmf-var/ls-R...
mktexlsr: Done.
setting up ConTeXt cache: running mtxrun --generate ...done
pre-generating all format files, be patient...
running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-strict --all ...done
running package-specific postactions
finished with package-specific postactions
See
/usr/local/texlive/2016/index.html
for links to documentation. The TeX Live web site
contains updates and corrections: http://tug.org/texlive.
TeX Live is a joint project of the TeX user groups around the world;
please consider supporting it by joining the group best for you. The
list of user groups is on the web at http://tug.org/usergroups.html.
Add /usr/local/texlive/2016/texmf-dist/doc/info to INFOPATH.
Add /usr/local/texlive/2016/texmf-dist/doc/man to MANPATH
(if not dynamically found).
Most importantly, add /usr/local/texlive/2016/bin/x86_64-linux
to your PATH for current and future sessions.
Welcome to TeX Live!
Logfile: /usr/local/texlive/2016/install-tl.log
mark@ASUS:~/Downloads/install-tl-20161022$
setting
Now the installation has been seccesful, but we need to add TeX Live to PATH before we can TeX.
The follwing info should be apend to etc/profile
PATH=/usr/local/texlive/2016/bin/x86_64-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2016/texmf-dist/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2016/texmf-dist/doc/info:$INFOPATH; export INFOPATH
Attention:
- the first line is based on a 64 bit machine (OS), the content that given in the manual is, however, based on a 32 bit machine.
*note the info given in the terminal * - to make the PATH take effect, a reboot is need. Alternatively, refer to this page to temporaly echo the PATH (and verify if TeX is seen by Ubuntu).
PDF viewer
As we know, the default viewer for PDF files on Ubutnu is evince, any way, I don not like this application. I wanna make zathura my PDF viewer.
Type in Terminal sudo aptitude install zathura
to get the viewer, and go to the user settings file of LatexTools package for ST3, and then set the viewer to be zathura, that's all.
Zathura is a little bit like Vim, it has no nemu.
The way to evoke inverse search in zathura is Ctrl + Click.
tlmgr to manage packages
type tlmgr -gui
to evoke TeX Live Package Manager. But ...
perll-tk not found, after installing the package there is still a problem as can be seen in the picture below.
However, I can not tackle this annoying problem. By googling the warning message, I find this link may be helpful
But shall I type in Terminal
sudo /usr/local/texlive/2015/bin/x86_64-linux/tlmgr ...
every time I wanna install a package? No, that's not what I want. I set the PATH in /ec/profile, but it does not work, so I have to type this loooooong command. Fortunately, I don't have to do so very often. An alternative way is to set an alias:
alias tlmgr="sudo /usr/local/texlive/2016/bin/x86_64-linux/tlmgr -gui"
.
BUT, this is only a temporary alias. If you wanna set a permeant alias, ask Baidu or Google.
Alternatively, query the location of tlmgr and copy it
which tlmgr
tlmgr: saving backups to /usr/local/texlive/2016/tlpkg/backups
[ 1/19, ??:??/??:??] update: autoaligne [357k] (42226 -> 42337) ... done
[ 2/19, 00:05/00:59] update: biblatex-anonymous [62k] (42152 -> 42343) ... done
[ 3/19, 00:07/01:10] update: biblatex-manuscripts-philology [128k] (42119 -> 42345) ... done
[ 4/19, 00:09/01:09] update: biblatex-nature [381k] (42146 -> 42338) ... done
[ 5/19, 00:13/00:59] update: chickenize [226k] (39341 -> 42341) ... done
[ 6/19, 00:16/00:58] update: churchslavonic [177k] (41182 -> 42342) ... done
[ 7/19, 00:18/00:57] update: context-filter [17k] (36285 -> 42326) ... done
[ 8/19, 00:20/01:02] update: denisbdoc [31k] (41341 -> 42346) ... done
[ 9/19, 00:21/01:04] update: fixme [369k] (29362 -> 42331) ... done
[10/19, 00:27/01:05] update: handout [190k] (42266 -> 42347) ... done
[11/19, 00:30/01:05] update: listofitems [654k] (41971 -> 42335) ... done
[12/19, 00:37/01:00] update: mcf2graph [778k] (42302 -> 42336) ... done
[13/19, 00:44/00:55] update: optidef [266k] (42154 -> 42324) ... done
[14/19, 00:50/00:58] update: overlays [95k] (42206 -> 42348) ... done
[15/19, 00:55/01:02] update: texlive-docindex [222k] (42318 -> 42340) ... done
[16/19, 01:00/01:04] update: texlive-scripts [108k] (42283 -> 42333) ... done
[17/19, 01:03/01:05] update: uppunctlm [167k] (42270 -> 42334) ... done
not auto-installing biblatex-gb7714-2015 due to -no-auto-install (new on server)
not auto-installing context-cmscbf due to -no-auto-install (new on server)
not auto-installing context-cmttbf due to -no-auto-install (new on server)
not auto-installing context-inifile due to -no-auto-install (new on server)
not auto-installing context-layout due to -no-auto-install (new on server)
[18/19, 01:07/01:07] update: collection-bibtexextra [2k] (42278 -> 42325) ... done
[19/19, 01:08/01:08] update: collection-context [1k] (42319 -> 42330) ... done
running mktexlsr ...
done running mktexlsr.
running mtxrun --generate ...
done running mtxrun --generate.
Completed.