Skip to content
Snippets Groups Projects
Commit 7943f21a authored by Laros's avatar Laros
Browse files

Added support for displaying code with the lstlisting package. Added support

for a multi line title.

Makefile:
- Expanded the clean command.

presentation.tex:
- Added an example code frame.

beamerthemelumc.sty:
- Enabled numbering of figures and tables.
- Added settings for displaying code, fixed references in captions of code and
  fixed increasing of the listing counter in an overlay.
- Made the title multi line with the use of a minipage.
parent b178cbe3
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ release: $(SRC) clean
clean:
rm -f *.aux $(SRC).blg $(SRC).dvi $(SRC).log $(SRC).nav $(SRC).out \
$(SRC).toc $(SRC).snm
$(SRC).toc $(SRC).snm $(SRC).vrb
distclean: clean
rm -f $(SRC).ps $(SRC).pdf
......@@ -36,6 +36,34 @@
% Macro for bold text.
\newcommand{\bt}[1]{\texttt{\textbf{#1}}}
% Enable numbering of figures and tables.
\setbeamertemplate{caption}[numbered]
%
% Settings for displaying code.
%
% This is for code listing in a presentation and to use references in captions.
\usepackage{listings}
\usepackage{cleveref}
% Prevent an overlay to increase the listing counter.
\resetcounteronoverlays{lstlisting}
% Make a nice layout for code.
\lstset{
language = Python,
basicstyle = \footnotesize,
lineskip = -0.40ex,
frame = shadowbox,
rulesepcolor = \color{black},
showstringspaces = false,
captionpos = b,
numbers = left,
numbersep = -1em,
numberstyle = \tiny
}
%
% Settings for the title page.
%
......@@ -90,28 +118,30 @@
{
\titletemplate
\begin{frame}
\vspace{1.5cm}
\begin{center}
\color{black} {\Large {\bf \inserttitle}}
\begin{minipage}[b][6cm][c]{0.98\textwidth}
\begin{center}
\vspace{1.5cm}
\color{black} {\Large {\bf \inserttitle}}
\vspace{2.3cm}
{\bf
{\scriptsize
\color{LUMCBlue}
\insertauthor
\smallskip
\vfill
{\bf
{\scriptsize
\color{LUMCBlue}
\insertauthor
\smallskip
\myGroup
\smallskip
\myGroup
\smallskip
\myDepartment
\myDepartment
\vspace{-0.1cm}
\myCenter
\vspace{-0.1cm}
\myCenter
}
}
}
\end{center}
\end{center}
\end{minipage}
\end{frame}
}
......
......@@ -34,7 +34,6 @@
\pause
Second line.
\hfill
\end{frame}
\section{Topic2}
......@@ -55,11 +54,22 @@
The second slide in the same section.
\end{frame}
\begin{frame}[fragile]
And an example of displaying code, mind the [fragile] option.
\begin{lstlisting}[caption = {Example input}]
print "Hello"
\end{lstlisting}
\end{frame}
\section{Questions?}
\lastpagetemplate
\begin{frame}
\begin{center}
Acknowledgements..
Acknowledgements:
\bigskip
\bigskip
\end{center}
\end{frame}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment