A simple homework template for LaTeX

Here’s a simple homework template I compiled today for my friend. I guess, it’s useful for rather short homeworks without any need to prepare a table of contents or long bibliography.

\documentclass[10pt,english]{article}
\usepackage[a4paper,left=2cm,top=2cm,right=2cm,bottom=2.5cm]{geometry}
\usepackage[utf8]{inputenc} % input coding stuff
\usepackage[T1]{fontenc} % font coding stuff
\usepackage{babel} % hyphenation
\usepackage{csquotes} % to \enquote{}
\usepackage{xcolor} % color stuff
 
\definecolor{chamois}{RGB}{255,255,240}
%\pagecolor{chamois} % for nice background color
 
\usepackage{palatino} % Font
\usepackage{blindtext} % some useless text
 
\usepackage{setspace} % 1,5-line spacing
 
\setlength{\parindent}{0pt} % just skips, no indent
\setlength{\parskip}{6pt}
 
\usepackage{titling} % defines \theauthor, \thetitle, etc.
 
\usepackage{scrpage2} % living column titles
\pagestyle{scrheadings}
 
\ohead{}
\ihead{}
 
\ofoot{\pagemark}
\ifoot{}
 
\cfoot{}
\chead{}
 
\author{Jane Doe, student ID 1234\,5678}
\title{Homework}
 
\begin{document}
{\theauthor} \\[-0.5em]
 
{\Large \bfseries \thetitle}
 
\today
 
\onehalfspacing
 
\subsubsection*{This is the first question.}
 
\blindtext[3]
 
\subsubsection*{This is the second question.}
 
\blindtext[4]
 
 
\subsubsection*{This is the third question.}
 
\blindtext[3]
 
\end{document}

03.02

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website