From e39f7eca69f5377eb24cbd814a7038086e05e49e Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 1 May 2025 22:15:31 +0200 Subject: [PATCH 1/8] Replace fake ellipses --- content/special-characters.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/special-characters.tex b/content/special-characters.tex index 8c3d4b4..b96e6f8 100644 --- a/content/special-characters.tex +++ b/content/special-characters.tex @@ -72,10 +72,10 @@ The decisive factor is the appearance, not the semantics, which is why the Frenc \cmidrule(lr){2-3} \cmidrule(lr){4-5} & Code & Result & Code & Result \\ \midrule - English (\acro{A.\,E.}) & \code{latex}{``...''} & ``…'' & \code{latex}{`...'} & `…' \\ - English (\acro{B.\,E.}) & \code{latex}{`...'} & `…' & \code{latex}{``...''} & ``…'' \\ - German & \code{latex}{\glqq...\grqq} & \glqq…\grqq & \code{latex}{\glq…\grq} & \glq…\grq \\ - German (alternatively) & \code{latex}{\frqq...\flqq} & \frqq…\flqq & \code{latex}{\frq…\flq} & \frq…\flq \\ + English (\acro{A.\,E.}) & \code{latex}{``…''} & ``…'' & \code{latex}{`…'} & `…' \\ + English (\acro{B.\,E.}) & \code{latex}{`…'} & `…' & \code{latex}{``…''} & ``…'' \\ + German & \code{latex}{\glqq…\grqq} & \glqq…\grqq & \code{latex}{\glq…\grq} & \glq…\grq \\ + German (alternatively) & \code{latex}{\frqq…\flqq} & \frqq…\flqq & \code{latex}{\frq…\flq} & \frq…\flq \\ \bottomrule \end{tabular} \caption{Quotation marks} From ce6d806495ec254ff77a97944549135c8cc3820e Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 1 May 2025 22:15:42 +0200 Subject: [PATCH 2/8] Adjust exercise numbers --- main-exercises.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main-exercises.tex b/main-exercises.tex index ab99dfd..a61c503 100644 --- a/main-exercises.tex +++ b/main-exercises.tex @@ -27,7 +27,7 @@ \input{first-steps-with-latex.tex} % Align exercise numbers with chapters -\setcounter{section}{2} +\setcounter{section}{1} \input{exercises/basic-document-structure/task} \subsubsection*{Modify the content below} From d1458eca95fa50b0433b0de15d2d8f11e62a1fe6 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 8 May 2025 22:08:42 +0200 Subject: [PATCH 3/8] Add extra tasks for lists --- exercises/lists/lists.code.done.tex | 23 +++++++++++++++++++++++ exercises/lists/lists.raw.tex | 2 +- praeamble.tex | 3 +++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/exercises/lists/lists.code.done.tex b/exercises/lists/lists.code.done.tex index fe17438..293a39e 100644 --- a/exercises/lists/lists.code.done.tex +++ b/exercises/lists/lists.code.done.tex @@ -21,4 +21,27 @@ Ingredients: \item add the remaining ingredients \item scramble thoroughly \end{enumerate} +\end{itemize} + +% With all extra tasks: + +\begin{itemize} + \item Ingredients: + \begin{compactitem} + \item 400 g berries + \item 50 ml maple syrup + \item 4 lemons + \item 1 l cold water + \item 400 g ice cubes + \end{compactitem} + + \item Instructions: + \begin{enumerate}[label=\roman*] + \setcounter{enumi}{6} + \item boil and shred the berries + \item add maple syrup + \item squeeze the lemons and add their juice + \item add the remaining ingredients + \item scramble thoroughly + \end{enumerate} \end{itemize} \ No newline at end of file diff --git a/exercises/lists/lists.raw.tex b/exercises/lists/lists.raw.tex index 6dbb5ae..3627090 100644 --- a/exercises/lists/lists.raw.tex +++ b/exercises/lists/lists.raw.tex @@ -3,4 +3,4 @@ Ingredients: 400~g berries, 50~ml maple syrup, 4~lemons, 1~l cold water, 400~g ice cubes -\noindent Instructions: Boil and shred the berries, add maple syrup, squeeze the lemons and add their juice, add the remaining ingredients, scramble thoroughly \ No newline at end of file +\noindent Instructions: Boil and shred the berries, add maple syrup, squeeze the lemons and add their juice, add the remaining ingredients, scramble thoroughly diff --git a/praeamble.tex b/praeamble.tex index 2453cf4..55bf402 100644 --- a/praeamble.tex +++ b/praeamble.tex @@ -29,6 +29,9 @@ % Compact lists \usepackage{paralist} +% Lists with different bullet points +\usepackage{enumitem} + % Tables \usepackage{longtable, array, tabularx, booktabs, colortbl} From 1a39161dd49cd6238e74517bf00d16375379a72b Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 8 May 2025 22:13:09 +0200 Subject: [PATCH 4/8] Remove the commenting-out task --- .../document-structure.code.done.tex | 16 ++++++++-------- exercises/basic-document-structure/task.tex | 5 +---- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/exercises/basic-document-structure/document-structure.code.done.tex b/exercises/basic-document-structure/document-structure.code.done.tex index 2bcd804..8081663 100644 --- a/exercises/basic-document-structure/document-structure.code.done.tex +++ b/exercises/basic-document-structure/document-structure.code.done.tex @@ -1,11 +1,11 @@ -% \documentclass{article} -% \usepackage[utf8]{inputenc} -% \usepackage[T1]{fontenc} -% \usepackage[english]{babel} -% \usepackage[hidelinks]{hyperref} +\documentclass{article} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[english]{babel} +\usepackage[hidelinks]{hyperref} -% \begin{document} -% \tableofcontents +\begin{document} +\tableofcontents \section{Beverages} @@ -38,4 +38,4 @@ Coming soon! \subsubsection{Buckwheat Overnight Oats} Coming soon! -% \end{document} +\end{document} diff --git a/exercises/basic-document-structure/task.tex b/exercises/basic-document-structure/task.tex index ce1bff6..dfc4bc3 100644 --- a/exercises/basic-document-structure/task.tex +++ b/exercises/basic-document-structure/task.tex @@ -11,8 +11,5 @@ \item It is time to structure your first document. Use the \LaTeX{} commands \code{latex}{\textbackslash section}, \code{latex}{\textbackslash subsection}, etc. to structure the text. - Also, - include - a table of contents for your document. - \item Afterwards, comment out the preamble, the document environment, and the table of contents. + Also, include a table of contents for your document. \end{enumerate} From 4aa827cd2059dda551d468a2eeec1f61bc662a3d Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 8 May 2025 22:28:38 +0200 Subject: [PATCH 5/8] Add extra list task instructions --- exercises/lists/task.tex | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/exercises/lists/task.tex b/exercises/lists/task.tex index 6712a02..3c8292f 100644 --- a/exercises/lists/task.tex +++ b/exercises/lists/task.tex @@ -5,3 +5,11 @@ unordered list (\code{latex}{itemize}) with sub-lists \emph{Ingredients} and \emph{Instructions}. Within these, there shall be an unordered list of ingredients and an ordered list of instructions, respectively. + +\subsection*{Extra tasks: Special enumerations} + +\begin{compactitem} + \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 From 9e827a19d65f4f131b48b76fe2963473d8369135 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 8 May 2025 23:24:48 +0200 Subject: [PATCH 6/8] 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} From 3e3d168b79aa966cb0f1e5fe9aa5e61ec3dce1e2 Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 9 May 2025 00:10:32 +0200 Subject: [PATCH 7/8] Adapt literature task for biber --- exercises/literature/literature.code.done.tex | 13 ++++++++++--- exercises/literature/task.tex | 14 +++++++------- praeamble.tex | 2 +- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/exercises/literature/literature.code.done.tex b/exercises/literature/literature.code.done.tex index 38b8cc3..865ea21 100644 --- a/exercises/literature/literature.code.done.tex +++ b/exercises/literature/literature.code.done.tex @@ -1,5 +1,12 @@ -An introductory \LaTeX{} course can be found in \enquote{\LaTeX{} in 24 Hours} \cite{datta2017}. +% Preamble adjustments + +% Literature +\usepackage[style=numeric, citestyle=alpha, backend=biber]{biblatex} +\addbibresource{exercises/literature/literature.bib} + +% Actual content + +An introductory \LaTeX{} course can be found in \enquote{\LaTeX{} in 24 Hours} \parencite{datta2017}. There is a plethora of further handbooks \cite*[e.\,g.,][]{goossensmittelbach2010}. -\bibliographystyle{plain} -\bibliography{exercises/literature/literature.done.bib} \ No newline at end of file +\printbibliography \ No newline at end of file diff --git a/exercises/literature/task.tex b/exercises/literature/task.tex index fd04702..64eb11e 100644 --- a/exercises/literature/task.tex +++ b/exercises/literature/task.tex @@ -8,12 +8,12 @@ \item Dilip Datta (2017): \LaTeX\ in 24 Hours. A Practical Guide for Scientific Writing. \item Frank Mittelbach / Michel Goossens (2010): Der \LaTeX-Begleiter. \end{itemize} - \item Add the Bib\TeX{} entries to the newly created Bib\TeX{} files. + \item Add the Bib\TeX{} entries to the newly created Bib\TeX{} file. \item Assign unique and meaningful Bib\TeX{} keys. - \item Include the Bib\TeX{} file in a suitable location, where later on the references should be listed. - \item Cite the two handbooks in the - file\\\file{exercises/literature/literature.tex}. - \item Make use of the \mono{plain} biliography style. - \item \textbf{Note}: If compiling fails, it may help to remove all auxiliary - files \\(\mono{main.aux/bbl/blg/loc/out/pdf/soc/toc}) before compiling again. + \item Add the bibliography file to the project's preamble. + \item Make use of the \mono{alpha} bibliography style. + \item Cite the two handbooks in the file\\\file{exercises/literature/literature.tex}. + \item Ensure that the bibliography is listed. \end{enumerate} + +\noindent \textbf{Note}: If compiling fails, it may help to remove all auxiliary files \\(\mono{main.aux/bbl/blg/loc/out/pdf/soc/toc}) before compiling again. \ No newline at end of file diff --git a/praeamble.tex b/praeamble.tex index 7de430a..02eccf0 100644 --- a/praeamble.tex +++ b/praeamble.tex @@ -53,7 +53,7 @@ \usepackage[autostyle,autopunct=false]{csquotes} % Literature -\usepackage{natbib} +\usepackage[style=numeric, citestyle=ieee, backend=biber]{biblatex} % Line wraps in monospace font \usepackage[htt]{hyphenat} From a50c4bf8fbc7012de04de602e4125139beafe7c7 Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 9 May 2025 00:18:39 +0200 Subject: [PATCH 8/8] Update VS Code instructions --- vs-code-instructions.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/vs-code-instructions.md b/vs-code-instructions.md index f2d1340..9457ba3 100644 --- a/vs-code-instructions.md +++ b/vs-code-instructions.md @@ -12,8 +12,8 @@ This tutorial demonstrates how to set up VS Code to compile the LaTeX script. Ma LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a list of commands that are executed one after the other. For our exercises, we will need one basic recipe which simply runs the compiler twice. Later on, we will need a second recipe to deal with bibliographic data. 1. Launch the VS Code settings and search for “recipes.” -2. In the “Latex: Recipes” section, click on “Edit in settings.json.” -3. Go ahead and add the following two entries to the list. The first one just uses the `pdflatex` compiler twice to build our document, whereas the second one adds an intermediate round of `bibtex` compilation. +2. In the “Latex-workshop > LaTeX: Recipes” section, click on “Edit in settings.json.” +3. Go ahead and add the following two entries to the list. The first one just uses the `pdflatex` compiler twice to build our document, whereas the second one adds an intermediate round of `biber` compilation. ```json "latex-workshop.latex.recipes": [ @@ -25,10 +25,10 @@ LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a ] }, { - "name": "pdflatex -> bibtex -> pdflatex × 2", + "name": "pdflatex -> biber -> pdflatex × 2", "tools": [ "pdflatex", - "bibtex", + "biber", "pdflatex", "pdflatex" ] @@ -37,8 +37,26 @@ LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a ] ``` -4. Save and close the settings file. -5. For later convenience, set the “Recipe: Default” option to `lastUsed`. +4. Now search for “latex tools” in the settings search. +5. In the “Latex-workshop > LaTeX: Tools section, click on “Edit in settings.json.” +6. Make sure the following entry is part of the list. + +```json +"latex-workshop.latex.tools": [ + { + "name": "biber", + "command": "biber", + "args": [ + "%DOC%" + ], + "env": {} + }, + // EXISTING ENTRIES GO HERE +] +``` + +7. Save and close the settings file. +8. For later convenience, set the “Latex-workshop > Latex > Recipe: Default” option to `lastUsed`. ## Compiling