Author considering a novel with a dramatic plot that counts down from 10 to 0.

Challenge: Can I get ConTeXt to do this for him by ensuring that we get either Parts to decrement 10 to 0 or Chapter numbers to do it instead?

Right out of my depth here but I thought of trying to at least play around with one idea (defining a ChapterStartNumber and a ReverseChapterNumber).

I get 10 for every Chapter if I do something like

\def\ChapterStartNumber{10}

\define[1]\ReverseChapterNumber{%

    \number\numexpr \ChapterStartNumber - \rawcountervalue[chapter] \relax

}

\setuphead[chapter][number=yes,numbercommand=\ReverseChapterNumber]

\starttext

\chapter{First chapter}

Some text.

\chapter{Second chapter}

\stoptext

So I wondered if I tried to do something different with the \setuphead:

\setuphead[chapter][before={%
    \advance\ChapterStartNumber by -1 % decrement before each chapter
}]

But that won't compile.

Then I guess there is the problem that he wants the last chapter to be 0 not 1.

Any thoughts?

Julian
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to