1% This file is filled in by ../configure. Do not edit this file by 2% hand! Make changes in macros.tex.in instead. 3% 4% Macros for dieharder.tex 5% 6% These macros basicallypermit one to shorten typing -- it is much easier 7% to type \be than \begin{equation}. Others encapsulate complex commands, 8% such as commands that add dynamic links to wikipedia content (which is 9% VERY USEFUL for online content! I'm quite proud of my "\wikinote{}" 10% below, as it is nearly a one-stop-shop for references these days. 11% 12 13\newcommand{\version}{3.31.1} 14 15%======================================================================== 16% These are some macros I find useful doing e.g. physics textbooks. 17% Some just shorten typing -- it is much easier to 18% type \be than \begin{equation}. Others encapsulate complex commands, 19% such as commands that add dynamic links to wikipedia content (which is 20% VERY USEFUL for online content! I'm quite proud of my "\wikinote{}" 21% below, as it is nearly a one-stop-shop for references these days. 22%======================================================================== 23\newcommand{\mb}[1]{\mbox{\boldmath $#1$}} 24\ifx \Vec \undefined 25\newcommand{\Vec}[1]{\mbox{\boldmath $\vec{#1}$}} 26\else 27\renewcommand{\Vec}[1]{\mbox{\boldmath $\vec{#1}$}} 28\fi 29\newcommand{\sVec}[1]{\mbox{\scriptsize \boldmath $#1$}} 30\newcommand{\Mat}[1]{\stackrel{\Leftrightarrow}{\mbox{\boldmath $#1$}}} 31\ifx \Hat \undefined 32\newcommand{\Hat}[1]{\mbox{\boldmath $\hat{#1}$}} 33\else 34\renewcommand{\Hat}[1]{\mbox{\boldmath $\hat{#1}$}} 35\fi 36\newcommand{\sHat}[1]{\hat{\mbox{\scriptsize \boldmath $#1$}}} 37\newcommand{\deriv}[2]{\frac{d #1}{d #2}} 38\newcommand{\ddt}[1]{\frac{d #1}{dt}} 39\newcommand{\dderiv}[2]{\frac{d^2 #1}{d #2^2}} 40\newcommand{\ddtsq}[1]{\frac{d^2 #1}{d t^2}} 41\newcommand{\partialdiv}[2]{\frac{\partial #1}{\partial #2}} 42\newcommand{\ppartialdiv}[2]{\frac{\partial^2 #1}{\partial #2^2}} 43\newcommand{\del}{\Vec{\nabla}} 44\newcommand{\grad}{\Vec{\nabla}} 45\newcommand{\deldot}{\del \cdot} 46\newcommand{\curl}{\del \times} 47\newcommand{\lapl}{\nabla^2} 48\newcommand{\vsh}[2]{\Vec{Y}_{#1}^{#2}} 49\newcommand{\abs}[1]{\left| #1 \right|} 50\newcommand{\RE}{\rm I \hspace{-.180em} R} 51 52\newcommand{\be}{ \begin{equation} } 53\newcommand{\ee}{ \end{equation} } 54 55\newcommand{\bea}{ \begin{eqnarray} } 56\newcommand{\eea}{ \end{eqnarray} } 57 58\newcommand{\ba}{\begin{array}} 59\newcommand{\ea}{\end{array}} 60 61\newcommand{\ben}{ \begin{enumerate} } 62\newcommand{\een}{ \end{enumerate} } 63 64\newcommand{\bit}{ \begin{itemize} } 65\newcommand{\eit}{ \end{itemize} } 66 67\newcommand{\bv}{ \begin{verbatim} } 68% one cannot end verbatim with a macro, as the macro 69% is interpreted as verbatim text, duh... 70 71% Here's a useful one for the Dieharder book: 72\newcommand{\die}{\emph{Dieharder}\ } 73 74\newcommand{\spade}{\framebox{$\spadesuit$}} 75\newcommand{\heart}{\framebox{$\heartsuit$}} 76\renewcommand{\diamond}{\framebox{$\diamondsuit$}} 77\newcommand{\club}{\framebox{$\clubsuit$}} 78\newcommand{\notrump}{\framebox{\rule[2.75mm]{0cm}{0cm}\rule[-0.5mm]{0cm}{0cm}\ \ }} 79\newcommand{\half}{\frac{1}{2}} 80\newcommand{\tot}{ {\rm tot} } 81 82\newcommand{\link}[2]{\htmladdnormallink{#1}{#2}} 83\newcommand{\wikilink}[1]{Wikipedia: \htmladdnormallink{http://www.wikipedia.org/wiki/#1}{http://www.wikipedia.org/wiki/#1}} 84\newcommand{\GIYF}{ \htmladdnormallink{GIYF}{http://www.google.com} } 85\newcommand{\WIYF}{\htmladdnormallink{WIYF}{http://www.wikipedia.org} } 86\newcommand{\MWIYF}{\htmladdnormallink{MWIYF}{http://mathworld.wolfram.com}} 87\newcommand{\webnote}[2]{\footnote{Internet: \htmladdnormallink{#1 }{#1 } #2}} 88\newcommand{\wikinote}[2]{\footnote{Wikipedia: \htmladdnormallink{http://www.wikipedia.org/wiki/#1.}{http://www.wikipedia.org/wiki/#1} #2} } 89\newcommand{\googlenote}[2]{\footnote{GIYF: \htmladdnormallink{#1 }{http://www.google.com/search?hl=en&lr=&q=#1&btnG=Search} #2} } 90 91% Really I should just go ahead and define a bloody alphabet of the 92% defs below... 93\newcommand{\vbeta}{\Vec{\beta}} 94\newcommand{\vA}{\Vec{A}} 95\newcommand{\vB}{\Vec{B}} 96\newcommand{\vC}{\Vec{C}} 97\newcommand{\vD}{\Vec{D}} 98\newcommand{\vE}{\Vec{E}} 99\newcommand{\vF}{\Vec{F}} 100\newcommand{\vG}{\Vec{G}} 101\newcommand{\vH}{\Vec{H}} 102\newcommand{\vI}{\Vec{I}} 103\newcommand{\vJ}{\Vec{J}} 104\newcommand{\vL}{\Vec{L}} 105\newcommand{\vM}{\Vec{M}} 106\newcommand{\vN}{\Vec{N}} 107\newcommand{\vO}{\Vec{O}} 108\newcommand{\vP}{\Vec{P}} 109\newcommand{\vQ}{\Vec{Q}} 110\newcommand{\vR}{\Vec{R}} 111\newcommand{\vS}{\Vec{S}} 112\newcommand{\vT}{\Vec{T}} 113\newcommand{\vU}{\Vec{U}} 114\newcommand{\vV}{\Vec{V}} 115\newcommand{\vW}{\Vec{W}} 116\newcommand{\vX}{\Vec{X}} 117\newcommand{\vY}{\Vec{Y}} 118\newcommand{\vZ}{\Vec{Y}} 119 120\newcommand{\va}{\Vec{a}} 121\newcommand{\vb}{\Vec{b}} 122\newcommand{\vc}{\Vec{c}} 123\newcommand{\vd}{\Vec{d}} 124\newcommand{\ve}{\Vec{e}} 125\newcommand{\vf}{\Vec{f}} 126\newcommand{\vg}{\Vec{g}} 127\newcommand{\vh}{\Vec{h}} 128\newcommand{\vi}{\Vec{i}} 129\newcommand{\vj}{\Vec{j}} 130\newcommand{\vk}{\Vec{k}} 131\newcommand{\vl}{\Vec{l}} 132\newcommand{\vm}{\Vec{m}} 133\newcommand{\vn}{\Vec{n}} 134\newcommand{\vo}{\Vec{o}} 135\newcommand{\vp}{\Vec{p}} 136\newcommand{\vq}{\Vec{q}} 137\newcommand{\vr}{\Vec{r}} 138\newcommand{\vs}{\Vec{s}} 139\newcommand{\vt}{\Vec{t}} 140\newcommand{\vu}{\Vec{u}} 141\newcommand{\vv}{\Vec{v}} 142\newcommand{\vx}{\Vec{x}} 143\newcommand{\vy}{\Vec{y}} 144\newcommand{\vz}{\Vec{z}} 145 146\newcommand{\vell}{\Vec{\ell}} 147\newcommand{\valpha}{\Vec{\alpha}} 148\newcommand{\vtau}{\Vec{\tau}} 149\newcommand{\vomega}{\Vec{\omega}} 150\newcommand{\vOmega}{\Vec{\Omega}} 151 152\newcommand{\ha}{\Hat{a}} 153\newcommand{\hb}{\Hat{b}} 154\newcommand{\hc}{\Hat{c}} 155\newcommand{\hd}{\Hat{d}} 156% \newcommand{\he}{\Hat{e}} 157\newcommand{\hf}{\Hat{f}} 158\newcommand{\hg}{\Hat{g}} 159\newcommand{\hh}{\Hat{h}} 160\newcommand{\hi}{\Hat{i}} 161\newcommand{\hj}{\Hat{j}} 162\newcommand{\hk}{\Hat{k}} 163\newcommand{\hl}{\Hat{l}} 164\newcommand{\hm}{\Hat{m}} 165\newcommand{\hn}{\Hat{n}} 166\newcommand{\ho}{\Hat{o}} 167\newcommand{\hp}{\Hat{p}} 168\newcommand{\hq}{\Hat{q}} 169\newcommand{\hr}{\Hat{r}} 170\newcommand{\hs}{\Hat{s}} 171\newcommand{\hT}{\Hat{t}} 172\newcommand{\hu}{\Hat{u}} 173\newcommand{\hv}{\Hat{v}} 174\newcommand{\hw}{\Hat{w}} 175\newcommand{\hx}{\Hat{x}} 176\newcommand{\hy}{\Hat{y}} 177\newcommand{\hz}{\Hat{z}} 178 179\newcommand{\he}{\Hat{\epsilon}} 180\newcommand{\htheta}{\Hat{\Theta}} 181\newcommand{\hphi}{\Hat{\phi}} 182 183\newcommand{\bx}{\bar{x}} 184 185\newcommand{\Z}{\sqrt{ \frac{\mu_0}{\epsilon_0} }} 186\newcommand{\Ylm}{Y_{\ell m}} 187\newcommand{\YL}{Y_L} 188 189\newcounter{short} 190\newcommand{\shortproblem}[1]{ 191 192 \stepcounter{short} 193 % \addcontentsline{toc}{subsection}{Short Problem \arabic{short}} 194 \vspace{1cm} 195 {\noindent \bf Short Problem \arabic{short}.} 196 \vspace{0.2cm} 197\\ 198 {\noindent #1} 199 200} 201 202\newcounter{true} 203\newcommand{\truefact}[1]{ 204 205 \stepcounter{true} 206 % \addcontentsline{toc}{subsection}{True Fact \arabic{true}} 207 \vspace{1cm} 208 {\noindent \bf True Fact \arabic{true}.} 209 \vspace{0.2cm} 210\\ 211 {\noindent #1} 212 213} 214 215% OLD shortproblem with minipage, which seems to block putting 216% figures inside... 217% \newcommand{\shortproblem}[1]{ 218% 219% \stepcounter{short} 220% \addcontentsline{toc}{subsection}{Short Problem \arabic{short}} 221% \vfill 222% \noindent 223% \begin{minipage}[c]{6in} 224% \vspace{0.2cm} 225% {\noindent \bf Short Problem \arabic{short}.} 226% \vspace{0.2cm} 227% 228% \noindent {#1} 229% \end{minipage} 230% \vfill 231% 232% } 233 234\newcounter{hwcnt} 235\newcommand{\homework}[1]{ 236 237 \stepcounter{hwcnt} 238 \vspace{1.0cm} 239 {\noindent \bf Problem \arabic{hwcnt}.} 240 \vspace{0.2cm} 241 242 \noindent {#1} 243 244} 245 246\newcounter{probcnt} 247\newcommand{\problem}[1]{ 248 249 \stepcounter{probcnt} 250 \vspace{1.0cm} 251 {\noindent \bf Problem \arabic{probcnt}.} 252 \vspace{0.2cm} 253 254 \noindent {#1} 255 256} 257 258\newcounter{quescnt} 259\newcommand{\question}[1]{ 260 261 \stepcounter{quescnt} 262 \vspace{1.0cm} 263 {\noindent \bf Question \arabic{quescnt}.} 264 \vspace{0.2cm} 265 266 \noindent {#1} 267 268} 269 270\newcounter{testprobcnt} 271\newcommand{\testproblem}[2]{ 272 273 \stepcounter{testprobcnt} 274 \vspace{1.0cm} 275 \noindent \textbf{Problem \arabic{testprobcnt}.}\quad({#1} points) 276 \vspace{0.2cm} 277 278 \noindent {#2} 279 280} 281 282\newcommand{\ahomework}[1]{ 283 284 \stepcounter{hwcnt} 285 \vspace{1.0cm} 286 {\noindent \bf * Problem \arabic{hwcnt}.} 287 \vspace{0.2cm} 288 289 \noindent {#1} 290 291} 292 293\newcounter{hardcnt} 294\newcommand{\hardproblem}[1]{ 295 296 \stepcounter{hardcnt} 297 \addcontentsline{toc}{subsection}{Essential Problem \arabic{week}.\arabic{hardcnt}} 298 \vspace{1.0cm} 299 {\noindent \bf Essential Problem \arabic{week}.\arabic{hardcnt}.} 300 \vspace{0.2cm} 301 302 \noindent {#1} 303 \newpage 304 305} 306 307 308\newcommand{\week}[1]{ 309 310 \stepcounter{chapter} 311 \addcontentsline{toc}{chapter}{Week \arabic{chapter}: #1} 312 \markboth{Week \arabic{chapter}: #1}{Week \arabic{chapter}: #1} 313 \chapter*{Week \arabic{chapter}: #1} 314 315} 316 317 318