Für Vorlesungen, bitte die Webseite verwenden. https://flavigny.de/lecture
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

266 satır
7.1KB

  1. \ProvidesClass{presentation}
  2. \LoadClass[notheorems]{beamer}
  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{tikz}
  17. \RequirePackage{pgfplots}
  18. %\RequirePackage[nobottomtitles]{titlesec}
  19. \RequirePackage{listings}
  20. \RequirePackage{mathtools}
  21. \RequirePackage{forloop}
  22. \RequirePackage{totcount}
  23. \RequirePackage{calc}
  24. \RequirePackage{wasysym}
  25. \RequirePackage{environ}
  26. \usetikzlibrary{quotes, angles}
  27. \pgfplotsset{
  28. compat=1.15,
  29. default 2d plot/.style={%
  30. grid=both,
  31. minor tick num=4,
  32. grid style={line width=.1pt, draw=gray!10},
  33. major grid style={line width=.2pt,draw=gray!50},
  34. axis lines=middle,
  35. enlargelimits={abs=0.2}
  36. },
  37. }
  38. % beamer specific proof envs without title or qed symbol
  39. % proof beginning (suppressing qed symbol)
  40. \NewEnviron{proofb}
  41. {
  42. \begin{proof}
  43. \renewcommand{\qedsymbol}{}
  44. \BODY
  45. \end{proof}
  46. }
  47. % proof intermediate (suppressing both)
  48. \NewEnviron{proofi}
  49. {
  50. \renewcommand{\proofname}{\hskip-\labelsep\spacefactor3000 }
  51. \begin{proof}
  52. \renewcommand{\qedsymbol}{}
  53. \BODY
  54. \end{proof}
  55. }
  56. % proof end (suppressing title)
  57. \NewEnviron{proofe}
  58. {
  59. \renewcommand{\proofname}{\hskip-\labelsep\spacefactor3000 }
  60. \begin{proof}
  61. \BODY
  62. \end{proof}
  63. }
  64. % PARAGRAPH no indent but skip
  65. \setlength{\parskip}{3mm}
  66. \setlength{\parindent}{0mm}
  67. \theoremstyle{plain}
  68. \newtheorem{satz}{Satz}[section]
  69. \newtheorem{lemma}[satz]{Lemma}
  70. \newtheorem{korollar}[satz]{Korollar}
  71. \theoremstyle{definition}
  72. \newtheorem{definition}[satz]{Definition}
  73. \theoremstyle{remark}
  74. \newtheorem{bsp}[satz]{Beispiel}
  75. \newtheorem{bem}[satz]{Bemerkung}
  76. \newtheorem{aufgabe}{Aufgabe}
  77. % enable aufgaben counting
  78. %\regtotcounter{aufgabe}
  79. % temporary calculation counter
  80. \newcounter{var}
  81. \newcommand{\N}{\mathbb{N}}
  82. \newcommand{\R}{\mathbb{R}}
  83. \newcommand{\Z}{\mathbb{Z}}
  84. \newcommand{\Q}{\mathbb{Q}}
  85. \newcommand{\C}{\mathbb{C}}
  86. % HEADERS
  87. %\pagestyle{fancy}
  88. \newcommand{\incfig}[1]{%
  89. \def\svgwidth{\columnwidth}
  90. \import{./figures/}{#1.pdf_tex}
  91. }
  92. \pdfsuppresswarningpagegroup=1
  93. % horizontal rule
  94. \newcommand\hr{
  95. \noindent\rule[0.5ex]{\linewidth}{0.5pt}
  96. }
  97. % punkte tabelle
  98. %\newcommand{\punkte}[1][1]{
  99. % \newcounter{k}
  100. % \setcounter{k}{#1}
  101. % \@punkten{\value{k}}{\totvalue{aufgabe}}
  102. % \setcounter{k}{#1-1}
  103. % \setcounter{aufgabe}{\value{k}}
  104. % \vspace{5mm}
  105. %}
  106. %
  107. %\def\@punkten#1#2{
  108. % \newcounter{n}
  109. % % create a temporary calculation counter
  110. % \setcounter{var}{#2-#1+1}
  111. % \begin{tabular}{|c|*{\value{var}}{m{1cm}|}m{1cm}|@{}m{0cm}@{}}
  112. % \hline
  113. % Aufgabe
  114. % \forloop{n}{#1}{\not{\value{n} > #2}}{
  115. % & \centering A\then
  116. % }
  117. % & \centering $\sum$ & \\[5mm] \hline
  118. % Punkte
  119. % \forloop{n}{#1}{\not{\value{n} > #2}}{
  120. % &
  121. % }
  122. % & & \\[5mm] \hline
  123. % \end{tabular}
  124. %}
  125. % code listings, define style
  126. \lstdefinestyle{mystyle}{
  127. commentstyle=\color{gray},
  128. keywordstyle=\color{blue},
  129. numberstyle=\tiny\color{gray},
  130. stringstyle=\color{black},
  131. basicstyle=\ttfamily\footnotesize,
  132. breakatwhitespace=false,
  133. breaklines=true,
  134. captionpos=b,
  135. keepspaces=true,
  136. numbers=left,
  137. numbersep=5pt,
  138. showspaces=false,
  139. showstringspaces=false,
  140. showtabs=false,
  141. tabsize=2
  142. }
  143. % activate my colour style
  144. \lstset{style=mystyle}
  145. % better stackrel
  146. \let\oldstackrel\stackrel
  147. \renewcommand{\stackrel}[2]{%
  148. \oldstackrel{\mathclap{#1}}{#2}
  149. }%
  150. % integral d sign
  151. \makeatletter \renewcommand\d[2][]{\ensuremath{%
  152. \,\mathrm{d}^{#1}#2\@ifnextchar^{}{\@ifnextchar\d{}{\,}}}}
  153. \makeatother
  154. % contradiction
  155. \newcommand{\contr}{\text{\Large\lightning}}
  156. % disjoint unions: provides cupdot and bigcupdot
  157. \makeatletter
  158. \def\moverlay{\mathpalette\mov@rlay}
  159. \def\mov@rlay#1#2{\leavevmode\vtop{%
  160. \baselineskip\z@skip \lineskiplimit-\maxdimen
  161. \ialign{\hfil$\m@th#1##$\hfil\cr#2\crcr}}}
  162. \newcommand{\charfusion}[3][\mathord]{
  163. #1{\ifx#1\mathop\vphantom{#2}\fi
  164. \mathpalette\mov@rlay{#2\cr#3}
  165. }
  166. \ifx#1\mathop\expandafter\displaylimits\fi}
  167. \makeatother
  168. \newcommand{\cupdot}{\charfusion[\mathbin]{\cup}{\cdot}}
  169. \newcommand{\bigcupdot}{\charfusion[\mathop]{\bigcup}{\cdot}}
  170. \ExplSyntaxOn
  171. % S-tackrelcompatible ALIGN environment
  172. % some might also call it the S-uper ALIGN environment
  173. % uses regular expressions to calculate the widest stackrel
  174. % to put additional padding on both sides of relation symbols
  175. \NewEnviron{salign}
  176. {
  177. \begin{align}
  178. \lec_insert_padding:V \BODY
  179. \end{align}
  180. }
  181. % starred version that does no equation numbering
  182. \NewEnviron{salign*}
  183. {
  184. \begin{align*}
  185. \lec_insert_padding:V \BODY
  186. \end{align*}
  187. }
  188. % some helper variables
  189. \tl_new:N \l__lec_text_tl
  190. \seq_new:N \l_lec_stackrels_seq
  191. \int_new:N \l_stackrel_count_int
  192. \int_new:N \l_idx_int
  193. \box_new:N \l_tmp_box
  194. \dim_new:N \l_tmp_dim_a
  195. \dim_new:N \l_tmp_dim_b
  196. \dim_new:N \l_tmp_dim_needed
  197. % function to insert padding according to widest stackrel
  198. \cs_new_protected:Nn \lec_insert_padding:n
  199. {
  200. \tl_set:Nn \l__lec_text_tl { #1 }
  201. % get all stackrels in this align environment
  202. \regex_extract_all:nnN { \c{stackrel}{(.*?)}{(.*?)} } { #1 } \l_lec_stackrels_seq
  203. % get number of stackrels
  204. \int_set:Nn \l_stackrel_count_int { \seq_count:N \l_lec_stackrels_seq }
  205. \int_set:Nn \l_idx_int { 1 }
  206. \dim_set:Nn \l_tmp_dim_needed { 0pt }
  207. % iterate over stackrels
  208. \int_while_do:nn { \l_idx_int <= \l_stackrel_count_int }
  209. {
  210. % calculate width of text
  211. \hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 1 }$}
  212. \dim_set:Nn \l_tmp_dim_a {\box_wd:N \l_tmp_box}
  213. % calculate width of relation symbol
  214. \hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 2 }$}
  215. \dim_set:Nn \l_tmp_dim_b {\box_wd:N \l_tmp_box}
  216. % check if 0.5*(a-b) > minimum padding, if yes updated minimum padding
  217. \dim_compare:nNnTF
  218. { 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } > { \l_tmp_dim_needed }
  219. { \dim_set:Nn \l_tmp_dim_needed { 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } }
  220. { }
  221. \quad
  222. % increment list index by three, as every stackrel produces three list entries
  223. \int_incr:N \l_idx_int
  224. \int_incr:N \l_idx_int
  225. \int_incr:N \l_idx_int
  226. }
  227. % replace all relations with align characters (&) and add the needed padding
  228. \regex_replace_all:nnN
  229. { (<&|&<|\c{iff}&|&\c{iff}|\c{impliedby}&|&\c{impliedby}|\c{implies}&|&\c{implies}|\c{approx}&|&\c{approx}|\c{equiv}&|&\c{equiv}|=&|&=|\c{le}&|&\c{le}|\c{ge}&|&\c{ge}|&\c{stackrel}{.*?}{.*?}|\c{stackrel}{.*?}{.*?}&|&\c{neq}|\c{neq}&) }
  230. { \c{kern} \u{l_tmp_dim_needed} \1 \c{kern} \u{l_tmp_dim_needed} }
  231. \l__lec_text_tl
  232. \l__lec_text_tl
  233. }
  234. \cs_generate_variant:Nn \lec_insert_padding:n { V }
  235. \ExplSyntaxOff