From 5ead271cdc101a7ba293cbd15c81634ec96b0bc5 Mon Sep 17 00:00:00 2001 From: "evelyn.fradtschuk" Date: Mon, 3 Oct 2022 22:08:19 +0200 Subject: [PATCH] drop slides 5 to 8 --- slides/intro.en.md | 72 ---------------------------------------------- 1 file changed, 72 deletions(-) diff --git a/slides/intro.en.md b/slides/intro.en.md index edc789a..653fd25 100644 --- a/slides/intro.en.md +++ b/slides/intro.en.md @@ -65,75 +65,3 @@ Compile the script for the first time
Windows users: In order to enable file endings, click the view tab in the file explorer, and select *file name extensions*. This helps differentiating the different ``main`` files.
- -@slide(layout=content-and-preview) -@title -Listings - -@content -We have multiple examples of LaTeX source code in the script. As a default setting, we use the package **listings** for displaying them. - -* However, the package **minted** generates more appealing listings. -* Minted requires additional configuration, like the installation of the programming language **Python 3** and the package **Pygments** -* The following slides explain how to use `minted` for this LaTeX project - -@preview -![](svg/chapter-10/minted-overview-english-crop.svg){ .thin-padding} - -@slide(layout=content-only) -@title -Installation of Python 3 - -@content -* Check if Python is already installed on your operating system using a command prompt: -``` {.lang-sh .hljs} -python --version -``` -* If installed, the output should look similar to this (the exact version may deviate): -``` {.lang-sh .hljs} -Python 3.10.6 -``` -* If not installed, follow the instructions for your operating sytem on the **[website](https://www.python.org/)**. -* Make sure to enable the option to add Python to your PATH, if possible. -* Run the above-mentioned command to ensure the installation was successful. - - -@slide(layout=content-only) -@title -`Pygments` and compiler command settings - -@content -* Install the **Pygments** by executing the following command in a command prompt: -pip install Pygments - -* In TeXstudio, navigate to Options → Configure TeXstudio → Commands -* Next to the PdfLaTeX label, add the ``shell-escape`` flag to the compiler command: - -pdflatex -synctex=1 -interaction=nonstopmode **\-\-shell-escape** %.tex - -
-Passing the flag ``--shell-escape`` to your compiler can be a potential security risk. **Only do it for documents you trust!** -
- -@slide(layout=content-and-preview) - -@title -Change the listings mode - -@content -In order to compile the script using `minted`, the listings mode has to be changed. - -* Create a new file in the root directory of the project archive, named `listings-mode.tex` -* Insert the following command into the newly created file - -``` {.lang-tex .tex .hljs} -\newcommand\listingsmode{minted} -``` -* Compile `main.tex` again by pressing - -@preview -
-![](images/code-listing-default.png) -![](images/code-listing-minted.png) -
-
``listings`` (top) vs. ``minted`` (bottom)