Difference between revisions of "LaTeX"

From PHYSpedia
Jump to: navigation, search
Line 2: Line 2:
  
 
==Installation==
 
==Installation==
 
+
To start writing Latex documents, you two things. A Latex ``compiler'' (this is a set of programs and files that allow you to generate pdfs from a Latex file), and a Latex editor (you can use a plain text editor, but an editor designed for Latex will have many more handy features). There are a few different Latex compilers and editors. The instructions below are to install the texlive compiler and texmaker editor.
 
;Windows
 
;Windows
 
:#download and run the install-tl.zip file from here http://www.tug.org/texlive/acquire-netinstall.html
 
:#download and run the install-tl.zip file from here http://www.tug.org/texlive/acquire-netinstall.html
:#install texmaker
+
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/
 +
:#configure texmaker: go to toolbar, choose options/quick build/User, add the following text
 +
latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -t letter %.dvi -o %.ps|ps2pdf -dPDFSETTINGS=/prepress %.ps
 +
 
  
 
;Macs
 
;Macs
:Follow the instructions here http://www.tug.org/mactex/2011/
+
:#Follow the instructions here http://www.tug.org/mactex/2011/
 +
:#install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/
  
 
;Ubuntu Linux
 
;Ubuntu Linux
:use synaptic to install the texlive package
+
:use synaptic to install the texmaker which will automatically install texlive as well
 
  > sudo apt-get install texmaker
 
  > sudo apt-get install texmaker
  
Note that the net installers look deceptively small is size, but the texlive folder on my windows machine is about 2.5 GB in size, so make sure you have HD space before you start!
 
 
2) Install a LaTeX editor. I use the cross-platform Texmaker (http://www.xm1math.net/texmaker/)
 
 
3) Install REVTeX https://authors.aps.org/revtex4/
 
  
It may be useful to refer to this site: [http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html] when installing the custom styles and bibliography formats.
+
You may also want to to install the REVTeX package (https://authors.aps.org/revtex4/). Many APS journals use a style included in this package. However, it is not necessary to do this before starting to use Latex.
 +
For more information on installing custom document and bibliography styles, see http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html
  
 
4) Get this example template: [[File:Advanced lab.tar]] (Use 7-Zip, http://www.7-zip.org/, on Windows to extract this .tar file.)
 
4) Get this example template: [[File:Advanced lab.tar]] (Use 7-Zip, http://www.7-zip.org/, on Windows to extract this .tar file.)
  
5) Configure Texmaker: go to toolbar, choose options/quick build/User, add the following text
+
5)  
 
 
latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -t letter %.dvi -o %.ps|ps2pdf -dPDFSETTINGS=/prepress %.ps
 
 
 
 
== Using LaTeX ==
 
== Using LaTeX ==
  

Revision as of 08:51, 14 March 2013

Latex is a program for typesetting papers. It is very good at typesetting math, so it is commonly used in fields that require equations to be displayed in papers.

Installation

To start writing Latex documents, you two things. A Latex ``compiler (this is a set of programs and files that allow you to generate pdfs from a Latex file), and a Latex editor (you can use a plain text editor, but an editor designed for Latex will have many more handy features). There are a few different Latex compilers and editors. The instructions below are to install the texlive compiler and texmaker editor.

Windows
  1. download and run the install-tl.zip file from here http://www.tug.org/texlive/acquire-netinstall.html
  2. install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/
  3. configure texmaker: go to toolbar, choose options/quick build/User, add the following text
latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -t letter %.dvi -o %.ps|ps2pdf -dPDFSETTINGS=/prepress %.ps


Macs
  1. Follow the instructions here http://www.tug.org/mactex/2011/
  2. install texmaker, which is cross platform, from here http://www.xm1math.net/texmaker/
Ubuntu Linux
use synaptic to install the texmaker which will automatically install texlive as well
> sudo apt-get install texmaker


You may also want to to install the REVTeX package (https://authors.aps.org/revtex4/). Many APS journals use a style included in this package. However, it is not necessary to do this before starting to use Latex. For more information on installing custom document and bibliography styles, see http://www.math.uiuc.edu/~hildebr/tex/tips-customstyles.html

4) Get this example template: File:Advanced lab.tar (Use 7-Zip, http://www.7-zip.org/, on Windows to extract this .tar file.)

5)

Using LaTeX

LaTeX Wikibook: http://en.wikibooks.org/wiki/LaTeX

LaTeX Cookbook: http://www.personal.ceu.hu/tex/cookbook.html