* Grey background for pages belonging to last section of every chapter @ 2015-01-30 15:13 Rob Heusdens 2015-01-30 16:18 ` Rob Heusdens 0 siblings, 1 reply; 12+ messages in thread From: Rob Heusdens @ 2015-01-30 15:13 UTC (permalink / raw) To: ntg-context Hello list, For the last section of every chapter I want a grey background for the text, which otherwise should look the same as every other section, except that it starts on a new page (I can set that by defining my own section command). The last section summarizes the chapter. My current implementation is using a frame: \defineframed[achtergrond] [frame=off, background=color, backgroundcolor=gray, width=fit, height=fit, offset=2ex, align={flushleft,nothyphenated,verytolerant}] And use it as: \achtergrond{ \section{Last section} \startitemize[n] \item ... \stopitemize } But this does not accomodate sections longer then a page. And I can't place \page command in the middle of an itemize, and using \stopitemize, \startitemize[continue] makes the pages vary in sizes. Is there some way to achieve the desired effect (grey background behind the text, and otherwise page layour identical to other sections) without the problem that text exceeds the page size? Greetings, Rob PS. The defined frame is also used elsewhere, but the last section should in fact not have normal alignment like the other sections. ___________________________________________________________________________________ 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] 12+ messages in thread
* Re: Grey background for pages belonging to last section of every chapter 2015-01-30 15:13 Grey background for pages belonging to last section of every chapter Rob Heusdens @ 2015-01-30 16:18 ` Rob Heusdens 2015-01-30 16:34 ` Wolfgang Schuster 0 siblings, 1 reply; 12+ messages in thread From: Rob Heusdens @ 2015-01-30 16:18 UTC (permalink / raw) To: mailing list for ConTeXt users > Hello list, > > For the last section of every chapter I want a grey background for the > text, which otherwise should look the same as every other section, except > that it starts on a new page (I can set that by defining my own section > command). > > The last section summarizes the chapter. > > My current implementation is using a frame: > > > \defineframed[achtergrond] > [frame=off, > background=color, > backgroundcolor=gray, > width=fit, > height=fit, > offset=2ex, > align={flushleft,nothyphenated,verytolerant}] > > And use it as: > > \achtergrond{ > \section{Last section} > > \startitemize[n] > \item ... > \stopitemize > } > > But this does not accomodate sections longer then a page. And I can't > place \page command in the middle of an itemize, and using \stopitemize, > \startitemize[continue] makes the pages vary in sizes. > > Is there some way to achieve the desired effect (grey background behind > the text, and otherwise page layour identical to other sections) without > the problem that text exceeds the page size? > > Greetings, > > Rob > > PS. The defined frame is also used elsewhere, but the last section should > in fact not have normal alignment like the other sections. > > > What perhaps fixes this problem is defining my own section command like this: \definehead[summary][section] \setuphead[summary] [ number=no, style=bold, before={\page\setupbackgrounds[text][text][state=start] [background=color,backgroundcolor=gray]}, after={\setupbackgrounds[text][text][state=stop]} ] According to the wiki (http://wiki.contextgarden.net/Command/setupbackgrounds) that should work, but Context doesn't seem to understand the syntax and prints the part: "[background=color,backgroundcolor=gray]" before the section title. What did I do wrong? Greetings, Rob ___________________________________________________________________________________ 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] 12+ messages in thread
* Re: Grey background for pages belonging to last section of every chapter 2015-01-30 16:18 ` Rob Heusdens @ 2015-01-30 16:34 ` Wolfgang Schuster 2015-01-30 17:17 ` Rob Heusdens 0 siblings, 1 reply; 12+ messages in thread From: Wolfgang Schuster @ 2015-01-30 16:34 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2530 bytes --] > Am 30.01.2015 um 17:18 schrieb Rob Heusdens <robheus@xs4all.nl>: > >> Hello list, >> >> For the last section of every chapter I want a grey background for the >> text, which otherwise should look the same as every other section, except >> that it starts on a new page (I can set that by defining my own section >> command). >> >> The last section summarizes the chapter. >> >> My current implementation is using a frame: >> >> >> \defineframed[achtergrond] >> [frame=off, >> background=color, >> backgroundcolor=gray, >> width=fit, >> height=fit, >> offset=2ex, >> align={flushleft,nothyphenated,verytolerant}] >> >> And use it as: >> >> \achtergrond{ >> \section{Last section} >> >> \startitemize[n] >> \item ... >> \stopitemize >> } >> >> But this does not accomodate sections longer then a page. And I can't >> place \page command in the middle of an itemize, and using \stopitemize, >> \startitemize[continue] makes the pages vary in sizes. >> >> Is there some way to achieve the desired effect (grey background behind >> the text, and otherwise page layour identical to other sections) without >> the problem that text exceeds the page size? >> >> Greetings, >> >> Rob >> >> PS. The defined frame is also used elsewhere, but the last section should >> in fact not have normal alignment like the other sections. >> >> >> > > What perhaps fixes this problem is defining my own section command like this: > > \definehead[summary][section] > > \setuphead[summary] > [ > number=no, > style=bold, > before={\page\setupbackgrounds[text][text][state=start] > [background=color,backgroundcolor=gray]}, > after={\setupbackgrounds[text][text][state=stop]} > ] > > According to the wiki > (http://wiki.contextgarden.net/Command/setupbackgrounds <http://wiki.contextgarden.net/Command/setupbackgrounds>) that should work, > but Context doesn't seem to understand the syntax and prints the part: > "[background=color,backgroundcolor=gray]" before the section title. > > What did I do wrong? 1. Put both assignments in the same argument, i.e. change \setupbackgrounds[text][text][state=start][background=color,backgroundcolor=gray] to \setupbackgrounds[text][text][state=start,background=color,backgroundcolor=gray] 2. You have to finish the page before you disable the coloured background. after={\page\setupbackgrounds[…]} Wolfgang [-- Attachment #1.2: Type: text/html, Size: 17391 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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] 12+ messages in thread
* Re: Grey background for pages belonging to last section of every chapter 2015-01-30 16:34 ` Wolfgang Schuster @ 2015-01-30 17:17 ` Rob Heusdens 2015-01-30 17:27 ` Wolfgang Schuster 0 siblings, 1 reply; 12+ messages in thread From: Rob Heusdens @ 2015-01-30 17:17 UTC (permalink / raw) To: mailing list for ConTeXt users > >> Am 30.01.2015 um 17:18 schrieb Rob Heusdens <robheus@xs4all.nl>: >> >>> Hello list, >>> >>> For the last section of every chapter I want a grey background for the >>> text, which otherwise should look the same as every other section, >>> except >>> that it starts on a new page (I can set that by defining my own section >>> command). >>> >>> The last section summarizes the chapter. >>> >>> My current implementation is using a frame: >>> >>> >>> \defineframed[achtergrond] >>> [frame=off, >>> background=color, >>> backgroundcolor=gray, >>> width=fit, >>> height=fit, >>> offset=2ex, >>> align={flushleft,nothyphenated,verytolerant}] >>> >>> And use it as: >>> >>> \achtergrond{ >>> \section{Last section} >>> >>> \startitemize[n] >>> \item ... >>> \stopitemize >>> } >>> >>> But this does not accomodate sections longer then a page. And I can't >>> place \page command in the middle of an itemize, and using >>> \stopitemize, >>> \startitemize[continue] makes the pages vary in sizes. >>> >>> Is there some way to achieve the desired effect (grey background behind >>> the text, and otherwise page layour identical to other sections) >>> without >>> the problem that text exceeds the page size? >>> >>> Greetings, >>> >>> Rob >>> >>> PS. The defined frame is also used elsewhere, but the last section >>> should >>> in fact not have normal alignment like the other sections. >>> >>> >>> >> >> What perhaps fixes this problem is defining my own section command like >> this: >> >> \definehead[summary][section] >> >> \setuphead[summary] >> [ >> number=no, >> style=bold, >> before={\page\setupbackgrounds[text][text][state=start] >> [background=color,backgroundcolor=gray]}, >> after={\setupbackgrounds[text][text][state=stop]} >> ] >> >> According to the wiki >> (http://wiki.contextgarden.net/Command/setupbackgrounds >> <http://wiki.contextgarden.net/Command/setupbackgrounds>) that should >> work, >> but Context doesn't seem to understand the syntax and prints the part: >> "[background=color,backgroundcolor=gray]" before the section title. >> >> What did I do wrong? > > 1. Put both assignments in the same argument, i.e. change > > \setupbackgrounds[text][text][state=start][background=color,backgroundcolor=gray] > > to > > \setupbackgrounds[text][text][state=start,background=color,backgroundcolor=gray] > > 2. You have to finish the page before you disable the coloured background. > > after={\page\setupbackgrounds[â¦]} > > Wolfgang Hello Wolfgang, Yes, of course! I misinterpreted it, but now I see there is in fact only 3 options, not 4. I was misdirected by the 4 lines displayed below the command explaining the syntax. Problem is however resetting the background. In the after option of \setuphead will not work, the \page is ejected directly after the section title. I want to reset to normal background after the section itself finishes. After this special section (summary) always a new chapter begins (except perhaps the last summary). Should I add that manually as the last command of every summary (where also the chapter ends), or is there some way to perform a command after the summary itself (at the location where one would place \stopsummary if using the \startsummary syntax) ends? The background should only be displayed behind the text itself, not the whole text area (so if a section ends halfway of the page, the bottom part should have no background) with some extra space surrounding it (above,below,left,right) using the offset or perhaps backgroundoffset options of \setupframed). Greetings, Rob ___________________________________________________________________________________ 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] 12+ messages in thread
* Re: Grey background for pages belonging to last section of every chapter 2015-01-30 17:17 ` Rob Heusdens @ 2015-01-30 17:27 ` Wolfgang Schuster 2015-01-30 18:28 ` Rob Heusdens 0 siblings, 1 reply; 12+ messages in thread From: Wolfgang Schuster @ 2015-01-30 17:27 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1438 bytes --] > Am 30.01.2015 um 18:17 schrieb Rob Heusdens <robheus@xs4all.nl>: > > Problem is however resetting the background. In the after option of > \setuphead will not work, the \page is ejected directly after the section > title. I want to reset to normal background after the section itself > finishes. After this special section (summary) always a new chapter begins > (except perhaps the last summary). > > Should I add that manually as the last command of every summary (where > also the chapter ends), or is there some way to perform a command after > the summary itself (at the location where one would place \stopsummary if > using the \startsummary syntax) ends? > > The background should only be displayed behind the text itself, not the > whole text area (so if a section ends halfway of the page, the bottom part > should have no background) with some extra space surrounding it > (above,below,left,right) using the offset or perhaps backgroundoffset > options of \setupframed). Use text backgrounds. \definetextbackground [SummaryBackground] [frame=off, background=color, backgroundcolor=gray] \definehead[summary][section] \setuphead [summary] [before=, beforesection={\blank\starttextbackground[SummaryBackground]}, aftersection={\stoptextbackground\blank}] \starttext \startsection[title=Knuth] \input{knuth} \stopsection \startsummary[title=Zapf] \input{zapf} \stopsummary \stoptext Wolfgang [-- Attachment #1.2: Type: text/html, Size: 13303 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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] 12+ messages in thread
* Re: Grey background for pages belonging to last section of every chapter 2015-01-30 17:27 ` Wolfgang Schuster @ 2015-01-30 18:28 ` Rob Heusdens 2015-01-30 19:05 ` Wolfgang Schuster 0 siblings, 1 reply; 12+ messages in thread From: Rob Heusdens @ 2015-01-30 18:28 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: text/plain, Size: 2477 bytes --] > Use text backgrounds. > > \definetextbackground > [SummaryBackground] > [frame=off, > background=color, > backgroundcolor=gray] > > \definehead[summary][section] > > \setuphead > [summary] > [before=, > beforesection={\blank\starttextbackground[SummaryBackground]}, > aftersection={\stoptextbackground\blank}] > > \starttext > > \startsection[title=Knuth] > > \input{knuth} > > \stopsection > > \startsummary[title=Zapf] > > \input{zapf} > > \stopsummary > > \stoptext > > Wolfgang Hello Wolfgang, Your example works. After adjusting the \summary to using \startsummary, \stopsummary, and using your code, with only minor additions, as below: \definetextbackground [SummaryBackground] [frame=off, background=color, backgroundcolor=gray, backgroundoffset=2ex] % <- added \definehead[summary][section] \setuphead[summary] [number=no, % <- added style=bold, % <- added before=, beforesection={\page\starttextbackground[SummaryBackground]}, % <- changed \blank to \page aftersection={\stoptextbackground\page}] % <- changed \blank to \page I get some unwanted result. See the picture. The bold does not show up, and a small portion of the topleft corner of the background frame is missing.... Changing bold to italic also has no effect. Something strange.... Also trying with \blank instead of \page, the background then starts right after the previous section, and it seems the indentation causes the missing background on the first line. So I placed "\noindentation\page" into beforesection (replacing \blank) and get the background result I want, but still the bold is missing in the summary title, and too much whitespace appears before the section title. The title should be placed in the same position as normal text would appear (and as a side note: in fact I am copying a style that was used in a printed book that I typeset, in which each section title - except for the summary - is just a normal sentence (or 2) typeset bold, with the rest of the text appearing after the section title just as after a normal sentence, so no vertical space between title and first sentence of the section. Since it appears in the content also, I had to use section commands, but is this behaviour duplicatable using setuphead for section?) How can I adjust that? Greetings, Rob (my context version is 2014.12.03 18:26) [-- Attachment #2: picture7.png --] [-- Type: image/png, Size: 29117 bytes --] [-- Attachment #3: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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] 12+ messages in thread
* Re: Grey background for pages belonging to last section of every chapter 2015-01-30 18:28 ` Rob Heusdens @ 2015-01-30 19:05 ` Wolfgang Schuster 2015-01-30 20:36 ` Rob Heusdens 2015-01-30 20:43 ` Rob Heusdens 0 siblings, 2 replies; 12+ messages in thread From: Wolfgang Schuster @ 2015-01-30 19:05 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2736 bytes --] > Am 30.01.2015 um 19:28 schrieb Rob Heusdens <robheus@xs4all.nl>: > >> Use text backgrounds. >> >> \definetextbackground >> [SummaryBackground] >> [frame=off, >> background=color, >> backgroundcolor=gray] >> >> \definehead[summary][section] >> >> \setuphead >> [summary] >> [before=, >> beforesection={\blank\starttextbackground[SummaryBackground]}, >> aftersection={\stoptextbackground\blank}] >> >> \starttext >> >> \startsection[title=Knuth] >> >> \input{knuth} >> >> \stopsection >> >> \startsummary[title=Zapf] >> >> \input{zapf} >> >> \stopsummary >> >> \stoptext >> >> Wolfgang > > Hello Wolfgang, > > Your example works. After adjusting the \summary to using \startsummary, > \stopsummary, and using your code, with only minor additions, as below: > > \definetextbackground > [SummaryBackground] > [frame=off, > background=color, > backgroundcolor=gray, > backgroundoffset=2ex] % <- added > > \definehead[summary][section] > > \setuphead[summary] > [number=no, % <- added > style=bold, % <- added > before=, > beforesection={\page\starttextbackground[SummaryBackground]}, % <- > changed \blank to \page > aftersection={\stoptextbackground\page}] % <- changed \blank to \page > > I get some unwanted result. See the picture. > > The bold does not show up, and a small portion of the topleft corner of > the background frame is missing.... > > Changing bold to italic also has no effect. > > Something strange.... > > Also trying with \blank instead of \page, the background then starts right > after the previous section, and it seems the indentation causes the > missing background on the first line. > > So I placed "\noindentation\page" into beforesection (replacing \blank) > and get the background result I want, but still the bold is missing in the > summary title, and too much whitespace appears before the section title. > > The title should be placed in the same position as normal text would > appear (and as a side note: in fact I am copying a style that was used in > a printed book that I typeset, in which each section title - except for > the summary - is just a normal sentence (or 2) typeset bold, with the rest > of the text appearing after the section title just as after a normal > sentence, so no vertical space between title and first sentence of the > section. Since it appears in the content also, I had to use section > commands, but is this behaviour duplicatable using setuphead for section?) > > > How can I adjust that? Make a working minimal example which shows the problem because I’cant reproduce the problems you mention. Wolfgang [-- Attachment #1.2: Type: text/html, Size: 34815 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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] 12+ messages in thread
* Re: Grey background for pages belonging to last section of every chapter 2015-01-30 19:05 ` Wolfgang Schuster @ 2015-01-30 20:36 ` Rob Heusdens 2015-01-30 20:43 ` Rob Heusdens 1 sibling, 0 replies; 12+ messages in thread From: Rob Heusdens @ 2015-01-30 20:36 UTC (permalink / raw) To: mailing list for ConTeXt users > Make a working minimal example which shows the problem because Icant > reproduce the problems you mention. > > Wolfgang Hello Wofgang, So far I am unable of re-producing the missing bold description for summary section titles (and all of sudden, the summary titles no longer show up in the TOC either even though 'summary' is included in the definedcombinedlist , although the page still shows with empty title). This example does however show that the alignment to the section title of summary sections does not line up properly with normal section text. It's a bit too low. How to fix that? And another thing, the background sometimes extends to a new page even though there is no text, which looks silly. Deleting the \blank in the \setupheads entry for the option after does not help. Below is the code. Greetings, Rob % test background \setupwhitespace[none] \setupindenting[yes, small, next] \setuppagenumbering[alternative=doublesided] \definetextbackground [SummaryBackground] [frame=off, background=color, backgroundcolor=gray, backgroundoffset=2ex] \definehead[summary][section] \setuphead [summary] [number=no, style=bold, before=, beforesection={\noindentation\page\starttextbackground[SummaryBackground]}, aftersection={\stoptextbackground\blank}] \setuphead[section][number=no,style=bold] \definecombinedlist[content][section,summary] \setupcombinedlist[content][level=4, alternative=c] \starttext \completecontent \page \dorecurse{9}{ \startsection[title={Knuth -- \recurselevel}] \input{knuth} \stopsection } \startsummary[title=Samenvatting] \input{zapf} \stopsummary \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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Grey background for pages belonging to last section of every chapter 2015-01-30 19:05 ` Wolfgang Schuster 2015-01-30 20:36 ` Rob Heusdens @ 2015-01-30 20:43 ` Rob Heusdens 2015-02-02 11:51 ` Wolfgang Schuster 1 sibling, 1 reply; 12+ messages in thread From: Rob Heusdens @ 2015-01-30 20:43 UTC (permalink / raw) To: mailing list for ConTeXt users Correction, I added "offset=none,frameoffset=0pt," to the parameters for the textbackground frame. Code again with correction: % test background \setupwhitespace[none] \setupindenting[yes, small, next] \setuppagenumbering[alternative=doublesided] \definetextbackground [SummaryBackground] [frame=off,offset=none,frameoffset=0pt, background=color, backgroundcolor=gray, backgroundoffset=2ex] \definehead[summary][section] \setuphead [summary] [number=no, style=bold, before=, beforesection={\noindentation\page\starttextbackground[SummaryBackground]}, aftersection={\stoptextbackground\blank}] \setuphead[section][number=no,style=bold] \definecombinedlist[content][section,summary] \setupcombinedlist[content][level=4, alternative=c] \starttext \completecontent \page \dorecurse{9}{ \startsection[title={Knuth -- \recurselevel}] \input{knuth} \stopsection } \startsummary[title=Samenvatting] \input{zapf} \stopsummary \stoptext Still the summary title is a bit lower on the page then other text. ___________________________________________________________________________________ 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] 12+ messages in thread
* Re: Grey background for pages belonging to last section of every chapter 2015-01-30 20:43 ` Rob Heusdens @ 2015-02-02 11:51 ` Wolfgang Schuster 2015-02-02 13:00 ` TOC with " Keith J. Schultz 0 siblings, 1 reply; 12+ messages in thread From: Wolfgang Schuster @ 2015-02-02 11:51 UTC (permalink / raw) To: mailing list for ConTeXt users > Am 30.01.2015 um 21:43 schrieb Rob Heusdens <robheus@xs4all.nl>: > > Correction, I added "offset=none,frameoffset=0pt," to the parameters for > the textbackground frame. > > Code again with correction: > > % test background > \setupwhitespace[none] > \setupindenting[yes, small, next] > \setuppagenumbering[alternative=doublesided] > > \definetextbackground > [SummaryBackground] > [frame=off,offset=none,frameoffset=0pt, > background=color, > backgroundcolor=gray, > backgroundoffset=2ex] > > \definehead[summary][section] > > \setuphead > [summary] > [number=no, > style=bold, > before=, > beforesection={\noindentation\page\starttextbackground[SummaryBackground]}, > aftersection={\stoptextbackground\blank}] > > \setuphead[section][number=no,style=bold] > > > \definecombinedlist[content][section,summary] > \setupcombinedlist[content][level=4, alternative=c] > > \starttext > \completecontent > \page > \dorecurse{9}{ > \startsection[title={Knuth -- \recurselevel}] > > \input{knuth} > > \stopsection > } > > \startsummary[title=Samenvatting] > > \input{zapf} > > \stopsummary > > \stoptext > > > > Still the summary title is a bit lower on the page then other text. You have to add „location=paragraph” to the textbackground setup. \definetextbackground [ChapterFrame] [frame=off, background=color, backgroundcolor=green, backgroundoffset=1ex, location=paragraph] % default: location=text \definehead [Framed] [chapter] \definehead [Frameless] [chapter] \setuphead [Frameless] [before={\blank[2*line]}] \setuphead [Framed] [page=no, before=, beforesection={\page\blank[2*line]\starttextbackground[ChapterFrame]}, aftersection=\stoptextbackground] \starttext \startnamedsection[Frameless][title=Chapter without frame] \input knuth \stopnamedsection \startnamedsection[Framed][title=Chapter with frame] \input knuth \stopnamedsection \stoptext 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] 12+ messages in thread
* TOC with Grey background for pages belonging to last section of every chapter 2015-02-02 11:51 ` Wolfgang Schuster @ 2015-02-02 13:00 ` Keith J. Schultz 2015-02-02 22:23 ` Wolfgang Schuster 0 siblings, 1 reply; 12+ messages in thread From: Keith J. Schultz @ 2015-02-02 13:00 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1099 bytes --] Hi Wolgang, I noticed that \startnamedsection does not add it to the TOC how would one go about having these „namedsections“ added to the TOC. regards Keith. > Am 02.02.2015 um 12:51 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>: > > You have to add „location=paragraph” to the textbackground setup. > > \definetextbackground > [ChapterFrame] > [frame=off, > background=color, > backgroundcolor=green, > backgroundoffset=1ex, > location=paragraph] % default: location=text > > \definehead [Framed] [chapter] > \definehead [Frameless] [chapter] > > \setuphead > [Frameless] > [before={\blank[2*line]}] > > \setuphead > [Framed] > [page=no, > before=, > beforesection={\page\blank[2*line]\starttextbackground[ChapterFrame]}, > aftersection=\stoptextbackground] > > \starttext > > \startnamedsection[Frameless][title=Chapter without frame] > > \input knuth > > \stopnamedsection > > \startnamedsection[Framed][title=Chapter with frame] > > \input knuth > > \stopnamedsection > > \stoptext > [-- Attachment #1.2: Type: text/html, Size: 25509 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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] 12+ messages in thread
* Re: TOC with Grey background for pages belonging to last section of every chapter 2015-02-02 13:00 ` TOC with " Keith J. Schultz @ 2015-02-02 22:23 ` Wolfgang Schuster 0 siblings, 0 replies; 12+ messages in thread From: Wolfgang Schuster @ 2015-02-02 22:23 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2014 bytes --] > Am 02.02.2015 um 14:00 schrieb Keith J. Schultz <keithjschultz@web.de>: > > Hi Wolgang, > > I noticed that \startnamedsection does not add it to the TOC > how would one go about having these „namedsections“ added to the TOC. > > regards > Keith. > >> Am 02.02.2015 um 12:51 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com <mailto:schuster.wolfgang@gmail.com>>: >> >> You have to add „location=paragraph” to the textbackground setup. >> >> \definetextbackground >> [ChapterFrame] >> [frame=off, >> background=color, >> backgroundcolor=green, >> backgroundoffset=1ex, >> location=paragraph] % default: location=text >> >> \definehead [Framed] [chapter] >> \definehead [Frameless] [chapter] >> >> \setuphead >> [Frameless] >> [before={\blank[2*line]}] >> >> \setuphead >> [Framed] >> [page=no, >> before=, >> beforesection={\page\blank[2*line]\starttextbackground[ChapterFrame]}, >> aftersection=\stoptextbackground] >> >> \starttext >> >> \startnamedsection[Frameless][title=Chapter without frame] >> >> \input knuth >> >> \stopnamedsection >> >> \startnamedsection[Framed][title=Chapter with frame] >> >> \input knuth >> >> \stopnamedsection >> >> \stoptext The command \startnamedsection[chapter] is the same as using \startchapter in your document, the only difference is that you use the header-type as argument in the first case while in the second case the head-type is part of the command name. When you print your table of contents with the \placecontent or \completecontent commands ConTeXt uses only headers which are in the list for the “content” list. To print additional headers which are defined with \definehead in your document you can either use \placelist[chapter,MYHEADER,section,…] instead of \placecontent or you extend the list for “content” with \setupcombinedlist[content][list={chapter,MYHEADER,…}] or \placecontent[list={chapter,MYHEADER,…}] Wolfgang [-- Attachment #1.2: Type: text/html, Size: 26642 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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] 12+ messages in thread
end of thread, other threads:[~2015-02-02 22:23 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-01-30 15:13 Grey background for pages belonging to last section of every chapter Rob Heusdens 2015-01-30 16:18 ` Rob Heusdens 2015-01-30 16:34 ` Wolfgang Schuster 2015-01-30 17:17 ` Rob Heusdens 2015-01-30 17:27 ` Wolfgang Schuster 2015-01-30 18:28 ` Rob Heusdens 2015-01-30 19:05 ` Wolfgang Schuster 2015-01-30 20:36 ` Rob Heusdens 2015-01-30 20:43 ` Rob Heusdens 2015-02-02 11:51 ` Wolfgang Schuster 2015-02-02 13:00 ` TOC with " Keith J. Schultz 2015-02-02 22:23 ` Wolfgang Schuster
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).