Commit | Line | Data |
---|---|---|
41761fdc | 1 | %%% -*-latex-*- |
2 | %%% | |
3 | %%% Definitions for IPS course | |
4 | ||
76f457cb | 5 | \NeedsTeXFormat{LaTeX2e} |
6 | \ProvidesClass{ips}[2001/10/02] | |
7 | ||
8 | %%%----- Document class stuff ----------------------------------------------- | |
9 | ||
10 | \newif\ifipsslides \ipsslidesfalse | |
11 | \newif\ifipsanswers \ipsanswerstrue | |
12 | \InputIfFileExists{ips.cfg}\relax\relax | |
13 | ||
14 | \ifipsslides | |
aa3dde65 | 15 | \PassOptionsToClass{a4, slidesonly}{mdwslides} |
76f457cb | 16 | \else |
aa3dde65 | 17 | \PassOptionsToClass{a4, article, twoside}{mdwslides} |
76f457cb | 18 | \fi |
aa3dde65 | 19 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{mdwslides}} |
76f457cb | 20 | \ProcessOptions |
aa3dde65 | 21 | \LoadClass{mdwslides} |
76f457cb | 22 | |
41761fdc | 23 | %%%----- Required packages -------------------------------------------------- |
24 | ||
25 | \RequirePackage[palatino, helvetica, courier, maths=cmr]{mdwfonts} | |
41761fdc | 26 | \RequirePackage[T1]{fontenc} |
1c35584f | 27 | \RequirePackage{amssymb} |
41761fdc | 28 | \RequirePackage{mdwtab, mathenv, crypto, mdwthm, mdwmath} |
29 | \RequirePackage[within=section]{exercise} | |
41761fdc | 30 | \RequirePackage{url} |
31 | ||
014f5211 | 32 | \if0\ifx\pdfoutput\@@undefined0\else\the\pdfoutput\fi |
76f457cb | 33 | \PassOptionsToPackage{dvips}{xy} |
41761fdc | 34 | \else |
41761fdc | 35 | \ifarticle |
36 | \pdfpagewidth\paperwidth | |
37 | \pdfpageheight\paperheight | |
38 | \else | |
014f5211 MW |
39 | \setslidelength{\pdfpagewidth}{\paperheight} |
40 | \setslidelength{\pdfpageheight}{\paperwidth} | |
41 | \pdfhorigin=1 true in | |
42 | \pdfvorigin=1 true in | |
41761fdc | 43 | \fi |
44 | \fi | |
76f457cb | 45 | \RequirePackage[all]{xy} |
41761fdc | 46 | |
47 | %%%----- Miscellaneous settings --------------------------------------------- | |
48 | ||
49 | \errorcontextlines=999 | |
50 | ||
51 | %%%----- Style choices ------------------------------------------------------ | |
52 | ||
53 | \renewcommand{\qedsymbol}{$\square$} | |
54 | \def\hex#1{\texttt{0x#1}} | |
55 | \let\emptystring\lambda | |
56 | \let\epsilon\varepsilon | |
57 | \let\phi\varphi | |
58 | \let\emptyset\varnothing | |
59 | \bibliographystyle{mdwalpha} | |
60 | \sloppy | |
61 | ||
62 | %%%----- Exercise typesetting ----------------------------------------------- | |
63 | ||
64 | \exctrcheck{section}{\answrite{\protect\subsection*{Section \thesection}}} | |
65 | ||
66 | %%%----- Diagram typesetting ------------------------------------------------ | |
67 | ||
68 | \turnradius={4pt} | |
69 | ||
70 | \def\ocat{ | |
71 | \setbox\z@\hbox{$\scriptstyle\|$}% | |
72 | \dimen8\ht\z@\advance\dimen8\dp\z@% | |
73 | \mathbin{\xy *=<\dimen8>[o][F]{\box\z@} \endxy}% | |
74 | } | |
75 | ||
41761fdc | 76 | %%%----- That's all, folks -------------------------------------------------- |
77 | ||
78 | \endinput |