Re: [NTG-context] Remove header after ToC
At 2017-10-17T16:58:22+02:00, Tomas Hala wrote: > Add the following \if command: > > \startfrontmatter > \completecontent > \ifodd\pageno\page[empty]\else\setupheadertexts[chapter][pagenumber]\fi > \stopfrontmatter Thanks, that should work. However, searching through setup-en.pdf, I found the conditional `\doifelseoddpage {CMD} {CMD}', which is precisely what I needed. Enclosed below is an example which is formatted as I wanted. 1. I use `header=empty' in \setuphead [chapter], for otherwise I get a header on the pages where a chapter begins. 2. I use \setupheadertexts twice, first before the beginning of the front matter, and then before the beginning of the body matter, with settings appropriate for the respective block. 3. I use `\marking [chapter] {Contents}' before \completecontent, for otherwise I get no chapter name in the header for the ToC. 4. I use `\doifelseoddpage {\page [empty]} {}' after \completecontent, to do what you had suggested. Thanks again for the help. Regards, Raghu. -- \starttext \setuphead [chapter] [page={yes,header,footer,right}, header=empty] \setupheadertexts [] \setupfootertexts [] \setupheadertexts [{\getmarking [chapter]}] [\pagenumber] [\pagenumber] [{\getmarking [chapter]}] \startfrontmatter \marking [chapter] {Contents} \completecontent \doifelseoddpage {\page [empty]} {} \stopfrontmatter \setupheadertexts [{\getmarking [sectionnumber].\ \getmarking [section]}] [\pagenumber] [\pagenumber] [{Chapter \getmarking [chapternumber].\ \getmarking [chapter]}] \startbodymatter \dorecurse {20} { \startchapter [title=A chapter] \startsection [title=A section] Some text \stopsection \page \startsection [title=A section] Some text \stopsection \page \startsection [title=A section] Some text \stopsection \stopchapter } \stopbodymatter \stoptext -- N. Raghavendra , http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Remove header after ToC
Add the following \if command: \startfrontmatter \completecontent \ifodd\pageno\page[empty]\else\setupheadertexts[chapter][pagenumber]\fi \stopfrontmatter Best wishes, Tomas Tue, Oct 17, 2017 ve 07:17:34PM +0530 N. Raghavendra napsal(a): # At 2017-10-17T12:34:06+02:00, Tomas Hala wrote: # # > I did two changes in your code: # > # > 1. Disabling of header=empty. # > 2. Adding of \page[empty]. # > # > Probably, there is better and system solution, # > but this might help you, I guess. # # Dear Tomas, # # Thank you for your kind help. # # The change you made works when the ToC ends on an odd page, as in this # case when it ends on page 1. However, if the ToC ends on an even page, # say on page 2, the modification you have suggested produces an empty # page with no headers on page 3, and then an empty page with # headers "4 ... Chapter." on page 4; the first chapter starts on page 5. # Enclosed below is an example of such a file. # # I don't want the empty pages 3 (without headers) and 4 (with headers), # and I want the first chapter to start on page 3, which is the first # right hand, i.e., odd numbered, page after the end of the ToC. # # I think what is required is a command \foo which implements the # following pseudocode: # # if the current page is even numbered ; then # \page [empty] # else # do nothing # endif # # Then, I can use # # \startfrontmatter # \completecontent # \foo # \stopfrontmatter # # Regards, # Raghu. # # -- # \starttext # # \setuppagenumbering # [alternative=doublesided] # # \setupheadertexts # [] # # \setupfootertexts # [] # # \setupheadertexts # [{\getmarking[section]}] # [\pagenumber] # [\pagenumber] # [{Chapter \getmarking[chapternumber].\ \getmarking[chapter]}] # # \setuphead # [chapter] # [page={yes,header,footer,right}] # # \startfrontmatter # \completecontent # \page [empty] # \stopfrontmatter # # \startbodymatter # \dorecurse # {20} # { # \startchapter # [title=A chapter] # # \startsection # [title=A section] # Some text # \stopsection # # \page # # \startsection # [title=Another section] # Some text # \stopsection # # \stopchapter # } # \stopbodymatter # # \stoptext # -- # # -- # N. Raghavendra , http://www.retrotexts.net/ # Harish-Chandra Research Institute, http://www.hri.res.in/ # ___ # 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://context.aanhet.net # archive : https://bitbucket.org/phg/context-mirror/commits/ # wiki : http://contextgarden.net # ___ Tomáš Hála Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky Zemědělská 1, CZ-613 00 Brno, tel. +420 545 13 22 28 http://akela.mendelu.cz/~thala ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Remove header after ToC
At 2017-10-17T19:17:34+05:30, N. Raghavendra wrote: > if the current page is even numbered ; then > \page [empty] > else > do nothing > endif Read "odd" instead of "even" in the place marked . Raghu. -- N. Raghavendra , http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Remove header after ToC
At 2017-10-17T12:34:06+02:00, Tomas Hala wrote: > I did two changes in your code: > > 1. Disabling of header=empty. > 2. Adding of \page[empty]. > > Probably, there is better and system solution, > but this might help you, I guess. Dear Tomas, Thank you for your kind help. The change you made works when the ToC ends on an odd page, as in this case when it ends on page 1. However, if the ToC ends on an even page, say on page 2, the modification you have suggested produces an empty page with no headers on page 3, and then an empty page with headers "4 ... Chapter." on page 4; the first chapter starts on page 5. Enclosed below is an example of such a file. I don't want the empty pages 3 (without headers) and 4 (with headers), and I want the first chapter to start on page 3, which is the first right hand, i.e., odd numbered, page after the end of the ToC. I think what is required is a command \foo which implements the following pseudocode: if the current page is even numbered ; then \page [empty] else do nothing endif Then, I can use \startfrontmatter \completecontent \foo \stopfrontmatter Regards, Raghu. -- \starttext \setuppagenumbering [alternative=doublesided] \setupheadertexts [] \setupfootertexts [] \setupheadertexts [{\getmarking[section]}] [\pagenumber] [\pagenumber] [{Chapter \getmarking[chapternumber].\ \getmarking[chapter]}] \setuphead [chapter] [page={yes,header,footer,right}] \startfrontmatter \completecontent \page [empty] \stopfrontmatter \startbodymatter \dorecurse {20} { \startchapter [title=A chapter] \startsection [title=A section] Some text \stopsection \page \startsection [title=Another section] Some text \stopsection \stopchapter } \stopbodymatter \stoptext -- -- N. Raghavendra , http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Remove header after ToC
Hi Raghu, I did two changes in your code: 1. Disabling of header=empty. 2. Adding of \page[empty]. Probably, there is better and system solution, but this might help you, I guess. Best wishes, Tomas %% ... \setuphead [chapter] [page={yes,header,footer,right}, % header=empty ] \startfrontmatter \completecontent \page[empty] \stopfrontmatter \startbodymatter \startchapter [title=A chapter] ... %% Tue, Oct 17, 2017 ve 03:37:21PM +0530 N. Raghavendra napsal(a): # Any help is appreciated! Do let me know if some more information is # needed. # # Thanks and regards, # Raghu. # # -- # # At 2017-10-16T08:33:13+05:30, N. Raghavendra wrote: # # > I am a ConTeXt beginner. I am having trouble getting rid of the header # > after the ToC in a document that I am preparing. The following is a # > simplified version of the document. I get a header with "2" on the left # > edge, and "Chapter ." on the right edge, on page 2, which is an empty # > page after the ToC. How do I remove the header on this page? # > # > Thanks, # > Raghu. # > # > -- # > \starttext # > # > \setuppagenumbering # > [alternative=doublesided] # > # > \setupheadertexts # > [] # > # > \setupfootertexts # > [] # > # > \setupheadertexts # > [{\getmarking[section]}] # > [\pagenumber] # > [\pagenumber] # > [{Chapter \getmarking[chapternumber].\ \getmarking[chapter]}] # > # > \setuphead # > [chapter] # > [page={yes,header,footer,right}, # >header=empty] # > # > \startfrontmatter # > \completecontent # > \stopfrontmatter # > # > \startbodymatter # > \startchapter # > [title=A chapter] # > # > \startsection # > [title=A section] # > Some text # > \stopsection # > # > \page # > # > \startsection # > [title=Another section] # > Some text # > \stopsection # > # > \stopchapter # > \stopbodymatter # > # > \stoptext # > -- # > # > -- # > N. Raghavendra , http://www.retrotexts.net/ # > Harish-Chandra Research Institute, http://www.hri.res.in/ # # -- # N. Raghavendra , http://www.retrotexts.net/ # Harish-Chandra Research Institute, http://www.hri.res.in/ # ___ # 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://context.aanhet.net # archive : https://bitbucket.org/phg/context-mirror/commits/ # wiki : http://contextgarden.net # ___ Tomáš Hála Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky Zemědělská 1, CZ-613 00 Brno, tel. +420 545 13 22 28 http://akela.mendelu.cz/~thala ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Remove header after ToC
Any help is appreciated! Do let me know if some more information is needed. Thanks and regards, Raghu. -- At 2017-10-16T08:33:13+05:30, N. Raghavendra wrote: > I am a ConTeXt beginner. I am having trouble getting rid of the header > after the ToC in a document that I am preparing. The following is a > simplified version of the document. I get a header with "2" on the left > edge, and "Chapter ." on the right edge, on page 2, which is an empty > page after the ToC. How do I remove the header on this page? > > Thanks, > Raghu. > > -- > \starttext > > \setuppagenumbering > [alternative=doublesided] > > \setupheadertexts > [] > > \setupfootertexts > [] > > \setupheadertexts > [{\getmarking[section]}] > [\pagenumber] > [\pagenumber] > [{Chapter \getmarking[chapternumber].\ \getmarking[chapter]}] > > \setuphead > [chapter] > [page={yes,header,footer,right}, >header=empty] > > \startfrontmatter > \completecontent > \stopfrontmatter > > \startbodymatter > \startchapter > [title=A chapter] > > \startsection > [title=A section] > Some text > \stopsection > > \page > > \startsection > [title=Another section] > Some text > \stopsection > > \stopchapter > \stopbodymatter > > \stoptext > -- > > -- > N. Raghavendra , http://www.retrotexts.net/ > Harish-Chandra Research Institute, http://www.hri.res.in/ -- N. Raghavendra , http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Remove header after ToC
I am a ConTeXt beginner. I am having trouble getting rid of the header after the ToC in a document that I am preparing. The following is a simplified version of the document. I get a header with "2" on the left edge, and "Chapter ." on the right edge, on page 2, which is an empty page after the ToC. How do I remove the header on this page? Thanks, Raghu. -- \starttext \setuppagenumbering [alternative=doublesided] \setupheadertexts [] \setupfootertexts [] \setupheadertexts [{\getmarking[section]}] [\pagenumber] [\pagenumber] [{Chapter \getmarking[chapternumber].\ \getmarking[chapter]}] \setuphead [chapter] [page={yes,header,footer,right}, header=empty] \startfrontmatter \completecontent \stopfrontmatter \startbodymatter \startchapter [title=A chapter] \startsection [title=A section] Some text \stopsection \page \startsection [title=Another section] Some text \stopsection \stopchapter \stopbodymatter \stoptext -- -- N. Raghavendra , http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___