beamer add tag
Charles (imported from SE)
After my reading of a nice topic <https://tex.stackexchange.com/questions/59742/progress-bar-for-latex-beamer> on progress bar, I want to know if it is possible to do a progress bar which take into account all the whole slides and also the number of slides in the current subsection.

To be more precise, I would like a very simple progress bar as in <https://tex.stackexchange.com/questions/413760/change-the-color-or-the-progress-bar-indicator-in-the-beamer-metropolis-theme>, but when we can distinguish the different subsection. The aim of this is to allow people to know where we are in the subsection and in the entire presentation.

To be more precise with what I imagine, the principle would be the same as the one with the circle progress bar, you can tell how many slides remains in the current subsection and in the entire presentation. So I would like to do the same but with a progress bar, maybe by adding some vertical bars indicating the limits between the differents sections (subsections).

Top Answer
samcarter (imported from SE)
One could draw a simple progress bar with subsection marks in tikz:

    \documentclass{beamer}
    
    \usepackage{totcount}
    \newtotcounter{mysub}
    \AtBeginSubsection{\addtocounter{mysub}{1}\label{mysub:\themysub}}
    \newcounter{foo}
    \usepackage{refcount}
    \usepackage{tikz}
    
    \setbeamertemplate{footline}{%
        \begin{tikzpicture}
        	\draw[ultra thick] (0,0) -- (\thepage/\insertdocumentendpage*\paperwidth,0);
         	\foreach \x in {1,...,\totvalue{mysub}}{%
         		\setcounterpageref{foo}{mysub:\x}
    				\draw[thick] (\thefoo/\insertdocumentendpage*\paperwidth,0) -- (\thefoo/\insertdocumentendpage*\paperwidth,0.5);	
    
         	}
        \end{tikzpicture}
    
    }
    
    \begin{document}
    
    \section{section name}
    \subsection{section name}
    \begin{frame}
    \end{frame}
    
    \begin{frame}
    \end{frame}
    
    \subsection{section name}
    \begin{frame}
    \end{frame}
    
    \subsection{section name}
    \begin{frame}
    \end{frame}
    
    \section{section name}
    \subsection{section name}
    \begin{frame}
    \end{frame}
    
    \begin{frame}
    \end{frame}
    
    \end{document}

[![enter image description here][1]][1]


  [1]: https://i.stack.imgur.com/qd6Ba.gif

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.