Hi,

I'd like to get access to the first letter of a chapter for the
purpose of laying out the chapter heading, but I'm having difficulty
with expansion.

Here's my attempt:

\def\MyChapterTitle#1#2{%
  \def\doMyChapterTitle##1##2^{%
      {\tfb ##1}##2
  }
  #1 \doMyChapterTitle#2^
}

setuphead[chapter][command=\MyChapterTitle]

\starttext

\chapter{Foo}

bar

\stoptext

This doesn't work because the chapter title isn't expanded out before
passing it to \MyChapterTitle. I know there is deeptextcommand but I
need the chapter title during the layout of chapter number + title, so
I need to use command instead of deeptextcommand. I attempted to get
hold of the chapter title using the following

\def\MyChapterTitle#1#2{%
  \def\doMyChapterTitle##1##2^{%
      {\tfb ##1}##2
  }
  #1 \expandafter\doMyChapterTitle\expandafter{\fetchmark[chapter][first]}^
}

but that doesn't seem to work either. Any ideas?

Many thanks,

M
___________________________________________________________________________________
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