1 | % \pagestyle{empty} % no page numbers |
---|
2 | |
---|
3 | \addtolength{\topmargin}{-1.25in} |
---|
4 | \addtolength{\textheight}{2in} |
---|
5 | \frenchspacing % uniform spacing |
---|
6 | \hyphenpenalty=10000 % no hyphenation |
---|
7 | \rightskip=0pt plus1.4in % add some stretchy glue to right side |
---|
8 | |
---|
9 | %%% Make LaTeX stuff easier to typeset |
---|
10 | |
---|
11 | \def\cmd#1{{\tt $\backslash$#1}} |
---|
12 | |
---|
13 | %\def\example#1{\begin{tabular}{p{0.5\textwidth}p{0.5\textwidth}} #1 &% |
---|
14 | %\begin{verbatim} |
---|
15 | %#1 |
---|
16 | %\end{verbatim} \end{tabular}} |
---|
17 | |
---|
18 | %\def\example#1{\verb @#1@} |
---|
19 | |
---|
20 | %%% Set up handling of titles for slides |
---|
21 | |
---|
22 | \newlength{\titl@wd} %% Length of title |
---|
23 | \newlength{\titl@rulewidth} %% Thickness of underlining |
---|
24 | \setlength{\titl@rulewidth}{0.15ex} |
---|
25 | |
---|
26 | \def\titlesize{\large} |
---|
27 | \def\textsize{\normalsize} |
---|
28 | |
---|
29 | \def\mktitle{\slidetitle} |
---|
30 | |
---|
31 | \def\slidetitle{\@ifstar{\@nocontentstitle}{\@contentstitle}} |
---|
32 | |
---|
33 | \def\@contentstitle#1{% |
---|
34 | \addcontentsline{toc}{slide}{#1}% |
---|
35 | \@nocontentstitle{#1}} |
---|
36 | |
---|
37 | \def\@nocontentstitle#1{{%Makes the title of the slide |
---|
38 | \def\th@title{{\titlesize \bf #1}} |
---|
39 | \settowidth{\titl@wd}{\th@title} |
---|
40 | \flushleft\th@title\hspace{-\titl@wd}%This comment necessary for spacing |
---|
41 | \rule[-.3\baselineskip]{\textwidth}{\titl@rulewidth}\hfil\par |
---|
42 | }} |
---|
43 | |
---|
44 | %%% Set up figure and table environments |
---|
45 | |
---|
46 | %% Some required counters |
---|
47 | \newcounter{fig@re} |
---|
48 | \setcounter{fig@re}{0} |
---|
49 | |
---|
50 | \newcounter{t@ble} |
---|
51 | \setcounter{t@ble}{0} |
---|
52 | |
---|
53 | %% The environments themselves |
---|
54 | \newenvironment{figure} |
---|
55 | {\@floatimitator{fig@re}} |
---|
56 | {} |
---|
57 | |
---|
58 | \newenvironment{table} |
---|
59 | {\@floatimitator{t@ble}} |
---|
60 | {} |
---|
61 | |
---|
62 | %% A macro to detect [] stuff |
---|
63 | \def\@floatimitator#1{% |
---|
64 | \@ifnextchar[% |
---|
65 | {\@xfloatimitator{#1}}% [] stuff present |
---|
66 | {\@regfloatimitator{#1}}} % call different things depending on whether location specifier is present |
---|
67 | |
---|
68 | \def\@regfloatimitator#1{% |
---|
69 | \stepcounter{#1}% |
---|
70 | \def\caption##1{% |
---|
71 | {\def\@currentlabel{\csname the#1\endcsname}% |
---|
72 | \m@kecaption{\csname #1num\endcsname}{##1}}}} |
---|
73 | |
---|
74 | \def\@xfloatimitator#1[#2]{\@regfloatimitator{#1}} % just ignore the [] stuff |
---|
75 | |
---|
76 | %% Caption starter definitions |
---|
77 | \def\fig@renum{\fig@rename~\thefig@re} |
---|
78 | \def\t@blenum{\t@blename~\thet@ble} |
---|
79 | |
---|
80 | \def\fig@rename{Figure} |
---|
81 | \def\t@blename{Table} |
---|
82 | |
---|
83 | %% Macro to make caption itself |
---|
84 | \long\def\m@kecaption#1#2{% |
---|
85 | \vskip\abovecaptionskip |
---|
86 | \sbox\@tempboxa{#1: #2}% |
---|
87 | \ifdim \wd\@tempboxa >\hsize |
---|
88 | #1: #2\par |
---|
89 | \else |
---|
90 | \global \@minipagefalse |
---|
91 | \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% |
---|
92 | \fi |
---|
93 | \vskip\belowcaptionskip} |
---|
94 | |
---|
95 | %% Some more lengths to control caption positioning |
---|
96 | \newlength{\abovecaptionskip} |
---|
97 | \setlength{\abovecaptionskip}{0pt} |
---|
98 | |
---|
99 | \newlength{\belowcaptionskip} |
---|
100 | \setlength{\belowcaptionskip}{0pt} |
---|
101 | |
---|
102 | |
---|
103 | %%% Label handling |
---|
104 | |
---|
105 | %% Fix the way labels are handled... |
---|
106 | \def\label#1{\@bsphack |
---|
107 | \protected@write\@auxout{}% |
---|
108 | {\string\newlabel{#1}{{\@currentlabel}{\theslide}}}% |
---|
109 | \@esphack} |
---|
110 | |
---|
111 | %% define the standard label to just be slide |
---|
112 | \def\@currentlabel{\theslide} |
---|
113 | |
---|
114 | |
---|
115 | %% table of contents stuff |
---|
116 | \def\addcontentsline#1#2#3{% |
---|
117 | \addtocontents{#1}{\protect\contentsline{#2}{#3}{\theslide}}} |
---|
118 | |
---|
119 | \newcommand\tableofcontents{% |
---|
120 | \thispagestyle{empty}% |
---|
121 | \addtocounter{slide}{-1}% |
---|
122 | \slidetitle*{\contentsname |
---|
123 | \@mkboth{% |
---|
124 | \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% |
---|
125 | \begingroup |
---|
126 | \tiny |
---|
127 | \@starttoc{toc}% |
---|
128 | \endgroup |
---|
129 | } |
---|
130 | |
---|
131 | \newcommand*\l@slide{\@dottedtocline{0}{1.5em}{2.3em}} |
---|
132 | |
---|
133 | \newcommand\contentsname{Contents} |
---|
134 | \newcommand\@pnumwidth{1.55em} |
---|
135 | \newcommand\@tocrmarg{2.55em} |
---|
136 | \newcommand\@dotsep{4.5} |
---|
137 | \setcounter{tocdepth}{0} |
---|