Install LaTeX on Ubuntu 14.04

This is a How-To article that include installation and compile LaTeX file to PDF using Texmaker, Sublime Text 3, and Vim.

Install TeX Live

Install texlive-latex-extra instead of texlive-latex-base.

$sudo apt-get install texlive-latex-extra -y

Initial user tree in home directory

Before using tlmgr in user mode, you have to set up the user tree with the init-usertree action.
tlmgr is TeX Live package manager, you can run tlmgr --help for more detail.
The full documentation for tlmgr

$ tlmgr init-usertree
(running on Debian, switching to user mode!)

Install packages

Run tlmgr install package-name to install a package, if an error has occurred with following.

$ tlmgr install bytefield
(running on Debian, switching to user mode!)
/usr/bin/tlmgr: Initialization failed (in setup_unix_one):
/usr/bin/tlmgr: could not find a usable xzdec.
/usr/bin/tlmgr: Please install xzdec and try again.
Couldn't set up the necessary programs.
Installation of packages is not supported.
Please report to
tlmgr: exiting unsuccessfully (status 1).  

Install zxedc to solve this problem.

$sudo apt-get install xzdec

If you have no problem with install a package

$ tlmgr install bytefield
(running on Debian, switching to user mode!)
tlmgr: package repository
[1/1, ??:??/??:??] install: bytefield [5k]
tlmgr: package log updated: /home/oopsmonk/texmf/web2c/tlmgr.log
running mktexlsr ...
done running mktexlsr.

Manually install packages

Install Editor

Here are some editors you can choose.

Hello LaTex

Hello world!
$Hello world!$ %math mode 

Save to hello.tex and compile to PDF

Sublime Text 3 with LaTeXTools

Vim with vimtex
launch Vim via vim --servername vimlatex

tlmgr cannot setup TLPDB



Leave a Comment