Re: [NTG-context] struggling with section headers

2014-03-10 Thread Henning Hraban Ramm

Am 2014-03-11 um 10:01 schrieb Henning Hraban Ramm :

> - In automatic typesetting, I can’t know how much lines my titles will take.
> - Still the space above titles becomes negative so that title and previous 
> lines of body text overlap.

Further, my setting of interlinespace for the titles seems to be ignored, the 
rest of the page is out of sync with the grid;
if I enable internalgrid=strict, I get a huge gap instead of the defined 
interlinespace, thr first line of the title just moves up even more into the 
previous paragraph.

Greetlings, 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
___


Re: [NTG-context] struggling with section headers

2014-03-10 Thread Henning Hraban Ramm
Am 2014-03-11 um 03:11 schrieb Thangalin :

> 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].

Thank you, it helps to palliate the symptoms, but it doesn’t cure the disease.

- In automatic typesetting, I can’t know how much lines my titles will take.
- Still the space above titles becomes negative so that title and previous 
lines of body text overlap.

Greetlings, 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
___


Re: [NTG-context] struggling with section headers

2014-03-10 Thread Thangalin
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
___


Re: [NTG-context] struggling with section headers

2014-03-10 Thread Henning Hraban Ramm
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
___


[NTG-context] struggling with section headers

2014-03-07 Thread Henning Hraban Ramm
Hi again,

I got a few different problems related to my section headers.

I use \startsection[title={Something}] … \stopsection, but not \startparagraph, 
in case that matters. (Latest MkIV beta on OSX.)

I need grid typesetting and use the same line spacing for body text and section 
headers (body text is 9pt, section headers are 11pt, interlinespace is 12pt).
But as soon as I enable grid typesetting, there’s at least one line of space 
after the header - doesn’t hurt, but my setup says:

\setupheads[
align={right,nothyphenated}, 
tolerance=verytolerant,
grid=line, 
number=no]

\setuphead[section][
page=no,
style={\SectionFont}, 
before={\blank\vfil},
after={\relax},
interlinespace=12pt]

Headers should stick with their (following) paragraph,
but they tend to stick with the previous line.
I.e. there are several pages that end somewhere in the middle, 
but their last line is on the next page above the section title.
   
I don’t want page=yes, but the section should start on a new page
rather than with just the title at the foot.

If a page starts with a header, there should be no additional space above it.

Did I miss some obvious setup?


Greetlings, 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
___