Merge branch '2021-translate-script' of git.stuve-bamberg.de:latex/latex-skript into 2021-translate-script

This commit is contained in:
Knoch 2022-01-10 10:12:40 +01:00
commit cc88aff49b
7 changed files with 33 additions and 33 deletions

View File

@ -34,18 +34,6 @@
\rule{\widefigurewidth}{0.4pt}
}
% Listings mode
% =============
% The listings mode can be chosen by writing one of the following to the listings-mode.tex file before compilation:
% \newcommand\listingsmode{default} % to use lstlistings
% \newcommand\listingsmode{minted} % for a script with exercises only
% The following lines include that file or make \listingsmode default to 'default' so that any derivatives of this project will work even without the file.
\IfFileExists{listings-mode.tex}{
\input{listings-mode.tex}
}{
\newcommand\listingsmode{default}
}
% Shell command
% ==============
% Mono-spaced text without syntax highlighting.
@ -148,7 +136,7 @@
midrule, bottomrule, cref, setlength, maketitle,
tableofcontents, foreignlanguage, paragraph, subparagraph,
mint, mintinline, inputminted, usemintedstyle, definecolor,
citep, enquote%
citep, enquote, lstinputlisting%
},
postbreak=\mbox{{$\hookrightarrow$}\space},
emphstyle={\color{ForestGreen}\bfseries},

View File

@ -31,15 +31,19 @@ Any editor will do (notepad++, Atom, VS Code, etc.).
However, for beginners, we do recommend using a program that supports you with \LaTeX-specific features.
One of these programs is \TeX{}studio.\footnote{You find the latest version on \url{https://www.texstudio.org/}.}
\section*{Changing the compiler command}
\todo{Refactor after the code inclusion part is redone.}
To prevent errors during the compilation of our document, you have to change the compiler command.
In \TeX{}studio, click on the \emph{Options} button and then on \emph{Configure \TeX{}studio \textellipsis}\todo{Add the correct steps for Mac (these dont apply)}.
A new window will open up.
Navigate to the \emph{Commands} area, and, next to \sh{pdflatex}, add the flag \sh{-shell-escape}.
In other words: The command for \sh{pdflatex} should look like this:
\shell{pdflatex -synctex=1 -interaction=nonstopmode -shell-escape \%.tex}
%\section*{Changing the compiler command}
%\todo{Refactor after the code inclusion part is redone.}
%To prevent errors during the compilation of our document, you have to change
%the compiler command.
%In \TeX{}studio, click on the \emph{Options} button and then on
%\emph{Configure \TeX{}studio \textellipsis}\todo{Add the correct steps for Mac
%(these dont apply)}.
%A new window will open up.
%Navigate to the \emph{Commands} area, and, next to \sh{pdflatex}, add the flag
%\sh{-shell-escape}.
%In other words: The command for \sh{pdflatex} should look like this:
%
%\shell{pdflatex -synctex=1 -interaction=nonstopmode -shell-escape \%.tex}
\section*{Compiling for the first time}
Open up the file \file{main.tex} in the root directory of the project and compile it by pressing \faForward.

View File

@ -15,7 +15,7 @@ or macOS.\footnote{\url{https://docs.python-guide.org/starting/install3/osx/}}
After a successful installation, you should be able to execute the aforementioned command in a terminal, confirm by pressing Enter, and see approximately the following result:
\codeblock{bash}{listings/source-code-listings/python-version.txt}
\shell{python $--$version \\ Python 3.8.5}
\noindent If the version number is equal to the one stated here, or higher, then everything should be set up correctly.
Next, enter the command \sh{pip install Pygments}\footnote{On some operating systems, you might have to use the command \sh{pip3 install Pygments}} in the same terminal window to install the Pygments package for Python.

View File

@ -1,2 +0,0 @@
$ python --version
Python 3.8.5

View File

@ -1,4 +1,7 @@
\input{setup.tex} % Setup
\input{praeamble.tex} % Preamble
\input{commands.tex} % Custom commands
\title{Script for the Fachschaft \acro{WIAI} \LaTeX{} Workshop}
\author{Evelyn Fradtschuk \and Florian Knoch \and Christian Kremitzl \and Bernhard Luedtke}

View File

@ -38,6 +38,7 @@
% Source code listings
\usepackage{listings}
\ifthenelse{\equal{\listingsmode}{minted}}{\usepackage{minted}}{}
% Quotes (\enquote)
\usepackage[autostyle,autopunct=false]{csquotes}
@ -52,11 +53,3 @@
\usepackage{changes}
\definechangesauthor[color=blue, name={Christian}]{C}
\definechangesauthor[color=purple, name={Florian}]{F}
% Custom commands
\input{commands.tex}
% Optional: Minted for source code listings
\ifthenelse{\equal{\listingsmode}{minted}}{%
\usepackage{minted}
}{}

14
setup.tex Normal file
View File

@ -0,0 +1,14 @@
% Listings mode
% =============
% The listings mode can be chosen by writing one of the following to the
%listings-mode.tex file before compilation:
% \newcommand\listingsmode{default} % to use lstlistings
% \newcommand\listingsmode{minted} % to use minted
% The following lines include that file or make \listingsmode default to
% 'default' so that any derivatives of this project will work even without the
% file.
\IfFileExists{listings-mode.tex}{
\input{listings-mode.tex}
}{
\newcommand\listingsmode{default}
}