theorems and hyperrefs
[lectures/latex.git] / physics_compact / phys_comp.tex
index c82c627..8a9760a 100644 (file)
 % units
 \usepackage{units}
 
+% theorem environment
+\usepackage{framed}
+\usepackage[framed,thref,amsmath,hyperref]{ntheorem}
+
+% hyperlinks
+\usepackage[colorlinks=true,linkcolor=black,citecolor=black]{hyperref}
+
 % shortcuts
 \newcommand{\si}{Si$_{\text{i}}${}}
 \newcommand{\ci}{C$_{\text{i}}${}}
 \newrgbcolor{hb}{0.75 0.77 0.89}
 \newrgbcolor{lbb}{0.75 0.8 0.88}
 \newrgbcolor{lachs}{1.0 .93 .81}
+%
+\newrgbcolor{ctheorem}{0.9 0.9 0.95}
+\newrgbcolor{cdefinition}{0.95 0.9 0.9}
+\newrgbcolor{cremark}{0.95 0.95 0.9}
+\newrgbcolor{cproof}{0.95 0.92 0.95}
 
 % roman numbers
 \newcommand{\RM}[1]{\MakeUppercase{\romannumeral #1{}}}
 % vectors are simply represented by bold font characters
 \renewcommand{\vec}[1]{{\bf #1{}}}
 
-
-\newtheorem{theorem}{Theorem}[section]
-\newtheorem{lemma}[theorem]{Lemma}
-\newtheorem{proposition}[theorem]{Proposition}
-\newtheorem{corollary}[theorem]{Corollary}
-
-\newenvironment{proof}[1][Proof]{\begin{trivlist}
-\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
-\newenvironment{definition}[1][Definition]{\begin{trivlist}
-\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
-\newenvironment{example}[1][Example]{\begin{trivlist}
-\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
-\newenvironment{remark}[1][Remark]{\begin{trivlist}
-\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
-
-\newcommand{\qed}{\nobreak \ifvmode \relax \else
-\ifdim\lastskip<1.5em \hskip-\lastskip
-\hskip1.5em plus0em minus0.5em \fi \nobreak
-\vrule height0.75em width0.5em depth0.25em\fi}
+%
+% theorem environment
+%
+% common
+\theoremstyle{plain}
+\theoremseparator{:}
+\theorembodyfont{\normalfont}
+% theorem
+\theoremsymbol{\ensuremath{\diamondsuit}}
+\shadecolor{ctheorem}
+\newshadedtheorem{theorem}{Theorem}[section]
+% definition
+\theoremsymbol{\ensuremath{\clubsuit}}
+\shadecolor{cdefinition}
+\newshadedtheorem{definition}[theorem]{Definition}
+% remark
+\theoremsymbol{\ensuremath{\diamondsuit}}
+\shadecolor{cremark}
+\newshadedtheorem{remark}[theorem]{Remark}
+% proof
+\theoremstyle{nonumberplain}
+\theoremsymbol{\rule{1ex}{1ex}}
+\shadecolor{cproof}
+\newshadedtheorem{proof}{Proof}
 
 % author & title
 \author{Frank Zirkelbach}
 \frontmatter{}
 \include{title}
 \include{contents}
-%\include{lists}
 
 \mainmatter{}
 \include{intro}
 \include{math_app}
 
 \backmatter{}
+\include{lists}
 \include{literature}
 \include{ack}