On 03.09.2013, at 17:54, Wolfgang Schuster <schuster.wolfg...@gmail.com> wrote:
> > Am 03.09.2013 um 16:32 schrieb Michael Scholtz <scmi...@gmail.com>: > >> On 03.09.2013, at 16:13, Wolfgang Schuster <schuster.wolfg...@gmail.com> >> wrote: >> >>> >>> Am 03.09.2013 um 16:02 schrieb Michael Scholtz <scmi...@gmail.com>: >>> >>>> If chapter titles are styled using the `before` option, the header texts >>>> on each first page of the documents (body|back|appendix)part are >>>> incorrect, because chapter name and number are empty. >>>> (Tested with ConTeXt version 2013.05.28 00:36 and 2013.09.03 10:22) >>>> >>>> Is this a bug? (If not, is there any other way to set `before` without >>>> breaking the headers?) >>> >>> It’s the wrong method to add rules at the begin/end of a heading. >>> >>> A better way to add rules is to put a frame around the text. >>> >>> \defineframedtext >>> [ChapterFrame] >>> [frame=off, >>> width=\textwidth, >>> topframe=on, >>> bottomframe=on, >>> offset=0pt, >>> toffset=1ex, >>> boffset=1ex] >>> >>> \setuphead >>> [chapter] >>> [before=\startChapterFrame, >>> after=\stopChapterFrame] >>> >>> Wolfgang >> >> >> Thanks, I got this from the wiki page: >> http://wiki.contextgarden.net/Titles#Your_Own_Titling_Levels >> ...but it seems to be wrong there. > > It’s a solution which works but also with side effects because allow TeX to > break > the page between the rule and the heading which isn’t the case with framedtext > where the whole block is unbreakable. > >> I used `before` (probably in the wrong way ;-) ) to add more space above >> each chapter title. >> How to do this without `before`? > > Controlling the space before and after the heading is the default way in > which the before/after > keys are used. There has been a few suggestions to add a spacebefore key to > \setuphead which > will replace "before=\blank" for this but this hasn’t happened so far. > > In the example above you can now set the spaces before and after the heading > in the framedtext > setup with "before={\blank[2cm]}" and "after=\blank". > > Wolfgang Thanks for the hints. I tried `\blank` commands in `before`, but it seems to have to effect. A space before `\blank` (like `before={\ \blank[5em]}`) makes it work, but is not so nice. But using `toffset` and `boffset` does the job, even without `\blank`s: \defineframedtext[ChapterFrame][ frame=off, width=\textwidth, offset=0pt, toffset=5em, boffset=2em, ] \setuphead[chapter][ before=\startChapterFrame, after=\stopChapterFrame, ] Regards, Michael ___________________________________________________________________________________ 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 ___________________________________________________________________________________