Beamer (Slides or Presentations): LaTeX Made Simple

Published: 08 September 2021
on channel: LaTeX Made Simple
468
10

PowerPoint-like presentations are possible with beamer class file in LaTeX. This video is a good introduction to its usage.

Credits:
Background image: https://www.churchmotiongraphics.com/
Channel link: https://youtube.com/channel/UC7OxZziq

1. Code to get progress bar in the slides:
\usepackage{tikz}
\usetikzlibrary{calc}
\definecolor{pbblue}{HTML}{0A75A8}% filling color for the progress bar
\definecolor{pbgray}{HTML}{575757}% background color for the progress bar
\makeatletter
\def\progressbar@progressbar{} % the progress bar
\newcount\progressbar@tmpcounta% auxiliary counter
\newcount\progressbar@tmpcountb% auxiliary counter
\newdimen\progressbar@pbht %progressbar height
\newdimen\progressbar@pbwd %progressbar width
\newdimen\progressbar@tmpdim % auxiliary dimension
\progressbar@pbwd=\linewidth
\progressbar@pbht=1.5ex
% the progress bar
\def\progressbar@progressbar{%
\progressbar@tmpcounta=\insertframenumber
\progressbar@tmpcountb=\inserttotalframenumber
\progressbar@tmpdim=\progressbar@pbwd
\multiply\progressbar@tmpdim by \progressbar@tmpcounta
\divide\progressbar@tmpdim by \progressbar@tmpcountb
\begin{tikzpicture}[rounded corners=2pt,very thin]
\shade[top color=pbgray!20,bottom color=pbgray!20,middle color=pbgray!50]
(0pt, 0pt) rectangle ++ (\progressbar@pbwd, \progressbar@pbht);
\shade[draw=pbblue,top color=pbblue!50,bottom color=pbblue!50,middle color=pbblue] %
(0pt, 0pt) rectangle ++ (\progressbar@tmpdim, \progressbar@pbht);
\draw[color=normal text.fg!50]
(0pt, 0pt) rectangle (\progressbar@pbwd, \progressbar@pbht)
node[pos=0.5,color=normal text.fg] {\textnormal{%
\pgfmathparse{\insertframenumber*100/\inserttotalframenumber}%
\pgfmathprintnumber[fixed,precision=2]{\pgfmathresult}\,\%%
}%
};
\end{tikzpicture}%
}
\addtobeamertemplate{headline}{}
{%
\begin{beamercolorbox}[wd=\paperwidth,ht=4ex,center,dp=1ex]{white}%
\progressbar@progressbar%
\end{beamercolorbox}%
}
\makeatother

2. Code to get the number of slides:
\setbeamertemplate{navigation symbols}
{\Large\color{red}\bf \insertframenumber/\inserttotalframenumber }

3. Code to get Table of Contents before each section:
\AtBeginSection[]
{
\begin{frame}{Table of Contents}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
}


Watch video Beamer (Slides or Presentations): LaTeX Made Simple online without registration, duration hours minute second in high quality. This video was added by user LaTeX Made Simple 08 September 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 468 once and liked it 10 people.