From d97cd0834eee377bb4a514b80856ad0708d068d7 Mon Sep 17 00:00:00 2001 From: Evelyn Fradtschuk Date: Mon, 25 Apr 2022 01:20:51 +0200 Subject: [PATCH] add slides for installation session --- slides.yml | 1 + slides/intro.de.md | 20 ++++++++ slides/intro.en.md | 114 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 135 insertions(+) create mode 100644 slides/intro.de.md create mode 100644 slides/intro.en.md diff --git a/slides.yml b/slides.yml index 4215767..b68790c 100644 --- a/slides.yml +++ b/slides.yml @@ -1,3 +1,4 @@ +- intro - chapter-00 - chapter-01 - chapter-02 diff --git a/slides/intro.de.md b/slides/intro.de.md new file mode 100644 index 0000000..4b38ef2 --- /dev/null +++ b/slides/intro.de.md @@ -0,0 +1,20 @@ +@slide(layout=chapter-slide) + +@title +Technik-Vorbereitung + +@content +TEST TEST + +@slide(layout=content-only) + +@title +Installing the compiler + +@content +Before starting out with LaTeX, a compiler has to be installed. + +The following list gives you exemplary compilers for different operating systems: +* Windows +* MacOS +* Ubuntu \ No newline at end of file diff --git a/slides/intro.en.md b/slides/intro.en.md new file mode 100644 index 0000000..e012bc9 --- /dev/null +++ b/slides/intro.en.md @@ -0,0 +1,114 @@ +@slide(layout=chapter-slide) + +@title +First steps with LATEX + +@content +In order to compile the script for this tutorial, a few steps have to be followed, which are explained in the next slides. + +@slide(layout=content-only) + +@title +Installing the compiler + +@content +* The compiler translates our LATEX code into a PDF +* Depending on your operating system, different compilers are available +* Windows: MikTEX +* macOS: MacTEX +* Linux distributions: TEXLive + * Debian-based distributions: run `sudo apt install texlive-full` + * other distributions: see the website + +
+Make sure to install the full version with all packages, if you can! +
+ +@slide(layout=content-only) + +@title +Installing the editor + +@content +* An editor can downloaded once the compiler has been installed +* For editing LaTeX documents, any text editor works fine, e.g., Notepad++, VSCode +* For beginners, TEXstudio is recommended due to its LaTex-specific features +* Download and install TEXstudio + +@slide(layout=content-only) +@title +Compile the script for the first time + +@content +* Download the project archive from the VC. +* Unzip the archive. +* Open the file `main.tex` in TEXstudio. It is located in the root directory of the archive. +* Compile `main.tex` by pressing +* A few new files will be generated by the compilation. +* **WINDOWS FILE ENDINGS** + +@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: +``` {.lang-sh .hljs} +Python 3.8.5 +``` +* 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-only) +@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 + \ No newline at end of file