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

250 行
7.1KB

  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. \usetikzlibrary{quotes, angles, math}
  42. \pgfplotsset{
  43. compat=1.15,
  44. axis lines = middle,
  45. ticks = none,
  46. %default 2d plot/.style={%
  47. % ticks=none,
  48. % axis lines = middle,
  49. % grid=both,
  50. % minor tick num=4,
  51. % grid style={line width=.1pt, draw=gray!10},
  52. % major grid style={line width=.2pt,draw=gray!50},
  53. % axis lines=middle,
  54. % enlargelimits={abs=0.2}
  55. }
  56. \newcounter{curve}
  57. \NewDocumentCommand{\algebraiccurve}{ O{} O{$#5 = 0$} O{-4:4} O{-4:4} m }{
  58. \addplot[id=curve\arabic{curve}, raw gnuplot, smooth, #1] function{%
  59. f(x,y) = #5;
  60. set xrange [#3];
  61. set yrange [#4];
  62. set view 0,0;
  63. set isosample 1000,1000;
  64. set size square;
  65. set cont base;
  66. set cntrparam levels incre 0,0.1,0;
  67. unset surface;
  68. splot f(x,y)
  69. };
  70. \addlegendentry{#2}
  71. \stepcounter{curve}
  72. }%
  73. % PAGE GEOMETRY
  74. \geometry{
  75. top=1.2in,bottom=1.4in,left=1.3in,right=1.3in,
  76. bottom=35mm
  77. }
  78. % PARAGRAPH no indent but skip
  79. %\setlength{\parskip}{3mm}
  80. %\setlength{\parindent}{0mm}
  81. \newtheorem{satz}{Proposition}[section]
  82. \newtheorem{theorem}[satz]{Theorem}
  83. \newtheorem{lemma}[satz]{Lemma}
  84. \newtheorem{korollar}[satz]{Corollary}
  85. \theoremstyle{definition}
  86. \newtheorem{definition}[satz]{Definition}
  87. \newtheorem*{definition*}{Definition}
  88. %\theoremstyle{definition}
  89. %\newmdtheoremenv{satz}{Satz}[section]
  90. %\newmdtheoremenv{lemma}[satz]{Lemma}
  91. %\newmdtheoremenv{korollar}[satz]{Korollar}
  92. %\newmdtheoremenv{definition}[satz]{Definition}
  93. \newtheorem{bsp}[satz]{Example}
  94. \newtheorem{bem}[satz]{Remark}
  95. \newtheorem{aufgabe}{Exercise}
  96. % enable aufgaben counting
  97. \regtotcounter{aufgabe}
  98. % temporary calculation counter
  99. \newcounter{var}
  100. \newcommand{\N}{\mathbb{N}}
  101. \newcommand{\R}{\mathbb{R}}
  102. \newcommand{\Z}{\mathbb{Z}}
  103. \newcommand{\Q}{\mathbb{Q}}
  104. \newcommand{\C}{\mathbb{C}}
  105. % HEADERS
  106. \pagestyle{headings}
  107. \newcommand{\incfig}[1]{%
  108. \def\svgwidth{\columnwidth}
  109. \import{./figures/}{#1.pdf_tex}
  110. }
  111. \pdfsuppresswarningpagegroup=1
  112. % code listings, define style
  113. \lstdefinestyle{mystyle}{
  114. commentstyle=\color{gray},
  115. keywordstyle=\color{blue},
  116. numberstyle=\tiny\color{gray},
  117. stringstyle=\color{black},
  118. basicstyle=\ttfamily\footnotesize,
  119. breakatwhitespace=false,
  120. breaklines=true,
  121. captionpos=b,
  122. keepspaces=true,
  123. numbers=left,
  124. numbersep=5pt,
  125. showspaces=false,
  126. showstringspaces=false,
  127. showtabs=false,
  128. tabsize=2
  129. }
  130. % activate my colour style
  131. \lstset{style=mystyle}
  132. % better stackrel
  133. \let\oldstackrel\stackrel
  134. \renewcommand{\stackrel}[2]{%
  135. \oldstackrel{\mathclap{#1}}{#2}
  136. }%
  137. % integral d sign
  138. \makeatletter \renewcommand\d[2][]{\ensuremath{%
  139. \,\mathrm{d}^{#1}#2\@ifnextchar^{}{\@ifnextchar\d{}{\,}}}}
  140. \makeatother
  141. % contradiction
  142. \newcommand{\contr}{\text{\Large\lightning}}
  143. % disjoint unions: provides cupdot and bigcupdot
  144. \makeatletter
  145. \def\moverlay{\mathpalette\mov@rlay}
  146. \def\mov@rlay#1#2{\leavevmode\vtop{%
  147. \baselineskip\z@skip \lineskiplimit-\maxdimen
  148. \ialign{\hfil$\m@th#1##$\hfil\cr#2\crcr}}}
  149. \newcommand{\charfusion}[3][\mathord]{
  150. #1{\ifx#1\mathop\vphantom{#2}\fi
  151. \mathpalette\mov@rlay{#2\cr#3}
  152. }
  153. \ifx#1\mathop\expandafter\displaylimits\fi}
  154. \makeatother
  155. \newcommand{\cupdot}{\charfusion[\mathbin]{\cup}{\cdot}}
  156. \newcommand{\bigcupdot}{\charfusion[\mathop]{\bigcup}{\cdot}}
  157. \ExplSyntaxOn
  158. % S-tackrelcompatible ALIGN environment
  159. % some might also call it the S-uper ALIGN environment
  160. % uses regular expressions to calculate the widest stackrel
  161. % to put additional padding on both sides of relation symbols
  162. \NewEnviron{salign}
  163. {
  164. \begin{align}
  165. \lec_insert_padding:V \BODY
  166. \end{align}
  167. }
  168. % starred version that does no equation numbering
  169. \NewEnviron{salign*}
  170. {
  171. \begin{align*}
  172. \lec_insert_padding:V \BODY
  173. \end{align*}
  174. }
  175. % some helper variables
  176. \tl_new:N \l__lec_text_tl
  177. \seq_new:N \l_lec_stackrels_seq
  178. \int_new:N \l_stackrel_count_int
  179. \int_new:N \l_idx_int
  180. \box_new:N \l_tmp_box
  181. \dim_new:N \l_tmp_dim_a
  182. \dim_new:N \l_tmp_dim_b
  183. \dim_new:N \l_tmp_dim_needed
  184. % function to insert padding according to widest stackrel
  185. \cs_new_protected:Nn \lec_insert_padding:n
  186. {
  187. \tl_set:Nn \l__lec_text_tl { #1 }
  188. % get all stackrels in this align environment
  189. \regex_extract_all:nnN { \c{stackrel}{(.*?)}{(.*?)} } { #1 } \l_lec_stackrels_seq
  190. % get number of stackrels
  191. \int_set:Nn \l_stackrel_count_int { \seq_count:N \l_lec_stackrels_seq }
  192. \int_set:Nn \l_idx_int { 1 }
  193. \dim_set:Nn \l_tmp_dim_needed { 0pt }
  194. % iterate over stackrels
  195. \int_while_do:nn { \l_idx_int <= \l_stackrel_count_int }
  196. {
  197. % calculate width of text
  198. \hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 1 }$}
  199. \dim_set:Nn \l_tmp_dim_a {\box_wd:N \l_tmp_box}
  200. % calculate width of relation symbol
  201. \hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 2 }$}
  202. \dim_set:Nn \l_tmp_dim_b {\box_wd:N \l_tmp_box}
  203. % check if 0.5*(a-b) > minimum padding, if yes updated minimum padding
  204. \dim_compare:nNnTF
  205. { 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } > { \l_tmp_dim_needed }
  206. { \dim_set:Nn \l_tmp_dim_needed { 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } }
  207. { }
  208. \quad
  209. % increment list index by three, as every stackrel produces three list entries
  210. \int_incr:N \l_idx_int
  211. \int_incr:N \l_idx_int
  212. \int_incr:N \l_idx_int
  213. }
  214. % replace all relations with align characters (&) and add the needed padding
  215. \regex_replace_all:nnN
  216. { (<&|&<|\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}) }
  217. { \c{kern} \u{l_tmp_dim_needed} \1 \c{kern} \u{l_tmp_dim_needed} }
  218. \l__lec_text_tl
  219. \l__lec_text_tl
  220. }
  221. \cs_generate_variant:Nn \lec_insert_padding:n { V }
  222. \ExplSyntaxOff