I'm currently writing a book, and I'd like some of the sections to be clearly marked as "difficult" or "optional". Not only sections, but also exercises (I'm using the exercise
package) and theorems (that I am defining with newtheorem
from amsthm
)). Something that would work for arbitrary sectioning levels, environments, etc would be great…
edit: I think I should have also said — I'd like something like a star at the margin, close to the section/theorem/etc, and, if it's a section or chapter, then there should be a star before it in the text and at the table of contents:
1 Introduction
1.1 blah
2.3 blah
2 Some Chapter
2.1 blah
* 2.2 this is an optional section
2.3 blah blah
edit: it would be nice if the star (or a configurable symbol of course) was placed before the section number.
Best Answer
The titletoc manual introduces an interesting method to do what you are after. It's illustrated best with an example.
This example starts with marking selected sections within a chapter. For marked chapters it needs to be modified accordingly.
As always, the blindtext package is only for creating dummy text, thus is not part of the solution.