Latex Presentation Template
This is going to be a short post, but thanks to Lorna Jane & Matthew Weier O`Phinney I've been using Latex to generate PDF slides for my upcoming talks. Over the last few weeks I've been doing a lot of learning in regards to how it works and how to use it more efficiently. Lorna has an excellent entry in her blog that shows how to actually run latexmk to generate the slides here and another excellent entry on markup here. Matthew Weier O`Phinney and I have been talking about an awesome program on github called pdf-presenter-console which makes life easier as a presenter, it seems like an interesting tool and I'll be covering it at some point more in depth.
On Ubuntu these are the packages you will need:
-
texlive-publishers texlive-latex-recommended latemk texlive-fonts-extra latex-fonts-recommended
(I may have forgotten one or two but will add if I discover any more)
And here is my template:
-
\usepackage{listings}
-
\usepackage{color}
-
\usepackage{textcomp}
-
-
% Code Listing Stuff
-
\definecolor{lbcolor}{rgb}{0.9,0.9,0.9}
-
\lstset{
-
language=PHP,
-
tabsize=2,
-
backgroundcolor=\color{lbcolor},
-
rulecolor=,
-
extendedchars=true,
-
frame=single,
-
breakatwhitespace=true,
-
breaklines=true,
-
identifierstyle=\ttfamily,
-
keywordstyle=\color[rgb]{0,0,1},
-
commentstyle=\color[rgb]{0.133,0.545,0.133},
-
stringstyle=\color[rgb]{0.627,0.126,0.941},
-
morekeywords={class, interface, namespace, abstract, new, return, function, public, protected, private, implements, extends, use, as, throws, catch}
-
}
-
% Presentation Metadata
-
\title{Title}
-
\author{Shawn Stratton}
-
\date{\today}
-
\begin{document}
-
\maketitle
-
\begin{slide}{Slide Title}
-
\begin{itemize}
-
\item Item1
-
\item Item2
-
\end{itemize}
-
\end{slide}
-
\section{Section Title}
-
\begin{slide}{New}
-
\vspace*{\fill}
-
\begin{figure}
-
\centering
-
\includegraphics[width=0.6\slidewidth]{images/sample.eps}
-
\caption{This is a centered (both horizontal & vertical image}
-
\end{figure}
-
\vspace*{\fill}
-
\end{slide}
-
\begin{note}
-
This is a note
-
\end{note}
-
\begin{slide}{Source Inclusion}
-
\vspace*{\fill}
-
\lstinputlisting{src/file.php}
-
\vspace*{\fill}
-
\end{slide}
-
\end{document}
The command to run to generate the presentation:
-
latexmk -f -pdfps presentation.tex