Skip to content

Instantly share code, notes, and snippets.

@recardona
Created December 11, 2013 05:05
Show Gist options
  • Save recardona/7905333 to your computer and use it in GitHub Desktop.
Save recardona/7905333 to your computer and use it in GitHub Desktop.
My typical LaTeX Document Preamble
%----------------------------------------------------------------------------------------------
% Theorem environments.
% From: http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Theorems.html
% The following code will create theorem, lemma, proposition, corollary,
% proof, definition, example and remark environments, together with a
% control sequence \qed which produces `tombstones' for the ends of proofs.
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}{Definition} % I added this one
\newenvironment{proof}[1][Proof]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{example}[1][Example]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{remark}[1][Remark]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newcommand{\qed}{\nobreak \ifvmode \relax \else
\ifdim\lastskip<1.5em \hskip-\lastskip
\hskip1.5em plus0em minus0.5em \fi \nobreak
\vrule height0.75em width0.5em depth0.25em\fi}
%----------------------------------------------------------------------------------------------
%----------------------------------------------------------------------------------------------
% Editorial commands.
\newcommand{\cn}{\textsuperscript{{\bf [Citation Needed]}}}
\newcommand{\how}{\textsuperscript{{\bf [How?]}}}
\newcommand{\howDifferent}{\textsuperscript{{\bf [How is it different?]}}}
\newcommand{\editorial}[1]{{\bf [Author's Note: {#1}]}}
\newcommand{\knolpred}[1]{{\footnote{\bf [Knowledge Precondition: {#1}]}}}
\newcommand{\eref}[1]{Eq.~\ref{#1}}
\newcommand{\fref}[1]{Figure~\ref{#1}}
\newcommand{\tref}[1]{Table~\ref{#1}}
\newcommand{\etal}[0]{{et al.\ }}
%----------------------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment