I'm trying to understand why the hook AtBeginEnvironment{frame}
does not seem to apply in this MWE:
\documentclass{beamer}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usetheme{Madrid}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redéfinition de l'environnement frame
\AtBeginEnvironment{frame}{%
\frametitle{\thesection - \insertsection}%
\framesubtitle{\thesubsection - \insertsubsection}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\section{section n°1}
\subsection{sous-section 1-1}
\begin{frame}
Texte du slide.
\end{frame}
\end{document}
Normally, it should print a title and a subtitle in the frame, but for some reason that I don't understand it does not.
Thanks for helping.
\usepackage[latin1]{inputenc}
needs to be deleted