Install Latex distribution, editor and packages on Ubuntu

1. Install TexLive. This is the latex environment.

https://www.tug.org/texlive/quickinstall.html

We recommend to use .install-tl script to install TexLive. TexLive is usually installed at “/usr/local/texlive/year/bin/x86_64-linux/….”

Although you can install vanilla TexLive via sudo apt-get install texlive, we often observe it misses advanced accessories such as fonts.

 

2. Install Texmaker

http://www.xm1math.net/texmaker/

*** Note: On Ubuntu, Texmaker can be installed via apt-get install texmaker***

3. Open Texmaker, Options -> Configure Texmaker:

Set pdflatex location in your TexLive installed location. For example, mine is “/usr/local/texlive/2015/bin/x86_64-linux/pdflatex” -interaction=nonstopmode %.tex

4. Use `F1` to compile your tex file. Done.

5. In some versions of Ubuntu, certain shortcuts of Texmaker don’t work. To address that, you can do three steps:

a. sudo apt-get remove appmenu-qt5

b. reinstall Texmaker with Qt4-supported version: http://www.xm1math.net/texmaker/download.html

c. Keep Texmaker closed while going to ~/.config/xm1/ and edit texmaker.ini such that no same key is mapped to two different actions. (e.g. QuickBuild and PdfLatex are often mapped to the same key, F1. So please eliminate such repeating cases.)

6. To support pdf – tex synchronization (features like jump to the line from pdf to tex file, or show the red rectangle of current editing position), you need to add “-synctex=1” in pdflatex command:

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

 

To install CTAN packages:

Download package files, which usually contains a .ins and a .dtx file.

Run latex ***.ins. This will generate a ***.sty file in the same folder.

Copy and paste the sty file into texmf/tex/latex/local 

 

Leave a comment

Your email address will not be published. Required fields are marked *