ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Chapter headings and tex boxes
@ 2002-08-09  2:12 Bruce D'Arcus
  0 siblings, 0 replies; only message in thread
From: Bruce D'Arcus @ 2002-08-09  2:12 UTC (permalink / raw)


OK; this one has sample code :-)

Have finally gotten very close to what I want for a chapter heading.  
I'm not exactly sure what I've done, however, nor how to fix the 
remaining problem.  What this code does is place the chapter number at 
the top left of the page, and the title centered a bit below.  The 
problem is that I don't want the rbox to be a fixed 7em.  Rather, I 
want the size to be dependent on the size of the text that occupies it 
(because with a short one-line title I get considerably more whitespace 
between the title and the first paragraph than if the title is two 
lines).  Sooo...again with the question: "what do I do?"

\def\HeadTitle#1#2%
{\rbox to 7em \bgroup
\rbox{\framed[width=\hsize, align=right, frame=off]{#1}}%
\rbox{\framed[width=\hsize, align=middle, frame=off]{#2}}%
\egroup
 }

\setuphead
[chapter]
[command=\HeadTitle]

What I also have not figured out: how to get the caps command to work 
on the title and headings.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-09  2:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-09  2:12 Chapter headings and tex boxes Bruce D'Arcus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).