On macOS you want to download and install MacTeX.
TeX
sub-folder will be
created with TeXShop inside it. This programme can be
used for creating LaTeX documents.pdflatex
pdftex
latex
lualatex
Once done, LaTeX should also work from inside Sublime Text: open or
create a TEX file (with the .tex
extension) and press
Ctrl+B to build a PDF.
1. Install LaTeX
Before you can use LaTeX in Sublime Text you need to have it installed on your computer:
$ sudo apt install texlive-latex-base
You can check that it has worked by running the following in the terminal:
$ latex --version
$ pdflatex --version
$ lualatex --version
$ bibtex --version
Each of the above should return a block of text with version, author and license information.
Another way to check that it has worked is to actually create and compile a document:
$ echo '\documentclass{article}\begin{document}Hello, World!\end{document}' > test.tex
$ pdflatex test.tex
Next, install some extra things that are missing from the base LaTeX installation:
$ sudo apt install dvipng
$ sudo apt install texlive-latex-extra
$ sudo apt install texlive-fonts-recommended
$ sudo apt install texlive-pictures
$ sudo apt install texlive-extra-utils
$ sudo apt install texlive-font-utils # Needed for eps figures to work
$ sudo apt install latexmk # Needed for running LaTeX in Sublime Text
$ sudo apt install texlive-lang-greek # Needed for the textgreek package
$ sudo apt install cm-super # Needed for using LaTeX in Matplotlib plot labels
2. Install the Sublime Text Extensions for LaTeX
Specifically, install the LaTeXTools package for Sublime Text:
Check that it has worked by opening a LaTeX file (one with the
.tex
extension) in Sublime Text and compiling it:
.tex
file doesn’t open in Sublime Text:
.tex
files,
right-click > Properties (keyboard shortcut: Ctrl+I) > Open With
> select Sublime Text > Set as default.tex
files with LaTeX. Go to Tools > Build
System > LaTeX and try to Build it again. If this works, remember to
change the Build System back to automatic (Tools > Build System >
Automatic).xelatex
and
biber
are missing and if display_log
is false,
but everything else should be there and be green.Note that if you have a bibliography you need to copy the bibstyle
file (eg apa.bst
) into the working directory.
To see all the keyboard shortcuts that will work when a
.tex
file is open and active, go to Preferences >
Package Settings > LaTeXTools > Key Bindings - Default. Probably
the most useful is the shortcut that will display the word count:
Ctrl+L, W
3. Installing LaTeX Packages
.sty
file or as a
.zip
file. If the latter, unzip it and run LaTeX on the
.ins
file which will create the .sty
file:
cd
into the unzipped folder and
run:$ latex {package_name}.ins
.sty
file to the following directory:
/usr/share/texmf/tex/latex
. This can be done with:$ sudo mv {package_name}.sty /usr/share/texmf/tex/latex/{package_name}.sty
.sty
file into might not be searched by default,
the ls-R file must be updated to make the system aware of the new
package:$ sudo mktexlsr
Check that it has worked by opening a LaTeX file and adding
\usepackage{}
to the preamble with your new package’s name
between the curly brackets and compiling it.
1. Install LaTeX
Before you can use LaTeX in Sublime Text you need to have it installed on your computer:
$ sudo apt install texlive-latex-base
You can check that it has worked by running the following in the terminal:
$ latex --version
$ pdflatex --version
$ lualatex --version
$ bibtex --version
Each of the above should return a block of text with version, author and license information.
Another way to check that it has worked is to actually create and compile a document:
$ echo '\documentclass{article}\begin{document}Hello, World!\end{document}' > test.tex
$ pdflatex test.tex
Next, install some extra things that are missing from the base LaTeX installation:
$ sudo apt install dvipng
$ sudo apt install texlive-latex-extra
$ sudo apt install texlive-fonts-recommended
$ sudo apt install texlive-pictures
$ sudo apt install texlive-extra-utils
$ sudo apt install magick
$ sudo apt install texlive-font-utils # Needed for eps figures to work
$ sudo apt install latexmk # Needed for running LaTeX in Sublime Text
$ sudo apt install texlive-lang-greek # Needed for the textgreek package
$ sudo apt install cm-super # Needed for using LaTeX in Matplotlib plot labels
2. Install the Sublime Text Extensions for LaTeX
Specifically, install the LaTeXTools package for Sublime Text:
Check that it has worked by opening a LaTeX file (one with the
.tex
extension) in Sublime Text and compiling it:
.tex
file doesn’t open in Sublime Text:
.tex
files,
right-click > Properties (keyboard shortcut: Ctrl+I) > Open With
> select Sublime Text > Set as default.tex
files with LaTeX. Go to Tools > Build
System > LaTeX and try to Build it again. If this works, remember to
change the Build System back to automatic (Tools > Build System >
Automatic).xelatex
and
biber
are missing and if display_log
is false,
but everything else should be there and be green.Note that if you have a bibliography you need to copy the bibstyle
file (eg apa.bst
) into the working directory.
To see all the keyboard shortcuts that will work when a
.tex
file is open and active, go to Preferences >
Package Settings > LaTeXTools > Key Bindings - Default. Probably
the most useful is the shortcut that will display the word count:
Ctrl+L, W
3. Installing LaTeX Packages
.sty
file or as a
.zip
file. If the latter, unzip it and run LaTeX on the
.ins
file which will create the .sty
file:
cd
into the unzipped folder and
run:$ latex {package_name}.ins
.sty
file to the following directory:
/usr/share/texmf/tex/latex
. This can be done with:$ sudo mv {package_name}.sty /usr/share/texmf/tex/latex/{package_name}.sty
.sty
file into might not be searched by default,
the ls-R file must be updated to make the system aware of the new
package:$ sudo mktexlsr
Check that it has worked by opening a LaTeX file and adding
\usepackage{}
to the preamble with your new package’s name
between the curly brackets and compiling it.
Install LaTeX:
install-tl-*
foldersudo su
./install-tl
i
PATH=/usr/local/texlive/2017/bin/x86_64-linux:$PATH
apt-get install latexmk
sudo apt-get -y install texlive-latex-recommended texlive-pictures texlive-latex-extra
Also install ImageMagick:
$ cd ~/Downloads
$ wget https://www.imagemagick.org/download/ImageMagick.tar.gz
$ tar xvzf ImageMagick.tar.gz
$ cd ImageMagick-7.0.x-xx/ # Replace the "x"s with the right version numbers
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig /usr/local/lib
Once finished:
xelatex
and biber
might be missing and
display_log
might be false, but everything else should be
there and be greenOn Windows 7, 8 and 10: