I want to create my own progress bar in my beamer presentation. This is my preamble code:

\documentclass[9pt, hyperref={pdfpagemode=FullScreen}]{beamer}


\definecolor{whitesmoke}{rgb}{0.96, 0.96, 0.96}


\definecolor{ghostwhite}{rgb}{0.97, 0.97, 1.0}

\definecolor{columbiablue}{rgb}{0.61, 0.87, 1.0}





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PROGRESS BAR 



    \fill [gray] (10,0) rectangle (13.0,0.5) ;

    \fill [blue] (0,0) rectangle (10,0.5);  



\setbeamertemplate{headline}{ \progressbar}




All the slides contain the same rectangles at the top:

enter image description here

I would like that in all slides the gray rectangle fills up with any color until the presentation ends, containing the frame number below.

  • Sorry for the typo. Is A progress bar with TIKZ Oct 17, 2020 at 23:51
  • Welcome to TeX.SE! Feel free to edit your question to fix typos and formatting :) For the code, you can select it and hit the icon that lookes like {} so that it's properly formatted in the questions with proper indentation.
    – Alenanno
    Oct 17, 2020 at 23:58
  • I did it for you. :)
    – Alenanno
    Oct 18, 2020 at 0:01

1 Answer 1


I made this before for myself.

% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = pdflatex
% !TEX spellcheck = English
% !TEX pdfSinglePage



\title[Math of Communication]{A Mathematical Theory of Communication}
\author[C.~E.~Shannon]{Claude E.~Shannon}
\institute{University of Informatics}



\makeatletter\defbeamertemplate*{sidebar right}{pro-bar}{
    \tikz[remember picture,overlay,x=3mm,y=\paperheight]{\footnotesize
        \path[save path=\stare,yscale=1/\safetotalframenumber]
        \tikzset{bar/.pic={\node at(-.55,-.5)[rotate=-90]
        \fill[use path=\stare,gray]pic[blue]{bar};
        \clip[use path=\stare]pic[green]{bar};

\frame{{Doe, a deer, a female deer}
    Beamer is a LaTeX document class for creating presentation slides,
    with a wide range of templates and a set of features for making slideshow effects.

\frame{{Ray, a drop of golden sun}
    It supports pdfLaTeX, LaTeX + dvips, LuaLaTeX and XeLaTeX.[1]
    The name is taken from the German word "Beamer"
    as a pseudo-anglicism for "video projector".

\frame{{Me, a name I call myself}
    The Beamer class is not the first LaTeX class for creating presentations,
    and like many of its predecessors
    (such as slides, seminar, prosper, powerdot),[2]
    it has special syntax for defining "slides"
    (known in Beamer as "frames").

\frame{{Far, a long, long way to run}
    Slides can be built up on-screen in stages
    as if by revealing text that was previously hidden or covered.
    This is handled with PDF output by creating successive pages
    that preserve the layout but add new elements,
    so that advancing to the next page in the PDF file
    appears to add something to the displayed page,
    when in fact it has merely redrawn the page.

\frame{{Sew, a needle pulling thread}
    The list of features supported by Beamer is quite long.
    The most important features, according to the user guide[1] are:

\frame{{La, a note to follow Sew}
        \item   Beamer can be used with pdfLaTeX, LaTeX+dvips, LuaLaTeX and XeLaTeX.
                LaTeX+dvipdfm isn’t supported.
        \item   The standard commands of LaTeX still work.
                A tableofcontents will still create a table of contents,
                section is still used to create structure,
                and itemize still creates a list.
        \item   Overlays and dynamic effects can be easily created.
        \item   The appearance of presentations can be modified using themes.

\frame{{Tea, a drink with jam and bread}
        \item   The layout, the colors, and the fonts
                used in a presentation can easily be changed globally,
                while preserving control over the most minute detail.
        \item   A special style file allows for the use the LaTeX source of
                a presentation directly in other LaTeX classes such as article or book.
                This makes it easy to create presentations out of
                lecture notes or lecture notes out of presentations.
        \item   The final output is typically a PDF file, making it highly portable
                and worry-free, in the sense that a given presentation
                will always look the same no matter the machine it is opened on.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .