shortcuts.sty 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. \DeclareMathOperator{\First}{First}
  82. \DeclareMathOperator{\Follow}{Follow}
  83. \let\succ\relax% Set equal to \relax so that LaTeX thinks it's not defined
  84. \DeclareMathOperator{\succ}{succ}
  85. \newcommand{\iu}{{i\mkern1mu}} % imaginary unit
  86. %\DeclareMathOperator{\Re}{Re}
  87. %\DeclareMathOperator{\Im}{Im}
  88. %%%Text %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  89. \newcommand\obda{o.~B.~d.~A.\xspace}
  90. \newcommand\Obda{O.~B.~d.~A.\xspace}
  91. \newcommand{\ts}[1]{\textnormal{#1}} % textual subscript
  92. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  93. % http://tex.stackexchange.com/a/101138/5645
  94. \newcommand\rtilde[1]{\widetilde{\mathit{#1}}}
  95. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  96. \crefname{satz}{\textup{Satz}}{\textup{Sätze}}
  97. \crefname{proposition}{\textup{Proposition}}{\textup{Propositionen}}
  98. \crefname{lemma}{\textup{Lemma}}{\textup{Lemmata}}
  99. \crefname{korollar}{\textup{Korollar}}{\textup{Korollare}}
  100. \crefname{folgerung}{\textup{Folgerung}}{\textup{Folgerungen}}
  101. \crefname{definition}{\textup{Definition}}{\textup{Definitionen}}
  102. \crefname{behauptung}{\textup{Behauptung}}{\textup{Behauptungen}}
  103. \crefname{beispiel}{\textup{Beispiel}}{\textup{Beispiele}}
  104. \crefname{aufgabe}{\textup{Aufgabe}}{\textup{Aufgaben}}
  105. \crefname{bemerkung}{\textup{Bemerkung}}{\textup{Bemerkungen}}
  106. %\let\OldAngle\angle
  107. %\let\angle\sphericalangle
  108. \newlist{defenum}{enumerate}{1}
  109. \setlist[defenum]{label=\alph*),ref=\textup{\thedefinition.\alph*}}
  110. \crefalias{defenumi}{definition}
  111. \newlist{defenumprops}{enumerate}{1}
  112. \setlist[defenumprops]{label=(\roman*),ref=\textup{\thedefinition.\roman*}}
  113. \crefalias{defenumpropsi}{definition}
  114. \newlist{bemenum}{enumerate}{1}
  115. \setlist[bemenum]{label=\alph*),ref=\textup{\thebemerkung.\alph*}}
  116. \crefalias{bemenumi}{bemerkung}
  117. \newlist{bspenum}{enumerate}{1}
  118. \setlist[bspenum]{label=\arabic*),ref=\textup{\thebeispiel.\arabic*}}
  119. \crefalias{bspenumi}{beispiel}
  120. \newlist{propenum}{enumerate}{1}
  121. \setlist[propenum]{label=\alph*), ref=\textup{\theproposition~(\alph*)}}
  122. \crefalias{propenumi}{proposition}
  123. \newlist{aufgabeenum}{enumerate}{1}
  124. \setlist[aufgabeenum]{label=(\alph*),ref=\textup{\theaufgabe~(\alph*)}}
  125. \crefalias{aufgabeenumi}{aufgabe}
  126. % Commands for local abbreviations
  127. \newcommand\crefabbr[1]{%
  128. \begingroup
  129. \crefname{bemerkung}{\textup{Bem.}}{\textup{Bem.}}%
  130. \crefname{definition}{\textup{Def.}}{\textup{Def.}}\cref{#1}
  131. \endgroup%
  132. }
  133. \newcommand\Crefabbr[1]{%
  134. \begingroup
  135. \Crefname{bemerkung}{\textup{Bem.}}{\textup{Bem.}}%
  136. \Crefname{definition}{\textup{Def.}}{\textup{Def.}}\Cref{#1}
  137. \endgroup%
  138. }