Re: Beamer: aggiungere il numero slide nella headline

#75554
Up
0
Down
::

DirkPitt” post=75059Ciao,

vorrei sapere se è possibile modificare il tuo codice per far si che ciascun miniframe nella headline corrisponda ad una subsection e non ad un frame.

Questo perchè se i quadri sono tanti i miniframe diventano troppi (mi si dispogono in verticale occupando circa mezzo foglio 🙁 ).

Ho fatto alcune prove partendo dal tuo codice e dalla documentazione di beamer ma non ci sono riuscito.

Grazie, ciao!

Forse sono arrivato a qualcosa di utile:

definendo due comandi \miniframeson e \miniframesoff che (come dicono i loro nomi) (dis)abilitano la creazione dei miniframe. In tal modo usando questi due comandi si può creare un miniframe per ogni subsection, alternando opportunamente on e off.

Per fare ciò bisogna lavorare sulla macro \beamer@writeslidentry che è quella che gestisce il file .nav (non so se è la sola).

Copio un esempio, se compilate notate che per la sezione 1 vengono prodotti solo 2 miniframe, per la sezione 2 invece viene generato un miniframe per ogni quadro

`
\documentclass[compress]{beamer}
\useoutertheme[subsection=false]{miniframes}
\makeatletter
\let\beamer@writeslidentry@miniframeson=\beamer@writeslidentry
\def\beamer@writeslidentry@miniframesoff{%
\expandafter\beamer@ifempty\expandafter{\beamer@framestartpage}{}% does not happen normally
{%else
% removed \addtocontents commands
\clearpage\beamer@notesactions%
}
}
\newcommand*{\miniframeson}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframeson}
\newcommand*{\miniframesoff}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframesoff}
\makeatother

\begin{document}
\frame{\tableofcontents}
\section{Section 1}
\subsection{Subsection 1}
\frame{\frametitle{Frame 1}}
\miniframesoff
\frame{\frametitle{Frame 2}}
\frame{\frametitle{Frame 3}}
\subsection{Subsection 2}
\miniframeson
\frame{\frametitle{Frame 1}}
\miniframesoff
\frame{\frametitle{Frame 2}}
\frame{\frametitle{Frame 3}}
\frame{\frametitle{Frame 4}}
\section{Section 2}
\miniframeson
\subsection{Subsection 1}
\frame{\frametitle{Frame 1}}
\frame{\frametitle{Frame 2}}
\frame{\frametitle{Frame 3}}
\subsection{Subsection 2}
\frame{\frametitle{Frame 1}}
\frame{\frametitle{Frame 2}}
\frame{\frametitle{Frame 3}}
\frame{\frametitle{Frame 4}}
\end{document}
`

PS VI avrei dato i link originali da cui ho preso vari pezzi del codice ma chi se li ritrova più :=)

Ciao

Go to top