If one uses

\setuplayout[header][text][frame=on]

then the frame is drawn on pages with header=empty but not drawn on pages with header=high.

By default, the 'empty' pagebreak method (in page-txt.mkvi) sets the header and footer state to empty rather than high. This means that header frames are drawn on empty pages. For example, see attached file.

Would it make sense to change the definition in page-txt.mkvi to the following:

\installpagebreakmethod \v!empty
  {\page_otr_flush_all_floats
   \page_otr_command_next_page

\doifnot{\namedlayoutelementparameter\v!header\c!state}\v!stop{\setuplayoutelement[\v!header][\c!state=\v!high]}%

\doifnot{\namedlayoutelementparameter\v!footer\c!state}\v!stop{\setuplayoutelement[\v!footer][\c!state=\v!high]}%
   \page_otr_insert_dummy_page}

\installpagebreakmethod \v!header

{\doifnot{\namedlayoutelementparameter\v!header\c!state}\v!stop{\setuplayoutelement[\v!header][\c!state=\v!high]}}

\installpagebreakmethod \v!footer

{\doifnot{\namedlayoutelementparameter\v!footer\c!state}\v!stop{\setuplayoutelement[\v!footer][\c!state=\v!high]}}

or, if that is too drastic of a change, create a new pagebreakmethod called high. This request is motivated by:

http://tex.stackexchange.com/q/110701/323

Aditya
%\showframe

\setuplayout
  [
    header=\lineheight,
    headerdistance=\lineheight,
  ]

\setuppagenumbering
  [
    location=,
    alternative=doublesided,
  ]

\definepagebreak
  [chapterpagebreak]
  [yes,empty,right]

\setuphead
  [chapter]
  [
    style=\bfc,
    header=high,
    before={\blank[force,\the\headerheight]},
    page=chapterpagebreak,
  ]

\setupheader[style=bold]

\setupheadertexts
  [{\getmarking[sectionnumber]\hskip1em\getmarking[section][first]}]
  [pagenumber]
  [{Chapter~\getmarking[chapternumber]\hskip1em\getmarking[chapter]}]
  [pagenumber]

\setupbackgrounds[header][text][bottomframe=on]

\starttext
\chapter{First Chapter}
this is the first chapter
\page   
the second page of the first chapter
\page
third page
\chapter{Second Chapter}
this is the second chapter
\page
the second page of the second chapter
\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
___________________________________________________________________________________

Reply via email to