Jürgen Spitzmüller wrote:
> The attached module implements an "Enumerate-Resume" style for beamer. This
> works with LyX 2.0 and 2.1, with beamer and beamerarticle and both with
> default overlay settings and "mini templates" (although you need to re-
> specifiy this for each "resumed" list).
This one also works with multiple consequent Enumerate-Resumes.
Jürgen
#\DeclareLyXModule{Beamer Resumable Enumerate}
#DescriptionBegin
# Adds a layout 'Enumerate-Resume' to beamer that lets you continue an
enumerated list.
# This only works in the beamer and beamer-article classes.
#DescriptionEnd
# Author: Jürgen Spitzmüller <sp...@lyx.org>
Format 35
Style Enumerate-Resume
CopyStyle Enumerate
# a blue label to indicate that this is not a WYSIWYG label
# because the numbering differs in the output
LaTeXName resenumerate
LabelFont
Color blue
EndFont
Preamble
% Resumable enumeration
\newif\ifenumresume\enumresumefalse
\newcounter{saveenumi}
\only<presentation>{\resetcounteronoverlays{saveenumi}}
\usepackage{etoolbox}
\AtEndEnvironment{enumerate}{\setcounter{saveenumi}{\value{enumi}}}
\let\resenumerate\enumerate
\let\endresenumerate\endenumerate
\AtBeginEnvironment{resenumerate}{\enumresumetrue}
\AtEndEnvironment{resenumerate}{\enumresumefalse\setcounter{saveenumi}{\value{enumi}}}
\apptocmd{\beamer@enum@}{\ifenumresume\setcounter{enumi}{\value{saveenumi}}\fi}{}{}
\AtBeginDocument{%
\only<article>{%
\makeatletter
\apptocmd{\@enum@}{\ifenumresume\setcounter{enumi}{\value{saveenumi}}\fi}{}{}
\makeatother
}
}
EndPreamble
End