0% found this document useful (0 votes)
34 views

Maths Typesetting Using L TEX-A Short: 1 Getting Started

(1) LATEX is a powerful typesetting system for mathematics developed by Donald Knuth, with a core based on his TEX program. It allows mathematical expressions and equations to be beautifully formatted. (2) A basic LATEX document structure includes document class, packages, title, and sections within the document body. Math can be typed using $...$ for inline or \[...\] for display equations. (3) LATEX has conventions for mathematical notation like using lowercase for variables, Greek letters for constants, and bold for vectors and matrices. It can format fractions, sums, and other expressions nicely.

Uploaded by

baconbagon
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Maths Typesetting Using L TEX-A Short: 1 Getting Started

(1) LATEX is a powerful typesetting system for mathematics developed by Donald Knuth, with a core based on his TEX program. It allows mathematical expressions and equations to be beautifully formatted. (2) A basic LATEX document structure includes document class, packages, title, and sections within the document body. Math can be typed using $...$ for inline or \[...\] for display equations. (3) LATEX has conventions for mathematical notation like using lowercase for variables, Greek letters for constants, and bold for vectors and matrices. It can format fractions, sums, and other expressions nicely.

Uploaded by

baconbagon
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Maths Typesetting using LATEX- A Short

Introduction
J.D.
May 11, 2017

1 Getting Started
Maths is beautiful, so it demands a beautiful typesetting system. This is almost
single-handedly accomplished by Donald Knuth (mathematician, legendary pro-
grammer, and a Lutheran organist) with his TEX. Over the decades it has de-
veloped into a huge typesetting system called LATEX. At the core is TEX, whose
current version is 3.14159265 (yes you wonder why ,).

1.1 Installation
While you may wish to have a local installation of the software package (it’s Big),
you can also use online editors such as those at overleaf.com or sharelatex.
com.
I prefer to use a local installation with TeXShop on top of TeX Live. In-
stallation is usually straightforward. Occasionally you may need to add some
optional packages, later on.

1.2 Document structure


A simple LATEX document has the following structure:

% preambles: document type (also report/book etc.); used packages


\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}

% title etc.
\title{Maths Typesetting using \LaTeX - A Short Introduction}
\author{J.D.}
\date{\today}
%
\begin{document}
\maketitle

1
... Here the document starts. You can use \section, \subsection,
\subsubsection etc. to structure the document. E.g.,
\section{blah my first section}
\subsection{blah blah first subsection}
Here goes a paragraph.

A blank line (like above) will start a new paragraph. Yes you are
liberated from having to deal with numbering and formatting
trivialities.

You can include figures and tables (these will also be automatically
numbered). Footnotes and bibliography too. Use \label{thelabel} to define
a label, \ref{thelabel} to refer to sections/figures/tables.
\cite{...} to cite a book/article/webpage etc. -- see BibTeX.
...
Finally, remember to end the document - otherwise the document can’t
compile. Yes the document is a piece of code that’s to be compiled and
rendered into Postscript or PDF for viewing/printing.
\end{document}

1.3 Maths: wrappers, numbering


To type maths, you need to use $ · · · $ to wrap inline maths expressions. For
example, $z=x+y$ will give z = x + y.
If you want to make it an equation, use the equation environment:
\begin{equation}
z=x+y
\label{eq:myeq}
\end{equation}
which renders a numbered equation for you:

z =x+y (1)

Note here a label is also given. You can refer to the labelled equation using the
\ref{eq:myeq} command citing the label anywhere in your document. E.g., z
is given in Eq.(1).
To get an unnumbered equation, you use the \[ ... \] or $$ ... $$ wrap-
per instead. Here’s an example. Using
$$e=mc^2,$$
we get
e = mc2 ,
Easy!

2
1.4 Display style
Sometimes maths notations are embedded in the main text, e.g., suppose there’s
a function f (x) = sinx x . If we add \displaystyle in front of the \frac operator,
sin x
the fraction can be better rendered, like this – f (x) = .
x
You’ll find the display style handy to typeset continued fractions, e.g. the
following one –
x
tanh(x) =
x2
1+
x2
3+
x2
5+
7 + ···
Display style also works for other operators. For instance, try adding \displaystyle
in front of the \sum operator used for the expression
1
PN ,
i=1 xi

and see the effect.

2 Notation guidelines
Before getting into the gritty details about formatting, let’s start with some
notation conventions mathematicians tend to adopt:
1. Use plain alphabetics for variable names, e.g., x, y, z.

2. Greek letters can be used for constants or parameters (lowercase, e.g., α,


β, γ), or special function (usually uppercase, e.g., Γ).
3. For vectors, use bold, lowercase characters, e.g., \math{x} for x, or \vec{x}
for ~x.
4. Use bold uppercase characters for matrices, e.g, X, Y.

5. To represent space, use \mathbb, e.g. R3 gives our 3-D Euclidean space.

3 Misc.
Question . Where can I find a FAQ?
Answer. It’s better to go through a longer tutorial (than this one) and get to
learn more about the basic usage, among more tricks. Then you can use Google
to search out online answers to various LATEX related questions, many in high
quality notably on stackexchange.com.
There is a Wikibook on LATEX and it’s quite useful too. Check it out. Get
the mathematical symbols page printed – it will be quite handy.

You might also like