diff --git a/docs/vs-code-instructions.md b/docs/vs-code-instructions.md index c88d285..63361da 100644 --- a/docs/vs-code-instructions.md +++ b/docs/vs-code-instructions.md @@ -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. diff --git a/praeamble.tex b/praeamble.tex index 02eccf0..9cae390 100644 --- a/praeamble.tex +++ b/praeamble.tex @@ -1,3 +1,4 @@ +% !TeX root = ./main-exercises.tex \documentclass[a4paper,english]{report} % Language and font encoding