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} diff --git a/exercises/basic-document-structure/document-structure.code.done.tex b/exercises/basic-document-structure/document-structure.code.done.tex index 2bcd804..40bde2e 100644 --- a/exercises/basic-document-structure/document-structure.code.done.tex +++ b/exercises/basic-document-structure/document-structure.code.done.tex @@ -1,11 +1,38 @@ -% \documentclass{article} -% \usepackage[utf8]{inputenc} -% \usepackage[T1]{fontenc} -% \usepackage[english]{babel} -% \usepackage[hidelinks]{hyperref} +% twocolumn parameter adds second column +\documentclass[twocolumn]{article} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\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} -% \tableofcontents +\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,15 +54,16 @@ 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! -% \end{document} +\end{document} diff --git a/exercises/basic-document-structure/task.tex b/exercises/basic-document-structure/task.tex index ce1bff6..0b1b322 100644 --- a/exercises/basic-document-structure/task.tex +++ b/exercises/basic-document-structure/task.tex @@ -11,8 +11,18 @@ \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} + +\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/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/exercises/lists/task.tex b/exercises/lists/task.tex index 6712a02..d56f5d8 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{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{itemize} \ No newline at end of file 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/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} diff --git a/praeamble.tex b/praeamble.tex index 2453cf4..02eccf0 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} @@ -29,6 +32,9 @@ % Compact lists \usepackage{paralist} +% Lists with different bullet points +\usepackage{enumitem} + % Tables \usepackage{longtable, array, tabularx, booktabs, colortbl} @@ -47,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} 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