Ian Jauslin
summaryrefslogtreecommitdiff
blob: e55928fd42c4ece7a4f6e28045dddc36a06ba7b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
%%
%% Presentation style
%%

%% can call commands even when they are not defined
\def\safe#1{%
\ifdefined#1%
#1%
\else%
{\color{red}\bf?}%
\fi%
}


%% paper size
\setlength\paperheight{240pt}
\setlength\paperwidth{320pt}

%% body size
% height=paperheight-2xtopmargin-footskip
\textheight=208pt
% width=paperwidth-2xoddsidemargin
\textwidth=272pt

%% margins
\voffset=-1in
\hoffset=-1in
\oddsidemargin=24pt
\evensidemargin=24pt
\topmargin=8pt
\headheight=0pt
\headsep=0pt
\marginparsep=0pt
\marginparwidth=0pt
\footskip=16pt
\skip\footins=0pt

%% reset skips
\parskip=0pt
\parindent=0pt
\baselineskip=0pt
\AtBeginDocument{
}

%% footer
\def\ps@plain{
  \def\@oddhead{}
  \def\@evenhead{\@oddhead}
  \def\@oddfoot{\tiny\hfill\thepage/\safe\slidecount\hfill}
  \def\@evenfoot{\@oddfoot}
}
\def\ps@empty{
  \def\@oddhead{}
  \def\@evenhead{\@oddhead}
  \def\@oddfoot{}
  \def\@evenfoot{\@oddfoot}
}

%% save total slide count
\AtEndDocument{
  \immediate\write\@auxout{\noexpand\gdef\noexpand\slidecount{\thepage}}
}

\pagestyle{plain}

%% title of slide
\def\title#1{
  \hfil{\bf\large #1}\par
  \hfil\vrule width0.75\textwidth height0.3pt\par
  \vskip5pt
}

%% itemize
\newlength\itemizeskip
% left margin for items
\setlength\itemizeskip{20pt}
% item symbol
\def\itemizept{\textbullet}
\newlength\itemizeseparator
% space between the item symbol and the text
\setlength\itemizeseparator{5pt}

\newlength\current@itemizeskip
\setlength\current@itemizeskip{0pt}
\def\itemize{
  \vfil
  \addtolength\current@itemizeskip{\itemizeskip}
  \leftskip\current@itemizeskip
}
\def\enditemize{
  \addtolength\current@itemizeskip{-\itemizeskip}
  \par\leftskip\current@itemizeskip
  \vfil
}
\newlength\itempt@total
\def\item{
  \settowidth\itempt@total{\itemizept}
  \addtolength\itempt@total{\itemizeseparator}
  \par
  \vfil
  \hskip-\itempt@total\itemizept\hskip\itemizeseparator
}

\def\itemptchange#1{
  \let\itempt@prev\itemizept
  \def\itemizept{#1}
}
\def\itemptreset{
  \def\itemizept{\itempt@prev}
}