LaTeX: Difference between revisions

From Wiki
Jump to navigation Jump to search
Line 36: Line 36:


To include references in your text file, you will need to create a bibtex file, i. e. name.bib. This file should contain in an special format the references. You can create it by hand, or you can use [[JabRef]]. To know more about the format, how to compile it, etc  http://www.bibtex.org/Using/
To include references in your text file, you will need to create a bibtex file, i. e. name.bib. This file should contain in an special format the references. You can create it by hand, or you can use [[JabRef]]. To know more about the format, how to compile it, etc  http://www.bibtex.org/Using/
'''To correct typos and orthography: the babel package'''
To check the orthography, you need to define the language at the beginning of the document with:
\documentclass[catalan]{article}
\usepackage{babel}
\begin{document}
...
\end{document}
or
\usepackage[catalan,activeacute]{babel}
and to have the corresponding package available in your computer. By the default language is English.
To check the typos just close the tex file and use the command:
ispell namefile.tex


= LaTeX Examples =
= LaTeX Examples =

Revision as of 13:40, 9 September 2009

go back to Main Page, Chemistry & More, Writing Tips, Software for writing


LaTeX is a document markup language and document preparation system for the TeX typesetting program. LaTeX is most widely used by mathematicians, scientists, engineers, philosophers, ... As a primary or intermediate format (e.g. translating DocBook and other XML-based formats to PDF), LaTeX is used because of the high quality of typesetting achievable by TeX. The typesetting system offers programmable desktop publishing features and extensive facilities for automating most aspects of typesetting and desktop publishing, including numbering and cross-referencing, tables and figures, page layout and bibliographies.

Although it is widely used in Linux, there are several programs available that allow you to use LaTeX in Windows (i.e. MikTeX), some of them with friendly graphical environments.(To learn more http://www.pinteric.com/miktex.html )

How to Install LaTeX in Linux

1.- check that latex is not already installed by typing "latex"

2.- if you have root or sudo rights, you coult try to install the following packages (if you have problems ask Martín for help):

  • Ubuntu sudo aptitude install texlive-latex-base
  • General sudo aptitude install tetex

LaTeX Tips

To compile/process a file in Linux:

To compile a TeX file called example.tex, you just need to type:

latex example.tex
xdvi example.dvi

The first command will compile the TeX file and create a dvi file. If any typo/error appears on the TeX file, the errors will appear on the screen. The second command will open the output file with dvi. You could use the command dvipdf to convert the dvi to pdf, or dvips to convert it to ps. You could directly form the pdf from the TeX file by using:

pdflatex example.tex

To edit a LaTeX file:

You can edit it with any text editor: vi, emacs, xedit, ... (see Linux & Unix section) Different text editors have different advantages, if you like emacs, you may like the tool auctex. Auctex uses colour codes to distinguish between words and commands, and has help options available.

To include references:

To include references in your text file, you will need to create a bibtex file, i. e. name.bib. This file should contain in an special format the references. You can create it by hand, or you can use JabRef. To know more about the format, how to compile it, etc http://www.bibtex.org/Using/

To correct typos and orthography: the babel package

To check the orthography, you need to define the language at the beginning of the document with:

\documentclass[catalan]{article} \usepackage{babel} \begin{document} ... \end{document}

or

\usepackage[catalan,activeacute]{babel}

and to have the corresponding package available in your computer. By the default language is English.

To check the typos just close the tex file and use the command:

ispell namefile.tex

LaTeX Examples

Example.tex This is a very simple example, example.tex

referencesin.tex This is a very simple example about how to call the bibtex file, referencesin.tex

biblio.bib Simple bibtex file, biblio.bib

LaTeX Guides

There are many guides over internet, and several books you can buy. Some nice and popular material is:

  • LaTeX – A document preparation system. It is a LaTeX guide available in the lab's bookcase, book number 20.