Hello everyone,

I have defined a macro for the chapter layouts -- nothing fancy, but still it is giving me trouble. Essentially, I call this macro using *command=* in *\setuphead*. My philosophy was to add all the details in the macro, so that I don't have to call anyother keyvalue pairs in *\setuphead*. However, the macro gives two different results when called for typesetting a chapter heading by ConTeXt internals and explicitly by me in the document (see attached file).

I don't know why the chapter number font style is not obeyed. If I add *numberstyle=dfont* in *\setuphead*, then the font size is increased but the frame size has spurious space at top and
bottom.

When I call the macro myself, there is a single whitespace before the chapter heading (as can be
seen in the attached file).

I have gone through the wiki as much as possible and I think that I could have easily copied *much better* heading styles from it. But I do not want to use code that I don't fully
understand.

Any suggestions/help will be most appreciated.

Regards,
Devendra


*MWE*

\definefont
 [dfont]
  [Serif at 60pt]

\definecolor[lightgrey][h=d8dcd6]

\define[2]\dmaketitle{%
  \starttable[|r|r|]
  \NC
    \framed
     [frame=on,
      rulethickness=3pt,
      framecolor=lightgrey,
      foreground=color,
      foregroundcolor=lightgrey,
      corner=00,
      align=right]
     {\hspace[big]{\dfont#1}}
  \NC
    \framed
     [width=.1\textwidth,
      strut=no,
      frame=on,
      align={flushleft,nothyphenated,verytolerant}]
     {{\kap\kerncharacters[.5]\tfc#2}}
  \NR
  \stoptable
}

\setuphead
  [chapter]
  [command=\dmaketitle]
   %numberstyle=\dfont

\starttext
 \chapter{Introduction to thesis}
 \dmaketitle{1}{Introduction to thesis}
\stoptext


<<attachment: Screenshot from 2013-02-08 11:53:14.png>>

___________________________________________________________________________________
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