Writing LaTeX: Difference between revisions

From String Theory Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
There are many excellent introductions to writing mathematics with LaTeX, for example [http://www.math.uiuc.edu/~hildebr/tex/course/ Introduction to LaTeX].  Below is a quick and dirty example to start with.
LaTeX is the language in which most mathematics and physics documents
LaTeX is the language in which most mathematics and physics documents
are written.  Mathematical symbols and equations are written in a
are written.  Mathematical symbols and equations are written in a
Line 22: Line 24:


LaTeX commands start with a back slash <code>\</code>. Sometimes they
LaTeX commands start with a back slash <code>\</code>. Sometimes they
have an argument in curly brackets, e.g <code>\sqrt{b^2-4ac}</code>.
have an argument in curly brackets, e.g <code>\sqrt{b^2-4ac}</code>.  Most of the commands in the document above are self-explanatory.


To convert this into a readable document first save it into a file
To convert this into a readable document first save it into a file
Line 28: Line 30:
Then you need to process it.  If you are using GNU/Linux, see
Then you need to process it.  If you are using GNU/Linux, see
[[Processing LaTeX with GNU/Linux systems]].
[[Processing LaTeX with GNU/Linux systems]].
===links===
[http://www.math.uiuc.edu/~hildebr/tex/course/ Introduction to LaTeX]
[http://ricardo.ecn.wfu.edu/LaTeX/ LaTeX: from quick and dirty to style and finesse]
[http://www.math.uiuc.edu/~hildebr/tex/basics.html LaTeX Tips]

Latest revision as of 19:47, 24 December 2006

There are many excellent introductions to writing mathematics with LaTeX, for example Introduction to LaTeX. Below is a quick and dirty example to start with.

LaTeX is the language in which most mathematics and physics documents are written. Mathematical symbols and equations are written in a special markup. For example an integral sign is inserted with \int. The best way to learn LaTeX is by example. Here is a basic LaTeX file:

\documentclass[a4paper,10pt]{article}
\usepackage{amsfonts,amsthm,amsmath,amssymb}
\title{Simple example} 

\begin{document}
\maketitle
 
\section{Quadratic equation}

We want to solve $ax^2+bx+c$.  The solution is
\begin{equation}
  x= \frac{-b\pm \sqrt{b^2 -4ac}}{2a}
\end{equation}

\end{document}

LaTeX commands start with a back slash \. Sometimes they have an argument in curly brackets, e.g \sqrt{b^2-4ac}. Most of the commands in the document above are self-explanatory.

To convert this into a readable document first save it into a file with a .tex extension, e.g. sample.tex. Then you need to process it. If you are using GNU/Linux, see Processing LaTeX with GNU/Linux systems.

links

Introduction to LaTeX

LaTeX: from quick and dirty to style and finesse

LaTeX Tips