I want to number the each section, subsection and subsubsecton in bookmarks of beamer using texlive 2018 version. This problem seems to have been solved many years ago according to the solutions provided by cybersingularity in question Adjust Bookmarks numbering in Beamer.
I followed it and solved it in texlive 2017 last year, however, I can not compile the code in texlive 2018 on Windows OS:
the bookmark is:
The code is as follows:
\documentclass{beamer}
\documentclass{beamer}
\hypersetup{
bookmarksnumbered=true
}
\setcounter{tocdepth}{4}
% get numbering in section bookmarks
\usepackage{etoolbox}
\usepackage{bookmark}
\makeatletter
\newcounter{realsection}
\newif\ifrealsection
\long\def\beamer@@ssection*#1{\realsectionfalse\beamer@section[{#1}]{}}
\long\def\beamer@@@section#1{\realsectiontrue\beamer@section[{#1}]{#1}}
\patchcmd{\beamer@section}%
{\refstepcounter{section}}%
{\ifrealsection\refstepcounter{realsection}\fi\refstepcounter{section}}%
{}{\errmessage{failed to patch}}
\patchcmd{\beamer@section}%
{\Hy@writebookmark{\the\c@section}{\secname}}%
{\Hy@writebookmark{\the\c@section}{\numberline{\therealsection}\secname}}%
{}{\errmessage{failed to patch}}
\patchcmd{\beamer@subsection}%
{\Hy@writebookmark{\the\c@subsection}{#2}}%
{\Hy@writebookmark{\the\c@subsection}{\numberline{\therealsection.\thesubsection}#2}}%
{}{\errmessage{failed to patch}}
\patchcmd{\beamer@subsubsection}%
{\Hy@writebookmark{\the\c@subsubsection}{#2}}%
{\Hy@writebookmark{\the\c@subsubsection}{\numberline{\therealsection.\thesubsection.\thesubsubsection}#2}}%
{}{\errmessage{failed to patch}}
\makeatother
\begin{document}
\section*{Intro}
\section{section}
\begin{frame}
\end{frame}
\subsection{subsection}
\begin{frame}
\end{frame}
\subsubsection{subsubsection}
\begin{frame}
\end{frame}
\section{section}
\begin{frame}
\end{frame}
\subsection{subsection}
\begin{frame}
\end{frame}
\subsubsection{subsubsection}
\begin{frame}
\end{frame}
\subsubsection{subsubsection}
\begin{frame}
\end{frame}
\end{document}
So, how do i modify the code above and number the subsection and subsusection?
Many thanks for your help.