* state=high vs state=empty for headers and footers
@ 2014-02-12 16:28 Aditya Mahajan
0 siblings, 0 replies; only message in thread
From: Aditya Mahajan @ 2014-02-12 16:28 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1263 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: TEXT/x-tex; name=test.tex, Size: 903 bytes --]
%\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
[-- 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] only message in thread
only message in thread, other threads:[~2014-02-12 16:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 16:28 state=high vs state=empty for headers and footers Aditya Mahajan
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).