From: Thangalin <thangalin@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: struggling with section headers
Date: Mon, 10 Mar 2014 14:11:32 -0700 [thread overview]
Message-ID: <CAANrE7rwe421fDJ4hTPVSGZSbwaW-Tkq+417VJv0i_4+XUxfZg@mail.gmail.com> (raw)
In-Reply-To: <AB5BD5E0-F7DF-4F7E-998C-D07F3D40F3D8@fiee.net>
Hi,
Try using \testpage[3]. The 3 will have to vary depending on the
number of lines that the section titles can possibly take up. For
example, if the section title takes up 4 lines, then you might want to
use \testpage[5].
\usemodule[visual] % fakewords
\definepapersize[a6][width=105mm,height=148mm] % ConTeXt seems to have
forgotten about a5 and a6??
\setuppapersize[a6][a6] % small paper to get more breaks
\setupbodyfont[rm,9pt]
\setupinterlinespace[12pt]
\setupindenting[yes, medium, next]
\setupblank[big]
\setupcolor[state=start]
\setuplayout[grid=yes]
\setupheads[
align={right,nothyphenated},
tolerance=verytolerant,
grid=line
]
\definefont[SectionFont][Sans at 11pt] % fits within grid
\setuphead[section][
page=no, style={\SectionFont},
before={\blank\testpage[3]}, after={},
interlinespace=12pt
]
% dummy section with long, red title
\def\Section{
\startsection[title={\definecolor[fakerulecolor][red]Section
Title\fakewords{2}{15}\definecolor[fakerulecolor][black]}]
\fakewords{20}{50}\par\fakewords{20}{50}\par\fakewords{20}{50}\par
\stopsection
}
\starttext
\startchapter[title={See, ye mighty, and despair!}]
\fakewords{10}{30}
\dorecurse{20}{\Section}
\stopchapter
\stoptext
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2014-03-10 21:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 11:54 Henning Hraban Ramm
2014-03-10 11:16 ` Henning Hraban Ramm
2014-03-10 21:11 ` Thangalin [this message]
2014-03-11 4:01 ` Henning Hraban Ramm
2014-03-11 4:05 ` Henning Hraban Ramm
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=CAANrE7rwe421fDJ4hTPVSGZSbwaW-Tkq+417VJv0i_4+XUxfZg@mail.gmail.com \
--to=thangalin@gmail.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).