Compare commits

...

3 Commits

4 changed files with 32 additions and 12 deletions

View File

@ -12,6 +12,7 @@ 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/**/*

View File

@ -5,6 +5,7 @@
- [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)
@ -36,18 +37,22 @@ The compiler complains that a package, particularly the corresponding .sty docum
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
pdflatex main.tex
lualatex main.tex
biber main
pdflatex main.tex
pdflatex main.tex
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, LuaTeX, … ([numerous other tools available](https://www.tug.org/interest.html#free)).
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.

View File

@ -13,7 +13,7 @@ LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a
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.
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`.
```json
"latex-workshop.latex.recipes": [
@ -25,12 +25,12 @@ LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a
]
},
{
"name": "pdflatex -> biber -> pdflatex × 2",
"name": "lualatex -> biber -> lualatex × 2",
"tools": [
"pdflatex",
"lualatex",
"biber",
"pdflatex",
"pdflatex"
"lualatex",
"lualatex"
]
},
// EXISTING ENTRIES GO HERE
@ -51,6 +51,17 @@ LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a
],
"env": {}
},
{
"name": "lualatex",
"command": "lualatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
],
"env": {}
},
// EXISTING ENTRIES GO HERE
]
```
@ -67,13 +78,15 @@ LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a
## Some useful notes
+ 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:
+ 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:
```tex
```
% !TeX root = ../../main-exercises.tex
```
This plugin offers a couple of other handy features:
+ 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:
+ 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.

View File

@ -1,3 +1,4 @@
% !TeX root = ./main-exercises.tex
\documentclass[a4paper,english]{report}
% Language and font encoding