Hi Roman -
Comatose provides a data structure for content and logic for rendering, it has no logic that has anything to do with layout, so everything you are talking about with books and shelves (for which one might also use the more standard term of widgets) would have to be implemented on top of that. So I don't know what comatose is giving you for the scenario you are considering.
You could perhaps use the hierarchical structure of comatose as way to layout the pages.
For example, each page a person is creating could start as a page in comatose.
Then each content area/shelf that would contain some ordered set of widgets/books would be a subpage of the main page.
Finally, each widget/book would be a 'leaf' in the hierarchy, and would be ordered as a child subpage of the containing shelf.
so in comatose, the hierarchy might be structured like this:
root|+--> page
|
+--> shelf 1
| |
| +--> book 1
| |
| +--> book 2
|
|
+--> shelf 2
|
+--> book 1
|
+--> book 2
You would then need to create a page to render each comatose page that assumed the above structure, and used it to render the sections of the page. I am undecided how best to create that layout - either in the comatose page text itself, or as the layout for the comatose pages, but something like that. Just thinking about an approach here, not at all sure of the details.
That's my $.02, not sure it' a great idea, but that's one way to approach it.
-Andrew