
A Presentation with LaTeX
作者:
amisoccassiopeia
最近上传:
5 年前
许可:
Creative Commons CC BY 4.0
摘要:
A beamer slides template that uses the Metropolis theme (by Matthias Vogelgesang) for everyone who wants to set up a quick-and-easy presentation.

A beamer slides template that uses the Metropolis theme (by Matthias Vogelgesang) for everyone who wants to set up a quick-and-easy presentation.
\documentclass[10pt]{beamer} % For a presentation we need to use the document class "beamer"
% Here we can also define the font size (10pt)
% This template uses the Metropolis theme by Matthias Vogelgesang (https://www.overleaf.com/latex/templates/metropolis-beamer-theme/qzyvdhrntfmr) and is meant to present an easily accessible template for everyone who wants to set-up a quick-and-easy presentation
\input{general.tex} % Loads required packages from the separate file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Add title information
\title{A Presentation with\space \LaTeX} % Adds the title of the presentation
\subtitle{Add a nice subtitle} % Comment if you do not need it
\date{\footnotesize \today} % Adds the date (default: today
\author{FIRSTNAME LASTNAME} % Adds the author's name
\institute{UNIVERSITY} % Adds the author's institute/university
\titlegraphic{\hfill\includegraphics[height=2cm]{figures/1.png}} % Adds a logo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Begin the document
\begin{document}
\maketitle % Adds the title
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Add an agenda
\begin{frame}[plain]{Outline} % "Plain" omits the page number
% \tableofcontents[hideallsubsections] % Adds table of content and hides all subsections
\tableofcontents % Adds table of content
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Section 1: Different slide layouts
\section{Different slide layouts} % Adds a section title
% Begin a frame (A frame is essentially your slide)
% 1) A slide with simple bullet points
\begin{frame}{A slide with bullet points and numbers} % Add frame title
\setcounter{framenumber}{1} % Set frame/slide number to 1
\begin{itemize} % Start the environment "itemize" for a bullet point list
\item This is a simple list
\item With bullet points
\item[--] Or dashes
\end{itemize}
\begin{enumerate} % Start the environment "enumerate" for a numbered list
\item First thing
\item Second thing
\item Third thing
\end{enumerate}
\end{frame}
% 2) A slide with bullet points that appear step-by-step
\begin{frame}{A slide with bullet points that appear step-by-step} % Add frame title
\begin{itemize}[<+->] % The simple code "[<+->]" allows the several bullets to appear step-wise
\item This is a simple list
\item That appears step-wise
\item Which might come handy when presenting
\item As you can see: The slide number remains the same
\end{itemize}
\end{frame}
% 3) A slide with an image
\begin{frame}{A slide with an image} % Add frame title
\begin{figure} % Start the environment "figure"
\centering
\includegraphics[scale=0.05]{figures/1.png} % Add path to the figure; you may adjust the size of the image by reducing the scale - per default it's 1
\caption{Logo of the \texttt{overviewR}} % Add a caption
\label{fig:logo} % Add a reference (useful when you want to refer to the image)
\end{figure}
\end{frame}
% 4) A slide with an image and a text next to the image
\begin{frame}{A slide with an image and text side-by-side} % Add frame title
\begin{columns} % We use the environment "columns" to generate a slide with an image and a text side-by-side. "Columns" is provided by beamer
\column{0.49\linewidth} % This command defines the width of the image
\begin{figure}
\centering
\includegraphics[scale=0.04]{figures/1.png} % The scale reduced the size of the image
\caption{Logo} % We add a caption again
\end{figure}
\column{0.49\linewidth} % And this command defines the width of the text
\begin{itemize}
\item And we add
\item a simple bullet
\item point list
\end{itemize}
\end{columns}
\end{frame}
% 5) A slide with a table
\begin{frame}{A slide with a table} % Add frame title
This slide contains an example of a simple table:
\begin{table}[] % We begin the environment "table" to generate a table
\centering
\begin{tabular}{lcc} % The environment "tabular" directly describes the table
& \textbf{Not confess} & \textbf{Confess} \\
\textbf{Not confess} & 2,2 & 5,1 \\
\textbf{Confess} & 1,5 & 4,4
\end{tabular}
\caption{Prisoner's dilemma} % Add a caption
\label{tab:table} % Add a reference for the table
\end{table}
% To generate more sophisticated tables, you may want to use: https://www.tablesgenerator.com
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Section 2: Different styles
\section{Different styles} % Adds a section title
% 1) Different ways to highlight parts of the text
\begin{frame}{How to highlight parts of the texts} % Add a frame title
\begin{itemize} % Start again the "itemize" environment
\item This slide shows you how to highlight \alert{\textbf{some parts of the text with colors}}, % Highlight key words with matching colors
\item with \textbf{bold text}, % or with bold text (\textbf)
\item or \textit{text in italics}. % or italics (\textit)
\end{itemize}
\end{frame}
% 2) Different ways to cite correctly
\begin{frame}{How to cite references} % Add a frame title
\begin{itemize} % Start again the "itemize" environment
\item This slide shows you how to add references...
\item ... to quotes: {\scriptsize\citep[565]{collier2004greed}}
\item ... or as an indirect reference: {\scriptsize\cite{fearon2003ethnicity}}
\end{itemize}
\end{frame}
% 3) Add mathematical formula
\begin{frame}{How to add mathematical formula} % Add a frame title
This is a simple linear regression model:
\begin{equation*} % Begin the mathematical environment
y_i = \alpha + \beta x_i + \varepsilon_i
\end{equation*}
\end{frame}
% 4) Add blocks
\begin{frame}{How to add blocks I} % Add a frame title
The Metropolis theme allows several blocks that might come handy when highlighting something:
\begin{block}{Default block} % Begin the environment of the default block
The first block is the \textit{default block}.
\end{block}
\begin{alertblock}{Alert block} % Begin the environment of the alert block
The second block is the \textit{alert block}.
\end{alertblock}
\begin{exampleblock}{Example block} % Begin the environment of the example block
The third block is the \textit{example block}.
\end{exampleblock}
\end{frame}
\begin{frame}{How to add blocks II} % Add a frame title
You may also fill the blocks:
\metroset{block=fill}
\begin{block}{Default block} % Begin the environment of the default block
The first block is the \textit{default block}.
\end{block}
\begin{alertblock}{Alert block} % Begin the environment of the alert block
The second block is the \textit{alert block}.
\end{alertblock}
\begin{exampleblock}{Example block} % Begin the environment of the example block
The third block is the \textit{example block}.
\end{exampleblock}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Section 3: References
\section{References} % Adds a section title
% Start a new frame
\begin{frame}[allowframebreaks] % Allows frame breaks (i.e. breaks the frame automatically if the text is longer than the frame)
% \bibliographystyle{apsr} % Uncomment to change the citation style
\bibliography{literature} % Adds the bibliography
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Section 4: And the bonus slides (Appendix)
\section{Appendix} % Adds a section title
% Begin a new frame with appendix information
\begin{frame}{The first Appendix slide}
\begin{itemize}
\item This is a normal bullet point list that might be added to the Appendix with alternative backup information.
\item Note, the Appendix is not numerated and the slides do not count into the normal slide counter.
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document} % End the document here