On 1-8-2010 10:20, Alan BRASLAU wrote:
On Saturday 31 July 2010 11:20:38 Hans Hagen wrote:
On 31-7-2010 1:08, Alan BRASLAU wrote:
Using parts is not as simple as it seems and is still somewhat problematic, or maybe I, too, am unable to read the source.
parts are just like chapters and sections; the defaults are just set up differently; don't think of them as something programatically different
Some logical subtleties, though, reflecting the different use either as "part" or as "volume":
A book (or single volume) may contain several parts, each one containing several chapters. One may wish to number the chapters subsequently, independent of the part structure.
This is no problem: \definestructureresetset [default] [0,0] [1] % do not reset parts and chapters (although the syntax is somewhat obscure here). also \setuphead [part] [sectionresetset=default,conversion=Romannumerals,placehead=yes] and \setuphead [chapter,section,subsection] [sectionsegments=2:100] \setuppagenumbering [alternative=doublesided,way=bytext,partnumber=no] (this is what Hans refers to as defaults that are set up differently).
[By the way, the default pagenumbering by part is a very reasonable default, as is resetting chapter numbering by part, for often "part" is synonymous with "volume". But not always: sometimes a book is to be broken into parts within a single volume.]
Now the front matter and the back matter are common to the entire book, logically part-less (if part is not to be taken as volume). The front matter may contain chapter(s) (preface, introduction, definitions) that may be unnumbered. The back matter will contain appendices (numbered), an index or indexes (unnumbered), etc.
For now, I have found no better way then to use funny definitions: \definehead [frontchapter] [chapter] % to get around broken bookmarks \setuphead [frontchapter] [incrementnumber=list] \definehead [unnumberedchapter] [chapter] \setuphead [unnumberedchapter] [incrementnumber=list] \definehead [unnumberedpart] [part] \setuphead [unnumberedpart] [incrementnumber=list,label=no] \definecombinedlist [content] [part,unnumberedpart,frontchapter,unnumberedchapter,chapter,section,subsection,subsubsection] \setuplist [part,unnumberedpart,frontchapter,unnumberedchapter,chapter,section,subsection,subsubsection] [alternative=c, % number – title – dots – pagenumber interaction=all]
A problem comes up when I want the main body parts to be labeled, as well as chapters, as in: \setuphead [part] [sectionresetset=default,conversion=Romannumerals,placehead=yes] \setuplabeltext [chapter=Chapter ] % with trailing space; blank by default \startsectionblockenvironment[bodypart] \setuplist [chapter] [label=yes] \stopsectionblockenvironment
The problem is always that easier setups also lead to more options (undocumented) that when explained lead to the previous code. At some point we can thing of some 'common preset' but I'm not yet sure how to implement that. btw, there is: \setupstructurehead [chapter] [appendixlabel=appendix, bodypartlabel=chapter] -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------