From: Mari Voipio <mari.voipio@iki.fi>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Section title font define
Date: Tue, 3 Apr 2007 13:15:34 +0300 (EEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0704031253001.9795@lagavulin.sappho.net> (raw)
In-Reply-To: <f32c35750704030214g4290eb99s221c31c8806daaaf@mail.gmail.com>
On Tue, 3 Apr 2007, Roy Zuo wrote:
> I do not want to use \switchtobodyfont every time I type a chapter
> title, but I have no idea how to make it a style in the setup area.
Good news is that this is fairly easily done.
The Hello World document on ConTextwiki (ConTeXtGarden) has one
solution where the common nominators are given in one go and then more
stuff is added separately; see http://wiki.contextgarden.net/Hello_world
and the stuff starting with \setuphead
Now, my solution has been to define each heading level separately:
% This sets the look of the first level headings
\setuphead
[chapter]
[style=\sstfc,
prefix=+]
% This sets the look of the second level headings
\setuphead
[section]
[style=\sstfb,
before={\blank[2*big]}]
\setuphead
[subject]
[style=\sstfb,
before={\blank[2*big]}]
% Third level headings
\setuphead
[subsection]
[style=\ssbf]
Note: "section" and "subject" are of same level, but section is numbered
(1.2 etc.) while subject is not.
You can find this information and more
1) In the wiki on page http://wiki.contextgarden.net/Titles
2) In the beginner's manual ("Excursion") at
http://www.pragma-ade.com/general/manuals/ms-cb-en.pdf under "5 Headers"
(!)
3) In the big manual at
http://www.pragma-ade.com/general/manuals/cont-eni.pdf (this is the
interactive on-screen version) under "8 Text Elements"
Now, interestingly, I cannot find any direct examples how to give point
size to chapter heading, I'm used to doing just \tfa, \tfb and \tfc
(somewhat bigger than standard, quite a bit bigger, huge).
However, judging from the Hello World document, this might work out:
\setuphead
[chapter]
[style={\switchtobodyfont[18pt]}] %is {} needed here?
If the text should also be sans serif (Arial etc), this might be the way:
\setuphead
[chapter]
[style={\ss\switchtobodyfont[18pt]}]
Yep, both of the above work at least in my ConTeXt. So I learned something
new today! (Mostly thanks to Sanjoy's wonderful Hello World...)
This should give you a reasonable starting point, the rest you can
probably figure out with the documentation and some testing (been there,
done that, got it right in the end....)
Mari
next prev parent reply other threads:[~2007-04-03 10:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-03 9:14 Roy Zuo
2007-04-03 9:31 ` Zhichu Chen
2007-04-03 10:15 ` Mari Voipio [this message]
2007-04-03 10:40 ` Wolfgang Schuster
2007-04-03 11:17 ` Roy Zuo
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=Pine.LNX.4.64.0704031253001.9795@lagavulin.sappho.net \
--to=mari.voipio@iki.fi \
--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).