From 4726199b7fc9b1833723746dab7a7d73672487ee Mon Sep 17 00:00:00 2001 From: voidcaller <a.soeyler@fu-berlin.de> Date: Tue, 3 May 2022 17:28:39 +0200 Subject: [PATCH] updated scrartcl.tex, minor changes overall --- exercise00.tex => 00.tex | 2 +- scrartcl.tex | 261 +++++++++++++++++++++++++++------------ 2 files changed, 183 insertions(+), 80 deletions(-) rename exercise00.tex => 00.tex (87%) diff --git a/exercise00.tex b/00.tex similarity index 87% rename from exercise00.tex rename to 00.tex index 6f56303..6789f27 100644 --- a/exercise00.tex +++ b/00.tex @@ -11,7 +11,7 @@ \begin{enumerate} \item does the compilation work? - \item have you changed the general information in scrartl.tex? + \item have you changed the general information in scrartcl.tex? \item ideas for changes? open a merge request or issue! \end{enumerate} diff --git a/scrartcl.tex b/scrartcl.tex index 5e222d5..9ba2de1 100644 --- a/scrartcl.tex +++ b/scrartcl.tex @@ -1,137 +1,240 @@ -\documentclass{scrartcl} +\documentclass[numbers=endperiod]{scrartcl} + +% Set \germantrue if the document is in German language +\newif\ifgerman +%\germanfalse +\germantrue +\ifgerman + \def\babellanguage{ngerman} + % Most fonts do not advertise a specialised + % Latin/English (latn.ENG) or + % Latin/German + % but only Latin (latn) script. + % Thus, when loading fonts, ask for the generic version. + \def\babelfontlanguage{Default} + \def\babelscript{Latin} + + \def\biblatexsorting{de_DE} + \def\namecorollary{Korollar} + \def\namedefinition{Definition} + \def\nameexercise{Aufgabe} + \def\namelemma{Lemma} + \def\nameproposition{Aussage} + \def\nameremark{Anmerkung} + \def\nametheorem{Satz} +\else + \def\babellanguage{english} + \def\babelfontlanguage{Default} + \def\babelscript{Latin} + \def\biblatexsorting{en_US} + \def\namecorollary{Corollary} + \def\namedefinition{Definition} + \def\nameexercise{Exercise} + \def\namelemma{Lemma} + \def\nameproposition{Proposition} + \def\nameremark{Remark} + \def\nametheorem{Theorem} +\fi -% these packages are used for math symbols \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} - -% fancy floor and ceil -\newcommand{\floor}[1]{\lfloor #1 \rfloor} -\providecommand{\ceil}[1]{\left \lceil #1 \right \rceil } - - -\usepackage{fontspec} -\defaultfontfeatures{Mapping=TeX} - -% micro typography, removes many problems +% You can declare additional operators, eg. +%\DeclareMathOperator{\rem}{rem} + +% tikz stuff +% if you want to draw pretty things +\usepackage{tikz} +\usepackage{pgfplots} +\usepackage{tikz-3dplot} + +\usetikzlibrary{calc, arrows.meta, positioning,through} +\usetikzlibrary{angles, quotes,backgrounds,shapes,arrows,positioning,calc,snakes,fit} +\usepgflibrary{decorations.markings} + +\tdplotsetmaincoords{60}{115} +\pgfplotsset{compat=newest} + + +% allows to create extended matrizes by adding e.g. [c c | r] afterwards +\makeatletter +\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{% + \hskip -\arraycolsep + \let\@ifnextchar\new@ifnextchar + \array{#1}} +\makeatother + +\usepackage{iftex} +\ifPDFTeX + % Warning: Inputenc is only a hack to teach pdfTeX Unicode. Beware of dragons! + \usepackage[utf8]{inputenc} + \usepackage[T1]{fontenc} + \usepackage{lmodern} + \usepackage[\babellanguage]{babel} +\else + \usepackage{fontspec} + \usepackage{babel} + + \babelprovide[import, + language=\babelfontlanguage, + script=\babelscript, + main]{\babellanguage} + \usepackage{unicode-math} + % Load the Computer Modern Unicode OTF fonts from the system. Also see README.md + \babelfont{rm}% + % Use non-lining numerals for non-math text + [Numbers=OldStyle] + {CMU Serif} + \babelfont{sf}{CMU Sans Serif} + \babelfont{tt}{CMU Typewriter Text} + + % Make it look more like CM Math + % % https://tex.stackexchange.com/q/140754/90407 + \setmathfont{Latin Modern Math} + \setmathfont[range=\mathbb]{TeX Gyre Termes Math} + + % LM Math only provides the U+2216 code point for "set minus", however, + % unicode-math maps \setminus the "reverse solidus operator" U+29F5 which LMM + % doesn't provide, instead mapping \smallsetminus to U+2216. However, whether + % you want a "small" set minux or a "long" is a font decision (IMHO), so + % remap \setminus to the correct Unicode code point. + % https://tex.stackexchange.com/a/140343/90407 + % https://tex.stackexchange.com/a/161873/90407 + \ExplSyntaxOn + \AtBeginDocument + { + \__um_process_symbol_noparse:nnn {"02216}{\setminus}{\mathbin} + } + \ExplSyntaxOff +\fi + +% Protruding punctuation \usepackage{microtype} -% Internationalisation -\usepackage{polyglossia} -% NOTE: change here for other languages (e.g. english) -\setdefaultlanguage{german} -% \enquote for properly enclosed quotes -\usepackage{csquotes} +% \enquote{} for setting things in "quotes" +\usepackage{csquotes} -\usepackage[labelfont=bf]{caption} % captionof -%\begin{center} -% \includegraphics{...}% whatever ... -% \captionof{figure}{description}\label{fig:test} -%\end{center} +% Additional [H] specifier for floats that actually shouldn't be floats +% but still be considered figures +\usepackage{float} -\usepackage{xcolor} -% define your colors here -\definecolor{mygreen}{rgb}{0,0.6,0} -\definecolor{mygray}{rgb}{0.5,0.5,0.5} -\definecolor{mymauve}{rgb}{0.58,0,0.82} -\definecolor{mygreenblue}{rgb}{0.1,0.6,0.4} +% To create custom itemizations, eg. +% \begin{itemize}[label=\alph*)] +\usepackage{enumitem} -% sane defaults +% Typesetting code, setup for C by default +\usepackage{xcolor} \usepackage{listings} \lstdefinestyle{default}{% numbers=left, stepnumber=1, - numberstyle=\scriptsize, - numbersep=2pt, -% lineskip=1pt, % fixes some white stripes between lines - basicstyle=\ttfamily\footnotesize, + numberstyle=\tiny, + basicstyle=\ttfamily, backgroundcolor=\color{gray!8}, - commentstyle=\color{mygreenblue}, + commentstyle=\color{green!60!blue}\itshape, keywordstyle=\color{blue}, - stringstyle=\color{mymauve}, + stringstyle=\color{blue!30!red}, tabsize=4, keepspaces=true, } -\lstdefinestyle{defaultInline}{ - style=default, - basicstyle=\ttfamily, +\lstset{style=default, language=C} + +% Break URLs at hyphens +\PassOptionsToPackage{hyphens}{url} +% Make PDF links work with non-latin languages via Unicode +\usepackage[pdfusetitle,pdfencoding=auto]{hyperref} +\pdfstringdefDisableCommands{ + \def\@{} } -\lstset{style=defaultInline, language=C} - -% small URL style -\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} - -\usepackage{enumitem} - -% bits and bytes -\usepackage[binary-units=true]{siunitx} -% Bibliography with biber backend +% Typeset units with +% \SI{8}{\bit} or \si{\bit} +\usepackage[ + binary-units=true, + % Make \num{42} and $\num{42}$ behave differently. + detect-mode, + detect-family, + detect-inline-family=math, +]{siunitx} + +% Disable warning for biblatex < 3.14 +\makeatletter\def\blx@nowarnpolyglossia{}\makeatother \usepackage[ natbib=true, backend=biber, style=numeric, citestyle=numeric, sorting=nty, - sortlocale=de_DE, + sortlocale=\biblatexsorting, seconds=true, alldates=iso, ]{biblatex} +%\addbibresource{./bib.bib} -\addbibresource{scrartcl.bib} - -% \theauthor, etc. -\usepackage{titling} - -% More space -\usepackage[left=3.0cm,right=2.5cm,top=4cm,bottom=3cm]{geometry} - -% Headers and Footers +% Headers & Footers \usepackage[headsepline]{scrlayer-scrpage} \pagestyle{scrheadings} +% titling conflicts with \maketitle etc. from KOMA, but as long as we don't use +% that this is fine. +\usepackage{titling} \lohead*{\theauthor} \cohead*{\thetitle} \rohead*{\today} \cofoot*{\thepage} -% Data -\author{your name} -\title{course} +% define specific math symbols +\usepackage{mathtools} +\DeclarePairedDelimiter\ceil{\lceil}{\rceil} +\DeclarePairedDelimiter\floor{\lfloor}{\rfloor} \begin{document} +% TODO add your name here +\author{name} +\title{course} +% Add some neat environments for scripts and exercises + \theoremstyle{definition} -\newtheorem{definition}{Definition} +\newtheorem{definition}{\namedefinition} \theoremstyle{remark} -\newtheorem{remark}{Anmerkung} +\newtheorem{remark}{\nameremark} \theoremstyle{plain} -\newtheorem{proposition}{Aussage} -\newtheorem{theorem}{Satz} -\newtheorem{lemma}{Lemma} -\newtheorem{corollary}{Korollar} +\newtheorem{proposition}{\nameproposition} +\newtheorem{theorem}{\nametheorem} +\newtheorem{lemma}{\namelemma} +\newtheorem{corollary}{\namecorollary} \newtheoremstyle{exercise}% name of the style to be used {} % measure of space to leave above the theorem. E.g.: 3pt {} % measure of space to leave below the theorem. E.g.: 3pt - {} % name of font to use in the body of the theorem + {\upshape} % name of font to use in the body of the theorem {} % measure of space to indent {\bfseries}% name of head font {} % punctuation between head and body - { } % space after theorem head; " " = normal interword space + {\newline} % space after theorem head; " " = normal interword space {% -\thmname{#1} \thmnumber{#2}.\thmnote{ (#3)}% Manually specify head + \thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}% Manually specify head } \theoremstyle{exercise} -\newtheorem{exercise}{Exercise}[subsection] - - -% here you can include which files to compile -% this way you can either just produce one pdf per exercise or build the -% complete set by including every file. - -\include{exercise00} +\newtheorem{exercise}{\nameexercise}[section] + +% here you can add things as you wish. This allows to compile specific +% assignments or everything at once +\include{00} +%\include{01} +%\include{02} +%\include{03} +%\include{04} +%\include{05} +%\include{06} +%\include{07} +%\include{08} +%\include{09} +%\include{10} +%\include{11} +%\include{12} \end{document} -- GitLab