I am making a book, with chapters titled "Week 1", "Week 2", "Week 3", etc., and sections titled "Activity 1", "Activity 2", "Activity 3", etc., and other sections titled "Presentation 1", "Presentation 2", "Presentation 3", etc.
- The preceding numbers, e.g. "1.1 Activity 1", are not used.
- No other text, e.g. "Week 1 Topic" appears in the text.
- The numbers for sections never reset.
Here is a sample table of contents, showing how I hope it will appear:
______________________
| |
| Contents |
| |
| Week 1 |
| Activity 1 |
| Activity 2 |
| Presentation 1 |
| Week 2 |
| Activity 3 |
| Activity 4 |
| Presentation 2 |
|______________________|
The document occassionally has other orginary chapter and section titles as well. These should get the same font formatting, but otherwise, not be modified, and appear without any number, e.g., using chapter titles "Forward", "Conclusion", and a section title called "Notes":
______________________
| |
| Contents |
| |
| Forward |
| Week 1 |
| Activity 1 |
| Activity 2 |
| Presentation 1 |
| Week 2 |
| Activity 3 |
| Notes |
| Conclusion |
|______________________|
I have tried my own solution, by removing the preceding numbers using \setuphead[chapter][number=no]
, creating counters, e.g. \definenumber[weekcount]
, then defining custom macros which call for chapter titles to use these counters, however, my solution does not work:
\definenumber[weekcount]
\definenumber[activitycount]
\definenumber[presentationcount]
\setnumber[weekcount]{1}
\setnumber[activitycount]{1}
\setnumber[presentationcount]{1}
\define\week{\chapter{Week~\getnumber[weekcount]}\incrementnumber[weekcount]}
\define\activity{\section{Activity~\getnumber[activitycount]}\incrementnumber[activitycount]}
\define\presentation{\section{Presentation~\getnumber[presentationcount]}\incrementnumber[presentationcount]}
\setuphead[chapter][number=no]
\setuphead[section][number=no]
\starttext
\week
\activity
This is some text.
\activity
This is some text.
\presentation
This is some text.
\week
\activity
This is some more text.
\activity
This is some more text.
\presentation
This is some more text.
\stoptext
This results in this:
______________________
| |
| Contents |
| |
| Week |
| Activity |
| Activity 1 |
| Presentation |
| Week |
| Activity |
| Activity 1 |
| Presentation |
|______________________|
If you remove \setuphead[chapter][number=no]
, results are also unusual:
______________________
| |
| Contents |
| |
| 1. Week 1. |
| 1.1 Activity 1. |
| 1.2 Activity 1.1 |
| 1.2 Presentation 1. |
| 2. Week 2. |
| 2.1 Activity 2 |
| 2.2 Activity 2.1 |
| 2.3 Presentation 2. |
|______________________|
- Why is the numbering of the counters appear in this manner, when used inside section titles?
- How can I create custom chapter titles using a "Week " format, and similarly formatted section titles?
groupcount
appears to be unused in the example -- is this on purpose? – Philipp Gesang Jun 11 '12 at 6:51