In this post, we assume that you successfully installed beamer (check step-by-step installation process). Otherwise, you can use Overleaf, online LaTeX editor. This fast guide to LaTeX presentations creation introduces you to beamer class where all features are only swiftly explained here, for deeper insights, you should check the regular tutorials.
The minimal code of a LaTeX presentation includes: 1) loading the beamer class package, 2) choosing a default presentation theme and a frame.
Here is an example:
% Quick start guide \documentclass \usetheme \begin \begin This is your first presentation! \end \endComments:
Compiling this code yields to a basic slide:
Let’s try now to create a simple title page.
To create a title page, the first thing to do is to add the title and subtitle of the presentation, the name of the author, the institute and the date. After that, we create a frame environment and we use \titlepage to print the provided details.
Here is a simple example:
% Quick start guide \documentclass \usetheme % Title page details \title <\LaTeX<>Beamer introduction> \subtitle \author \institute \date \begin \begin % Print the title page as the first slide \titlepage \end \endCompiling this code yields:
Are you looking for more fancy title pages? More details can be found in the lesson “ Your First LaTeX Presentation–Title Page ”.
Adding a logo to beamer presentations can be done easily using the \logo command. Between braces, we can add text or an image using \includegraphics[options] command.
Here is an illustrative example:
% Quick start guide \documentclass \usetheme % Title page details \title <\LaTeX<>Beamer introduction> \subtitle \author \institute \date % Image Logo \logo<\includegraphics[width=2.5cm]Compiling this code yields:
The position of this logo depends on the theme used. In the default theme, it is placed at the right bottom corner of each slide of the presentation.
– To add a logo only for the title page, we can use \titlegraphic<> instead of \logo<> command. Check below the compilation output.
For more details about adding and positioning a logo in Beamer, check this lesson!
The \tableofcontents command creates the table of contents as it did in LaTeX. The table automatically gets updated with the addition or removal of sections and subsections. We have to create a frame environment and we add the command in question.
% . % Presentation outline \begin \tableofcontents \end % .Title and subtitle of a frame is added between braces as follows: \begin .
This command will display all sections and subsection(if any) in the table of contents. To display only sections titles’ we add the option [hideallsubsections] in squared brackets to the \tableofcontents command as follows:
% Presentation outline \begin \tableofcontents[hideallsubsections] \endIt is also possible to create a recurring table of contents before every section. This highlights the current section and fades out the rest. This feature is used to remind the audience of where we are in the presentation. This can be done with the help of \AtBeginSection command and specifying [currentsection] in the \tableofcontents command. Please go through the example below for better understanding:
% Presentation outline \begin \tableofcontents[hideallsubsections] \end % Current section \AtBeginSection[ ] < \begin \tableofcontents[currentsection] \end >
At this point, you know the basics about creating an outline for your presentation. More details are presented in this lesson!
Lists can be created using three environments in beamer: \enumerate , \itemize , and \description . Nested lists can also be created by combining these environments. To create an entry in these environments, the \item command is used.
Let’s discuss these environments in detail:
Itemize is used to create unordered lists. Under this environment, the obtained list will have bullet points. Check the following code:
% . % Lists in beamer (Itemize) \begin \begin \item First item \item Second item \item Third item \end \endwhich yields the following:
There are various templates in beamer to change this itemized list appearance. The command \setbeamertemplate is used on itemize items to change the shape of item markers.
This environment is used to create an ordered list. By default, before each item increasing Arabic numbers followed by a dot are printed (eg. “1.” and “2.”).
Here is an example:
% Ordered Lists in beamer \begin \begin \item First item \item Second item \item Third item \end \endSimilar to itemize items, we can change the enumerate style by placing numbers inside different shapes using \setbeamertemplate and instead of itemize items we use enumerate items:
The list looks like the following:
The description environment is used to define terms or to explain acronyms. We provide terms as an argument to the \item command using squared bracket.
Here is an example:
Compiling this piece of code yields:
We created a detailed lesson about lists in beamer, check it here. It includes multi-frame list, spacing between list items, change the marker appearance, and much more!
Tables and figures are created pretty much the same way as it is in LaTeX. Check the following code:
% Tables in beamer \begin \begin \begin <| c || c | c |>\hline No. & Name & Age \\ \hline \hline 1 & John T & 24 \\ 2 & Norman P & 8 \\ 3 & Alex K & 14 \\ \hline \end \caption \end \endCompiling this code with the minimal code of a LaTeX presentation presented above yields:
Figures can be included in a beamer presentation using the figure environment. The image can be simply inserted using the \includegraphics command, since beamer already includes the graphicx package in it. The size and the label of the image can be set using the scale option and \caption command respectively.
Columns can be created in beamer using the environment named columns . Inside this environment, you can either place several column environments, each of which creates a new column, or use the \column command to create new columns.
Here is an illustrative example:
% Multicolumn frame in beamer \begin \begin % Column 1 \begin Text here! Text here! . \end % Column 2 \begin \includegraphics[scale=0.5] \end \end \endUnder the columns environment, the column environment is to be entered along with column width to text width ratio specified in curly brackets. This ratio is generally taken as 0.5. However, it can be customized as per the requirements, check this example:
The lesson “ Create and Customize Columns in Beamer” provides more details!
Information can be displayed in the form of blocks using block environment. These blocks can be of three types :
The standard block is used for general text in presentations. It has a blue color and can be created as follows:
% Blocks in beamer \begin<> \begin This is a simple block in beamer. \end \endThe purpose of the alert block is to stand out and draw attention towards the content. This block is used to display warning or prohibitions. The default color of this block is red. To display an alert block the code can be written as:
% Blocks in beamer \begin<> \begin This is an alert block in beamer. \end \endThis block is used to highlight examples as the name suggests and it can also be used to highlight definitions. The default color of this block is green and it can be created as follows:
% Blocks in beamer \begin<> \begin This is an example block in beamer. \end \endThe theorem block is used to display mathematical equations, theorems, corollary and proofs. The color of this block is blue. Here is an example:
% Blocks in beamer \begin \begin It's in \LaTeX<> so it must be true $ a^2 + b^2 = c^2$. \end \begin a = b \end \begin a + b = b + c \end \endTo create jumps from one slide to another slide in our talk, we can add hyperlinks to our presentation. When the hyperlink is clicked it jumps the presentation to the target slide. This can be achieved in beamer by following these steps:
We reached the end of this quick guide to LaTeX presentations. If you would like to go into details, check the beamer free course!
LaTeX-Beamer.com is a personal website about creating stylish and modern presentations in LaTeX, through step-by-step lessons.