Technical Writing
Assignment 2
LaTeX
User Manual
Presented by:
Ali Essam Ali El-Qursh
Marwan Torky
Mohammed Ellotf
Nagy Hassan
Mohammed Salem
Sherif Anwar
LaTeX processes an input file containing the text of the document with interspersed commands that describe how the text should be formatted. It produces a “device independent” or '.dvi' file. This contains commands that can be translated into commands for a variety of output devices.
Important : If you don't have access permissions to install packages then ask your system administrator to install LaTeX for you.

Figure 1. Selecting packages to install
If you are using gnome:
1.From the start menu select
system settings --> Packages
if you are logging with your own account a message will be displayed asking for
the root password, type it and press Ok.
2.Now you are displayed with several package groups with check boxes beside them on the left. Check the box corressponding to authoring and publishing and then press Update.
3.Follow the instruction on the screen until the packages are installed and then press quit.
The first line of the input file should normally consist of an appropriate \documentclass command. If an article (or similar document) is to be produced on A 4paper, and if the main body of the text is to be set with a font whose natural size is ` 12point', then the appropriate \documentclass command is
\documentclass[a4paper,12pt]{article}
Other forms of the \documentclass command can be used for letters, reports or books.
After the \documentclass command, we place the command
\begin{document}
This command is then followed by the main body of the text, in the format prescribed by the rules of LaTeX.
Finally, we end the input file with a line containing the command
\end{document}
To produce a simple document using LaTeX one should create a LaTeX input file, beginning with a \documentclass command and the \begin{document} command, as described above. The input file should end with the \end{document} command, and the text of the document should be sandwiched between the \begin{document} and \end{document} commands in the manner described below.
If one merely wishes to type in ordinary text, without complicated mathematical formulae or special effects such as font changes, then one merely has to type it in as it is, leaving a completely blank line between successive paragraphs. You do not have to worry about paragraph indentation: LaTeX will automatically indent all paragraphs with the exception of the first paragraph of a new section (unless you take special action to override the conventions adopted by LaTeX)
To create the output file follow these steps:
4.Open your favourite text editor and type in your LaTeX document.
5.Save the file as <file_name>.tex in your home directory.
6.Open a terminal window and
type latex <file_name>.tex
LaTeX displays several messages and then returns back to the terminal.
7.Now all you have to do is view the 'dvi' file. There are many programs available that can convert it into the format appropriate for previewing the document on a computer screen.
Section headings of various sizes are produced (in the article document style) using the commands \section,\subsection and \subsubsection commands. LaTeX will number the sections and subsections automatically. The title of the section should be surrounded by braces and placed immediately after the relevant command. Thus if we type
\section{Section Headings}
We explain in this section how to obtain headings for the various sections and subsections of our document.
\subsection{Headings in the `article' Document Style}
In the `article' style, the document may be divided up into sections, subsections and subsubsections, and each can be given a title, printed in a boldface font, simply by issuing the appropriate command.
then the title of the section and that of the subsection will be printed in a large boldface font, and will be numbered accordingly.
Other document styles (such as the book and letter styles) have other `sectioning' commands available (for example, the book style has a \chapter command for beginning a new chapter).
Sometimes one wishes to suppress the automatic numbering provided by LaTeX. This can be done by placing an asterisk before the title of the section or subsection. Thus, for example, the section numbers in the above example could be suppressed by typing
\section*{Section
Headings}
We explain in this section how to obtain headings
for the various sections and subsections of our
document.
\subsection*{Headings
in the `article' Document Style}
In the `article' style, the document may be divided up
into sections, subsections and subsubsections, and each
can be given a title, printed in a boldface font,
simply by issuing the appropriate command.
In order to obtain a mathematical formula using LaTeX, one must enter mathematics mode before the formula and leave it afterwards. Mathematical formulae can occur either embedded in text or else displayed between lines of text. When a formula occurs within the text of a paragraph one should place a $ sign before and after the formula, in order to enter and leave mathematics mode. Thus to obtain a sentence like
![]()
one should type
Let $f$ be the function defined by $f(x) =3 x +7 $, and
let $a$ be a positive real number.
In particular, note that even mathematical expressions consisting of a single character, like f and a in the example above, are placed within $ signs. This is to ensure that they are set in italic type, as is customary in mathematical typesetting.
Producing White Space in LaTeX
To produce (horizontal) blank space within a paragraph, use \hspace, followed by the length of the blank space enclosed within braces. The length of the skip should be expressed in a unit recognized by LaTeX. These recognized units are given in the following table:
pt point ( 1in =72 . 27pt)
pc pica ( 1pc = 12 pt)
in inch ( 1in =25 . 4mm)
bp big point ( 1in = 72 bp)
cm centimetre ( 1cm = 10 mm)
mm millimetre
dd didot point ( 1157dd = 1238 pt)
cc cicero ( 1cc = 12 dd)
sp scaled point ( 65536sp = 1 pt)
Thus to produce a horizontal blank space of 20 mm in the middle of a paragraph one would type \hspace{ 20mm}.
If LaTeX decides to break between lines at a point in the document where an \hspace is specified, then no white space is produced. To ensure that white space is produced even at points in the document where line breaking takes place, one should replace \hspace by \hspace*
LaTeX provides the following list environments:
•enumerate for numbered lists,
•itemize for un-numbered lists,
Numbered lists are produced using
\begin{enumerate} ...
\end{enumerate}
eThe items included in the list should be placed between \begin{enumerate} and \end{enumerate} and should each be preceded by the control sequence \item (which will automatically generate the number labelling the item). For example, the text

is generated by LaTeX from the
following input:
A \emph{metric space} $(X,d)$ consists of a set~$X$ on
which is defined a \emph{distance function} which assigns
to each pair of points of $X$ a distance between them,
and which satisfies the following four axioms:
\begin{enumerate}
\item
$d(x,y) \geq0 $ for all points $x$ and $y$ of $X$;
\item
$d(x,y) = d(y,x)$ for all points $x$ and $y$ of $X$;
\item
$d(x,z) \leq d(x,y) + d(y,z)$ for all points $x$, $y$
and $z$ of $X$;
\item
$d(x,y) =0 $ if and only if the points $x$ and $y$
coincide.
\end{enumerate}
Un-numbered lists are produced using
\begin{itemize} ...
\end{itemize}