I'm trying to use the same tex files for my lecture notes and my beamer. I'm using the same counter for all my environments (theorems, definitions, remarks, and so on) for better readability.
In my beamer presentation, some remarks don't appear, which means that I put them outside frame environments.
Hence, beamer ignores them (as I use the ignorenonframetext option), which in turns shifts the counters between my lecture notes and my presentation.
Is there a way to not show text outside the frame environments but keep the counters running?
Here is a MWE
\documentclass[ignorenonframetext]{beamer}
\setbeamertemplate{theorems}[numbered]
\usepackage{default}
\begin{document}
\begin{frame}
\begin{definition}
foo
\end{definition}
\end{frame}
\begin{definition}
bar
\end{definition}
\begin{frame}
\begin{definition}
baz
\end{definition}
\end{frame}
\end{document}
Second frame shows "Definition 2" whereas I would like to see "Definition 3".
Any tip ?
Thanks !