[***SPAM***] Minimals ignores structureblockenvironment for frontmatter etc.
Minimals MKIV ignores the structureenvironment blocks when the suffix is 'matter' but applies them if the suffix is 'part.' Furthermore, they are applied in \starttext if between \startfrontmatter -- \stopfrontmatter, etc. blocks and error if between \startfrontpart -- \stopfrontpart, etc. blocks. The following code executes but does not apply the environment block commands. Commenting out the three \startstructureblockenvironment commands with 'matter" arguments and uncommenting the three 'part' commands will cause the environment block commands to be executed. Ironically, the \start-\stop pairs between \starttext and \stoptext error if 'part' is used but execute if 'matter.' \def\MyFrontMatterCommand#1#2% #1 is number, #2 is text {\framed[frame=off,align=middle,width=broad] {\switchtotypeface[ChapterStart] #2}} \def\MyChapterCommand#1#2% #1 is number, #2 is text {\framed[frame=off,bottomframe=on,topframe=off] {\vbox{\centerline{\headtext{chapter} #1}\par\blank{\centerline{#2}}}}} \definepagebreak[mychapterpagebreak][yes,header,right] \startstructureblockenvironment[frontmatter] %ignored if frontmatter, applied if frontpart %\startstructureblockenvironment[frontpart] \setuppagenumbering[state=start,location=bottom,conversion=romannumerals] \setuphead[chapter] [command=\MyFrontMatterCommand,textstyle=\ss\bfd, header=empty,footer=chapter,page=mychapterpagebreak, number=no,after={\blank[0.5in]}] \stopstructureblockenvironment \startstructureblockenvironment[bodymatter] %ignored if bodymatter, applied if bodypart %\startstructureblockenvironment[bodypart] \setuppagenumbering[alternative=doublesided,location=] \setuppagenumbering[state=start,location=bottom,conversion=numbers] \setuphead[chapter] [command=\MyChapterCommand,textstyle=\ss\bfd, header=empty,footer=chapter,page=mychapterpagebreak, after={\blank[0.5in]},before={\blank[force,1.0in]} \placeinitial] \stopstructureblockenvironment \startstructureblockenvironment[backmatter] %ignored if back, applied if backpart %\startstructureblockenvironment[backpart] \setuphead[title] [command=\MyFrontMatterCommand,textstyle=\ss\bfd, header=empty,footer=chapter,page=mychapterpagebreak, number=no,after={\blank[0.25in]}] \setuphead[chapter] [command=\MyFrontMatterCommand,textstyle=\ss\bfd, header=empty,footer=chapter,page=mychapterpagebreak, number=no,after={\blank[0.25in]}] \stopstructureblockenvironment \starttext \startfrontmatter % errors if startfrontpart %sample front matter \input knuth \completecontent[alternative=c,criterium=all] \chapter{Preface} \input knuth \chapter{Introduction} \input knuth \stopfrontmatter \startbodymatter %errors if startbodypart \chapter{I Was Born} \input knuth \chapter{I Observe} Lorem {\index{lorem}}ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ipsum turpis, imperdiet vel aliquam eu, iaculis at lorem. Proin ut orci ac dui sodales commodo vel quis sem. Etiam nunc odio, luctus non cursus elementum, elementum non. \stopbodymatter \startbackmatter %errors if startbackpart \title{Appendices} \page[blank] \completeindex \stopbackmatter \stoptext Tom Benjey 717-258-9733 voice 717-243-0074 fax blog: www.TomBenjey.com
Am 20.03.2011 um 14:37 schrieb Tom:
Minimals MKIV ignores the structureenvironment blocks when the suffix is 'matter' but applies them if the suffix is 'part.' Furthermore, they are applied in \starttext if between \startfrontmatter -- \stopfrontmatter, etc. blocks and error if between \startfrontpart -- \stopfrontpart, etc. blocks. The following code executes but does not apply the environment block commands. Commenting out the three \startstructureblockenvironment commands with 'matter" arguments and uncommenting the three 'part' commands will cause the environment block commands to be executed.
Sectionblocks have two names, one which you use for the settings and another one when you enable it in your text, e.g. frontmatter has the internal name “frontpart” but in the document you use it with “frontmatter”. ------------------------------------------------ | Name | Command (\startXXX ... \stopXXX) | |----------------------------------------------- | frontpart | frontmatter | | bodypart | bodymatter | | appendix | appendices | | backpart | backmatter | ------------------------------------------------ Wolfgang
Thank you, Wolfgang. Your table is most helpful. This can probably be found in the documentation but not where I looked. This probably relates to the recent discussion regarding manuals for novices. My observation is that \completecontent and \completeindex are treated like chapter starts in that 'Contents' and 'Index' are formatted as if they were chapter titles. Tom Benjey 717-258-9733 voice 717-243-0074 fax blog: www.TomBenjey.com -----Original Message----- From: ntg-context-bounces@ntg.nl [mailto:ntg-context-bounces@ntg.nl] On Behalf Of Wolfgang Schuster Sent: Sunday, March 20, 2011 9:49 AM To: mailing list for ConTeXt users Subject: Re: [NTG-context] Minimals ignores structureblockenvironment for frontmatter etc. Am 20.03.2011 um 14:37 schrieb Tom:
Minimals MKIV ignores the structureenvironment blocks when the suffix is 'matter' but applies them if the suffix is 'part.' Furthermore, they are applied in \starttext if between \startfrontmatter -- \stopfrontmatter, etc. blocks and error if between \startfrontpart -- \stopfrontpart, etc. blocks. The following code executes but does not apply the environment block commands. Commenting out the three \startstructureblockenvironment commands with 'matter" arguments and uncommenting the three 'part' commands will cause the environment block commands to be executed.
Sectionblocks have two names, one which you use for the settings and another one when you enable it in your text, e.g. frontmatter has the internal name "frontpart" but in the document you use it with "frontmatter". ------------------------------------------------ | Name | Command (\startXXX ... \stopXXX) | |----------------------------------------------- | frontpart | frontmatter | | bodypart | bodymatter | | appendix | appendices | | backpart | backmatter | ------------------------------------------------ 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 ____________________________________________________________________________ _______
On Sun, 20 Mar 2011, Tom wrote:
Thank you, Wolfgang. Your table is most helpful. This can probably be found in the documentation but not where I looked. This probably relates to the recent discussion regarding manuals for novices.
You could help by adding this information to the wiki, at a place where you expected it to be present. Aditya
Am 20.03.2011 um 16:46 schrieb Tom:
Thank you, Wolfgang. Your table is most helpful. This can probably be found in the documentation but not where I looked. This probably relates to the recent discussion regarding manuals for novices.
My observation is that \completecontent and \completeindex are treated like chapter starts in that 'Contents' and 'Index' are formatted as if they were chapter titles.
\completecontent == \title + \placecontent \completelist == \title + \placelist \completelistofsynonyms == \chapter + \placelistofsynonyms + \page \completeregister == \chapter + \placeregister + \page \completepublications == \chapter + \placepublications Wolfgang
participants (3)
-
Aditya Mahajan
-
Tom
-
Wolfgang Schuster