%%--------------------------------------------------------
%% example.tex
%%
%%--------------------------------------------------------
\documentclass[12pt]{article}
\input{prefix}%
\BibLatexMode{%
\bibliography{template}
}
\begin{document}
\title{Title of Paper}
\author{%
James Bond%
\JamesThanks{Bla bla.}%
%
\and%
%
Ford Perfect%
\thanks{Bla bla.}%
}
\date{\today}
\maketitle
\begin{abstract}
%%% DELETE START
One of the most annoying things about \LaTeX, and there are a lot,
is how hard it is to just start writing math papers. This is an
empty template intended to enable one to just start writing a
paper. It uses my personal style, but might be useful for other people. It uses BibLatex by default. Search \texttt{DELETE} in the file to know which portion to delete when you start writing.
%%% DELETE END
\end{abstract}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
%%% DELETE START
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% TO USE TEMPLATE DELETE EVERYTHING FROM HERE...
All the \LaTeX{} definitions/macros/etc are in the \texttt{prefix.tex} file. This makes this file a bit cleaner.
\begin{theorem}
\thmlab{first}%
%
Bla bla.
\end{theorem}
\begin{proof}
This is the proof.
\[
\sqrt{2} + \sqrt{2} = 2 \sqrt{2}.
\]
\end{proof}
\james{It is extremely useful to leave comments in the text for your coauthors.}
\ford{And the other author might reply...}
\james{But one can still have the last word. }
See \thmref{first}.
\begin{lemma}
\lemlab{second}.
%
This is a lemma.
\end{lemma}
See \lemref{second}.
\begin{definition}
\deflab{number}
A number is a \emphi{number}.
\end{definition}
See also \defref{number}.
\begin{remark}
\remlab{useful}
Remarks are useful sometime.
\end{remark}
Was \remref{useful} useful?
\section{Second section}
Do not forget to cite some irrelevant papers \cite{k-spda-10}.
%------------------------------------------------------------------
%------------------------------------------------------------------
\section{More stuff}
Some math:
\begin{equation*}
\Var{X}%
=%
\Ex{(X - \Ex{X})^2}.
\end{equation*}
Some definitions.
\begin{defn}
\deflab{prime}%
%
An integer number $p > 1$ is \emphi{prime} if it is divisible
only by $1$ or itself.
\end{defn}
A theorem:
\begin{theorem}
\thmlab{main}% Label for the theorm
%
The number of primes is unbounded.
\end{theorem}
\begin{proof}
Assume for the sake of contradiction that the number of primes is
finite, say $k$, and let $1 < p_1< p_2 < \cdots < p_k$ be these
primes. Observe that $N = p_1 \cdot p_2 \cdots p_k +1 > 1$ is
indivisible by $p_1, \ldots, p_k$, and is larger than all these
numbers. Thus, $N$ must be prime. A contradiction.
\end{proof}
\defref{prime} and \thmref{main} were both known to the Greeks. Well,
to some of the Greeks.
\bigskip
I prefer to use \texttt{enumitem} for creating lists:
\begin{compactenumI}
\smallskip%
\item One can create more compact lists.
\smallskip%
\item There is more control over labels.
\end{compactenumI}
\smallskip%
And another good reason is because:
\begin{compactenumI}[resume]
\smallskip%
\item One can resume the numbering.
\end{compactenumI}
\bigskip%
It is usually a good idea to let \LaTeX{} do its thing. Do not use
\textbackslash\textbackslash{} to end lines (common mistakes for
\LaTeX{} beginners). End a paragraph by having an empty line. If you
want a big space between two paragraphs, just put
\texttt{\textbackslash{big{}skip}} in a line on its own between th two
paragraphs.
\bigskip
Just like that.
\paragraph{Paragraphs.}
I like to title my paragraphs so that people know what the paragraph
is about. This is a personal style thing, as area lot of other writing
stuff. Follow what you like. More sectioning commands follow. If you
comment out the
\texttt{\textbackslash{}def\textbackslash{}UseBibLatex{1}} then the
system would use bibtex instead.
\subsection{A subsection}
\subsection{A lemma example}
\begin{lemma}
This is a lemma.
\end{lemma}
%------------------------------------------------------------------
%------------------------------------------------------------------
\section{Bibliography}
Nowadays, I like to use \texttt{biblatex}, but it is somewhat more
painful to use than \texttt{bibtex}. The big advantage of
\texttt{biblatex} that it is highly configurable if you are willing to
spend the energy to learn it. It does much better work than
\texttt{bibtex}. I highly recommend getting your bibtex entry from
DBLP, since they have the \texttt{doi} information -- this implies
that you get a link to the paper in \texttt{biblatex} or
\texttt{bibtex} if you use the right style.
Anyway, here is an example of a citation \cite{k-spda-10}.
%%% DELETE END
\section*{Acknowledgments}
%%% DELETE START
Thank everyone.
%%% DELETE END
%-------------------------------------------------------------------------
\BibTexMode{%
\bibliographystyle{alpha}
\bibliography{template}
}%
\BibLatexMode{\printbibliography}
\end{document}
%--------------------------------------------------------
%
% x.tex - end of file
%--------------------------------------------------------