* Setting `before` option of chapter breaks header text @ 2013-09-03 14:02 Michael Scholtz 2013-09-03 14:13 ` Wolfgang Schuster 0 siblings, 1 reply; 10+ messages in thread From: Michael Scholtz @ 2013-09-03 14:02 UTC (permalink / raw) To: ntg-context 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?) Here an example: \setuphead[chapter][ before=\hairline\blank, %<<< headers work, if this line is removed after=\nowhitespace\hairline, ] \setuppagenumbering[location=] % clear page numbers \startsectionblockenvironment[frontpart] \setupheadertexts[chapter][pagenumber] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setupheadertexts[{Chapter \getmarking[chapternumber]: \getmarking[chapter]}][pagenumber] \stopsectionblockenvironment \startsectionblockenvironment[backpart] \setupheadertexts[chapter][pagenumber] \stopsectionblockenvironment \startsectionblockenvironment[appendix] \setupheadertexts[{Appendix \getmarking[chapternumber]: \getmarking[chapter]}][pagenumber] \stopsectionblockenvironment \starttext \startfrontmatter \chapter{Front One} Here the header is correct. \chapter{Front Two} \stopfrontmatter \startbodymatter \chapter{Body One} Incorrect header on this page. \page[yes] Here the header is correct. \chapter{Body Two} \stopbodymatter \startbackmatter \chapter{Back One} Incorrect (none) header on this page. \chapter{Back Two} \stopbackmatter \startappendices \chapter{Appedix One} Incorrect header on this page. \chapter{Appedix Two} \stopappendices \stoptext 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Setting `before` option of chapter breaks header text 2013-09-03 14:02 Setting `before` option of chapter breaks header text Michael Scholtz @ 2013-09-03 14:13 ` Wolfgang Schuster 2013-09-03 14:32 ` Michael Scholtz 0 siblings, 1 reply; 10+ messages in thread From: Wolfgang Schuster @ 2013-09-03 14:13 UTC (permalink / raw) To: mailing list for ConTeXt users Am 03.09.2013 um 16:02 schrieb Michael Scholtz <scmicha@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 ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Setting `before` option of chapter breaks header text 2013-09-03 14:13 ` Wolfgang Schuster @ 2013-09-03 14:32 ` Michael Scholtz 2013-09-03 15:54 ` Wolfgang Schuster 0 siblings, 1 reply; 10+ messages in thread From: Michael Scholtz @ 2013-09-03 14:32 UTC (permalink / raw) To: mailing list for ConTeXt users On 03.09.2013, at 16:13, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote: > > Am 03.09.2013 um 16:02 schrieb Michael Scholtz <scmicha@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. I used `before` (probably in the wrong way ;-) ) to add more space above each chapter title. How to do this without `before`? 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Setting `before` option of chapter breaks header text 2013-09-03 14:32 ` Michael Scholtz @ 2013-09-03 15:54 ` Wolfgang Schuster 2013-09-03 18:22 ` Michael Scholtz 0 siblings, 1 reply; 10+ messages in thread From: Wolfgang Schuster @ 2013-09-03 15:54 UTC (permalink / raw) To: mailing list for ConTeXt users Am 03.09.2013 um 16:32 schrieb Michael Scholtz <scmicha@gmail.com>: > On 03.09.2013, at 16:13, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote: > >> >> Am 03.09.2013 um 16:02 schrieb Michael Scholtz <scmicha@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 ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Setting `before` option of chapter breaks header text 2013-09-03 15:54 ` Wolfgang Schuster @ 2013-09-03 18:22 ` Michael Scholtz 2013-09-03 18:32 ` Wolfgang Schuster 0 siblings, 1 reply; 10+ messages in thread From: Michael Scholtz @ 2013-09-03 18:22 UTC (permalink / raw) To: mailing list for ConTeXt users On 03.09.2013, at 17:54, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote: > > Am 03.09.2013 um 16:32 schrieb Michael Scholtz <scmicha@gmail.com>: > >> On 03.09.2013, at 16:13, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote: >> >>> >>> Am 03.09.2013 um 16:02 schrieb Michael Scholtz <scmicha@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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Setting `before` option of chapter breaks header text 2013-09-03 18:22 ` Michael Scholtz @ 2013-09-03 18:32 ` Wolfgang Schuster 2013-09-03 18:50 ` Michael Scholtz 2014-01-14 21:59 ` john Culleton 0 siblings, 2 replies; 10+ messages in thread From: Wolfgang Schuster @ 2013-09-03 18:32 UTC (permalink / raw) To: mailing list for ConTeXt users Am 03.09.2013 um 20:22 schrieb Michael Scholtz <scmicha@gmail.com>: > 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. TeX ignores a \blank at the begin of a page, to force the space you can “before=\blank[force,<value>]”. > But using `toffset` and `boffset` does the job, even without `\blank`s: This is wrong because the toffset and buffet control the margins *in* the boy and not around the box. Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Setting `before` option of chapter breaks header text 2013-09-03 18:32 ` Wolfgang Schuster @ 2013-09-03 18:50 ` Michael Scholtz 2014-01-14 21:59 ` john Culleton 1 sibling, 0 replies; 10+ messages in thread From: Michael Scholtz @ 2013-09-03 18:50 UTC (permalink / raw) To: mailing list for ConTeXt users On 03.09.2013, at 20:32, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote: > > Am 03.09.2013 um 20:22 schrieb Michael Scholtz <scmicha@gmail.com>: > >> 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. > > TeX ignores a \blank at the begin of a page, to force the space you can “before=\blank[force,<value>]”. > >> But using `toffset` and `boffset` does the job, even without `\blank`s: > > This is wrong because the toffset and buffet control the margins *in* the boy and not around the box. Thanks again, with `force` option everything works fine. 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Setting `before` option of chapter breaks header text 2013-09-03 18:32 ` Wolfgang Schuster 2013-09-03 18:50 ` Michael Scholtz @ 2014-01-14 21:59 ` john Culleton 2014-01-15 9:10 ` Hans Hagen 2014-01-15 19:42 ` john Culleton 1 sibling, 2 replies; 10+ messages in thread From: john Culleton @ 2014-01-14 21:59 UTC (permalink / raw) To: ntg-context On Tue, 3 Sep 2013 20:32:30 +0200 Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote: > > Am 03.09.2013 um 20:22 schrieb Michael Scholtz > <scmicha@gmail.com>: > > > 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. > > TeX ignores a \blank at the begin of a page, to > force the space you can > “before=\blank[force,<value>]”. > > > But using `toffset` and `boffset` does the > > job, even without `\blank`s: > > This is wrong because the toffset and buffet > control the margins *in* the boy and not around > the box. > > Wolfgang > ___________________________________________________________________________________ > If your question is of interest to others as > well, please add an entry to the Wiki! > > If the before option is just for space then how do I place a fleuron centered above the chapter title? That is what the customer wants. -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html PDF e-book: "Create Book Covers with Scribus" available at http://www.booklocker.com/books/4055.html ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Setting `before` option of chapter breaks header text 2014-01-14 21:59 ` john Culleton @ 2014-01-15 9:10 ` Hans Hagen 2014-01-15 19:42 ` john Culleton 1 sibling, 0 replies; 10+ messages in thread From: Hans Hagen @ 2014-01-15 9:10 UTC (permalink / raw) To: ntg-context On 1/14/2014 10:59 PM, john Culleton wrote: > On Tue, 3 Sep 2013 20:32:30 +0200 > Wolfgang Schuster <schuster.wolfgang@gmail.com> > wrote: > >> >> Am 03.09.2013 um 20:22 schrieb Michael Scholtz >> <scmicha@gmail.com>: >> >>> 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. >> >> TeX ignores a \blank at the begin of a page, to >> force the space you can >> “before=\blank[force,<value>]”. >> >>> But using `toffset` and `boffset` does the >>> job, even without `\blank`s: >> >> This is wrong because the toffset and buffet >> control the margins *in* the boy and not around >> the box. >> >> Wolfgang >> ___________________________________________________________________________________ >> If your question is of interest to others as >> well, please add an entry to the Wiki! >> >> > > If the before option is just for space then how > do I place a fleuron centered above the chapter > title? That is what the customer wants. before={\page\fleuron\blank} or so, assuming \fleuron exists or otherwise a command hooked into the title renderer ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Setting `before` option of chapter breaks header text 2014-01-14 21:59 ` john Culleton 2014-01-15 9:10 ` Hans Hagen @ 2014-01-15 19:42 ` john Culleton 1 sibling, 0 replies; 10+ messages in thread From: john Culleton @ 2014-01-15 19:42 UTC (permalink / raw) To: ntg-context On Tue, 14 Jan 2014 16:59:32 -0500 john Culleton <John@wexfordpress.com> wrote: > > > > > > > If the before option is just for space then how > do I place a fleuron centered above the chapter > title? That is what the customer wants. > Answered my own question. It seems that "before" can be used for more than just spacing. Here is the pertinent code from my files: ------------------------------------------------ \useexternalfigure[heart][heart.svg][width=1.5in] \def\fleuron{\centerline{\hbox{\externalfigure[heart]}}} \setuphead[chapter] [header=high,footer=chapter,page=right, alternative=middle, align=normal, number=no, page=mychapterpagebreak, style=ssbfc, before={\fleuron}, after={\blank[2*big]}] -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html PDF e-book: "Create Book Covers with Scribus" available at http://www.booklocker.com/books/4055.html ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-01-15 19:42 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-09-03 14:02 Setting `before` option of chapter breaks header text Michael Scholtz 2013-09-03 14:13 ` Wolfgang Schuster 2013-09-03 14:32 ` Michael Scholtz 2013-09-03 15:54 ` Wolfgang Schuster 2013-09-03 18:22 ` Michael Scholtz 2013-09-03 18:32 ` Wolfgang Schuster 2013-09-03 18:50 ` Michael Scholtz 2014-01-14 21:59 ` john Culleton 2014-01-15 9:10 ` Hans Hagen 2014-01-15 19:42 ` john Culleton
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).