Install LaTeX from Scratch: Difference between revisions

From Micro and Nano Mechanics Group
Jump to navigation Jump to search
(Created page with ' This method installs the TeXLive LaTeX implementation from the internet. First download the installer from any CTAN (Comprehensive TeX Archive Network) repository and decompress…')
 
No edit summary
Line 1: Line 1:

This method installs the TeXLive LaTeX implementation from the internet. First download the installer from any CTAN (Comprehensive TeX Archive Network) repository and decompress it. For example,
This method installs the TeXLive LaTeX implementation from the internet. First download the installer from any CTAN (Comprehensive TeX Archive Network) repository and decompress it. For example,


Line 23: Line 22:


After that, we have to add the tex tools (for example pdflatex, latex, bibtex) to the PATH. If the links were created in ~/usr/local/bin then that is the directory that should be in the PATH (if not yet). The PATH can be set in the .bashrc file for example.
After that, we have to add the tex tools (for example pdflatex, latex, bibtex) to the PATH. If the links were created in ~/usr/local/bin then that is the directory that should be in the PATH (if not yet). The PATH can be set in the .bashrc file for example.

Two different TeX systems/installations can coexists. For example, if the system had already a TeX system installed we can force to run that particular version by using the command
/usr/bin/pdflatex example.tex
or we can make sure our own install is used by doing
~/usr/local/bin/pdflatex example.tex

Which version is used by default depends on how the environment variable PATH is defined.

Revision as of 22:31, 5 January 2010

This method installs the TeXLive LaTeX implementation from the internet. First download the installer from any CTAN (Comprehensive TeX Archive Network) repository and decompress it. For example,

mkdir ~/soft
cd ~/soft
wget http://mirrors.dotsrc.org/ctan/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -zxvf install-tl-unx.tar.gz
cd install-tl-*

The installation will be performed in the user directory

mkdir -p ~/usr

More specifically, the main installation will be located at /usr/local/texlive.

The run the installer

./install-tl

Interactively, it is important to set the installation directory to ~/usr/local/texlive (instead of /usr/local/texlive) and to set 'letter' as the default paper size (unless you use A4 like in the rest of the civilized world). After confirming the options the installation will proceed to download and install around 2000 standard packages (including for example beamer, tikz, revtex, etc, etc, etc, etc). Optionally we can indicate that links to the tex tools should be created in ~/usr/local/bin.

The download/install took 3 hours in my computer and uses ~2GB (smaller installation is possible during the interactive setup).

After that, we have to add the tex tools (for example pdflatex, latex, bibtex) to the PATH. If the links were created in ~/usr/local/bin then that is the directory that should be in the PATH (if not yet). The PATH can be set in the .bashrc file for example.

Two different TeX systems/installations can coexists. For example, if the system had already a TeX system installed we can force to run that particular version by using the command

/usr/bin/pdflatex example.tex

or we can make sure our own install is used by doing

~/usr/local/bin/pdflatex example.tex

Which version is used by default depends on how the environment variable PATH is defined.