Using epub as an example, one relatively simple way to do this would be to have two different stylesheets. One that displayed the chapter/section/paragraph numbering and one that hid it. The numbering information could be included in the text, but only displayed when using the proper stylesheet.
The problem with this is that I don't see how you can change stylesheets, as the epub standard doesn't support any scripting or programability. Using the standard as-is, you could provide a top level item in the TOC that allowed selecting either version. But without the ability to switch stylesheets, you would have to also provide two copies of the content, with the only difference being which stylesheet it linked to. Not ideal, but workable and relatively simple to implement.
|