%% Use A4 page size
%% Book format, suitable for longer texts with chapters, etc
%% The "openany" option means that the starting pages
%% of chapters are not always starting on a right-hand page
\documentclass[a4paper,11pt,openany]{amsbook}

%% Use also various symbols from the AMS
\usepackage{amsmath,amssymb}

%% A font with slightly different calligraphic letters
\usepackage{mathrsfs}

%% The basic package to include graphics
\usepackage{graphicx}

%% The colorlinks option gives colored links instead of boxes around
%% links for equation numbers and other references
%% This can be a problem for color-blind readers
\usepackage[colorlinks]{hyperref}

%% The usual theorems, etc
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem*{theorem*}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}

%% Style for remarks
\theoremstyle{remark}
\newtheorem{remark}{Remark}

%% Style for definitions
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}

%% Define a new command to typeset SL as a function
\DeclareMathOperator{\SL}{SL}

%% An operator where the subscripts/superscripts appear under/over the
%% symbol
\DeclareMathOperator*{\expect}{\mathbf{E}}

%% For comparison when we use the command without *
\DeclareMathOperator{\expecta}{\mathbf{E}}

%% Allow to put some text over an arrow: this is a command with one
%% argument
\newcommand{\fleche}[1]{\stackrel{{#1}}{\longrightarrow}}

%% A version where both the top and bottom can be specified
\newcommand{\fleches}[2]{\stackrel{{#1}}{{#2}}}

%% Use the AMS versions of the "less than or equal to" and "larger
%% than or equal to" signs
\renewcommand{\leq}{\leqslant}
\renewcommand{\geq}{\geqslant}

%% A command "boldmath" to type bold mathematical formulas in such a
%% way that small letters remain slanted instead of being straight
\newcommand{\bm}[1]{\text{\boldmath${#1}$}}

%% Modulo with parentheses but smaller horizontal space than \pmod
\newcommand{\mods}[1]{\,(\mathrm{mod}\,{#1})}

%% The basic number sets in the bold style
\newcommand{\C}{\mathbf{C}}
\newcommand{\R}{\mathbf{R}}
\newcommand{\Q}{\mathbf{Q}}
\newcommand{\Z}{\mathbf{Z}}

%% The basic number sets in the "blackboard" style. Using this or the
%% previous is a question of taste, but they shouldn't be mixed.
% \newcommand{\C}{\mathbb{C}}
% \newcommand{\R}{\mathbb{R}}
% \newcommand{\Q}{\mathbb{Q}}
% \newcommand{\Z}{\mathbb{Z}}

%% A symbol for disjoint union; mathrel indicates that the spacing
%% around the symbol should as for other relation symbols.
\newcommand{\dunion}{\mathrel{\sqcup}}

%% Prefer the varepsilon for epsilon, and give it a shorter name
\newcommand{\eps}{\varepsilon}

%% Begin the text
\begin{document}

%% Start the title page

%% Title
\title{Fifth file}

%% Author
\author{E. Kowalski}
%% Physical address
\address{ETH Zürich, Rämistrasse 101, 8092 Zürich, Switzerland}
%% Email address
\email{kowalski@math.ethz.ch}

\begin{abstract}
  Structure for longer documents.  More basic commands.  Including
  pictures.  Bibliography using BiBTeX.
\end{abstract}

\maketitle

%% Display a table of contents
%% This can also be used in articles when they are a bit long
\tableofcontents

%% Beginning of the actual text
\mainmatter


\chapter{More general LaTeX things}

\section{Introduction}

Footnotes can be useful to make remarks that would otherwise not fit
well\footnote{\ For various reasons.} in the text.

It is easy to include pictures.

%% Using the environment \figure helps make sure that LaTeX finds the
%% best position to put the picture.
\begin{figure}[h]
  \includegraphics[width=3in]{szemeredi.pdf}
  %% Putting the label at the place indicated is important to make sure
  %% that references work out.
  \caption{A sample picture.\label{fig-szemeredi}}
\end{figure}

We see in Figure~\ref{fig-szemeredi} the logical structure of the proof
of Szemerédi's Theorem.

Disjoint union:
$$
X\dunion Y,\quad\quad \bigsqcup_{i\in I} U_i.
$$

Emptyset:
$$
A=\emptyset
$$

Calligraphic fonts of various styles:
%% \mathscr uses the mathrsfs package
$$
\mathcal{F},\quad \mathcal{L},\quad \mathscr{F},\quad \mathscr{L}.
$$

It is sometimes useful to think of reading your text aloud when
selecting notation: ``Let $f\in\mathcal{F}(F,\mathscr{F})$ be a
function.''

Variant greek letters:
%% It is best not to mix two styles of the same letter. One can use a
%% macro at the beginning to enforce the choice.
$$
\rho,\quad \varrho,\quad \phi,\quad \varphi,\quad \pi,\quad \varpi,\quad
\epsilon,\quad \varepsilon.
$$

Approximation and asymptotic notation symbols:
$$
f\sim g,\quad f\ll g,\quad f\gg g,\quad f\approx g,\quad f\asymp g,\quad
f\lesssim g,\quad f\gtrsim g.
$$

Modulo, with variants:
$$
p\equiv 1\bmod{4},\quad n\equiv m\pmod{q},\quad \sum_{p\equiv
  1\pmod{4}}\log p,\quad \sum_{p\equiv 1\mods{4}}\log p.
$$

%% It is often a good thing to include a section where various notations
%% are recalled and possible conventions are spelled out explicitly.
%% The * means it will not be numbered, but will appear in the table of
%% contents.
\section*{Notation and conventions}

We denote by $|X|$ the cardinality of a finite set.

All vector spaces in this work are over the field of complex numbers and
are assumed to be finite-dimensional, unless specified otherwise.


%% For longer texts, it is often convenient to work on
%% separate chapters in separate files
\include{file-5-chapter-2.tex}

%% For special formatting of an appendix
\appendix

\chapter{Reminders}

In an Appendix, one would include for instance
\begin{itemize}
\item Reminders of material that is relatively standard, but might not
  be familiar to all readers.
\item Full details of some proofs which are, for instance, particularly
  tedious and straightforward computations.
\end{itemize}


%% Indicate the bibliography "style" that BibTeX will use:
%%\bibliographystyle{amsplain}

%% Another common style
\bibliographystyle{amsalpha}

%% The name of the bibliography file
\bibliography{file5.bib}

\end{document}
