The code below seems to work fine when the first MyChapterCommand is
commented out and the second one is active. However, when the first one is
active and the second one is commented out, the ToC does not display
properly. What could be causing this to happen?

I know that the first MyChapterCommand is not appropriate and use an
appropriate on in the front matter environment for the actual book.

\definetypeface [mainface] [rm] [serif] [palatino]    [default]
\definetypeface [mainface] [ss] [sans]  [iwona-heavy] [default]
\definetypeface [mainface] [tt] [mono]  [modern]      [default]
\definetypeface [mainface] [mm] [math]  [palatino]    [default]

\definetypeface [pagenumber] [ss] [sans] [iwona-light] [default]

\definetypeface [dedication] [rm] [serif] [chancery] [default]

\setupbodyfont[mainface]

%\starthiding
%Chapter number only - not appropriate for frontmatter
\def\MyChapterCommand#1#2% #1 is number, #2 is text
  {\framed[frame=off,bottomframe=on,topframe=on]
     {\vbox{\centerline{ #1}}}} 
%\stophiding

\starthiding
%lines above and below chapter number and title
\def\MyChapterCommand#1#2% #1 is number, #2 is text
  {\framed[frame=off,bottomframe=on,topframe=on]
     {\vbox{\headtext{chapter} #1\blank#2}}} 
\stophiding

% headings

\definestartstop[dedication][style={\switchtobodyfont[dedication,20pt]},befo
re=\page]
\definehead [intro]     [chapter]

\setuphead[chapter][style=\ss\bfd,alternative=middle,
  command=\MyChapterCommand,
  header=empty,footer=chapter,
  after={\blank[0.5in]},before={\blank[force,1.0in]}
  \placeinitial]

\setuphead[intro][number=no]
\setuphead[dedication][incrementnumber=no]

\definecombinedlist [content][intro,chapter,section]

% pagenumbers

\setuppagenumbering
    [state=start,alternative=doublesided,conversion=numbers,location=]
\setupheadertexts
 [chapter][pagenumber][pagenumber][My Book Title]
\setupheader[style={\switchtobodyfont[pagenumber,20pt]\sl}]

%turn on indentation 
\setupindenting[yes,medium,next]

\starttext
\dedication{}
\startdedication
\startalignment[middle]
To someone who inspired or supported me. Let's see how this works for
dedications that span multiple lines.
\stopalignment
\stopdedication
\completecontent
\intro{Introduction - Ag}
\input knuth
\chapter{First chapter - Ag}
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\chapter{Second Chapter - Ag}
\input knuth
\stoptext



Tom Benjey
717-258-9733 voice
717-243-0074 fax
blog: www.TomBenjey.com





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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to