shortcuts.sty 5.2 KB

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