In math and science textbooks, we often have a main body of text that describes the principles, and interspersed throughout this text are examples. In upper-division and graduate texts, it seems like it's common simply to weave the examples into the text, whereas in freshman-level books they are usually set off from the main text by some graphical device. I think this is a good idea at the freshman level, because the audience is usually terrible at distinguishing basic principles from examples and trivia.
Below are some samples of this type of thing. Ideally I would like to have a package that would allow me to test-drive these styles just by changing one parameter in my class file. Is there such a thing? Or does anyone have a particular style, class, or package that has worked well for them? It's my experience that trying to do this kind of thing from scratch is often a lot of work to get right. Furthermore, styles like Grossman's seem difficult to manage without a lot of hand-tweaking of the visual design, because the different pieces of text in the margin end up colliding. I would also be happy to hear comments on the design and aesthetics.
like Grossman, Elementary linear algebra:
Kleppner and Kolenkow, An intro to mechanics:
Burke, Spacetime, geometry, cosmology
Morin, Intro to classical mechanics:




