ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: struggling with section headers
Date: Mon, 10 Mar 2014 17:16:13 +0600	[thread overview]
Message-ID: <AB5BD5E0-F7DF-4F7E-998C-D07F3D40F3D8@fiee.net> (raw)
In-Reply-To: <F458BBC9-4AB8-431F-AADA-94B1B7FAAA6E@fiee.net>

Ok, second try. Here’s a rather minimal example:

———
\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}, after={},
  interlinespace=12pt
]

% dummy section with long, red title
\def\Section{
\startsection[title={\definecolor[fakerulecolor][red]\fakewords{5}{20}\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
———

Problems:
- section titles with several lines get negative space above (but not always) and overprint the last line(s) of the previous section.
- instead, the space before section titles must stay constant, but not show up, if a page starts with a section title
- section titles should stick to their section text and never stand alone at the bottom of a page

I guess the first is a bug and the others may need some setup options that I don’t know.


Grüßlinge, Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2014-03-10 11:16 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 [this message]
2014-03-10 21:11   ` Thangalin
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=AB5BD5E0-F7DF-4F7E-998C-D07F3D40F3D8@fiee.net \
    --to=texml@fiee.net \
    --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).