So, for example, the author for the Preface needs to line up directly under the author for the Foreword. And the title for Chapters One/Two and the date range for Chapter Three likewise. The 'Context' item is a \section and I have got that more or less to line up by using an \hspace definition, but I know that using two very different definitions is likely to cause problems. (Alternatively, they could all line up under the title for Chapter One, so a bit further in. What *has to happen* is that they all line up accurately under each other, whichever solution I use).
My real problem is that I do not know how get these specific distances from the left-hand side using the definitions I have. If I knew how to get, say, 3cm in from the margin for Chapter authors/titles/date ranges (given the definition below) and section authors (given its definition below), I could solve this problem, but everything I have tried does not seem to work. Wolfgang had given me the ChapterListCommand definition, and I think Hraban the SectionTocentry:
(1) CHAPTERLISTCOMMAND
\define[3]\ChapterListCommand
{\hbox\bgroup
\hbox to 2.5cm{\currentlistsymbol\hss}% number + labeltext
\vtop\bgroup
\hsize\dimexpr\makeupwidth-2.5cm\relax
\doifsomething{\rawstructurelistuservariable{year}}
{{\structurelistuservariable{year}}\crlf}%
\currentlistentrytitle % title
\doifsomething{\rawstructurelistuservariable{author}}
{\crlf{\structurelistuservariable{author}}}%
\hfill\currentlistentrypagenumber % pagenumber
\egroup
\egroup}
Is there somewhere in here that I can specify my distances other than
the \hbox 2.5cm? Note that I obviously also have (e.g. for the Preface,
but I have others for Foreword, etc.):
\setuplist
[preface]
[label=preface,
alternative=command,
command=\ChapterListCommand]
(2) SECTIONTOCENTRY
\definehspace[twoem][2.5 em]
\define[1]\SectionTocEntry{%
#1\hspace[twoem]% title
\structurelistuservariable{author}%
}
\setuplist[section][
textcommand=\SectionTocEntry,
margin=.5cm]
The [twoem] definition (in fact it is 2.5 em) was how I got the
'Context' author to roughly line up under the other items, but I have
noticed that in some repetitions of this section, they do not line up
exactly even so.
Hope somebody can help - in the end I suppose I can open it in a PDF editing program and shift items under each other, but I want to achieve the correct result using ConTeXt, understandably.
Julian
toc.pdf
Description: Adobe PDF document
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
