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 You see, what should be natural (and probably the default) quickly gets to be a bit complicated. Furthermore, I have not yet been able to get everything that I want working. In the end, I'm sure that the solution will be quite easy. My point is that the use of \part (or, now, \startpart ... \stoppart) is not as simple and obvious as it should be. Alan