Compare commits
2 Commits
master
...
2024-revam
| Author | SHA1 | Date | |
|---|---|---|---|
| 766462e4ea | |||
| ef5c3b03e8 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -85,3 +85,4 @@ exercise-mode.tex
|
||||
public
|
||||
exercises/*/*.pdf
|
||||
temp
|
||||
exercises-new/*/*.pdf
|
||||
7
Makefile
7
Makefile
@ -12,7 +12,6 @@ clean:
|
||||
@rm -rf temp/*
|
||||
@rm -f main-{script,exercises,solutions}.{aux,loc,log,out,pdf,soc,toc,synctex.gz}
|
||||
@rm -f exercises/*/*.{aux,loc,log,out,pdf,soc,toc,synctex.gz}
|
||||
@rm -f install-verification/*.{aux,loc,log,out,pdf,soc,toc,synctex.gz}
|
||||
|
||||
# Compile listings (only needed when listings have changed)
|
||||
listings: listings/**/*
|
||||
@ -69,14 +68,14 @@ publication-pdf-with-solutions: clean publication-dir main-solutions.tex
|
||||
# Build a ZIP file without tasks
|
||||
publication-zip-without-exercises: clean publication-dir
|
||||
rm -rf temp/*
|
||||
cp --parents main-script.tex praeamble.tex commands.tex setup.tex content/* docs/* graphics/* install-verification/* listings/**/*.{tex,pdf,bib,java,txt} titlepage.tex imprint.tex temp/
|
||||
cp --parents main-script.tex praeamble.tex commands.tex setup.tex content/* graphics/* listings/**/*.{tex,pdf,bib,java,txt} titlepage.tex imprint.tex temp/
|
||||
cd temp && zip ../public/project-without-exercises * **/* **/**/*
|
||||
|
||||
|
||||
# Build a ZIP file with tasks and without solutions
|
||||
publication-zip-with-exercises: clean publication-dir
|
||||
rm -rf temp/* exercises/**/_*
|
||||
cp --parents main-exercises.tex praeamble.tex commands.tex setup.tex docs/* graphics/* install-verification/* listings/**/*.{tex,pdf,bib,java,txt} titlepage-exercises.tex imprint.tex first-steps-with-latex.tex temp/
|
||||
cp --parents main-exercises.tex praeamble.tex commands.tex setup.tex graphics/* listings/**/*.{tex,pdf,bib,java,txt} titlepage-exercises.tex imprint.tex first-steps-with-latex.tex temp/
|
||||
cp --parents exercises/**/* temp/
|
||||
rm -f temp/exercises/**/*.done.{tex,bib,synctex.gz}
|
||||
rm -f temp/exercises/**/*.rend.tex
|
||||
@ -89,7 +88,7 @@ publication-zip-with-exercises: clean publication-dir
|
||||
# Build a ZIP file with tasks and solutions
|
||||
publication-zip-with-solutions: clean publication-dir
|
||||
rm -rf temp/* exercises/**/_*
|
||||
cp --parents main-solutions.tex praeamble.tex commands.tex setup.tex docs/* graphics/* install-verification/* listings/**/*.{tex,pdf,bib,java,txt} titlepage-exercises.tex imprint.tex first-steps-with-latex.tex temp/
|
||||
cp --parents main-solutions.tex praeamble.tex commands.tex setup.tex graphics/* listings/**/*.{tex,pdf,bib,java,txt} titlepage-exercises.tex imprint.tex first-steps-with-latex.tex temp/
|
||||
cp --parents exercises/**/* temp/
|
||||
rm -f temp/exercises/**/*.raw.{tex,bib,synctex.gz}
|
||||
rm -f temp/exercises/**/*.aux
|
||||
|
||||
@ -29,7 +29,7 @@ This project contains three different documents:
|
||||
2. an **exercise script** with practical tasks to apply what you have learned (`main-exercises`), and
|
||||
3. a **solution script** that you can refer to for your self-study (`main-solutions`).
|
||||
|
||||
A PDF version of all of these documents can be found [in the “releases” section](https://git.stuve-bamberg.de/latex/latex-skript/releases). You may use the script to delve into the realms of LaTeX on your own. It will give you an overview of how to approach any, but especially this LaTeX project. To get your hands dirty, have a look at the exercise script, especially the “First steps with LaTeX” section.
|
||||
A PDF version of all of these documents can be found [in the “releases” section](https://github.com/fs-wiai/latex-script/releases). You may use the script to delve into the realms of LaTeX on your own. It will give you an overview of how to approach any, but especially this LaTeX project. To get your hands dirty, have a look at the exercise script, especially the “First steps with LaTeX” section.
|
||||
|
||||
**Optionally**, the `minted` package can be used for source code listings. This requires some additional configuration (including the installation of [Python3](https://www.python.org/)). Please refer to the chapter on “Source code listings” in the aforementioned PDF file.
|
||||
|
||||
@ -69,10 +69,6 @@ latex-script/
|
||||
│ ├── basic-document-structure.tex
|
||||
│ ├── basic-functionality.tex
|
||||
│ └── …
|
||||
├── docs
|
||||
│ ├── vs-code-instructions.md
|
||||
│ ├── faq.md
|
||||
│ └── …
|
||||
├── exercises
|
||||
│ ├── basic-document-structure
|
||||
│ ├── footnotes
|
||||
@ -116,7 +112,7 @@ Besides the exercise part, we also provide the script detailing all of the infor
|
||||
* They are bound together by **`main-script.tex`**, which also includes our preamble (`preamble.tex`) and our custom commands (`commands.tex`).
|
||||
* Further folders (e.g., `listings` and `graphics`) contain additional resources like images and source code listings used in the script.
|
||||
|
||||
Please don't feel overwhelmed by the amount of files in this repository. You will get to know the most important parts of the project step by step by [following the script](https://git.stuve-bamberg.de/latex/latex-skript/releases) or our workshop. What's more, by using this larger project you get accustomed to the complexity of real LaTeX projects – bachelor's/master's theses and the like.
|
||||
Please don't feel overwhelmed by the amount of files in this repository. You will get to know the most important parts of the project step by step by [following the script](https://github.com/fs-wiai/latex-script/releases) or our workshop. What's more, by using this larger project you get accustomed to the complexity of real LaTeX projects – bachelor's/master's theses and the like.
|
||||
|
||||
## Further information for maintainers
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ our referenced object appears in the text.
|
||||
\Example{lst:fooboar-learning-latex}{references/ref}{references/ref_crop}{Example
|
||||
for a reference}
|
||||
|
||||
A smarter package for references is \pkg{cleveref}.\footnote{with only one
|
||||
A smarter package for references is \pkg{cleverref}.\footnote{with only one
|
||||
\enquote{r}!}
|
||||
It provides us with the command \code{latex}{\textbackslash cref\{<label>\}},
|
||||
which can also handle multiple labels separated by commas.
|
||||
|
||||
@ -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}
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
# Instructions for compiling this project in CoCalc
|
||||
|
||||
> [CoCalc](https://academiccloud.de/services/cocalc/) is a web service for data scientists. As part of the [AcademicCloud](https://academiccloud.de/), it is available to students at University of Bamberg. CoCalc is useful for collaboration on $\LaTeX$ documents, Jupyter Notebooks, and much more. CoCalc provides an [extensive documentation](https://doc.cocalc.com/latex.html).
|
||||
>
|
||||
> **Please note**: The Academic Cloud version is currently in preview, causing limited resources, no backups, and changes without prior notice. Use at your own risk.
|
||||
|
||||
This tutorial demonstrates how to set up CoCalc to compile the LaTeX script.
|
||||
|
||||
## Project setup
|
||||
|
||||
1. Open CoCalc. Students at University of Bamberg may use [this instance](https://academiccloud.de/services/cocalc/).
|
||||
2. Click the blue button to go to your projects.
|
||||
3. Click on “Create Project …”.
|
||||
+ Add a title (e.g., “latex-workshop”).
|
||||
+ Click on “Customize software environment” and choose “TeXLive” from the dropdown.
|
||||
+ Create the project and wait for the initialization to finish. It is done when you see a blue button allowing you to “Create or Upload Files …”
|
||||
4. Choose “Explorer” on the left side and click on “Upload.” Select your compressed project archive. Once uploaded, click on the name and proceed to “Extract Files …”
|
||||
5. Back in the Explorer, you can now navigate through our project directory. Go to the file `main-exercises.tex`. It should load a familiar $\LaTeX$ work environment and automatically build the document for you. Compilation will be triggered whenever you hit `Ctrl + S`.
|
||||
|
||||
## Some general advice
|
||||
|
||||
+ Use the dropdown next to the three colorful buttons to **switch between source code files** related to the same root document. Do not open them in separate tabs via the Explorer.
|
||||
+ CoCalc **projects stop on inactivity**. You will be prompted to restart the project.
|
||||
+ When you **add new .tex documents**, CoCalc automatically fills them with some content you may want to use. For our purposes, you may delete this so-called boilerplate code.
|
||||
66
docs/faq.md
66
docs/faq.md
@ -1,66 +0,0 @@
|
||||
# Frequently asked questions
|
||||
|
||||
- [Frequently asked questions](#frequently-asked-questions)
|
||||
- [Error: “File 'setup.tex' not found. \\input{setup.tex}”](#error-file-setuptex-not-found-inputsetuptex)
|
||||
- [Error: “File \`latex-logo.png' not found: using draft setting.”](#error-file-latex-logopng-not-found-using-draft-setting)
|
||||
- [Error: “Unable to find xyz.sty”](#error-unable-to-find-xyzsty)
|
||||
- [I accidentally dismissed the prompt asking me to install a missing package.](#i-accidentally-dismissed-the-prompt-asking-me-to-install-a-missing-package)
|
||||
- [MikTeX Console is already running](#miktex-console-is-already-running)
|
||||
- [I want to use my own tools.](#i-want-to-use-my-own-tools)
|
||||
- [I need more help.](#i-need-more-help)
|
||||
|
||||
## Error: “File 'setup.tex' not found. \input{setup.tex}”
|
||||
|
||||
**Windows-specific diagnosis**:
|
||||
If this error shows up when you compile the script for the first time, you may have opened the $\LaTeX$ file without unzipping the project archive first. To resolve the error, go back to the folder where you store your downloads. Locate the project archive (something like `latex-project-….zip`). Do not double-click it. Instead, right-click and select “Unzip”, “Extract”, or similar. This will extract the ZIP archive to a new folder. Open this folder and proceed with opening the file you were looking for.
|
||||
|
||||
**Generic hints**:
|
||||
The compiler complains that a file called `setup.tex` cannot be found in the same folder as the file you are compiling. Make sure the file exists and there are no typos in your file name.
|
||||
|
||||
## Error: “File `latex-logo.png' not found: using draft setting.”
|
||||
|
||||
This is a common error when including any images or other media. Remember to specify the path to the image relative to your root document (i. e., your `main.tex`).
|
||||
|
||||
## Error: “Unable to find xyz.sty”
|
||||
|
||||
**Windows-specific diagnosis**:
|
||||
This error typically relates to packages missing from your $\LaTeX$ installation. On Windows, it can typically be solved like this:
|
||||
|
||||
1. Open the Mik$\TeX$ Console, a program that comes with your $\LaTeX$ installation.
|
||||
2. In there, you will find the “Packages” tab.
|
||||
3. Click the button to search for package updates. This should resolve the error.
|
||||
|
||||
**Generic hints**:
|
||||
The compiler complains that a package, particularly the corresponding .sty document, is missing. Typically, there is a `\usepackage{xyz}` command that loads the package xyz. Make sure there are no typos in the package name. If you do not use $\TeX$live-full (Linux), try to install the package via the Mik$\TeX$ Console (Windows) or your $\LaTeX$ distribution's helper tools.
|
||||
|
||||
## I accidentally dismissed the prompt asking me to install a missing package.
|
||||
|
||||
Try re-opening $\TeX$studio. If this does not help, there is still the option to manually install the required packages from the Mik$\TeX$ Console or similar distribution-specific management software.
|
||||
|
||||
## MikTeX Console is already running
|
||||
|
||||
If this error occurs while opening the MikTeX Console, open the Task Manager, search for “MikTeX Console”, select the entry in the table, and terminate the task by a click on the respective button. Then, open MikTeX Console again.
|
||||
|
||||
## I want to use my own tools.
|
||||
|
||||
Sure, feel free. We provide instructions for [CoCalc](./cocalc-instructions.md) and [VS Code/Codium](./vs-code-instructions.md). Any other editor will do if you know your ways around the terminal. In essence, all we do here is this:
|
||||
|
||||
```bash
|
||||
lualatex main.tex
|
||||
biber main
|
||||
lualatex main.tex
|
||||
lualatex main.tex
|
||||
```
|
||||
|
||||
Just run `pdflatex main.tex` twice if you do not have any citations. Or have a look at XeTeX, … ([numerous other tools available](https://www.tug.org/interest.html#free)).
|
||||
|
||||
## I need more help.
|
||||
|
||||
Please refer to our various resources:
|
||||
|
||||
- the workshop's [presentation](https://wiai.de/latex-weekend)
|
||||
- the [Moodle course](https://wiai.de/latex)
|
||||
- the Git project containing the [script](https://git.stuve-bamberg.de/latex/latex-skript)
|
||||
- the WIAI Student Council's [website](https://www.uni-bamberg.de/wiai/fs)
|
||||
|
||||
|
||||
19
exercises-new/02-simple-document/main.done.tex
Normal file
19
exercises-new/02-simple-document/main.done.tex
Normal file
@ -0,0 +1,19 @@
|
||||
% TODO: Make this document a report on A4 paper.
|
||||
\documentclass[a4paper]{report}
|
||||
|
||||
% TODO: Specify UTF-8 as the input encoding to add umlaut support.
|
||||
\usepackage[utf8]{inputenc}
|
||||
|
||||
% TODO: Specify T1 as the font encoding.
|
||||
\usepackage[T1]{fontenc}
|
||||
|
||||
% TODO: Add support for the english language.
|
||||
\usepackage[english]{babel}
|
||||
|
||||
% TODO: Add the document environment.
|
||||
\begin{document}
|
||||
|
||||
Hello, world!
|
||||
|
||||
% TODO: Close the document environment.
|
||||
\end{document}
|
||||
10
exercises-new/02-simple-document/main.raw.tex
Normal file
10
exercises-new/02-simple-document/main.raw.tex
Normal file
@ -0,0 +1,10 @@
|
||||
% TODO: Make this document a report on A4 paper.
|
||||
% TODO: Specify UTF-8 as the input encoding to add umlaut support.
|
||||
% TODO: Specify T1 as the font encoding.
|
||||
% TODO: Add support for the english language.
|
||||
|
||||
% TODO: Add the document environment.
|
||||
|
||||
Hello, world!
|
||||
|
||||
% TODO: Close the document environment.
|
||||
38
exercises-new/03-text-layout/main.raw.tex
Normal file
38
exercises-new/03-text-layout/main.raw.tex
Normal file
@ -0,0 +1,38 @@
|
||||
\documentclass[a4paper]{report}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[english]{babel}
|
||||
|
||||
\begin{document}
|
||||
|
||||
% TODO: Add the title "Recipes" with yourself as the author.
|
||||
% TODO: Make the title appear before the text.
|
||||
% TODO: Add a table of contents below the title.
|
||||
% TODO: Replace all "\\" by real paragraphs.
|
||||
% TODO: Declare headlines using the appropriate commands.
|
||||
|
||||
1. Beverages
|
||||
|
||||
1.1 Pink Lemonade
|
||||
We all know and love it in summer: a cold lemonade. The pink variant of our favorite summer drink is traditionally achieved by adding food coloring to the lemonade. However, we changed things up a little and decided to go for a variant with berries instead of food coloring, which also makes the drink less sour.
|
||||
|
||||
1.1.1 Ingredients
|
||||
For making the lemonade we need 400\,g of berries. You can use either frozen or fresh ones. You can, of course, adjust the choice of berries to your likings: raspberries, blueberries, blackberries, or a mixture work excellently for making the lemonade. \\
|
||||
To make the drink sweeter we use 50\,ml of maple syrup. Needless to say, you can also use less, if you want your lemonade to be more sour. By the way, other sweeteners, such as agave syrup, or coconut sugar also work fine. \\
|
||||
Additionally, we need the juice of four freshly-squeezed lemons, one litre worth of cold water and 400\,g of ice cubes to keep the drink cold.
|
||||
|
||||
1.1.2 Instructions
|
||||
Put the berries along with the maple syrup into a large bowl and cook them at medium-high heat for around three to four minutes. When the berries start to soften, reduce the heat a little. Now mash the berries with the end of a wooden spoon until there are almost no big chunks anymore. The less chunks the better! \\
|
||||
Place a sieve over the container that you want to store the lemonade in. Put the berries into the sieve. With the end of the wooden spoon, try to press out as much liquid of the berry mixture as possible. Let the juice sit until it is completely cold. \\
|
||||
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!
|
||||
|
||||
1.2 Hot Chocolate
|
||||
Coming soon!
|
||||
|
||||
2. Breakfast
|
||||
|
||||
2.1 Buckwheat Porridge
|
||||
Coming soon!
|
||||
|
||||
\end{document}
|
||||
97
exercises-new/main-final.tex
Normal file
97
exercises-new/main-final.tex
Normal file
@ -0,0 +1,97 @@
|
||||
\input{setup.tex} % Setup
|
||||
\input{praeamble.tex} % Preamble
|
||||
\input{commands.tex} % Custom commands
|
||||
|
||||
% Title section.
|
||||
% TODO: Add yourself as an author.
|
||||
\title{Fachschaft \acro{WIAI} \LaTeX{} Workshop\\Exercises}
|
||||
\author{}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
\todo{First add yourself as an author, then add the title to the first page.}
|
||||
|
||||
\selectlanguage{english}
|
||||
\frenchspacing
|
||||
|
||||
% Custom headline prefix
|
||||
\renewcommand{\thesection}{E\arabic{section}}
|
||||
\renewcommand{\thesubsection}{\arabic{subsection}}
|
||||
|
||||
% Title page
|
||||
\input{titlepage-exercises.tex}
|
||||
% or simply
|
||||
% \maketitle
|
||||
\thispagestyle{empty}
|
||||
\newpage
|
||||
\setcounter{page}{1} % Don't count title page.
|
||||
\setcounter{tocdepth}{2}
|
||||
\tableofcontents
|
||||
\newpage
|
||||
|
||||
\input{first-steps-with-latex.tex}
|
||||
|
||||
% Align exercise numbers with chapters
|
||||
\setcounter{section}{2}
|
||||
|
||||
\input{exercises/basic-document-structure/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/basic-document-structure/document-structure.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/project-structure/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/project-structure/tasks.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/special-characters/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/special-characters/special-characters.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/text-markup/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/text-markup/markup.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/lists/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/lists/lists.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/maths/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/maths/math-formulas.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/graphics/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/graphics/graphics.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/tables/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/tables/tables.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/footnotes/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/footnotes/footnotes.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/references/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/references/references.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/literature/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/literature/literature.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/source-code-listings/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/source-code-listings/source-code-listings.raw}
|
||||
|
||||
\end{document}
|
||||
52
exercises-new/praeamble.tex
Normal file
52
exercises-new/praeamble.tex
Normal file
@ -0,0 +1,52 @@
|
||||
\documentclass[a4paper,english]{report}
|
||||
|
||||
% Language and font encoding
|
||||
% \usepackage[utf8]{inputenc}
|
||||
% \usepackage[T1]{fontenc}
|
||||
% \usepackage[english,ngerman]{babel}
|
||||
|
||||
% Special characters
|
||||
% \usepackage{eurosym, tipa, textcomp, textgreek, upgreek}
|
||||
|
||||
% Mathematical symbols
|
||||
% \usepackage{amssymb, amsfonts, amsmath, dsfont}
|
||||
|
||||
% References and URLs
|
||||
% \usepackage[hidelinks]{hyperref}
|
||||
% \usepackage{cleveref}
|
||||
|
||||
% Images
|
||||
% \usepackage{graphicx}
|
||||
% \usepackage{float}
|
||||
% \graphicspath{graphics/}
|
||||
|
||||
% Text color
|
||||
% \usepackage[usenames,dvipsnames]{xcolor}
|
||||
|
||||
% Multiple captions in one figure
|
||||
% \usepackage{subcaption}
|
||||
|
||||
% Compact lists
|
||||
% \usepackage{paralist}
|
||||
|
||||
% Tables
|
||||
% \usepackage{longtable, array, tabularx, booktabs, colortbl}
|
||||
|
||||
% PDF imports
|
||||
% \usepackage{pdfpages}
|
||||
|
||||
% ToDos
|
||||
% \usepackage{todonotes}
|
||||
% \usepackage{changes}
|
||||
|
||||
% Source code listings
|
||||
% \usepackage{listings}
|
||||
|
||||
% Quotes (\enquote)
|
||||
% \usepackage[autostyle,autopunct=false]{csquotes}
|
||||
|
||||
% Literature
|
||||
% \usepackage{natbib}
|
||||
|
||||
% Line wraps in monospace font
|
||||
% \usepackage[htt]{hyphenat}
|
||||
72
exercises-new/topics.md
Normal file
72
exercises-new/topics.md
Normal file
@ -0,0 +1,72 @@
|
||||
# Topics
|
||||
|
||||
## 00 – Setup
|
||||
|
||||
+ [ ] compiler installation (options, updates)
|
||||
+ [ ] editor installation (options, setup)
|
||||
+ [ ] compilation (based on a simple startup file)
|
||||
+ [ ] package installation
|
||||
|
||||
## 01 – Introduction
|
||||
|
||||
+ [ ] Knuth/Lamport
|
||||
+ [ ] motivation
|
||||
+ [ ] objections to LaTeX
|
||||
+ [ ] WYSIWIG/WYSIWYM
|
||||
+ [ ] editor/compiler tasks
|
||||
|
||||
## 02 – Simple document
|
||||
|
||||
+ [ ] commands (parameters, backslash)
|
||||
+ [ ] document class
|
||||
+ [ ] input and font encoding
|
||||
+ [ ] language settings
|
||||
+ [ ] document environment
|
||||
+ [ ] error handling
|
||||
+ [ ] comments (with shortcuts)
|
||||
|
||||
## 03 – Text layout
|
||||
|
||||
+ [ ] continuous text
|
||||
+ [ ] paragraphs (empty lines)
|
||||
+ [ ] headlines
|
||||
+ [ ] title page
|
||||
+ [ ] table of contents
|
||||
|
||||
## 04 – Text markup
|
||||
|
||||
+ [ ] reserved characters
|
||||
+ [ ] spaces
|
||||
+ [ ] hyphens
|
||||
+ [ ] quotes
|
||||
+ [ ] emphases
|
||||
+ [ ] URLs
|
||||
+ [ ] lists
|
||||
+ [ ] footnotes
|
||||
|
||||
## 05 – Maths
|
||||
|
||||
## 06 – Figures
|
||||
|
||||
+ [ ] images
|
||||
+ [ ] tables
|
||||
+ [ ] listings
|
||||
+ [ ] references
|
||||
|
||||
## 07 – Complex projects
|
||||
|
||||
+ [ ] main file
|
||||
+ [ ] subfiles
|
||||
+ [ ] file paths
|
||||
+ [ ] root document
|
||||
|
||||
## 08 – Bibliography
|
||||
|
||||
+ [ ] manual entry search
|
||||
+ [ ] Zotero way
|
||||
+ [ ] .bib file
|
||||
+ [ ] bibliography style
|
||||
+ [ ] bibliography
|
||||
+ [ ] citing
|
||||
+ [ ] maybe biber
|
||||
|
||||
@ -1,38 +1,11 @@
|
||||
% 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!}
|
||||
% \documentclass{article}
|
||||
% \usepackage[utf8]{inputenc}
|
||||
% \usepackage[T1]{fontenc}
|
||||
% \usepackage[english]{babel}
|
||||
% \usepackage[hidelinks]{hyperref}
|
||||
|
||||
\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
|
||||
% \begin{document}
|
||||
% \tableofcontents
|
||||
|
||||
\section{Beverages}
|
||||
|
||||
@ -54,16 +27,15 @@ 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!
|
||||
|
||||
% short title for the table of contents via optional parameter
|
||||
\subsection[Chocoho!]{Hot Chocolate}
|
||||
\subsection{Hot Chocolate}
|
||||
Coming soon!
|
||||
|
||||
% asterisk (*) hides the section title in the table of contents
|
||||
\section*{Breakfast}
|
||||
|
||||
\section{Breakfast}
|
||||
|
||||
\subsubsection{Buckwheat Overnight Oats}
|
||||
Coming soon!
|
||||
|
||||
\end{document}
|
||||
% \end{document}
|
||||
|
||||
@ -11,18 +11,8 @@
|
||||
\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.
|
||||
Also,
|
||||
include
|
||||
a table of contents for your document.
|
||||
\item Afterwards, comment out the preamble, the document environment, and the table of contents.
|
||||
\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}
|
||||
@ -1,4 +1,5 @@
|
||||
Java is an object-oriented programming language that appeared in 1995.
|
||||
It still counts as one of the most dominant programming languages.\footnote{As of 2025, see \url{https://github.blog/news-insights/octoverse/octoverse-a-new-developer-joins-github-every-second-as-ai-leads-typescript-to-1/} (last accessed: 17/11/2025)}
|
||||
In order to write Java programs, one needs to install the so-called \emph{Java Development Kit (JDK)}.
|
||||
The most recent long-term support version of the programming language is Java SE 21 \footnote{released in September 2023}.
|
||||
In order to write Java programs, one needs to install the so-called \emph{Java Development Kit
|
||||
(JDK)}\footnote{\url{https://www.oracle.com/java/technologies/javase-downloads.html}}.
|
||||
Java programs can be written independently from the operating system that one uses.
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
% !TeX root = ../../main-exercises.tex
|
||||
|
||||
Java is an object-oriented programming language that appeared in 1995.
|
||||
It still counts as one of the most dominant programming languages (as of 2025).
|
||||
In order to write Java programs, one needs to install the so-called \emph{Java Development Kit (JDK)}.
|
||||
Java programs can be written independently from the operating system that one uses.
|
||||
Java is an object-oriented programming language that appeared in 1995. The most recent long-term support version of the programming language is Java SE 21 (released in September 2023). In order to write Java programs, one needs to install the so-called \emph{Java Development Kit (JDK)}. Java programs can be written independently from the operating system that one uses.
|
||||
@ -2,5 +2,5 @@
|
||||
|
||||
\subsection{Inserting footnotes}
|
||||
|
||||
Make the text \enquote{as of 2025} of the file \file{exercises/footnotes/footnotes.tex} appear as a footnote instead of in parentheses.
|
||||
Additionally, reference the corresponding blog post in the footnote: \\ \texttt{https://github.blog/news-insights/octoverse/octoverse-a-new-developer-joins-github-every-second-as-ai-leads-typescript-to-1/}
|
||||
Make the text \enquote{released in September 2023} of the file \file{exercises/footnotes/footnotes.tex} appear as a footnote instead of in parentheses.
|
||||
Additionally, insert a clickable URL to the Java Development Kit as footnote: \\ \texttt{https://www.oracle.com/java/technologies/javase-downloads.html}
|
||||
|
||||
@ -21,27 +21,4 @@ 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}
|
||||
@ -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
|
||||
\noindent Instructions: Boil and shred the berries, add maple syrup, squeeze the lemons and add their juice, add the remaining ingredients, scramble thoroughly
|
||||
@ -5,11 +5,3 @@ 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}
|
||||
@ -1,12 +1,5 @@
|
||||
% Preamble adjustments
|
||||
|
||||
% Literature
|
||||
\usepackage[style=numeric, citestyle=alphabetic, 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}.
|
||||
An introductory \LaTeX{} course can be found in \enquote{\LaTeX{} in 24 Hours} \cite{datta2017}.
|
||||
There is a plethora of further handbooks \cite*[e.\,g.,][]{goossensmittelbach2010}.
|
||||
|
||||
\printbibliography
|
||||
\bibliographystyle{plain}
|
||||
\bibliography{exercises/literature/literature.done.bib}
|
||||
@ -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{} file.
|
||||
\item Add the Bib\TeX{} entries to the newly created Bib\TeX{} files.
|
||||
\item Assign unique and meaningful Bib\TeX{} keys.
|
||||
\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.
|
||||
\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.
|
||||
\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.
|
||||
@ -1,14 +1,13 @@
|
||||
C\# is an object-oriented programming language that was developed by Microsoft in 2011.
|
||||
\Cref{fig:csharp} displays the logo of the programming language.
|
||||
C\# is an object-oriented programming language that was developed by Microsoft in 2011. In \cref{fig:csharp} we can see the logo of the programming language.
|
||||
|
||||
\begin{figure}[H]
|
||||
\label{fig:csharp}
|
||||
\centering
|
||||
\includegraphics[width=2cm]{exercises/references/csharp.png}
|
||||
\caption{The logo of C\#}
|
||||
\label{fig:csharp}
|
||||
\end{figure}
|
||||
|
||||
Listing \ref{lst:csharphelloworld} shows a program that prints the text \enquote{Hello LaTeX friends!} to the console. Like Java, C\# makes use of classes and main methods to build executable applications.
|
||||
\cref{lst:csharphelloworld} shows a program that prints the text \enquote{Hello LaTeX friends!} to the console. Like Java, C\# makes use of classes and main methods to build executable applications.
|
||||
|
||||
\lstset{language=csharp}
|
||||
\lstinputlisting[label=lst:csharphelloworld, caption=Hello World in C\#]{exercises/references/HelloLateXFriends.cs}
|
||||
@ -1,6 +1,6 @@
|
||||
% !TeX root = ../../main-exercises.tex
|
||||
|
||||
C\# is an object-oriented programming language that was developed by Microsoft in 2011. The figure displays the logo of the programming language.
|
||||
C\# is an object-oriented programming language that was developed by Microsoft in 2011. In the figure we can see the logo of the programming language.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
In file \file{exercises/references/references.tex}, replace \enquote{in the
|
||||
figure} and \enquote{the following source code listing} with suited references.
|
||||
Use the command \code{latex}{\textbackslash cref}. Do not forget to first
|
||||
introduce labels and captions for the elements that you want to reference.
|
||||
introduce labels for the elements that you want to reference.
|
||||
Make sure to use suitable prefixes before the labels.
|
||||
|
||||
For source code listings, adding labels and captions is a bit different.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
\blockquote[Source and more information: \url{https://en.wikipedia.org/wiki/Recursion}]{
|
||||
\emph{Recursion} (adjective: \emph{recursive}) occurs when a thing is defined in terms of itself or of its type.
|
||||
\emph{Recursion} is used in a variety of disciplines ranging from linguistics to logic.
|
||||
The most common application of \emph{recursion} is in mathematics and computer science, where a function being defined is applied within its own definition.
|
||||
}
|
||||
``\emph{Recursion} (adjective: \emph{recursive}) occurs when a thing is defined in terms of itself or of its type.
|
||||
\emph{Recursion} is used in a variety of disciplines ranging from linguistics to logic.
|
||||
The most common application of \emph{recursion} is in mathematics and computer science, where a function being defined is applied within its own definition.''
|
||||
|
||||
Source and more information: \url{https://en.wikipedia.org/wiki/Recursion}
|
||||
@ -4,7 +4,6 @@
|
||||
\item In \file{exercies/text-markup/markup.tex}, emphasize the words
|
||||
``recursion'' and ``recursive.''
|
||||
\item Make the \textsc{url} clickable.
|
||||
\item Find a proper way to display the whole \textbf{paragraph as a quote}. Have a look at the \mono{csquotes} package.
|
||||
\item Of course, you can also experiment with the other commands that you learned for text markup. However, you might want to remove them afterwards to keep your document nice and tidy.
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\chapter*{First steps with \LaTeX}
|
||||
\addcontentsline{toc}{section}{First steps with \LaTeX}
|
||||
|
||||
This document\footnote{Find the latest version of this document on Gitea: \url{https://git.stuve-bamberg.de/latex/latex-skript/releases}} contains exercises to practically apply learnings from the Fachschaft \acro{WIAI}'s \LaTeX{} workshop.
|
||||
This document\footnote{Find the latest version of this document on Github: \url{https://github.com/fs-wiai/latex-script/releases}} contains exercises to practically apply learnings from the Fachschaft \acro{WIAI}'s \LaTeX{} workshop.
|
||||
The following instructions will equip you with the programs necessary to create documents with \LaTeX{}---they are explained in the workshop and the main script.
|
||||
Please, make sure to install the \emph{compiler first} and the \emph{editor afterwards}\textit{.}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
\begin{tabular}{@{}lp{9cm}}
|
||||
& \subsubsection*{Imprint} \\
|
||||
& The \LaTeX{} Script (version 1.4.3 from November 2025) has been assembled by the Student Council of the Information Systems and Applied Computer Sciences Faculty (Fachschaft \acro{WIAI}) at the University of Bamberg. \\
|
||||
& The \LaTeX{} Script (version 1.4.1 from November 23rd, 2024) has been assembled by the Student Council of the Information Systems and Applied Computer Sciences Faculty (Fachschaft \acro{WIAI}) at the University of Bamberg. \\
|
||||
& It is licensed under Creative Commons \enquote{Attribution-ShareAlike 4.0 International} (CC BY-SA 4.0): \\
|
||||
\href{http://creativecommons.org/licenses/by-sa/4.0/}{\includegraphics[height=.5cm]{graphics/cc-by-sa}} & \url{http://creativecommons.org/licenses/by-sa/4.0/} \\ \\
|
||||
& Upon request, allowances exceeding the limitations of this license may be granted.
|
||||
|
||||
1
install-verification/.gitignore
vendored
1
install-verification/.gitignore
vendored
@ -1 +0,0 @@
|
||||
*.pdf
|
||||
@ -1,67 +0,0 @@
|
||||
\documentclass[a4paper,english]{report}
|
||||
|
||||
\IfFileExists{listings-mode.tex}{
|
||||
\input{listings-mode.tex}
|
||||
}{
|
||||
\newcommand\listingsmode{default}
|
||||
}
|
||||
|
||||
% Language and font encoding
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[english,ngerman]{babel}
|
||||
|
||||
% Special characters
|
||||
\usepackage{eurosym, tipa, textcomp, textgreek, upgreek}
|
||||
|
||||
% Mathematical symbols
|
||||
\usepackage{amssymb, amsfonts, amsmath, dsfont}
|
||||
|
||||
% References and URLs
|
||||
\usepackage[hidelinks]{hyperref}
|
||||
\usepackage{cleveref}
|
||||
|
||||
% Images
|
||||
\usepackage{graphicx}
|
||||
\usepackage{float}
|
||||
|
||||
% Text color
|
||||
\usepackage[usenames,dvipsnames]{xcolor}
|
||||
|
||||
% Multiple captions in one figure
|
||||
\usepackage{subcaption}
|
||||
|
||||
% Compact lists
|
||||
\usepackage{paralist}
|
||||
|
||||
% Tables
|
||||
\usepackage{longtable, array, tabularx, booktabs, colortbl}
|
||||
|
||||
% PDF imports
|
||||
\usepackage{pdfpages}
|
||||
|
||||
% ToDos
|
||||
\usepackage{todonotes}
|
||||
\usepackage{changes}
|
||||
|
||||
% Source code listings
|
||||
\usepackage{listings}
|
||||
\ifthenelse{\equal{\listingsmode}{minted}}{\usepackage{minted}}{}
|
||||
|
||||
% Quotes (\enquote)
|
||||
\usepackage[autostyle,autopunct=false]{csquotes}
|
||||
|
||||
% Literature
|
||||
\usepackage{natbib}
|
||||
|
||||
% Line wraps in monospace font
|
||||
\usepackage[htt]{hyphenat}
|
||||
|
||||
% Tracking changes
|
||||
\usepackage{changes}
|
||||
|
||||
\begin{document}
|
||||
|
||||
It works.
|
||||
|
||||
\end{document}
|
||||
@ -27,16 +27,16 @@
|
||||
\input{first-steps-with-latex.tex}
|
||||
|
||||
% Align exercise numbers with chapters
|
||||
\setcounter{section}{1}
|
||||
\setcounter{section}{2}
|
||||
|
||||
\input{exercises/basic-document-structure/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\codeblock{latex}{exercises/basic-document-structure/document-structure.raw.tex}
|
||||
\input{exercises/basic-document-structure/document-structure.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/project-structure/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\codeblock{latex}{exercises/project-structure/main.raw.tex}
|
||||
\input{exercises/project-structure/tasks.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/special-characters/task}
|
||||
@ -78,14 +78,14 @@
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/references/references.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/source-code-listings/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/source-code-listings/source-code-listings.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/literature/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/literature/literature.raw}
|
||||
|
||||
\newpage
|
||||
\input{exercises/source-code-listings/task}
|
||||
\subsubsection*{Modify the content below}
|
||||
\input{exercises/source-code-listings/source-code-listings.raw}
|
||||
|
||||
\end{document}
|
||||
|
||||
@ -31,8 +31,8 @@
|
||||
\input{content/graphics.tex}
|
||||
\input{content/tables.tex}
|
||||
\input{content/footnotes.tex}
|
||||
\input{content/source-code-listings.tex}
|
||||
\input{content/literature.tex}
|
||||
\input{content/source-code-listings.tex}
|
||||
\input{content/prospects.tex}
|
||||
|
||||
\end{document}
|
||||
|
||||
@ -68,12 +68,12 @@
|
||||
\input{exercises/references/task}
|
||||
\input{exercises/references/references.done}
|
||||
|
||||
\newpage
|
||||
\input{exercises/source-code-listings/task}
|
||||
\input{exercises/source-code-listings/source-code-listings.done}
|
||||
|
||||
\newpage
|
||||
\input{exercises/literature/task}
|
||||
\input{exercises/literature/literature.done}
|
||||
|
||||
\newpage
|
||||
\input{exercises/source-code-listings/task}
|
||||
\input{exercises/source-code-listings/source-code-listings.done}
|
||||
|
||||
\end{document}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
% !TeX root = ./main-exercises.tex
|
||||
\documentclass[a4paper,english]{report}
|
||||
|
||||
% Language and font encoding
|
||||
@ -6,9 +5,6 @@
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[english,ngerman]{babel}
|
||||
|
||||
% Headers and footers
|
||||
\usepackage{fancyhdr}
|
||||
|
||||
% Special characters
|
||||
\usepackage{eurosym, tipa, textcomp, textgreek, upgreek}
|
||||
|
||||
@ -33,9 +29,6 @@
|
||||
% Compact lists
|
||||
\usepackage{paralist}
|
||||
|
||||
% Lists with different bullet points
|
||||
\usepackage{enumitem}
|
||||
|
||||
% Tables
|
||||
\usepackage{longtable, array, tabularx, booktabs, colortbl}
|
||||
|
||||
@ -54,7 +47,7 @@
|
||||
\usepackage[autostyle,autopunct=false]{csquotes}
|
||||
|
||||
% Literature
|
||||
\usepackage[style=numeric, citestyle=ieee, backend=biber]{biblatex}
|
||||
\usepackage{natbib}
|
||||
|
||||
% Line wraps in monospace font
|
||||
\usepackage[htt]{hyphenat}
|
||||
|
||||
@ -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-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 and changes the LaTeX compiler to `lualatex`.
|
||||
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.
|
||||
|
||||
```json
|
||||
"latex-workshop.latex.recipes": [
|
||||
@ -25,68 +25,37 @@ LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "lualatex -> biber -> lualatex × 2",
|
||||
"name": "pdflatex -> bibtex -> pdflatex × 2",
|
||||
"tools": [
|
||||
"lualatex",
|
||||
"biber",
|
||||
"lualatex",
|
||||
"lualatex"
|
||||
"pdflatex",
|
||||
"bibtex",
|
||||
"pdflatex",
|
||||
"pdflatex"
|
||||
]
|
||||
},
|
||||
// EXISTING ENTRIES GO HERE
|
||||
]
|
||||
```
|
||||
|
||||
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": {}
|
||||
},
|
||||
{
|
||||
"name": "lualatex",
|
||||
"command": "lualatex",
|
||||
"args": [
|
||||
"-synctex=1",
|
||||
"-interaction=nonstopmode",
|
||||
"-file-line-error",
|
||||
"%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`.
|
||||
4. Save and close the settings file.
|
||||
5. For later convenience, set the “Recipe: Default” option to `lastUsed`.
|
||||
|
||||
## Compiling
|
||||
|
||||
1. Open the unzipped project archive (available in the [Releases section](https://git.stuve-bamberg.de/latex/latex-skript/releases)).
|
||||
1. Open the unzipped project archive (available in the [Releases section](https://github.com/fs-wiai/latex-script/releases)).
|
||||
2. To test your installation, open `main-exercises.tex`.
|
||||
3. In the left side bar, click on the TeX symbol, open the “Build LaTeX project entry” (clicking on the little arrow on the left) and choose the “pdflatex × 2” recipe. For the duration of the compilation, you should see a spinning icon in the bottom row next to the Git icons. Any errors will appear in the problems tab.
|
||||
4. To open the resulting document, click on “View LaTeX PDF” in the TeX section below the recipes. If this succeeded, you are ready to work on the exercises. The document will compile again once you save it.
|
||||
|
||||
## Some useful notes
|
||||
|
||||
+ LaTeX Workshop has a [process of deciding which file to compile](https://github.com/James-Yu/LaTeX-Workshop/wiki/Compile#latex-workshoplatexbuildforceRecipeUsage). Unfortunately, our project archive tends to confuse the plugin, resulting in compiler errors. You can **specify the document root** by adding a magic TeX root comment. We provided these comments for you in all exercise files:
|
||||
+ LaTeX Workshop will always try to compile the file your cursor is currently in. If you are working in sub-files, then this will result in errors. You can **specify the document root** by adding a magic TeX root comment. Press `Ctrl + Shift + P` and select “Insert !TeX magic root command.” Then simply select your root document and compile again. We provided these comments for you in all exercise files:
|
||||
|
||||
```
|
||||
```tex
|
||||
% !TeX root = ../../main-exercises.tex
|
||||
```
|
||||
|
||||
+ However, by default, **LaTeX Workshop ignores them** because they may pose a security threat if you cannot trust the project you are compiling. See [this issue](https://github.com/James-Yu/LaTeX-Workshop/issues/3027) for more details. To enable them anyway, go to your settings and deactivate the “Force Recipe Usage” checkbox.
|
||||
|
||||
The **LaTeX Workshop** plugin offers a couple of other handy features:
|
||||
This plugin offers a couple of other handy features:
|
||||
|
||||
+ Sometimes, it is helpful to kill all compiler processes and **clean up the auxiliary files** afterwards.
|
||||
+ If you need to **find a certain section** in the PDF or in the source document, you can use the “Navigate, select and edit” menu.
|
||||
Loading…
x
Reference in New Issue
Block a user