More or Less
Use case
I am writing an open source text on discrete mathematics. As in all
writing, the author tries to be cognizant of prospective readers. In
this case, ability level of readers may vary widely; the text is not
intended for a particular university. Ideally, it should serve Stanford
students as well as community college students. Diversity of
mathematical maturity level should be reflected in the structure of the
book: Students should have access to as detailed an explanation of a
concept, result, or proof as they need. No more, no less.
Specification
Since this amount of explanation varies among prospective students,
every high-level explanation can be accompanied by a <more> button,
which, when clicked, dynamically includes more explanatory details of
the concept, result, or proof. The dynamically included explanation is
indented.
The <more> button is a toggle: After being clicked, it becomes a <less>
button, which, when clicked, hides the extra explanation.
Such <more | less> buttons can be nested, supporting many levels of
mathematical maturity.
Export Implementation issues
As far as I know, dvi and pdf documents do not support this sort of
dynamic behavior. However, HTML, at least in principle, can support such
behavior.
For document formats that do not support dynamic behavior, all
explanation levels are included statically. For HTML, there could be a
tag, such as <more> . . . </more> and some corresponding Javascript to
support dynamic expansion/contraction.
How does this sound?
-Pete Cappello