added the identity pstrick fig for steffi!
[lectures/latex.git] / sandbox / identity.tex
1 \pdfoutput=0
2 \documentclass[twoside,a4paper,11pt,openany]{book}
3 %\documentclass[twoside,a4paper,11pt,draft]{book}
4 \usepackage[activate]{pdfcprot}
5 \usepackage{verbatim}
6 \usepackage[a4paper,textheight=636pt,textwidth=442pt,includeheadfoot]{geometry}
7 \usepackage[english,german]{babel}
8 \usepackage[latin1]{inputenc}
9 \usepackage[T1]{fontenc}
10 \usepackage{amsmath}
11 \usepackage{amssymb}
12 \usepackage{bm}
13 \usepackage{ae}
14 \usepackage{aecompl}
15 \usepackage[dvips]{graphicx}
16 \graphicspath{{./img/}}
17 \usepackage{subfigure}
18 \usepackage{color}
19 \usepackage{pstricks}
20 \usepackage{pst-node}
21 \usepackage{rotating}
22 \usepackage{fancyhdr}
23
24 % custom sections
25 \usepackage{titlesec}
26
27 % cites
28 \usepackage[numbers,sort,compress]{natbib}
29
30 % list of publications
31 \usepackage{multibib}
32 %\usepackage[resetlabels]{multibib}
33 \newcites{pub}{List of publications}
34
35 % box around verbatim text
36 \usepackage{fancyvrb}
37
38 % miller
39 \usepackage{miller}
40
41 % in use?
42 %\usepackage{slashbox}
43
44 % smaller captions ...
45 \usepackage[small,bf]{caption}
46
47 % units
48 \usepackage{units}
49
50 % theorem environment
51 \usepackage{framed}
52 \usepackage[framed,thref,thmmarks,amsmath,hyperref]{ntheorem}
53
54 % hyperlinks
55 \usepackage[colorlinks=true,linkcolor=black,citecolor=black]{hyperref}
56
57 % shortcuts
58 \newcommand{\si}{Si$_{\text{i}}${}}
59 \newcommand{\ci}{C$_{\text{i}}${}}
60 \newcommand{\cs}{C$_{\text{s}}${}}
61 \newcommand{\degc}[1]{\unit[#1]{$^{\circ}$C}{}}
62 \newcommand{\degk}[1]{\unit[#1]{K}{}}
63 \newcommand{\distn}[1]{\unit[#1]{nm}{}}
64 \newcommand{\dista}[1]{\unit[#1]{\AA}{}}
65 \newcommand{\perc}[1]{\unit[#1]{\%}{}}
66
67 %\newcommand{\bra}[1]{\left\langle #1 \right|}
68 %\newcommand{\ket}[1]{\left| #1 \right\rangle}
69 %\newcommand{\braket}[2]{\left\langle #1 \mid #2 \right\rangle}
70 \newcommand{\bra}[1]{\langle #1 |}
71 \newcommand{\ket}[1]{| #1 \rangle}
72 \newcommand{\braket}[2]{\langle #1 | #2 \rangle}
73
74 % (re)new commands
75 \newcommand{\printimg}[5]{%
76  \begin{figure}[#1]%
77  \begin{center}%
78  \includegraphics[#2]{#3}%
79  \caption{#4}%
80  \label{#5}%
81  \end{center}%
82  \end{figure}%
83 }
84
85 \pagestyle{fancy}
86
87 \renewcommand{\chaptermark}[1]{
88  \markboth{\thechapter.\ #1}{}
89 }
90 \renewcommand{\sectionmark}[1]{
91  \markright{\thesection.\ #1}
92 }
93 \fancyhf{}
94 \fancyhead[LE,RO]{\thepage}
95 \fancyhead[LO]{\nouppercase\rightmark}
96 \fancyhead[RE]{\nouppercase\leftmark}
97
98 % hyphenation
99 \hyphenation{}
100
101 % colors
102 \newrgbcolor{hb}{0.75 0.77 0.89}
103 \newrgbcolor{lbb}{0.75 0.8 0.88}
104 \newrgbcolor{lachs}{1.0 .93 .81}
105 %
106 \newrgbcolor{ctheorem}{0.85 0.85 0.95}
107 \newrgbcolor{cdefinition}{0.95 0.85 0.85}
108 \newrgbcolor{cremark}{0.97 0.97 0.97}
109 \newrgbcolor{cproof}{0.95 0.92 0.95}
110
111 % roman numbers
112 \newcommand{\RM}[1]{\MakeUppercase{\romannumeral #1{}}}
113
114 % vectors are simply represented by bold font characters
115 \renewcommand{\vec}[1]{{\bm #1{}}}
116
117 %
118 % theorem environment
119 %
120 % common
121 \theoremstyle{plain}
122 \theoremseparator{:}
123 \theorembodyfont{\normalfont}
124 \theoremsymbol{}
125 % theorem
126 \shadecolor{ctheorem}
127 \newshadedtheorem{theorem}{Theorem}[section]
128 % definition
129 \shadecolor{cdefinition}
130 \newshadedtheorem{definition}[theorem]{Definition}
131 % remark
132 \shadecolor{cremark}
133 \newshadedtheorem{remark}[theorem]{Remark}
134 % proof
135 \theoremstyle{nonumberplain}
136 \theoremsymbol{\rule{1ex}{1ex}}
137 \shadecolor{cproof}
138 \newtheorem{proof}{Proof}
139
140 \newcommand{\ctid}[1]{%
141 \psset{unit=#1}
142 \begin{pspicture}(.4,.4)
143 \psdot[dotsize=0.15](0.207,0.02)
144 \psarc[linewidth=0.02,arrowinset=0]{<-}(0.2,0.15){0.15}{-50}{220}
145 \end{pspicture}
146 }
147
148 \begin{document}
149
150 % english
151 \selectlanguage{english}
152
153 \noindent
154 Using ps-tricks, the identity \ctid{1cm} looks like this.\\
155 And we can scale it up! See:\\
156 \ctid{2cm}\\
157 \ctid{3cm}\\
158 \ctid{4cm}\\
159 \ctid{5cm}\\
160 \ctid{6cm}
161
162 \end{document}