%\chapter*{Preface}
%\addcontentsline{toc}{chapter}{Preface}

\chapter{Introduction}\label{chap:intro}

This introduction to \LaTeX{} is no more than that, an
introduction. Hopefully, by the end of it you will see the point of
\LaTeX, and are able to explore it further on your own.

This chapter gives a bit of background, which may help you
understand the philosophy of \LaTeX.

\section{History}

\LaTeX{} is pretty old, and its roots are even older.

In 1977 Donald Knuth, a mathematician, started creating his
typesetting system \TeX{} as a tool for better typesetting,
expecially of mathematics. The first version of \TeX{} appeared in
1978. The second version, which was a complete rewrite, appeared in
1982.

The \TeX{} system is based on a markup language. Contrary to html,
another popular markup language, \TeX{} is designed for precision
typesetting of complex texts, and is also a macro language.

In the early 1980s Leslie Lamport provided a set of macros
providing features such as automatic chapter- and section numbering,
footnotes and automatic cross-referencing.

\LaTeX{} allowed authors to concentrate on the meaning and structure
of documents, rather on appearance. This is called \emph{structural
  markup}.

The \LaTeX{} macros cover most uses of \TeX: besides articles,
reports and books, slides and letters are also provided for. Most
\TeX{} users started using the \LaTeX{} macros for their documents,
adding their own stuff as needed, rather than starting their own
macro package from scratch.

\section{The \TeX/\LaTeX{} ecosystem}

\TeX{} and \LaTeX{} caught on, and a large ecosystem grew up around
it. Users around the world contributed macros, fonts, support for
non-Western languages, manuals and utilities. The vast majority is
free.

The \citetitle{ctan} archives are the main repository for \TeX-related
material, but it is likely that your \TeX{} installation already
contains everything you need, or provides an easy way to add it.

The sites of \TeX{} user groups such as \citeurl{tug} and
\citeurl{ntg} host various mailing lists and have links to other
\TeX- and \LaTeX-related sites. My own site \citeurl{rugtex} is
about the RuG \TeX{} installation and also contains some useful
links.

\section{Working with \LaTeX}

\LaTeX{} is not a wysywyg wordprocessor. Preparing a document with
\LaTeX{} is a three-step cycle:
\begin{enumerate}
\item Enter your text, with markup, in a text editor such as Notepad
  or \TS{} or Emacs.
\item `Compile' your document, \emph{i.e.} convert it to pdf; more
  on that later.
\item Preview it in a pdf viewer such as Adobe Reader or SumatraPDF
  or the pdf viewer built into the editor, if there is one.
\end{enumerate}

\nextblock
Below you see a marked-up source fragment at the left and two
typeset results at the right:

\exa
\begin{verbatim}
\subsection{Some mathematics}\label{math}

The econometric model is confronted with observed
data and the parameters are estimated by
econometric techniques, as shown in equation
\ref{eq:smm} below:
\begin{equation}
Y_t = G_1 (Y, X, \hat{\Theta}, \hat{U})
\label{eq:smm}
\end{equation}
\end{verbatim}
\exb
\includegraphics[width=\linewidth]{../samples/jj_math}

\vspace{\baselineskip}
\includegraphics[width=\linewidth]{../samples/jj_math2}
\exc
%
%\exa
%~
%\exb
%\includegraphics[width=\linewidth]{../samples/jj_math2}
%\exc

\nextblock
The difference in appearance is entirely due to changes in the
document header. \LaTeX{} allows you to forget about layout and
typography until you are ready for it.

\LaTeX{} excels at automatic numbering and cross-referencing; as
well as at other long-document features such as bibliographies and
indexing. Best of all, these keep working efficiently and reliably
as the size of the project increases.

Hopefully, you will discover that \LaTeX{} can greatly
streamline your publishing process.
