ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Bruce D'Arcus" <darcusb@muohio.edu>
Subject: Chapter headings and tex boxes
Date: Thu, 8 Aug 2002 22:12:22 -0400 (EDT)	[thread overview]
Message-ID: <1634502.1028859142284.JavaMail.cpadmin@nassol01.mcs.muohio.edu> (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.


                 reply	other threads:[~2002-08-09  2:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1634502.1028859142284.JavaMail.cpadmin@nassol01.mcs.muohio.edu \
    --to=darcusb@muohio.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).