Für Vorlesungen, bitte die Webseite verwenden. https://flavigny.de/lecture
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

152 lines
3.4KB

  1. \ProvidesClass{lecture}
  2. \LoadClass[a4paper, titlepage]{article}
  3. \RequirePackage[utf8]{inputenc}
  4. \RequirePackage[T1]{fontenc}
  5. \RequirePackage{textcomp}
  6. \RequirePackage[german]{babel}
  7. \RequirePackage{amsmath, amssymb, amsthm}
  8. \RequirePackage{mdframed}
  9. \RequirePackage{fancyhdr}
  10. \RequirePackage{geometry}
  11. \RequirePackage{import}
  12. \RequirePackage{pdfpages}
  13. \RequirePackage{transparent}
  14. \RequirePackage{xcolor}
  15. \RequirePackage{array}
  16. \RequirePackage[shortlabels]{enumitem}
  17. \RequirePackage{tikz}
  18. \RequirePackage{pgfplots}
  19. \RequirePackage[nobottomtitles]{titlesec}
  20. \RequirePackage{listings}
  21. \RequirePackage{mathtools}
  22. \RequirePackage{forloop}
  23. \RequirePackage{totcount}
  24. \RequirePackage{calc}
  25. \RequirePackage{wasysym}
  26. \usetikzlibrary{quotes, angles}
  27. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
  28. \DeclareOption{uebung}{
  29. \makeatletter
  30. \lhead{\@title}
  31. \rhead{\@author}
  32. \makeatother
  33. }
  34. \ProcessOptions\relax
  35. % PAGE GEOMETRY
  36. \geometry{
  37. left=15mm,
  38. right=40mm,
  39. top=20mm,
  40. bottom=20mm
  41. }
  42. % PARAGRAPH no indent but skip
  43. \setlength{\parskip}{3mm}
  44. \setlength{\parindent}{0mm}
  45. \theoremstyle{definition}
  46. \newmdtheoremenv{satz}{Satz}[section]
  47. \newmdtheoremenv{lemma}[satz]{Lemma}
  48. \newmdtheoremenv{korrolar}[satz]{Korrolar}
  49. \newmdtheoremenv{definition}[satz]{Definition}
  50. \newtheorem{bsp}[satz]{Beispiel}
  51. \newtheorem{bem}[satz]{Bemerkung}
  52. \newtheorem{aufgabe}{Aufgabe}
  53. % enable aufgaben counting
  54. \regtotcounter{aufgabe}
  55. % temporary calculation counter
  56. \newcounter{var}
  57. \newcommand{\N}{\mathbb{N}}
  58. \newcommand{\R}{\mathbb{R}}
  59. \newcommand{\Z}{\mathbb{Z}}
  60. \newcommand{\Q}{\mathbb{Q}}
  61. \newcommand{\C}{\mathbb{C}}
  62. % HEADERS
  63. \pagestyle{fancy}
  64. \newcommand{\incfig}[1]{%
  65. \def\svgwidth{\columnwidth}
  66. \import{./figures/}{#1.pdf_tex}
  67. }
  68. \pdfsuppresswarningpagegroup=1
  69. % horizontal rule
  70. \newcommand\hr{
  71. \noindent\rule[0.5ex]{\linewidth}{0.5pt}
  72. }
  73. % punkte tabelle
  74. \newcommand{\punkte}[1][1]{
  75. \newcounter{k}
  76. \setcounter{k}{#1}
  77. \@punkten{\value{k}}{\totvalue{aufgabe}}
  78. \setcounter{k}{#1-1}
  79. \setcounter{aufgabe}{\value{k}}
  80. \vspace{5mm}
  81. }
  82. \def\@punkten#1#2{
  83. \newcounter{n}
  84. % create a temporary calculation counter
  85. \setcounter{var}{#2-#1+1}
  86. \begin{tabular}{|c|*{\value{var}}{m{1cm}|}m{1cm}|@{}m{0cm}@{}}
  87. \hline
  88. Aufgabe
  89. \forloop{n}{#1}{\not{\value{n} > #2}}{
  90. & \centering A\then
  91. }
  92. & \centering $\sum$ & \\[5mm] \hline
  93. Punkte
  94. \forloop{n}{#1}{\not{\value{n} > #2}}{
  95. &
  96. }
  97. & & \\[5mm] \hline
  98. \end{tabular}
  99. }
  100. % code listings, define style
  101. \lstdefinestyle{mystyle}{
  102. commentstyle=\color{gray},
  103. keywordstyle=\color{blue},
  104. numberstyle=\tiny\color{gray},
  105. stringstyle=\color{black},
  106. basicstyle=\ttfamily\footnotesize,
  107. breakatwhitespace=false,
  108. breaklines=true,
  109. captionpos=b,
  110. keepspaces=true,
  111. numbers=left,
  112. numbersep=5pt,
  113. showspaces=false,
  114. showstringspaces=false,
  115. showtabs=false,
  116. tabsize=2
  117. }
  118. % activate my colour style
  119. \lstset{style=mystyle}
  120. % better stackrel
  121. \let\oldstackrel\stackrel
  122. \renewcommand{\stackrel}[2]{%
  123. \oldstackrel{\mathclap{#1}}{#2}
  124. }%
  125. % integral d sign
  126. \makeatletter \renewcommand\d[1]{\ensuremath{%
  127. \;\mathrm{d}#1\@ifnextchar\d{\!}{}}}
  128. \makeatother
  129. % contradiction
  130. \newcommand{\contr}{\text{\Large\lightning}}