Difference between revisions of "Latex on Ubuntu"
Line 1: | Line 1: | ||
+ | == On Ubuntu 11.04 == | ||
+ | |||
+ | Install some packages to get ''pdflatex'', "xelatex"" and other tools for Latex support. | ||
+ | |||
+ | sudo apt-get install texlive texlive-latex-extra texlive-xetex | ||
+ | |||
+ | |||
+ | == On Ubuntu 10.04 == | ||
+ | |||
This is what I did to get TeX/Latex working on Ubuntu 10.04. Note, this is not the only way... | This is what I did to get TeX/Latex working on Ubuntu 10.04. Note, this is not the only way... | ||
Also, this may have some redundant packages. | Also, this may have some redundant packages. | ||
Line 4: | Line 13: | ||
There is a Winefish program to edit the latex files, but you can do it using gedit or emacs if you know most of the commands or have a good example or template. A good editor would have syntax highlighting and auto spell-check. | There is a Winefish program to edit the latex files, but you can do it using gedit or emacs if you know most of the commands or have a good example or template. A good editor would have syntax highlighting and auto spell-check. | ||
− | Install some packages to get ''pdflatex'', "xelatex"" and other tools | + | Install some packages to get ''pdflatex'', "xelatex"" and other tools. |
sudo apt-get install tex-common | sudo apt-get install tex-common | ||
Line 15: | Line 24: | ||
sudo apt-get install texlive-fonts-recommended | sudo apt-get install texlive-fonts-recommended | ||
+ | |||
+ | == Using Latex == | ||
You can create the pdf document from TeX like this | You can create the pdf document from TeX like this | ||
Line 21: | Line 32: | ||
I find it useful creating a makefile that will do this and some other tasks, such as cleaning up the log files and such. | I find it useful creating a makefile that will do this and some other tasks, such as cleaning up the log files and such. | ||
+ | For example: | ||
− | = | + | BASE_NAME=main |
− | + | ||
− | + | all: | |
− | + | xelatex $(BASE_NAME).tex | |
− | + | bibtex $(BASE_NAME) | |
+ | xelatex $(BASE_NAME).tex | ||
+ | xelatex $(BASE_NAME).tex | ||
+ | |||
+ | clean: | ||
+ | rm -f $(BASE_NAME).pdf *.aux *.bbl *.dvi *.log *.blg | ||
== Good resources == | == Good resources == |
Revision as of 10:30, 7 October 2011
On Ubuntu 11.04
Install some packages to get pdflatex, "xelatex"" and other tools for Latex support.
sudo apt-get install texlive texlive-latex-extra texlive-xetex
On Ubuntu 10.04
This is what I did to get TeX/Latex working on Ubuntu 10.04. Note, this is not the only way... Also, this may have some redundant packages.
There is a Winefish program to edit the latex files, but you can do it using gedit or emacs if you know most of the commands or have a good example or template. A good editor would have syntax highlighting and auto spell-check.
Install some packages to get pdflatex, "xelatex"" and other tools.
sudo apt-get install tex-common sudo apt-get install texlive-latex-base sudo apt-get install texlive-latex-extra sudo apt-get install texlive-xetex
Get some fonts to avoid the infamous missing 'ptmri7t' error.
sudo apt-get install texlive-fonts-recommended
Using Latex
You can create the pdf document from TeX like this
pdflatex mydoc.tex
I find it useful creating a makefile that will do this and some other tasks, such as cleaning up the log files and such. For example:
BASE_NAME=main all: xelatex $(BASE_NAME).tex bibtex $(BASE_NAME) xelatex $(BASE_NAME).tex xelatex $(BASE_NAME).tex clean: rm -f $(BASE_NAME).pdf *.aux *.bbl *.dvi *.log *.blg
Good resources
- in general: http://en.wikibooks.org/wiki/LaTeX
- Fonts and text size: http://en.wikibooks.org/wiki/LaTeX/Formatting#Font_Styles_and_size
- Figures and captions: http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Figures
- Tables: http://en.wikibooks.org/wiki/LaTeX/Tables
- Latex makefiles: http://www.wlug.org.nz/LatexMakefiles