This question led to a new package:
tagging
I'm trying to work out options for configuring a large memoir to multiple audiences via multiple editions.
Obviously one method of doing this is by building a master set of sections and then combining them into several different master documents which are basically a string of \input{} commands.
Another might be to define a set of section id environments and then include or exclude them with \newcomment{} \commentson{} and commentsoff{}
Yet another way would be an inverse of this: to tag each section with one or more labels. Something like this:
\begin{tagged}{managers,library}
\chapter{A Simple Introduction}
...
\end{tagged}
\begin{tagged}{sysprogs,library}
\chapter{A Complex Introduction}
...
\end{tagged}
\begin{tagged}{sysprogs,administrators}
\chapter{How to erase the system}
...
\end{tagged}
where I could then do something at the start like:
\usetag{sysprogs}
to build the "System Programmer" edition.
Is there a package that will do something like this?
Accepted @Leo Liu's answer. Bril.
