Skip to content

Instantly share code, notes, and snippets.

@chamik
Created May 25, 2022 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chamik/34a01e9ab17e7498e289ff5ab66ec188 to your computer and use it in GitHub Desktop.
Save chamik/34a01e9ab17e7498e289ff5ab66ec188 to your computer and use it in GitHub Desktop.
A template for KSP theoretical exercises
% A template for KSP theoretical exercises
% Made by Kubík
% Shared under the MIT license
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ksp}[2022/03/16 A template for KSP theoretical exercises]
\LoadClass[11pt, fleqn]{article}
\RequirePackage[T1]{fontenc} % modern font encoding
\RequirePackage{sectsty} % font size
\RequirePackage[utf8]{inputenc} % UTF-8
\RequirePackage{amsthm, amsmath, amssymb} % math, math, math
\RequirePackage{xcolor} % colors!
\RequirePackage{tikz, wrapfig} % drawing
\RequirePackage[top=1in, bottom=1.25in, left=1.1in, right=1.1in]{geometry} % page spacing
\RequirePackage{paralist} % better lists
\RequirePackage[hyperfootnotes=false]{hyperref} % hyperlinks
% setup for hyperfootnotes
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
pdftitle={\@title},
pdfpagemode=FullScreen,
}
% no page numbers
\pagenumbering{gobble}
% section spacing
\setlength{\parindent}{0em}
\setlength{\parskip}{.5em}
% line spacing
\linespread{1.1}
% math spacing
\AtBeginDocument{
\addtolength\abovedisplayskip{-1\baselineskip}
\addtolength\belowdisplayskip{.1\baselineskip}
}
% section font size
\sectionfont{\LARGE\selectfont}
% centered text box
\newcommand\textbox[1]{
\parbox{.333\textwidth}{\hspace{.4cm}#1\hspace*{.4cm}}
}
% remade title
\renewcommand{\maketitle}{
\begin{center}
\framebox[\textwidth]{
% \hfil - note the one 'l' here
\noindent\textbox{\@author\hfill}\textbox{\hfil {\Large \@title\hfil}}\textbox{\hfill \@date}
}
\end{center}
}
% credits, courtesy of Matúš
\newcommand{\templatecredit}{
\begin{flushright}{\scriptsize Template made by Kubík}\end{flushright}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment