I have read these two posts with attention but.. still, there are things I would like to do with beamer overlay specifications that seem not straightforward.
In a nutshell, I need to mix absolute with relative overlays with a real concern for factorisation, lisibility and flexibility. Like "another way to think about overlay".
Here is the hardcoded version of the example I would like to refactor:
my \alert<1>{frame}: \hfill \visible<7>{cuckoo!}
\begin{itemize}
\item<2-> on the \alert<2>{second} slide
\item<3-> on the \alert<3>{third} slide
\item<4-> on the \alert<4>{fourth} then the \alert<5>{fifth} slides
\item<6-> on the \alert<6-7>{sixth} slide
\item<8-> on the \alert<8>{eighth} slide
\end{itemize}
\visible<9->{but keep it \alert<9-10>{flexible!}}
\visible<10-11>{.. please :'(}
Here is how I would like to rewrite it:
% sweet dream: `*` would mean "after the previous one, increase counter"
% `|` would mean "same as the previous one, counter safe"
% `*(2)` would add ".. during two slides, increase counter"
% `|(2)` would add ".. during two slides, counter safe"
% `|(+1)` would mean "one after the previous one, counter safe"
% `*(+2)` would mean "two after the previous one, increase counter"
% `(7)*` would mean "one after the absolute seventh one, increase counter"
my \alert<1>{frame}: \hfill \visible<7>{cuckoo!} % counter: 1
\begin{itemize}
\item<*-> on the \alert<|>{second} slide % counter: 2
\item<*-> on the \alert<|>{third} slide % counter: 3
\item<*-> on the \alert<|>{fourth} then the \alert<|(+1)>{fifth} slides % counter: 4
\item<*(+2)-> on the \alert<|(2)>{sixth} slide % counter: 6
\item<(7)*-> on the \alert<|>{eighth} slide % counter: 8
\end{itemize}
\visible<*->{but keep it \alert<|(2)>{flexible!}} % counter: 9
\visible<*(2)>{.. please :'(} % counter: 10
% the absolute `7` would be factorized away with `\def\anchor{7}`
.. of course, such * and | overlay operators do not exist as far as I know.
I have been screwing around with +, ., +(1), .(1), \stepcounter etc. with no
success (mostly falling into endless compilation loops).
What is the closest I could get from this alternative, oniric overlay language?
doing it myself?
I am aware this would imply that my code is read linearly, which may not be the way beamer actually works.
I think it would not be difficult to write parametrized commands and a dedicated counter, which would expand down to the actual absolute overlays I need (i.e. expand to hardcoded example above). But how to make them not evaluated multiple times during successive slides compilation?
Once they would've been written, how to get into overlay syntax so that \alert<\sameAsPreviousOneCounterSafeAdd{2}>{sixth} would be expanded from \alert<|(2)>{sixth}? LaTeX needs sugar.