shortcuts.sty 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % make the index link to the correct part of the page %
  3. % http://tex.stackexchange.com/q/74493/5645 %
  4. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  5. \newcounter{indexanchor}
  6. \newcommand*{\xindex}[1]{%
  7. \stepcounter{indexanchor}% make anchor unique
  8. \def\theindexterm{#1}%
  9. \edef\doindexentry{\noexpand\index
  10. {\expandonce\theindexterm|indexanchor{index-\theindexanchor}}}%
  11. \raisebox{\baselineskip}{\hypertarget{index-\theindexanchor}%
  12. {\doindexentry}}%
  13. }
  14. \newcommand*{\indexanchor}[2]{\hyperlink{#1}{#2}}
  15. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  16. % Aufgaben-Environment %
  17. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  18. \newcounter{aufgabe}
  19. \newenvironment{aufgabe}[1][]{\refstepcounter{aufgabe}%
  20. \ifthenelse{\isempty{#1}}%
  21. {\subsection*{Aufgabe~\theaufgabe}}% if #1 is empty
  22. {\subsection*{Aufgabe~\theaufgabe~(#1)}}% if #1 is not empty
  23. \begin{adjustwidth}{1cm}{}}%
  24. {\end{adjustwidth}}
  25. \newenvironment{solution}[1][]{%
  26. \subsection*{Lösung zu Aufgabe~#1}%
  27. \begin{adjustwidth}{1cm}{}}%
  28. {\end{adjustwidth}}
  29. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  30. % Define theorems %
  31. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  32. \newcommand{\thmfoot}{}
  33. \theoremstyle{break}
  34. \setlength\theoremindent{0.7cm}
  35. \theoremheaderfont{\kern-0.7cm\normalfont\bfseries}
  36. \theorembodyfont{\normalfont} % nicht mehr kursiv
  37. \theoremseparator{\thmfoot}
  38. \newframedtheorem{satz}{Satz}[chapter]
  39. \newframedtheorem{lemma}[satz]{Lemma}
  40. \newframedtheorem{proposition}[satz]{Proposition}
  41. \newtheorem{korollar}[satz]{Korollar}
  42. \newtheorem{folgerung}[satz]{Folgerung}
  43. \newtheorem{definition}{Definition}
  44. \newtheorem{beispiel}{Beispiel}
  45. \newtheorem{bemerkung}{Bemerkung}
  46. \theoremstyle{nonumberplain}
  47. \newtheorem{beweis}{Beweis:}
  48. \newtheorem{behauptung}{Beh.:}
  49. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  50. \def\fB{\mathfrak{B}}%Für Basis
  51. \def\calS{\mathcal{S}}%Für Subbasis
  52. \def\fT{\mathfrak{T}}%Für Topologie
  53. \def\fU{\mathfrak{U}}%Für Topologie
  54. \renewcommand{\qed}{\hfill\blacksquare}
  55. \newcommand{\qedwhite}{\hfill \ensuremath{\Box}}
  56. \newcommand{\powerset}[1]{\mathcal{P}(#1)}
  57. \def\praum{\ensuremath{\mathcal{P}}}
  58. \def\mdp{\ensuremath{\mathbb{P}}}
  59. \def\mdc{\ensuremath{\mathbb{C}}}
  60. \def\mdr{\ensuremath{\mathbb{R}}}
  61. \def\mdq{\ensuremath{\mathbb{Q}}}
  62. \def\mdz{\ensuremath{\mathbb{Z}}}
  63. \def\mdn{\ensuremath{\mathbb{N}}}
  64. \def\mdh{\ensuremath{\mathbb{H}}}
  65. \def\gdw{\ensuremath{\Leftrightarrow}}
  66. \def\atlas{\ensuremath{\mathcal{A}}}
  67. \def\GL{\ensuremath{\mathrm{GL}}}
  68. \def\SL{\ensuremath{\mathrm{SL}}}
  69. \def\PSL{\ensuremath{\mathrm{PSL}}}
  70. \newcommand\mapsfrom{\mathrel{\reflectbox{\ensuremath{\mapsto}}}}
  71. \newcommand\dcup{\mathbin{\dot{\cup}}}
  72. \newcommand\Dcup{\mathop{\dot{\bigcup}}}
  73. \newcommand{\id}{\textnormal{id}}
  74. \DeclareMathOperator{\Deck}{Deck}
  75. \DeclareMathOperator{\Fix}{Fix}
  76. \DeclareMathOperator{\Iso}{Iso}
  77. \DeclareMathOperator{\grad}{grad}
  78. \DeclareMathOperator{\Perm}{Perm}
  79. \DeclareMathOperator{\Sym}{Sym}
  80. \DeclareMathOperator{\Homoo}{\textnormal{Homöo}}
  81. \DeclareMathOperator{\Diffeo}{Diffeo}
  82. \DeclareMathOperator{\conv}{conv}
  83. \DeclareMathOperator{\IWS}{IWS}
  84. \DeclareMathOperator{\DV}{DV}
  85. \DeclareMathOperator{\rang}{Rg}
  86. \DeclareMathOperator{\Bild}{Bild}
  87. \newcommand{\iu}{{i\mkern1mu}} % imaginary unit
  88. \newcommand{\kappanor}{\kappa_{\ts{Nor}}}
  89. %\DeclareMathOperator{\Re}{Re}
  90. %\DeclareMathOperator{\Im}{Im}
  91. %%%Text %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  92. \newcommand\obda{o.~B.~d.~A.\xspace}
  93. \newcommand\Obda{O.~B.~d.~A.\xspace}
  94. \newcommand{\ts}[1]{\textnormal{#1}} % textual subscript
  95. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  96. % http://tex.stackexchange.com/a/101138/5645
  97. \newcommand\rtilde[1]{\widetilde{\mathit{#1}}}
  98. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  99. \crefname{satz}{\textup{Satz}}{\textup{Sätze}}
  100. \crefname{proposition}{\textup{Proposition}}{\textup{Propositionen}}
  101. \crefname{lemma}{\textup{Lemma}}{\textup{Lemmata}}
  102. \crefname{korollar}{\textup{Korollar}}{\textup{Korollare}}
  103. \crefname{folgerung}{\textup{Folgerung}}{\textup{Folgerungen}}
  104. \crefname{definition}{\textup{Definition}}{\textup{Definitionen}}
  105. \crefname{behauptung}{\textup{Behauptung}}{\textup{Behauptungen}}
  106. \crefname{beispiel}{\textup{Beispiel}}{\textup{Beispiele}}
  107. \crefname{aufgabe}{\textup{Aufgabe}}{\textup{Aufgaben}}
  108. \crefname{bemerkung}{\textup{Bemerkung}}{\textup{Bemerkungen}}
  109. %\let\OldAngle\angle
  110. %\let\angle\sphericalangle
  111. \newlist{defenum}{enumerate}{1}
  112. \setlist[defenum]{label=\alph*),ref=\textup{\thedefinition.\alph*}}
  113. \crefalias{defenumi}{definition}
  114. \newlist{defenumprops}{enumerate}{1}
  115. \setlist[defenumprops]{label=(\roman*),ref=\textup{\thedefinition.\roman*}}
  116. \crefalias{defenumpropsi}{definition}
  117. \newlist{bemenum}{enumerate}{1}
  118. \setlist[bemenum]{label=\alph*),ref=\textup{\thebemerkung.\alph*}}
  119. \crefalias{bemenumi}{bemerkung}
  120. \newlist{bspenum}{enumerate}{1}
  121. \setlist[bspenum]{label=\arabic*),ref=\textup{\thebeispiel.\arabic*}}
  122. \crefalias{bspenumi}{beispiel}
  123. \newlist{propenum}{enumerate}{1}
  124. \setlist[propenum]{label=\alph*), ref=\textup{\theproposition~(\alph*)}}
  125. \crefalias{propenumi}{proposition}
  126. \newlist{aufgabeenum}{enumerate}{1}
  127. \setlist[aufgabeenum]{label=(\alph*),ref=\textup{\theaufgabe~(\alph*)}}
  128. \crefalias{aufgabeenumi}{aufgabe}
  129. % Commands for local abbreviations
  130. \newcommand\crefabbr[1]{%
  131. \begingroup
  132. \crefname{bemerkung}{\textup{Bem.}}{\textup{Bem.}}%
  133. \crefname{definition}{\textup{Def.}}{\textup{Def.}}\cref{#1}
  134. \endgroup%
  135. }
  136. \newcommand\Crefabbr[1]{%
  137. \begingroup
  138. \Crefname{bemerkung}{\textup{Bem.}}{\textup{Bem.}}%
  139. \Crefname{definition}{\textup{Def.}}{\textup{Def.}}\Cref{#1}
  140. \endgroup%
  141. }