From: Hans Hagen <pragma@wxs.nl>
Cc: "ConTeXt" <ntg-context@ntg.nl>
Subject: Re: redefining chapter (etc) appearence
Date: Thu, 05 Oct 2000 09:57:46 +0200 [thread overview]
Message-ID: <3.0.6.32.20001005095746.01222320@pop.wxs.nl> (raw)
In-Reply-To: <00e801c02e44$1c772cc0$ac430e97@nuovo>
At 10:41 PM 10/4/00 +0200, Giuseppe Bilotta wrote:
>Hello,
>
>I'm just beginning with ConTeXt, and thus I tried to do a thing that in
>LaTeX was very easy to do (using an appropriate package blah blah blah):
>redefining the appearence of the sectioning commands. More precisely, I want
>them to appear like
>
> Chapter <number>
>
> <chapter title>
>
>
>both being centered horizontally, with appropriate spacing, "Chapter
><number>" in small caps, \tfa (I use "real" small caps, and they seem to
>work properly :->), and <chapter title> written in bolf, \tfb. So I tried
>
>\def\ChapterHead#1#2{{\tfa \cap{Chapter #1}}\crlf{\tfb \bf #2}}
>
>(left the centering for the second step), without luck: \crlf doesn't (seem
>to) work, the chapter number is too big (even with {{\tfa\cap{Chapter}}#1}),
>and the chapter title is not boldfaced. So
>
>1) how do I make the "newline" with appropriate spacing? I did it in a
>second experiment by \hboxing the contents; is there some other way?
>2) how do I get a properly dimensioned chapter number?
>3) how do I get the proper font to the chapter title?
>4) (since we're at it) how do I center it all?
\def\ChapterHead#1#2{\vbox{#1\vskip12pt#1}} % you may add: \raggedcenter
\setuphead
[chapter]
[command=\ChapterHead,
allign=middle,
numberstyle=\bfa,
textstyle=\tfa]
\setuplabeltext[en][chapter=Chapter ] % given that your main language is en
So, fonts are passed automatically, and you should use a \vbox.
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
prev parent reply other threads:[~2000-10-05 7:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-04 20:41 Giuseppe Bilotta
2000-10-05 7:57 ` Hans Hagen [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=3.0.6.32.20001005095746.01222320@pop.wxs.nl \
--to=pragma@wxs.nl \
--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).