Hi Akim,
I hope I can be a bit of help to you. I have the need to generate
different sets of Beamer slides from the same sources, too. For
example, I teach the subject of sequential circuits in several
different courses, and make the set of slides longer or shorter,
depending on the course.
My current approach is based on the mode specifications of Beamer.
Beamer allows to have different variants for the presentation and
for the handout, for example, by adding <presentation| handout:0> or
<handout| presentation:0> to many commands, including \begin{frame}.
For itself, this does not help much. But Beamer ignores any invalid
mode specification, which I take advantage of. I specify something
like <all:0| tecin1-all> to have an extra frame for my TECIN1
course. Beamer ignores it, but first I feed my source code to a
little script that conditionally removes all "tecin1-" in the right
places. Therefore, it can become <all:0| all>, which is equivalent
to <all>.
When it comes to ranges of Beamer frames, I use something like
\mode<all:0| tecin1-all>{%
\begin{frame}
.....
\end{frame}
} % \mode<all:0| tecin1-all>
The only caveat is that this can break on "fragile" frames. In this
case, a per-frame mode specification helps.
I just uploaded the script at
http://homepages.hs-bremen.de/~jbredereke/en/software/slide-families/index.html
This approach was sufficient for a single source file feeding four
courses, each with two variants of Beamer slides, each with a
presentation and a handout variant. However, this is the upper limit
which I can handle.
I am currently working on a more generalized form, which will need
some new TeX code. However, I have not written any code yet, and my
technical report which will investigate the best syntax is still
*very* incomplete. The work progresses slowly because of all the
day-to-day teaching work I have to do.
As soon as I have a description of how it should work, I will post
it here (and on the above Web page) for feedback. One of the points
that is important to me is that I can have "modules" of several
frames which can be configured together to larger "modules", a bit
similar to what you described, but multi-level. (I once wrote an
entire Habilitation thesis on maintaining and configuring modules of
requirements specifications. Therefore my particular interest in
this subject.)
By the way, my draft report identifies some more ways of maintaining
variants:
- the ifthen package
- the input command
- the docstrip package
All of these have their limitations, of course. Otherwise I would
not be thinking about a more general approach.
> Just my wishes for this years' Christmas :)
So maybe it is now at least the first sunday of advent...
Best regards,
Jan
--
Prof. Dr. Jan Bredereke
University of Applied Sciences Bremen, Germany.
http://homepages.hs-bremen.de/~jbredereke GnuPG key available.