Skip to content

Instantly share code, notes, and snippets.

@tscholl2
Last active June 28, 2019 15:29
Show Gist options
  • Save tscholl2/2db571e82869de932f1f950fe5a1d2a7 to your computer and use it in GitHub Desktop.
Save tscholl2/2db571e82869de932f1f950fe5a1d2a7 to your computer and use it in GitHub Desktop.
tex template
\documentclass{article}
\usepackage{amsmath,amssymb,amsthm,amsfonts}
\usepackage{xcolor}
\newcommand{\public}[1]{\textcolor[rgb]{0.024,0.408,0.024}{#1}}
\newcommand{\private}[1]{\textcolor[rgb]{0.661,0.035,0.035}{#1}}
\newcommand{\FF}{\mathbb{F}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\ZZ}{\mathbb{Z}}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}
\newtheorem{theorem}[thm]{Theorem}
\newtheorem{lemma}[thm]{Lemma}
\newtheorem{corollary}[thm]{Corollary}
\theoremstyle{remark}
\newtheorem{remark}[thm]{Remark}
\theoremstyle{definition}
\newtheorem{definition}[thm]{Definition}
\newtheorem{example}[thm]{Example}
\title{???}
\begin{document}
\maketitle
\begin{abstract}
???
\end{abstract}
\section{Introduction}
???
\bibliography{references}
\bibliographystyle{alpha}
\end{document}
@tscholl2
Copy link
Author

tscholl2 commented May 1, 2019

For algorithms use \usepackage{algorithm,algorithmic} and

\begin{algorithm}
\label{alg:do-something}
\caption{Algorithm that does something.}
\begin{algorithmic}[1]
  \REQUIRE A number $x$.
  \ENSURE The value $x+1$.
  \STATE $x \gets x+1$.
  \RETURN $x$.
\end{algorithmic}
\end{algorithm}

@tscholl2
Copy link
Author

tscholl2 commented May 8, 2019

For norms and things, use

\DeclareMathOperator{\End}{End}
\DeclareMathOperator{\Norm}{Norm}
\DeclareMathOperator{\Trace}{Trace}
\DeclareMathOperator{\Diff}{Diff}
\DeclareMathOperator{\Disc}{Disc}
\DeclareMathOperator{\Gal}{Gal}

@tscholl2
Copy link
Author

For tikz:

\usepackage{tikz}

\[
\begin{tikzpicture}[node distance=1cm,auto]
    \draw (-2,0) ellipse (1);
    \node () at (-3.2,1.2)  {$V_1$};
    \node (j0) at (-2,-1)  {$\bullet$};
    \node[label={[shift={(0.5,-0.5)}]$j_1$}] (j1) at (-2,-2)  {$\bullet$};
    \draw[->] (j0) -> (j1);
\end{tikzpicture}
\]

@tscholl2
Copy link
Author

For line numbers and todonotes:

\usepackage{lineno}
\linenumbers
\usepackage{todonotes}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment