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 ...@@ -29,7 +29,7 @@ release: $(SRC) clean
clean: clean:
rm -f *.aux $(SRC).blg $(SRC).dvi $(SRC).log $(SRC).nav $(SRC).out \ 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 distclean: clean
rm -f $(SRC).ps $(SRC).pdf rm -f $(SRC).ps $(SRC).pdf
...@@ -36,6 +36,34 @@ ...@@ -36,6 +36,34 @@
% Macro for bold text. % Macro for bold text.
\newcommand{\bt}[1]{\texttt{\textbf{#1}}} \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. % Settings for the title page.
% %
...@@ -90,28 +118,30 @@ ...@@ -90,28 +118,30 @@
{ {
\titletemplate \titletemplate
\begin{frame} \begin{frame}
\vspace{1.5cm} \begin{minipage}[b][6cm][c]{0.98\textwidth}
\begin{center}
\begin{center} \vspace{1.5cm}
\color{black} {\Large {\bf \inserttitle}}
\color{black} {\Large {\bf \inserttitle}}
\vspace{2.3cm} \vfill
{\bf {\bf
{\scriptsize {\scriptsize
\color{LUMCBlue} \color{LUMCBlue}
\insertauthor \insertauthor
\smallskip \smallskip
\myGroup \myGroup
\smallskip \smallskip
\myDepartment \myDepartment
\vspace{-0.1cm} \vspace{-0.1cm}
\myCenter \myCenter
}
} }
} \end{center}
\end{center} \end{minipage}
\end{frame} \end{frame}
} }
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
\pause \pause
Second line. Second line.
\hfill
\end{frame} \end{frame}
\section{Topic2} \section{Topic2}
...@@ -55,11 +54,22 @@ ...@@ -55,11 +54,22 @@
The second slide in the same section. The second slide in the same section.
\end{frame} \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?} \section{Questions?}
\lastpagetemplate \lastpagetemplate
\begin{frame} \begin{frame}
\begin{center} \begin{center}
Acknowledgements.. Acknowledgements:
\bigskip
\bigskip
\end{center} \end{center}
\end{frame} \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