ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Disable overlay on chapter pages
@ 2017-08-02 10:00 Mikael P. Sundqvist
  2017-08-02 17:21 ` Pablo Rodriguez
  0 siblings, 1 reply; 12+ messages in thread
From: Mikael P. Sundqvist @ 2017-08-02 10:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I'm trying to print chapter and section titles in the margins, and it
works fine, except that the chapter title is also printed on the same
page as the chapter starts, which I find unnecessary.

1) Can I somehow (probably via the right \setuphead trick) disable
this overlay only on chapter pages?

2) If I want to disable it on another page, is there some smart way of
doint it, or should I just set it blank and then enable it when I know
I'm on next page again?

/Mikael

PS The code I have right now is given below. It compiles, but the
chapter title is shown on the first page...

\setuppagenumbering[alternative=doublesided]

\defineoverlay[mymargin][{\framed[frame=off,width=0.8in,height=0.8\textheight,offset=overlay,align={top}]{\doifrightpageelse{{\startalignment[flushleft]\getmarking[chapter]\stopalignment}}{{\startalignment[flushright]\getmarking[section]\stopalignment}}}}]

\setupbackgrounds[text][rightmargin][background=mymargin]


\starttext

\chapter{Foo}
\dorecurse{15}{\section{Bar}\input ward\par}

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-08-04 12:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-02 10:00 Disable overlay on chapter pages Mikael P. Sundqvist
2017-08-02 17:21 ` Pablo Rodriguez
2017-08-02 17:28   ` Mikael P. Sundqvist
2017-08-02 19:29     ` Pablo Rodriguez
2017-08-02 20:23     ` Henning Hraban Ramm
2017-08-02 20:33       ` Mikael P. Sundqvist
2017-08-03  8:35         ` Jean-Pierre Delange
2017-08-03 16:03           ` Hans Hagen
2017-08-03 17:29             ` Pablo Rodriguez
2017-08-03 18:11               ` Mikael P. Sundqvist
2017-08-04  7:53                 ` Hans Hagen
2017-08-04 12:06                   ` Mikael P. Sundqvist

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).