ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [***SPAM***] Minimals ignores structureblockenvironment for frontmatter etc.
@ 2011-03-20 13:37 Tom
  2011-03-20 13:49 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Tom @ 2011-03-20 13:37 UTC (permalink / raw)
  To: ntg-context

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




___________________________________________________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2011-03-20 18:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-20 13:37 [***SPAM***] Minimals ignores structureblockenvironment for frontmatter etc Tom
2011-03-20 13:49 ` Wolfgang Schuster
2011-03-20 15:46   ` Tom
2011-03-20 16:03     ` Aditya Mahajan
2011-03-20 18:49     ` 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).