Für Vorlesungen, bitte die Webseite verwenden. https://flavigny.de/lecture
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

215 行
6.2KB

  1. \ProvidesClass{notes}
  2. \LoadClass[a4paper]{amsart}
  3. \RequirePackage[utf8]{inputenc}
  4. \RequirePackage[T1]{fontenc}
  5. \RequirePackage{textcomp}
  6. \RequirePackage[german, english]{babel}
  7. \RequirePackage{amsmath, amssymb, amsthm}
  8. \RequirePackage{mdframed}
  9. \RequirePackage{tikz-cd}
  10. \RequirePackage{fancyhdr}
  11. \RequirePackage{geometry}
  12. \RequirePackage{import}
  13. \RequirePackage{pdfpages}
  14. %\RequirePackage{transparent}
  15. \RequirePackage{xcolor}
  16. \RequirePackage{array}
  17. \RequirePackage[shortlabels]{enumitem}
  18. \RequirePackage{tikz}
  19. \RequirePackage{pgfplots}
  20. \RequirePackage{listings}
  21. \RequirePackage{mathtools}
  22. \RequirePackage{forloop}
  23. \RequirePackage{totcount}
  24. \RequirePackage{calc}
  25. \RequirePackage{wasysym}
  26. \RequirePackage{environ}
  27. \RequirePackage{hyperref}
  28. \RequirePackage{graphicx}
  29. \usetikzlibrary{quotes, angles}
  30. \pgfplotsset{
  31. compat=1.15,
  32. default 2d plot/.style={%
  33. grid=both,
  34. minor tick num=4,
  35. grid style={line width=.1pt, draw=gray!10},
  36. major grid style={line width=.2pt,draw=gray!50},
  37. axis lines=middle,
  38. enlargelimits={abs=0.2}
  39. },
  40. }
  41. % PAGE GEOMETRY
  42. \geometry{
  43. top=1.2in,bottom=1.4in,left=1.3in,right=1.3in,
  44. bottom=35mm
  45. }
  46. % PARAGRAPH no indent but skip
  47. %\setlength{\parskip}{3mm}
  48. %\setlength{\parindent}{0mm}
  49. \newtheorem{satz}{Proposition}[section]
  50. \newtheorem{theorem}[satz]{Theorem}
  51. \newtheorem{lemma}[satz]{Lemma}
  52. \newtheorem{korollar}[satz]{Corollary}
  53. \theoremstyle{definition}
  54. \newtheorem{definition}[satz]{Definition}
  55. \newtheorem*{definition*}{Definition}
  56. %\theoremstyle{definition}
  57. %\newmdtheoremenv{satz}{Satz}[section]
  58. %\newmdtheoremenv{lemma}[satz]{Lemma}
  59. %\newmdtheoremenv{korollar}[satz]{Korollar}
  60. %\newmdtheoremenv{definition}[satz]{Definition}
  61. \newtheorem{bsp}[satz]{Example}
  62. \newtheorem{bem}[satz]{Remark}
  63. \newtheorem{aufgabe}{Exercise}
  64. % enable aufgaben counting
  65. \regtotcounter{aufgabe}
  66. % temporary calculation counter
  67. \newcounter{var}
  68. \newcommand{\N}{\mathbb{N}}
  69. \newcommand{\R}{\mathbb{R}}
  70. \newcommand{\Z}{\mathbb{Z}}
  71. \newcommand{\Q}{\mathbb{Q}}
  72. \newcommand{\C}{\mathbb{C}}
  73. % HEADERS
  74. \pagestyle{headings}
  75. \newcommand{\incfig}[1]{%
  76. \def\svgwidth{\columnwidth}
  77. \import{./figures/}{#1.pdf_tex}
  78. }
  79. \pdfsuppresswarningpagegroup=1
  80. % code listings, define style
  81. \lstdefinestyle{mystyle}{
  82. commentstyle=\color{gray},
  83. keywordstyle=\color{blue},
  84. numberstyle=\tiny\color{gray},
  85. stringstyle=\color{black},
  86. basicstyle=\ttfamily\footnotesize,
  87. breakatwhitespace=false,
  88. breaklines=true,
  89. captionpos=b,
  90. keepspaces=true,
  91. numbers=left,
  92. numbersep=5pt,
  93. showspaces=false,
  94. showstringspaces=false,
  95. showtabs=false,
  96. tabsize=2
  97. }
  98. % activate my colour style
  99. \lstset{style=mystyle}
  100. % better stackrel
  101. \let\oldstackrel\stackrel
  102. \renewcommand{\stackrel}[2]{%
  103. \oldstackrel{\mathclap{#1}}{#2}
  104. }%
  105. % integral d sign
  106. \makeatletter \renewcommand\d[2][]{\ensuremath{%
  107. \,\mathrm{d}^{#1}#2\@ifnextchar^{}{\@ifnextchar\d{}{\,}}}}
  108. \makeatother
  109. % contradiction
  110. \newcommand{\contr}{\text{\Large\lightning}}
  111. % disjoint unions: provides cupdot and bigcupdot
  112. \makeatletter
  113. \def\moverlay{\mathpalette\mov@rlay}
  114. \def\mov@rlay#1#2{\leavevmode\vtop{%
  115. \baselineskip\z@skip \lineskiplimit-\maxdimen
  116. \ialign{\hfil$\m@th#1##$\hfil\cr#2\crcr}}}
  117. \newcommand{\charfusion}[3][\mathord]{
  118. #1{\ifx#1\mathop\vphantom{#2}\fi
  119. \mathpalette\mov@rlay{#2\cr#3}
  120. }
  121. \ifx#1\mathop\expandafter\displaylimits\fi}
  122. \makeatother
  123. \newcommand{\cupdot}{\charfusion[\mathbin]{\cup}{\cdot}}
  124. \newcommand{\bigcupdot}{\charfusion[\mathop]{\bigcup}{\cdot}}
  125. \ExplSyntaxOn
  126. % S-tackrelcompatible ALIGN environment
  127. % some might also call it the S-uper ALIGN environment
  128. % uses regular expressions to calculate the widest stackrel
  129. % to put additional padding on both sides of relation symbols
  130. \NewEnviron{salign}
  131. {
  132. \begin{align}
  133. \lec_insert_padding:V \BODY
  134. \end{align}
  135. }
  136. % starred version that does no equation numbering
  137. \NewEnviron{salign*}
  138. {
  139. \begin{align*}
  140. \lec_insert_padding:V \BODY
  141. \end{align*}
  142. }
  143. % some helper variables
  144. \tl_new:N \l__lec_text_tl
  145. \seq_new:N \l_lec_stackrels_seq
  146. \int_new:N \l_stackrel_count_int
  147. \int_new:N \l_idx_int
  148. \box_new:N \l_tmp_box
  149. \dim_new:N \l_tmp_dim_a
  150. \dim_new:N \l_tmp_dim_b
  151. \dim_new:N \l_tmp_dim_needed
  152. % function to insert padding according to widest stackrel
  153. \cs_new_protected:Nn \lec_insert_padding:n
  154. {
  155. \tl_set:Nn \l__lec_text_tl { #1 }
  156. % get all stackrels in this align environment
  157. \regex_extract_all:nnN { \c{stackrel}{(.*?)}{(.*?)} } { #1 } \l_lec_stackrels_seq
  158. % get number of stackrels
  159. \int_set:Nn \l_stackrel_count_int { \seq_count:N \l_lec_stackrels_seq }
  160. \int_set:Nn \l_idx_int { 1 }
  161. \dim_set:Nn \l_tmp_dim_needed { 0pt }
  162. % iterate over stackrels
  163. \int_while_do:nn { \l_idx_int <= \l_stackrel_count_int }
  164. {
  165. % calculate width of text
  166. \hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 1 }$}
  167. \dim_set:Nn \l_tmp_dim_a {\box_wd:N \l_tmp_box}
  168. % calculate width of relation symbol
  169. \hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 2 }$}
  170. \dim_set:Nn \l_tmp_dim_b {\box_wd:N \l_tmp_box}
  171. % check if 0.5*(a-b) > minimum padding, if yes updated minimum padding
  172. \dim_compare:nNnTF
  173. { 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } > { \l_tmp_dim_needed }
  174. { \dim_set:Nn \l_tmp_dim_needed { 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } }
  175. { }
  176. \quad
  177. % increment list index by three, as every stackrel produces three list entries
  178. \int_incr:N \l_idx_int
  179. \int_incr:N \l_idx_int
  180. \int_incr:N \l_idx_int
  181. }
  182. % replace all relations with align characters (&) and add the needed padding
  183. \regex_replace_all:nnN
  184. { (<&|&<|\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}&|\c{simeq}&|&\c{simeq}) }
  185. { \c{kern} \u{l_tmp_dim_needed} \1 \c{kern} \u{l_tmp_dim_needed} }
  186. \l__lec_text_tl
  187. \l__lec_text_tl
  188. }
  189. \cs_generate_variant:Nn \lec_insert_padding:n { V }
  190. \ExplSyntaxOff