Skip to content

Commit

Permalink
chore: add generic template for future maintainers
Browse files Browse the repository at this point in the history
  • Loading branch information
err53 committed Oct 24, 2024
1 parent 5adaecb commit 074e02d
Showing 1 changed file with 131 additions and 0 deletions.
131 changes: 131 additions & 0 deletions template/template.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
% IF YOU CAN SEE THIS GO CONTRIBUTE >:(

\documentclass[letterpaper, 8pt]{extarticle}
\usepackage{amssymb,amsmath,amsthm,amsfonts}
\usepackage{multicol,multirow}
\usepackage{calc}
\usepackage{ifthen}
\usepackage[landscape]{geometry}
\usepackage[colorlinks=true,citecolor=blue,linkcolor=blue]{hyperref}

\usepackage{booktabs}
\usepackage{ulem}
\usepackage{enumitem}
\usepackage{tabulary}
\usepackage{graphicx}
\usepackage{siunitx}
\usepackage{tikz}
\usepackage{derivative}
\usepackage{svg}
\usepackage{listings}
\usepackage{setspace}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{courier}
\usepackage{syntax}
\usepackage{mathpartir}

% minimal line spacing
% NOTE: this makes math look bad, only use as a last resort
% \setstretch{0.1}

% set borders (experimentally determined to minimize cutoff and maximize space on school printers)
% NOTE: if you wish to tune this, please only do so on your local copy
\geometry{top=.25in,left=.25in,right=.25in,bottom=.35in}

% make figures work better in multicol
\newenvironment{Figure}
{\par\medskip\noindent\minipage}
{\endminipage\par\medskip}

\pagestyle{empty} % clear page

% rewrite section commands to be smaller
\makeatletter
\renewcommand{\section}{\@startsection{section}{1}{0mm}%
{-1explus -.5ex minus -.2ex}%
{0.5ex plus .2ex}%x
{\normalfont\normalsize\bfseries}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{0mm}%
{-1explus -.5ex minus -.2ex}%
{0.5ex plus .2ex}%
{\normalfont\small\bfseries}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0mm}%
{-1ex plus -.5ex minus -.2ex}%
{1ex plus .2ex}%
{\normalfont\tiny\bfseries}}
\makeatother
\setcounter{secnumdepth}{0} % disable section numbering


% disable indenting
\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt plus 0.5ex}

% Custom siunitx defs
\DeclareSIUnit\noop{\relax}
\NewDocumentCommand\prefixvalue{m}{%
\qty[prefix-mode=extract-exponent,print-unity-mantissa=false]{1}{#1\noop}
}

% Shorthand definitions
\newcommand{\To}{\Rightarrow}
\newcommand{\ttt}{\texttt}
\newcommand{\ra}{\rightarrow}

% condense itemize & enumerate
\let\olditemize=\itemize \let\endolditemize=\enditemize \renewenvironment{itemize}{\olditemize \itemsep0em}{\endolditemize}
\let\oldenumerate=\enumerate \let\endoldenumerate=\endenumerate \renewenvironment{enumerate}{\oldenumerate \itemsep0em}{\endoldenumerate}
\setlist[itemize]{noitemsep, topsep=0pt, leftmargin=*}
\setlist[enumerate]{noitemsep, topsep=0pt, leftmargin=*}

% TODO: CHANGEME
\title{ClassCode}

\begin{document}
\raggedright
\tiny

% make listings look nicer
\lstset{
tabsize = 2, %% set tab space width
showstringspaces = false, %% prevent space marking in strings, string is defined as the text that is generally printed directly to the console
basicstyle = \tiny\ttfamily, %% set listing font and size
breaklines = true, %% enable line breaking
numberstyle = \tiny,
postbreak = \mbox{\textcolor{red}{\(\hookrightarrow\)}\space}
}

\begin{center}
% TODO: CHANGEME
{\textbf{ClassCode TestType - LoremIpsum Edition}} \\
\end{center}
% set column spacing rules
\setlength{\premulticols}{1pt}
\setlength{\postmulticols}{1pt}
\setlength{\multicolsep}{1pt}
\setlength{\columnsep}{2pt}

% NOTE: tweak this based on desired content density / readability
\begin{multicols*}{4}

\section{Level 1 Heading}

\subsection{Level 2 Heading}

\subsubsection{Level 3 Heading}

\textbf{Topic}:
Some information about the topic \(y = mx + b\) with some inline math

\[
\int_{0}^{\infty} f(x) \quad \text{or a bit bigger}
\]

% add some images if needed
% \includegraphics[width=\linewidth]{image.png}


\end{multicols*}

\end{document}

0 comments on commit 074e02d

Please sign in to comment.