Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jauslin <ian.jauslin@roma1.infn.it>2015-07-11 18:54:46 +0000
committerIan Jauslin <ian.jauslin@roma1.infn.it>2015-07-11 18:54:46 +0000
commitd2b9a6e690b8abdcdf6fa2d5a6c164206e5683d3 (patch)
treea56d1e192ad9e34275019932f38612b917b55971 /presentation.sty
As presented at TQMS15 on 2015-07-09v1.0
Diffstat (limited to 'presentation.sty')
-rw-r--r--presentation.sty110
1 files changed, 110 insertions, 0 deletions
diff --git a/presentation.sty b/presentation.sty
new file mode 100644
index 0000000..e55928f
--- /dev/null
+++ b/presentation.sty
@@ -0,0 +1,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}
+}