Skip to content

Instantly share code, notes, and snippets.

@SeniorMars
Last active August 26, 2022 14:52
Show Gist options
  • Save SeniorMars/91cef5bc07f14edadd1f9cf4dd04dc80 to your computer and use it in GitHub Desktop.
Save SeniorMars/91cef5bc07f14edadd1f9cf4dd04dc80 to your computer and use it in GitHub Desktop.
Some starter latex code for a proof based class
\documentclass[11pt]{article}
\usepackage[dvipsnames]{xcolor} % write text in pretty colors
\usepackage[hidelinks]{hyperref} % makes section links, bibliography links clickable
\usepackage{bm}
\usepackage{booktabs} % for pretty tables
\usepackage{enumerate}
\usepackage{fullpage}
\usepackage{graphicx} % include images
\usepackage{hyperref}
\usepackage{listings} % include the contents of code files (avoids version issues!)
\usepackage{mathpazo} % a better font than the default, according to some
\usepackage{mathtools,amssymb,amsthm}
\usepackage{multicol}
\usepackage{tikzsymbols}
\usepackage{wrapfig} % wrap text at the side of a smaller figure (don't bother doing this for your own figures)
\graphicspath{ {./images/} }
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=blue,
pdfpagemode=FullScreen,
}
\usepackage[ruled,vlined,linesnumbered]{algorithm2e}
\newtheorem{theorem}{Theorem}
\newtheorem{prop}{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\renewcommand\qedsymbol{$\Laughey$}
\title{Problem Set #}
\author{Name}
\begin{document}
\maketitle{}
\begin{prop}
prop
\end{prop}
\begin{proof}
We proceed by induction.
\newline{}
\textit{Base Case:} base
\newline{}
\textit{Induction Step:} step
\begin{align*}
1 = 2\
\end{align*}
Thus, through the principle of mathematical induction, we can prove the following:
\end{proof}
\begin{algorithm}[H]
\KwIn{input}
\KwOut{output}
\tcc{comment}
\vspace{5mm}
\SetAlgoLined{}
some code here\;
$x \leftarrow 0$\;
$y \leftarrow 0$\;
\uIf{$ x > 5$} {
x is greater than 5\;
}
\uElse {
x is less than or equal to 5\;
}
\ForEach{y in 0..5} {
$y \leftarrow y + 1$\;
}
\For{$y$ in $0..5$} {
$y \leftarrow y - 1$\;
}
\While{$x > 5$} {
$x \leftarrow x - 1$\;
}
\Return Return something here\;
\caption{what}
\end{algorithm}
\end{document}
@SeniorMars
Copy link
Author

CleanShot 2022-08-26 at 09 51 24@2x

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