From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Customizing chapter heads
Date: Sun, 25 Jan 2009 10:43:47 +0100 [thread overview]
Message-ID: <9E3CEA74-669D-486D-AA00-190CDAD3802F@gmail.com> (raw)
In-Reply-To: <b33fbfe10901241549k30e39cd1ta9c82b1918bb26f6@mail.gmail.com>
Am 25.01.2009 um 00:49 schrieb Alfredo Catalina:
> I am new to ConTeXt. I am trying to define a customized head for
> chapters but I am finding some problems. The sentences below are
> based on the chapter Text Elements which may be found in the ConTeXt
> manual.
>
> Prior to setting up the title, a new Head command is defined by \def
> \HeadTitle#1#2%. It takes two arguments, the chapter number and the
> chapter title. The Head so defined will show the word "C h a p t e
> r" in capitals, then the chapter number at 80pt, then a horizontal
> line, and finally the title.
>
> The definition works quite well except that both, the chapter number
> and the chapter title, are not show at the specified font size.
>
> \definebodyfont[10pt,11pt,12pt][rm][tff=Regular at 80pt]
> \definebodyfont[10pt,11pt,12pt][rm][tfe=Regular at 42pt]
\definebodyfont[10pt,11pt,12pt][ss][tfe=Sans at 42pt]
> \def\HeadTitle#1#2%
> {\hbox to \hsize \bgroup
> {\hfill %
> \setupframed[height=7cm,offset=.5em,frame=off]
> \framed[width=9cm,align=left]
> {
> {\tfc \sc {C~h~a~p~t~e~r}} ~~ {\tff #1}\\
> \hairline
> {\ss \tfe #2}
>
{\tfc \sc {C~h~a~p~t~e~r}} ~~ {#1}\\
\hairline
{#2}
> }
> }
> \egroup
> }
>
> \starttext
> \setuphead[chapter] [command=\HeadTitle]
\setuphead[chapter] [command=\HeadTitle,numberstyle=\tff,textstyle=\ss
\tfe]
> \chapter{An Insight\\Into Fred's Design}
> \stoptext
Wolfgang
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2009-01-25 9:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-24 23:49 Alfredo Catalina
2009-01-25 9:43 ` Wolfgang Schuster [this message]
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=9E3CEA74-669D-486D-AA00-190CDAD3802F@gmail.com \
--to=schuster.wolfgang@googlemail.com \
--cc=ntg-context@ntg.nl \
/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).