From 9ade5e35d8792381fd7c6faa1be03ed3bcfd552c Mon Sep 17 00:00:00 2001
From: Ian Jauslin <ian.jauslin@roma1.infn.it>
Date: Thu, 21 Jan 2016 23:05:30 +0000
Subject: As presented in Rome on 2016-01-22

---
 presentation.sty | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 110 insertions(+)
 create mode 100644 presentation.sty

(limited to 'presentation.sty')

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}
+}
-- 
cgit v1.3

