Shawn Stratton PHP Geek

26Sep/11Off

Lock your doors!

So over the last few weeks things here have been crazy, between things that I can't discuss about work and Valerie and I buying the house there's been a very high level of stress in me mixed with anxiety and the such. Now that things have kind of stabilized I finally had the chance to calm down and take a breath, so when my boss took a week off some coworkers and I had the perfect opportunity to have some fun. My boss, Brian, came back from his vacation to find his office, well I better share pictures, that'll say more than I can put in words.

22May/11Off

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:

  1. 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:

\documentclass[style=jefka]{powerdot}
  1. \usepackage{listings}
  2. \usepackage{color}
  3. \usepackage{textcomp}
  4.  
  5. % Code Listing Stuff
  6. \definecolor{lbcolor}{rgb}{0.9,0.9,0.9}
  7. \lstset{  
  8. language=PHP, 
  9. tabsize=2, 
  10. backgroundcolor=\color{lbcolor}, 
  11. rulecolor=, 
  12. extendedchars=true, 
  13. frame=single, 
  14. breakatwhitespace=true, 
  15. breaklines=true, 
  16. identifierstyle=\ttfamily
  17. keywordstyle=\color[rgb]{0,0,1}, 
  18. commentstyle=\color[rgb]{0.133,0.545,0.133}, 
  19. stringstyle=\color[rgb]{0.627,0.126,0.941}, 
  20. morekeywords={class, interface, namespace, abstract, new, return, function, public, protected, private, implements, extends, use, as, throws, catch}
  21. }
  22. % Presentation Metadata
  23. \title{Title}
  24. \author{Shawn Stratton}
  25. \date{\today}
  26. \begin{document}
  27.   \maketitle
  28.   \begin{slide}{Slide Title}   
  29.     \begin{itemize}  
  30.       \item Item1  
  31.       \item Item2  
  32.     \end{itemize}
  33.   \end{slide}
  34.   \section{Section Title}
  35.   \begin{slide}{New}  
  36.     \vspace*{\fill}  
  37.     \begin{figure}  
  38.       \centering  
  39.       \includegraphics[width=0.6\slidewidth]{images/sample.eps}  
  40.       \caption{This is a centered (both horizontal & vertical image}  
  41.      \end{figure}  
  42.      \vspace*{\fill}
  43.   \end{slide}
  44.   \begin{note}
  45. This is a note
  46.   \end{note}
  47.   \begin{slide}{Source Inclusion}  
  48.     \vspace*{\fill}  
  49.     \lstinputlisting{src/file.php}  
  50.     \vspace*{\fill}
  51.   \end{slide}
  52. \end{document}

The command to run to generate the presentation:

  1. latexmk -f -pdfps presentation.tex
Filed under: Personal, Tools No Comments