I recently read a book Algorithm Design by Jon Kleinberg and Eva Tardos, which is written in a very unique style. This book doesn't have any typical LaTeX environments such as theorem, lemma, and corollary as in CLRS textbook. Instead, all these important blocks are numbered sequentially.
For example, this image is captured from page 7 in chapter 1 of the KT textbook, which is available from the publisher's website. (This page explains Gale-Shapley's algorithm for Stable Marriage Problem.)
As you can see, the block numbered (1.1) and (1.2) can be Lemma in the usual textbook and (1.3) can be theorem. I love their writing style and I want to mimic it.
My Question: What is the best way to mimic this style of writing? Let's say that I want to define an environment textblock
which does the following to copycat KT style of writing.
- This environment can be either shaded or not. (As shown in the above picture, (1.3) block is shaded while (1.1) and (1.2) are not.)
- The numbering of this environment includes chapter number.
- I'd like this block spans across the entire
textwidth
.
How can I define such an environment?