# Introduction to LaTeX

LaTex is a mark-up language widely used, especially in academic context, for writing texts with formulas. Formulas are written by means of an in-line sequence of instructions. For instance, the fraction one half, in LaTeX it is written as \frac{1}{2}.
Since, LaTeX has an in-line (one dimensional) structure, it is suitable for screen readers and braille displays. A LaTeX file can be successively compiled by specific editors for realizing, e.g., pdf files where formulas are visualized in a standard way.

For using LaTex, it is necessary to install its distribution. In Windiows, we Per poter usare il linguaggio LaTeX occorre in primo luogo installare la sua distribuzione. On Windows we recommend MiKTeX:

On Mac we recommend MacTeX:

These software will be never used for writing, but only for installing packages.
After the installation of a LaTeX distribution, it is necessary to install an editor, i.e., the software that will be used for writing.
On Windows we recommend TeXnicCenter:

On Mac we recommend TeXworks:

In the following, there is a simple LaTeX example:

\documentclass[a4paper,11pt]{article}

\usepackage[latin1]{inputenc}
\usepackage{amsmath}

\title{Learn the LaTex}
\author{Author}
\begin{document}

\maketitle

Let us write a cubic equation: $ax^3+bx^2+cx+d$.\\
Now, we write an expression with fractions and square roots. This equation is centred:
\begin{equation}
\phi=\cfrac{1+\sqrt{5}}{2}
\end{equation}
We have written phi equals to fraction numerator one plus square root of five denominator two.\\
\end{document}

Let us analyze the above commands.
In a .tex file, the first row must be
\documentclass[a4paper,11pt]{article}
Different options can be inserted within curly brackets, such as article, book, etc. In this way, we declare the type of the text that define formatting. Within square brackets there are further options. For example, 11pt specifies the size of the characters.

The command \usepackage is needed in order to use packages, i.e., to activate specific commands. For example, above there are
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
the package amsmath allows to use some commands for formulas. For example, with this package we can write greek letters. The package inputenc is needed for stresses above letters. Next we have commands for writing the title and the authors of the text.

The command \begin{document} declares the start of the document. Text of the document must be written within \begin{document} and \end{document}.

The command \maketitle visualizes title and authors in the pdf file.

The commands of formulas are very intuitive. A formula must be written within dollars. If the commands \begin{equation} and \end{equation} are used, then the formula will be centred and automatically numbered in the pdf file. The same result can be reached using two couples of dollars, but in this case the formula is not numbered. The command \\ is used for starting a new paragraph.

The pdf file can be realized pressing Ctrl+Maiusc+F5 (this is useful for sighted people, but does not improve accessibility)

Useful links: Introduction to LaTeX by John Gardner.

Some LaTeX commands.

There exist software, like BlindMath and latex-access (free), that improve accessibility and usability of LaTeX both for writing and reading texts with formulas.