How to make a presentation file with LaTeX

About this memo

Presentatiaon (Beamer)

Using Beamer presentation style

\documentclass[xcolor=dvipsnames]{beamer} 

\usetheme{Madrid}
% AnnArbor, Antibes, Bergen, Berkeley, Berlin, Boadilla, CambridgeUS, Copenhagen, 
% Darmstadt, default, Dresden, Frankfurt, Goettingen, Hannover, Ilmenau, JuanLesPins, 
% Luebeck, Madrid, Malmoe, Marburg, Montpellier, PaloAlto, Pittsburgh, Rochester, 
% Singapore, Szeged, Warsaw

\usefonttheme{serif}
% serif, euler, newcent, avant, helvet, palatino, bookman, mathtime, pifont, chancery, charter, mathptm, mathptmx, utopia

\usecolortheme[named=RoyalBlue]{structure}
% or \usercolortheme{lily}
% albatross, beaver, beetle, crane, default, dolphin, dove, fly, lily, orchid, rose, seagull, seahorse, whale, wolverine

% see http://language.dyndns.org/research/latex/docs/beamerColor.pdf
\setbeamertemplate{items}[ball] 
\setbeamertemplate{blocks}[rounded][shadow=true] 

\usepackage{amsthm,amsmath,amsfonts} % AMSLaTeX packages
\usepackage{graphicx} % we want to use images

% PDF settings
\hypersetup{%
	pdftitle={Slides with Beamer},%
	pdfauthor={Tomonori Nagano},%
	pdfsubject={},%
	pdfkeywords={}%
}

% \mode
% \mode
\setbeamertemplate{footline} {%
  \leavevmode%
  \hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshortinstitute \hfill \insertframenumber/\inserttotalframenumber
  \end{beamercolorbox}}%
  \vskip0pt%
}

% \logo{\includegraphics[width=0.3in]{latexImg/GCLogoShort.eps}}

\usepackage{tree-dvips,graphicx,color,qtree,apacite,algorithm,algorithmic,multirow,tipa,vowel}

\newcommand{\subscript}[1]{{\textnormal{\scriptsize{#1}}}}  % for writing subscript text

% from http://blog.miliauskas.lt/2008/09/python-syntax-highlighting-in-latex.html
% http://www.ctan.org/tex-archive/macros/latex/contrib/listings/listings.pdf

\usepackage{textcomp}
\usepackage{setspace}

% \usepackage{cite}
\usepackage{natbib}
\renewcommand{\bibfont}{\tiny}

\usepackage{gb4e}

%%%%%%%%%%%%%%%%%%%%
% the paper title
%%%%%%%%%%%%%%%%%%%%
\title{TITLE}
% \subtitle{}
\author{NAME}
\institute[short institution]{long institution}
\date{\today}

%%%%%%%%%%%%%%%%%%%%
% body
%%%%%%%%%%%%%%%%%%%%
\begin{document}

\begin{frame}
% \begin{frame}[allowframebreaks,allowdisplaybreaks]
% \begin{frame}[shrink=5]
	\titlepage
\end{frame}

\section{Introduction}
\begin{frame}[t,allowframebreaks]{Overview}
\begin{block}{Block item}
Here is an example of the block item
\end{block}

\begin{itemize}
	\item Here is an example of bullet items
\end{itemize}

\end{frame}

\section{Bibliography}
\footnotesize
\begin{frame}[t,allowframebreaks]{Bibliography}
\bibliographystyle{apalike}
\bibliography{/Volumes/MYUSB/700LaTeX/mybibtex.bib}
\end{frame}

\end{document}

Beamer with syntax highlighting

\documentclass{beamer} 
\usetheme{Madrid}

% syntax highlighting
\usepackage[procnames]{listings}
\usepackage{textcomp}
\usepackage{setspace}

\renewcommand{\lstlistlistingname}{Code Listings}
\renewcommand{\lstlistingname}{Code Listing}
\definecolor{orange}{rgb}{1,0.5,0}
\definecolor{gray}{gray}{0.5}
\definecolor{green}{rgb}{0,0.5,0}
\definecolor{lightgreen}{rgb}{0,0.7,0}
\definecolor{darkblue}{rgb}{0.2,0,0.8}
\definecolor{lightblue}{rgb}{0.1.0.1,0.7}
\definecolor{purple}{rgb}{0.5,0,0.5}
\definecolor{darkred}{rgb}{0.5,0,0}

% default is Python
\lstset{
	language=python,
	basicstyle=\ttfamily\small\setstretch{1},
	stringstyle=\color{green}\ttfamily,
	showstringspaces=false,
	alsoletter={1234567890},
	otherkeywords={\ , \}, \{},
	keywordstyle=\color{green},
	columns=flexible,
	numbers=left, numberstyle=\tiny, stepnumber=1, numbersep=8pt,
	emph={access,and,as,break,class,continue,def,del,elif,else, except,exec,finally,for,from,global,if,import,in,is, lambda,not,or,pass,print,raise,return,try,while,assert},
	emphstyle=\color{orange}\bfseries,
	emph={[2]self},
	emphstyle=[2]\color{gray},
	emph={[4]ArithmeticError,AssertionError,AttributeError,BaseException, DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception, False,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,KeyError,KeyboardInterrupt,LookupError,MemoryError,NameError,None,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,ReferenceError,RuntimeError,RuntimeWarning,StandardError,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,abs,all,any,apply,basestring,bool,buffer,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,execfile,exit,file,filter,float,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,min,object,oct,open,ord,pow,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip,nltk},
	emphstyle=[4]\color{darkblue}\bfseries,
	upquote=true,
	morecomment=[s][\color{lightgreen}]{"""}{"""},
	commentstyle=\color{lightblue}\slshape,
	literate={>>>}{\textbf{\textcolor{darkred}{>{>}>}}}3 {...}{{\textcolor{gray}{...}}}3,
	procnamekeys={def,class},
	procnamestyle=\color{blue}\textbf,
	framexleftmargin=1mm, framextopmargin=1mm, frame=single,
	% for "sailor" class
	xleftmargin = 5mm,
	rulesepcolor=\color{lightgreen}
}

% when you need to enforce Unix
\lstnewenvironment{unix}[1][]{
\lstset{
	language=sh,
	basicstyle=\ttfamily\small\setstretch{1},
	stringstyle=\color{green},
	showstringspaces=false,
	alsoletter={1234567890},
	otherkeywords={\ , \}, \{},
	keywordstyle=\color{green},
	columns=flexible,
	numbers=left, numberstyle=\tiny, stepnumber=1, numbersep=8pt,
	emph={and,break,continue,else,exec,for,if,in,is,not,or,pass,print,raise,return,while,username@hostname},
	emphstyle=\color{orange}\bfseries,
	emph={[2]self},
	emphstyle=[2]\color{gray},
	emph={[4]adduser,addgroup,alias,apropos,apt-get,Search,aspell,awk,basename,bash,bc,bg,break,builtin,bzip2,cal,case,cat,cd,cfdisk,chgrp,chmod,chown,chroot,chkconfig,cksum,clear,cmp,comm,command,continue,cp,cron,crontab,csplit,cut,date,dc,dd,ddrescue,declare,df,diff,diff3,dig,dir,dircolors,dirname,dirs,dmesg,du,echo,egrep,eject,enable,env,ethtool,eval,exec,exit,expect,expand,export,expr,false,fdformat,fdisk,fg,fgrep,file,find,fmt,fold,for,format,free,fsck,ftp,function,fuser,gawk,getopts,grep,groups,gzip,hash,head,help,history,hostname,id,if,ifconfig,ifdown,ifup,import,install,join,kill,killall,less,let,ln,local,locate,logname,logout,look,lpc,lpr,lprint,lprintd,lprintq,lprm,ls,lsof,make,man,mkdir,mkfifo,mkisofs,mknod,more,mount,mtools,mv,mmv,netstat,nice,nl,nohup,nslookup,open,op,passwd,paste,pathchk,ping,pkill,popd,pr,printcap,printenv,printf,ps,pushd,pwd,quota,quotacheck,quotactl,ram,rcp,read,readarray,readonly,reboot,rename,renice,remsync,return,rev,rm,rmdir,rsync,screen,scp,sdiff,sed,select,seq,set,sftp,shift,shopt,shutdown,sleep,slocate,sort,source,split,ssh,strace,su,sudo,sum,symlink,sync,tail,tar,tee,test,time,times,touch,top,traceroute,trap,tr,true,tsort,tty,type,ulimit,umask,umount,unalias,uname,unexpand,uniq,units,unset,unshar,until,useradd,usermod,users,uuencode,uudecode,v,vdir,vi,watch,wc,whereis,which,while,who,whoami,Wget,write,x,yes,python},
	emphstyle=[4]\color{darkblue}\bfseries,
	upquote=true,
	morecomment=[s][\color{lightgreen}]{"""}{"""},
	commentstyle=\color{lightblue}\slshape,
	procnamekeys={def,class},
	procnamestyle=\color{blue}\textbf,
	framexleftmargin=1mm, framextopmargin=1mm, frame=single,
	% for "sailor" class
	xleftmargin = 5mm,
	rulesepcolor=\color{lightgreen},#1
}}{}

%%%%%%%%%%%%%%%%%%%%
% the paper title
%%%%%%%%%%%%%%%%%%%%
\title{TITLE}
% \subtitle{}
\author{NAME}
\institute[short institution]{long institution}
\date{\today}

%%%%%%%%%%%%%%%%%%%%
% body
%%%%%%%%%%%%%%%%%%%%
\begin{document}

\begin{frame}
% \begin{frame}[allowframebreaks,allowdisplaybreaks]
% \begin{frame}[shrink=5]
	\titlepage
\end{frame}

\section{Introduction}
\begin{frame}[t,containsverbatim,allowframebreaks]{Overview}
\begin{block}{Block item}
Here is an example of the block item
\end{block}

\begin{itemize}
	\item Here is an example of bullet items
\end{itemize}

\begin{unix}
$ cd /home/your_home
\end{unix}
\end{frame}

\section{Bibliography}
\footnotesize
\begin{frame}[t,allowframebreaks]{Bibliography}
\bibliographystyle{apalike}
\bibliography{/Volumes/MYUSB/700LaTeX/mybibtex.bib}
\end{frame}

\end{document}

Beamer theme gallery

Presentatiaon (Powerdot)

Using powerdot presentation style

\documentclass[
size=12pt,		% size=11pt,12pt,14pt,17pt,20pt
% paper=screen,a4paper,letterpaper,
% mode=present, print, handout
% orient=landscape,portoraid
% display=slidesnotes, 
style=default
% default: red, green, yellow, brown, purple
% paintings: Syndics (the default), Skater, GoldenGate, Lamentation, HolyWood, Europa, Moitessier, MayThird, PearlEarring, Charon
% fyma: green, gray, brown
% jefka: brown (the default), seagreen, blue and white
% sailor: River, Wine, Chocolate, Cocktail
% other styles (no palette): aggie,tycja, simple, horatio, jefka
% nopagebreaks, 
% fleqn
]{powerdot} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pdsetup{ 
% Change palette here (see the style above)
palette=blue,
lf={\tiny Tomonori Nagano $<$tnagano@gc.cuny.edu$>$}
% rf={\tiny \arabic{slide}~/~\pageref*{lastslide}} 
}
\pdsetup{
logohook=t, 
logopos={.088\slidewidth,.99\slideheight}
%logocmd={\includegraphics[height=0.5in]{logo.eps}}
}

\begin{document}

\section{Introduction}
\begin{slide}{Introduction}
	\begin{itemize}
		\item This is the introduction.
	\end{itemize}
\end{slide}

\begin{wideslide}[toc=,bm=]{Introduction}
	\begin{itemize}
		\item This is the introduction 2.
	\end{itemize}
\end{wideslide}

\section{Conclusion}
\begin{slide}{Conclusion}
	\begin{itemize}
		\item This is the Conclusion.
	\end{itemize}
\end{slide}

\begin{wideslide}[toc=,bm=]{Conclusion}
	\begin{itemize}
		\item This is the Conclusion 2.
	\end{itemize}
\end{wideslide}

\begin{slide}[toc=,bm=]{Notes}
	\begin{tiny}
		{\fontfamily{ppl}\selectfont
		\begin{itemize}
			\item This presentation slide was created with \LaTeX\ and \textit{powerdot} \LaTeX\ style (Hendri Adriaens and Christopher Ellison).
		\end{itemize}
		}
	\end{tiny}
\end{slide}

\end{document}

Use verbatim in the powerdot slide

\begin{wideslide}[toc=,bm=,method=direct]{Slide title}
\begin{verbatim}
verbatim text
\end{verbatim}
\end{wideslide}

Syntax highlighting on a presentation slide

\documentclass[]{powerdot} 
\usepackage{color}

% from http://blog.miliauskas.lt/2008/09/python-syntax-highlighting-in-latex.html
\usepackage[procnames]{listings}
\usepackage{textcomp}
\usepackage{setspace}

\renewcommand{\lstlistlistingname}{Code Listings}
\renewcommand{\lstlistingname}{Code Listing}
\definecolor{orange}{rgb}{1,0.5,0}
\definecolor{gray}{gray}{0.5}
\definecolor{green}{rgb}{0,0.5,0}
\definecolor{lightgreen}{rgb}{0,0.7,0}
\definecolor{purple}{rgb}{0.5,0,0.5}
\definecolor{darkred}{rgb}{0.5,0,0}

\lstnewenvironment{python}[1][]{
\lstset{
	language=python,
	basicstyle=\ttfamily\small\setstretch{1},
	stringstyle=\color{green},
	showstringspaces=false,
	alsoletter={1234567890},
	otherkeywords={\ , \}, \{},
	keywordstyle=\color{blue},
	emph={access,and,as,break,class,continue,def,del,elif,else,%
	except,exec,finally,for,from,global,if,import,in,is,%
	lambda,not,or,pass,print,raise,return,try,while,assert},
	emphstyle=\color{orange}\bfseries,
	emph={[2]self},
	emphstyle=[2]\color{gray},
	emph={[4]ArithmeticError,AssertionError,AttributeError,BaseException,DeprecationWarning,
	EOFError,Ellipsis,EnvironmentError,Exception,False,FloatingPointError,FutureWarning,
	GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,KeyError,
	KeyboardInterrupt,LookupError,MemoryError,NameError,None,NotImplemented,
	NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,ReferenceError,
	RuntimeError,RuntimeWarning,StandardError,StopIteration,SyntaxError,SyntaxWarning,
	SystemError,SystemExit,TabError,True,TypeError,UnboundLocalError,UnicodeDecodeError,
	UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,
	ValueError,Warning,ZeroDivisionError,abs,all,any,apply,basestring,bool,buffer,callable,chr,
	classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,
	eval,execfile,exit,file,filter,float,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,
	isinstance,issubclass,iter,len,license,list,locals,long,map,max,min,object,oct,open,ord,pow,
	property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,
	str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip},
	emphstyle=[4]\color{purple}\bfseries,
	upquote=true,
	morecomment=[s][\color{lightgreen}]{"""}{"""},
	commentstyle=\color{red}\slshape,
	literate={>>>}{\textbf{\textcolor{darkred}{>{>}>}}}3 {...}{{\textcolor{gray}{...}}}3,
	procnamekeys={def,class},
	procnamestyle=\color{blue}\textbf,
	framexleftmargin=1mm, framextopmargin=1mm, frame=shadowbox,
	rulesepcolor=\color{blue},#1
}}{}

\lstnewenvironment{unix}[1][]{
\lstset{
	language=sh,
	basicstyle=\ttfamily\small\setstretch{1},
	stringstyle=\color{green},
	showstringspaces=false,
	alsoletter={1234567890},
	otherkeywords={\ , \}, \{},
	keywordstyle=\color{blue},
	emph={access,and,as,break,class,continue,def,del,elif,else,%
	except,exec,finally,for,from,global,if,import,in,is,%
	lambda,not,or,pass,print,raise,return,try,while,assert},
	emphstyle=\color{orange}\bfseries,
	emph={[2]self},
	emphstyle=[2]\color{gray},
	emph={[4]  },
	emphstyle=[4]\color{purple}\bfseries,
	upquote=true,
	morecomment=[s][\color{lightgreen}]{"""}{"""},
	commentstyle=\color{red}\slshape,
	literate={>>>}{\textbf{\textcolor{darkred}{>{>}>}}}3 {...}{{\textcolor{gray}{...}}}3,
	procnamekeys={def,class},
	procnamestyle=\color{blue}\textbf,
	framexleftmargin=1mm, framextopmargin=1mm, frame=shadowbox,
	rulesepcolor=\color{blue},#1
}}{}


\begin{document}

\begin{slide}[method=direct]{What is Unix operating system?}
\begin{python}
for x in y:
	print(x)
\end{python}
\end{slide}

\begin{slide}[method=direct]{What is Unix operating system?}
\begin{unix}
for i;
do;
echo;
\end{unix}
\end{slide}


\end{document}

Comments and feedback

HTML Comment Box is loading comments...