shortcuts.sty 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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\fT{\mathfrak{T}}%Für Topologie
  52. \renewcommand{\qed}{\hfill\blacksquare}
  53. \newcommand{\qedwhite}{\hfill \ensuremath{\Box}}
  54. \newcommand{\Parr}{\text{\pointer}}
  55. \newcommand{\powerset}[1]{\mathcal{P}(#1)}
  56. \def\praum{\ensuremath{\mathcal{P}}}
  57. \def\mdp{\ensuremath{\mathbb{P}}}
  58. \def\mdc{\ensuremath{\mathbb{C}}}
  59. \def\mdr{\ensuremath{\mathbb{R}}}
  60. \def\mdq{\ensuremath{\mathbb{Q}}}
  61. \def\mdz{\ensuremath{\mathbb{Z}}}
  62. \def\mdn{\ensuremath{\mathbb{N}}}
  63. \def\mdh{\ensuremath{\mathbb{H}}}
  64. \def\gdw{\ensuremath{\Leftrightarrow}}
  65. \newcommand\mapsfrom{\mathrel{\reflectbox{\ensuremath{\mapsto}}}}
  66. \newcommand\dcup{\mathbin{\dot{\cup}}}
  67. \newcommand{\id}{\textnormal{id}}
  68. \DeclareMathOperator{\conv}{conv}
  69. \DeclareMathOperator{\IWS}{IWS}
  70. \DeclareMathOperator{\SLL}{SLL}
  71. \DeclareMathOperator{\Bild}{Bild}
  72. \DeclareMathOperator{\fst}{fst}
  73. \DeclareMathOperator{\snd}{snd}
  74. \DeclareMathOperator{\pair}{pair}
  75. \DeclareMathOperator{\nxt}{next}
  76. \DeclareMathOperator{\pred}{pred}
  77. \DeclareMathOperator{\ABS}{ABS}
  78. \DeclareMathOperator{\VAR}{VAR}
  79. \DeclareMathOperator{\CONST}{CONST}
  80. \DeclareMathOperator{\APP}{APP}
  81. \let\succ\relax% Set equal to \relax so that LaTeX thinks it's not defined
  82. \DeclareMathOperator{\succ}{succ}
  83. \newcommand{\iu}{{i\mkern1mu}} % imaginary unit
  84. %\DeclareMathOperator{\Re}{Re}
  85. %\DeclareMathOperator{\Im}{Im}
  86. %%%Text %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  87. \newcommand\obda{o.~B.~d.~A.\xspace}
  88. \newcommand\Obda{O.~B.~d.~A.\xspace}
  89. \newcommand{\ts}[1]{\textnormal{#1}} % textual subscript
  90. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  91. % http://tex.stackexchange.com/a/101138/5645
  92. \newcommand\rtilde[1]{\widetilde{\mathit{#1}}}
  93. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  94. \crefname{satz}{\textup{Satz}}{\textup{Sätze}}
  95. \crefname{proposition}{\textup{Proposition}}{\textup{Propositionen}}
  96. \crefname{lemma}{\textup{Lemma}}{\textup{Lemmata}}
  97. \crefname{korollar}{\textup{Korollar}}{\textup{Korollare}}
  98. \crefname{folgerung}{\textup{Folgerung}}{\textup{Folgerungen}}
  99. \crefname{definition}{\textup{Definition}}{\textup{Definitionen}}
  100. \crefname{behauptung}{\textup{Behauptung}}{\textup{Behauptungen}}
  101. \crefname{beispiel}{\textup{Beispiel}}{\textup{Beispiele}}
  102. \crefname{aufgabe}{\textup{Aufgabe}}{\textup{Aufgaben}}
  103. \crefname{bemerkung}{\textup{Bemerkung}}{\textup{Bemerkungen}}
  104. %\let\OldAngle\angle
  105. %\let\angle\sphericalangle
  106. \newlist{defenum}{enumerate}{1}
  107. \setlist[defenum]{label=\alph*),ref=\textup{\thedefinition.\alph*}}
  108. \crefalias{defenumi}{definition}
  109. \newlist{defenumprops}{enumerate}{1}
  110. \setlist[defenumprops]{label=(\roman*),ref=\textup{\thedefinition.\roman*}}
  111. \crefalias{defenumpropsi}{definition}
  112. \newlist{bemenum}{enumerate}{1}
  113. \setlist[bemenum]{label=\alph*),ref=\textup{\thebemerkung.\alph*}}
  114. \crefalias{bemenumi}{bemerkung}
  115. \newlist{bspenum}{enumerate}{1}
  116. \setlist[bspenum]{label=\arabic*),ref=\textup{\thebeispiel.\arabic*}}
  117. \crefalias{bspenumi}{beispiel}
  118. \newlist{propenum}{enumerate}{1}
  119. \setlist[propenum]{label=\alph*), ref=\textup{\theproposition~(\alph*)}}
  120. \crefalias{propenumi}{proposition}
  121. \newlist{aufgabeenum}{enumerate}{1}
  122. \setlist[aufgabeenum]{label=(\alph*),ref=\textup{\theaufgabe~(\alph*)}}
  123. \crefalias{aufgabeenumi}{aufgabe}
  124. % Commands for local abbreviations
  125. \newcommand\crefabbr[1]{%
  126. \begingroup
  127. \crefname{bemerkung}{\textup{Bem.}}{\textup{Bem.}}%
  128. \crefname{definition}{\textup{Def.}}{\textup{Def.}}\cref{#1}
  129. \endgroup%
  130. }
  131. \newcommand\Crefabbr[1]{%
  132. \begingroup
  133. \Crefname{bemerkung}{\textup{Bem.}}{\textup{Bem.}}%
  134. \Crefname{definition}{\textup{Def.}}{\textup{Def.}}\Cref{#1}
  135. \endgroup%
  136. }