From 9e827a19d65f4f131b48b76fe2963473d8369135 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 8 May 2025 23:24:48 +0200 Subject: [PATCH] Add extra document customization task --- .../document-structure.code.done.tex | 40 ++++++++++++++++--- exercises/basic-document-structure/task.tex | 13 ++++++ exercises/lists/task.tex | 4 +- praeamble.tex | 3 ++ 4 files changed, 52 insertions(+), 8 deletions(-) diff --git a/exercises/basic-document-structure/document-structure.code.done.tex b/exercises/basic-document-structure/document-structure.code.done.tex index 8081663..40bde2e 100644 --- a/exercises/basic-document-structure/document-structure.code.done.tex +++ b/exercises/basic-document-structure/document-structure.code.done.tex @@ -1,10 +1,37 @@ -\documentclass{article} +% twocolumn parameter adds second column +\documentclass[twocolumn]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} -\usepackage[english]{babel} +\usepackage[english,italian]{babel} \usepackage[hidelinks]{hyperref} + +% for headers and footers +\usepackage{fancyhdr} + +% configure title components +\title{Recipes} +\date{\today} +\author{It's you!} \begin{document} + +% set headers and footers +\pagestyle{fancy} % activate headers and footers in general +\thispagestyle{fancy} % apply to the first page as well + +% clear and configure headers +\fancyhead{} +\fancyhead[R]{Recipes} + +% clear and configure footers +\fancyfoot{} +\fancyfoot[R]{\thepage} + +% switch language (needs optional parameter where the babel package is added), display title, then switch back +\selectlanguage{italian} +\maketitle +\selectlanguage{english} + \tableofcontents \section{Beverages} @@ -27,13 +54,14 @@ Place a sieve over the container that you want to store the lemonade in. Put the When the liquid is cold, add the lemon juice, the cold water, and the ice cubes and stir everything. - Your lemonade is now ready to enjoy! -\subsection{Hot Chocolate} +% short title for the table of contents via optional parameter +\subsection[Chocoho!]{Hot Chocolate} Coming soon! - -\section{Breakfast} + +% asterisk (*) hides the section title in the table of contents +\section*{Breakfast} \subsubsection{Buckwheat Overnight Oats} Coming soon! diff --git a/exercises/basic-document-structure/task.tex b/exercises/basic-document-structure/task.tex index dfc4bc3..0b1b322 100644 --- a/exercises/basic-document-structure/task.tex +++ b/exercises/basic-document-structure/task.tex @@ -13,3 +13,16 @@ \code{latex}{\textbackslash subsection}, etc. to structure the text. Also, include a table of contents for your document. \end{enumerate} + +\subsection*{Extra tasks: Make it fit your needs} + +\begin{itemize} + \item Add a \textbf{title} to the document. + \item Make today's date appear in a \textbf{language of your choice}. + \item \textbf{Hide} one section title in the table of contents. + \item Add a \textbf{short title} to a different section title. + \item Split the text in \textbf{two columns} (keyword: \texttt{twocolumn}). + \item Add a \textbf{header} with the title on the right and a \textbf{footer} with the page number on the left. + \item Try out what changes when you change the \textbf{document class}. + \item Research the possibilities of traditional\footnote{\url{https://hartwork.org/beamer-theme-matrix/}} and modern\footnote{\url{https://gitlab.cs.fau.de/i4/tex/i4neo}} \textbf{beamer presentation templates}. +\end{itemize} \ No newline at end of file diff --git a/exercises/lists/task.tex b/exercises/lists/task.tex index 3c8292f..d56f5d8 100644 --- a/exercises/lists/task.tex +++ b/exercises/lists/task.tex @@ -8,8 +8,8 @@ instructions, respectively. \subsection*{Extra tasks: Special enumerations} -\begin{compactitem} +\begin{itemize} \item Try using \textbf{Roman numerals} in the ordered list. \item Make the ordered list \textbf{start at 7} (keyword: \texttt{\textbackslash setcounter}). \item Reduce the \textbf{white space} between the items in the unordered list. -\end{compactitem} \ No newline at end of file +\end{itemize} \ No newline at end of file diff --git a/praeamble.tex b/praeamble.tex index 55bf402..7de430a 100644 --- a/praeamble.tex +++ b/praeamble.tex @@ -5,6 +5,9 @@ \usepackage[T1]{fontenc} \usepackage[english,ngerman]{babel} +% Headers and footers +\usepackage{fancyhdr} + % Special characters \usepackage{eurosym, tipa, textcomp, textgreek, upgreek}