* 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
* Re: Disable overlay on chapter pages 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 0 siblings, 1 reply; 12+ messages in thread From: Pablo Rodriguez @ 2017-08-02 17:21 UTC (permalink / raw) To: ntg-context On 08/02/2017 12:00 PM, Mikael P. Sundqvist wrote: > 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. Hi Mikael, margintext as alternative for \setuphead may be a better approach: \showframe \setuppagenumbering[alternative=doublesided] \definemargindata[margintext:chapter] [margintext] [width=\rightmarginwidth, location=outer, align=flushleft] \defineheadalternative [margintext:chapter] [margintext] [margintext=margintext:chapter] \definemargindata[margintext:section] [margintext] [width=\leftmarginwidth, location=inner] \defineheadalternative [margintext:section] [margintext] [margintext=margintext:section] \setuphead[chapter] [alternative=margintext:chapter, style=\tf, number=no] \setuphead[section] [alternative=margintext, style=\tf, number=no] \starttext \chapter{Foo} \dorecurse{15}{\section{Bar}\input ward\par} \stoptext All this comes from Hans replying to a question of mine some days ago and from the last lines from typo-mar.mkiv. I hope I got it right ;-), Pablo -- http://www.ousia.tk ___________________________________________________________________________________ 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
* Re: Disable overlay on chapter pages 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 0 siblings, 2 replies; 12+ messages in thread From: Mikael P. Sundqvist @ 2017-08-02 17:28 UTC (permalink / raw) To: mailing list for ConTeXt users On Wed, Aug 2, 2017 at 7:21 PM, Pablo Rodriguez <oinos@gmx.es> wrote: > On 08/02/2017 12:00 PM, Mikael P. Sundqvist wrote: >> 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. > > Hi Mikael, > > margintext as alternative for \setuphead may be a better approach: > > \showframe > \setuppagenumbering[alternative=doublesided] > > \definemargindata[margintext:chapter] > [margintext] > [width=\rightmarginwidth, location=outer, align=flushleft] > > \defineheadalternative > [margintext:chapter] > [margintext] > [margintext=margintext:chapter] > > \definemargindata[margintext:section] > [margintext] > [width=\leftmarginwidth, location=inner] > > \defineheadalternative > [margintext:section] > [margintext] > [margintext=margintext:section] > > \setuphead[chapter] > [alternative=margintext:chapter, style=\tf, number=no] > \setuphead[section] > [alternative=margintext, style=\tf, number=no] > > \starttext > > \chapter{Foo} > \dorecurse{15}{\section{Bar}\input ward\par} > > \stoptext > > All this comes from Hans replying to a question of mine some days ago > and from the last lines from typo-mar.mkiv. > > I hope I got it right ;-), > > Pablo > > -- > http://www.ousia.tk > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ Hi Pablo, many thanks for your answer! I think I might have described my issue a bit vague. Just to clarify: I do not want to change the output of the chapters/sections themself. I want to have a "running header", but in the margin rather than in the header. I get that with the code I gave, but I want to disable it for new chapters _on the page where the chapter begins_. If you have a copy of Bringhursts book, you know what I mean. If it is still not clear what I mean please ask me to clarify it further. /Mikael ___________________________________________________________________________________ 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
* Re: Disable overlay on chapter pages 2017-08-02 17:28 ` Mikael P. Sundqvist @ 2017-08-02 19:29 ` Pablo Rodriguez 2017-08-02 20:23 ` Henning Hraban Ramm 1 sibling, 0 replies; 12+ messages in thread From: Pablo Rodriguez @ 2017-08-02 19:29 UTC (permalink / raw) To: ntg-context On 08/02/2017 07:28 PM, Mikael P. Sundqvist wrote: > Hi Pablo, > > many thanks for your answer! I think I might have described my issue a > bit vague. Just to clarify: > > I do not want to change the output of the chapters/sections themself. > > I want to have a "running header", but in the margin rather than in > the header. I get that with the code I gave, but I want to disable it > for new chapters _on the page where the chapter begins_. Sorry, Mikael, I misunderstood what you needed. I’m afraid I don’t know how to check whether you are in the chapter page or not. Pablo -- http://www.ousia.tk ___________________________________________________________________________________ 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
* Re: Disable overlay on chapter pages 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 1 sibling, 1 reply; 12+ messages in thread From: Henning Hraban Ramm @ 2017-08-02 20:23 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2017-08-02 um 19:28 schrieb Mikael P. Sundqvist <mickep@gmail.com>: > I do not want to change the output of the chapters/sections themself. > > I want to have a "running header", but in the margin rather than in > the header. I get that with the code I gave, but I want to disable it > for new chapters _on the page where the chapter begins_. I guess this is a case for setups. \startsetups[chapterpage] \setupheadertexts[][][][] \stopsetups \setuphead[chapter][setup=chapterpage] Something like this, I didn’t check. Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD ___________________________________________________________________________________ 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
* Re: Disable overlay on chapter pages 2017-08-02 20:23 ` Henning Hraban Ramm @ 2017-08-02 20:33 ` Mikael P. Sundqvist 2017-08-03 8:35 ` Jean-Pierre Delange 0 siblings, 1 reply; 12+ messages in thread From: Mikael P. Sundqvist @ 2017-08-02 20:33 UTC (permalink / raw) To: mailing list for ConTeXt users On Wed, Aug 2, 2017 at 10:23 PM, Henning Hraban Ramm <texml@fiee.net> wrote: > Am 2017-08-02 um 19:28 schrieb Mikael P. Sundqvist <mickep@gmail.com>: > >> I do not want to change the output of the chapters/sections themself. >> >> I want to have a "running header", but in the margin rather than in >> the header. I get that with the code I gave, but I want to disable it >> for new chapters _on the page where the chapter begins_. > > I guess this is a case for setups. > > \startsetups[chapterpage] > \setupheadertexts[][][][] > \stopsetups > > \setuphead[chapter][setup=chapterpage] > > Something like this, I didn’t check. > > > Greetlings, Hraban > --- > http://www.fiee.net > http://wiki.contextgarden.net > GPG Key ID 1C9B22FD > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ Thank you for your answer, Henning. I am sorry, but it does not work. The problem is that I don't have the marking text in the header, but in overlays in the margins. I tried to replace your \setupheadertexts[][][][] inside the setup with \setupbackgrounds[text][rightmargin][background=] but with no luck. But maybe you are right that one should use setups. /Mikael ___________________________________________________________________________________ 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
* Re: Disable overlay on chapter pages 2017-08-02 20:33 ` Mikael P. Sundqvist @ 2017-08-03 8:35 ` Jean-Pierre Delange 2017-08-03 16:03 ` Hans Hagen 0 siblings, 1 reply; 12+ messages in thread From: Jean-Pierre Delange @ 2017-08-03 8:35 UTC (permalink / raw) To: mailing list for ConTeXt users Hi Pablo, Dealing with the sample you has given to Mikael I find a difficulty on page 2 : if you replace 'Foo' and 'Bar' (three letters), by 'Introduction' and 'section', see what happen to 'section', page 2. Here is your MWE : \showframe \setuppagenumbering[alternative=doublesided] \definemargindata[margintext:chapter] [margintext] [width=\rightmarginwidth, location=outer, align=flushleft] \defineheadalternative [margintext:chapter] [margintext] [margintext=margintext:chapter] \definemargindata[margintext:section] [margintext] [width=\leftmarginwidth, location=inner] \defineheadalternative [margintext:section] [margintext] [margintext=margintext:section] \setuphead[chapter] [alternative=margintext:chapter, style=\tf, number=no] \setuphead[section] [alternative=margintext, style=\tf, number=no] \starttext \chapter{Introduction} \dorecurse{15}{\section{Section}\input ward\par} \stoptext ----- Mail original ----- De: "Mikael P. Sundqvist" <mickep@gmail.com> À: "mailing list for ConTeXt users" <ntg-context@ntg.nl> Envoyé: Mercredi 2 Août 2017 22:33:16 Objet: Re: [NTG-context] Disable overlay on chapter pages On Wed, Aug 2, 2017 at 10:23 PM, Henning Hraban Ramm <texml@fiee.net> wrote: > Am 2017-08-02 um 19:28 schrieb Mikael P. Sundqvist <mickep@gmail.com>: > >> I do not want to change the output of the chapters/sections themself. >> >> I want to have a "running header", but in the margin rather than in >> the header. I get that with the code I gave, but I want to disable it >> for new chapters _on the page where the chapter begins_. > > I guess this is a case for setups. > > \startsetups[chapterpage] > \setupheadertexts[][][][] > \stopsetups > > \setuphead[chapter][setup=chapterpage] > > Something like this, I didn’t check. > > > Greetlings, Hraban > --- > http://www.fiee.net > http://wiki.contextgarden.net > GPG Key ID 1C9B22FD > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ Thank you for your answer, Henning. I am sorry, but it does not work. The problem is that I don't have the marking text in the header, but in overlays in the margins. I tried to replace your \setupheadertexts[][][][] inside the setup with \setupbackgrounds[text][rightmargin][background=] but with no luck. But maybe you are right that one should use setups. /Mikael ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ___________________________________________________________________________________ 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
* Re: Disable overlay on chapter pages 2017-08-03 8:35 ` Jean-Pierre Delange @ 2017-08-03 16:03 ` Hans Hagen 2017-08-03 17:29 ` Pablo Rodriguez 0 siblings, 1 reply; 12+ messages in thread From: Hans Hagen @ 2017-08-03 16:03 UTC (permalink / raw) To: mailing list for ConTeXt users, Jean-Pierre Delange On 8/3/2017 10:35 AM, Jean-Pierre Delange wrote: > Hi Pablo, > > Dealing with the sample you has given to Mikael I find a difficulty on page 2 : if you replace 'Foo' and 'Bar' (three letters), by 'Introduction' and 'section', see what happen to 'section', page 2. > > Here is your MWE : > > > \showframe > \setuppagenumbering[alternative=doublesided] > > \definemargindata[margintext:chapter] > [margintext] > [width=\rightmarginwidth, location=outer, align=flushleft] > > \defineheadalternative > [margintext:chapter] > [margintext] > [margintext=margintext:chapter] > > \definemargindata[margintext:section] > [margintext] > [width=\leftmarginwidth, location=inner] > > \defineheadalternative > [margintext:section] > [margintext] > [margintext=margintext:section] > > \setuphead[chapter] > [alternative=margintext:chapter, style=\tf, number=no] > \setuphead[section] > [alternative=margintext, style=\tf, number=no] > > \starttext > > \chapter{Introduction} > \dorecurse{15}{\section{Section}\input ward\par} > > \stoptext > > ----- Mail original ----- > De: "Mikael P. Sundqvist" <mickep@gmail.com> > À: "mailing list for ConTeXt users" <ntg-context@ntg.nl> > Envoyé: Mercredi 2 Août 2017 22:33:16 > Objet: Re: [NTG-context] Disable overlay on chapter pages > > On Wed, Aug 2, 2017 at 10:23 PM, Henning Hraban Ramm <texml@fiee.net> wrote: >> Am 2017-08-02 um 19:28 schrieb Mikael P. Sundqvist <mickep@gmail.com>: >> >>> I do not want to change the output of the chapters/sections themself. >>> >>> I want to have a "running header", but in the margin rather than in >>> the header. I get that with the code I gave, but I want to disable it >>> for new chapters _on the page where the chapter begins_. >> >> I guess this is a case for setups. >> >> \startsetups[chapterpage] >> \setupheadertexts[][][][] >> \stopsetups >> >> \setuphead[chapter][setup=chapterpage] >> >> Something like this, I didn’t check. \showframe \setuplayout [backspace=3cm, margin=2cm, width=middle] \setuppagenumbering [alternative=doublesided] \definemargindata [margintext:chapter] [margintext] [width=\outermarginwidth, location=outer, align=flushouter] \defineheadalternative [margintext:chapter] [margintext] [margintext=margintext:chapter] \definemargindata[margintext:section] [margintext] [width=\innermarginwidth, location=inner, align=flushinner] \defineheadalternative [margintext:section] [margintext] [margintext=margintext:section] \setuphead [chapter] [alternative=margintext:chapter, style=\tf, number=no] \setuphead [section] [alternative=margintext, style=\tf, number=no] \starttext \chapter{Introduction} \dorecurse{15}{\section{Section}\input ward\par} \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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
* Re: Disable overlay on chapter pages 2017-08-03 16:03 ` Hans Hagen @ 2017-08-03 17:29 ` Pablo Rodriguez 2017-08-03 18:11 ` Mikael P. Sundqvist 0 siblings, 1 reply; 12+ messages in thread From: Pablo Rodriguez @ 2017-08-03 17:29 UTC (permalink / raw) To: ntg-context On 08/03/2017 06:03 PM, Hans Hagen wrote: > [...] > \definemargindata > [margintext:chapter] > [margintext] > [width=\outermarginwidth, > location=outer, > align=flushouter] > [...] > \definemargindata[margintext:section] > [margintext] > [width=\innermarginwidth, > location=inner, > align=flushinner] Many thanks for your reply, Hans. I didn’t know that these margin widths and aligments even existed. Pablo -- http://www.ousia.tk ___________________________________________________________________________________ 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
* Re: Disable overlay on chapter pages 2017-08-03 17:29 ` Pablo Rodriguez @ 2017-08-03 18:11 ` Mikael P. Sundqvist 2017-08-04 7:53 ` Hans Hagen 0 siblings, 1 reply; 12+ messages in thread From: Mikael P. Sundqvist @ 2017-08-03 18:11 UTC (permalink / raw) To: mailing list for ConTeXt users On Thu, Aug 3, 2017 at 7:29 PM, Pablo Rodriguez <oinos@gmx.es> wrote: > On 08/03/2017 06:03 PM, Hans Hagen wrote: >> [...] >> \definemargindata >> [margintext:chapter] >> [margintext] >> [width=\outermarginwidth, >> location=outer, >> align=flushouter] >> [...] >> \definemargindata[margintext:section] >> [margintext] >> [width=\innermarginwidth, >> location=inner, >> align=flushinner] > > Many thanks for your reply, Hans. > > I didn’t know that these margin widths and aligments even existed. > > Pablo > -- > http://www.ousia.tk > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ Hi, that solves the other problem that appeared. What about the one I originally posted in this thread? Is it possible to pause backgrounds on chapter pages? /Mikael ___________________________________________________________________________________ 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
* Re: Disable overlay on chapter pages 2017-08-03 18:11 ` Mikael P. Sundqvist @ 2017-08-04 7:53 ` Hans Hagen 2017-08-04 12:06 ` Mikael P. Sundqvist 0 siblings, 1 reply; 12+ messages in thread From: Hans Hagen @ 2017-08-04 7:53 UTC (permalink / raw) To: ntg-context On 8/3/2017 8:11 PM, Mikael P. Sundqvist wrote: > that solves the other problem that appeared. What about the one I > originally posted in this thread? Is it possible to pause backgrounds > on chapter pages? one of the many ways ... \definelayer [chapter] [width=\paperwidth, height=\paperheight] \defineoverlay [pagebackground] [\directsetup{pagebackground}] \setupbackgrounds [page] [background=pagebackground] \startsetups pagebackground \doifelsemode {chapterpage} { \setlayer [chapter] [preset=middle] {\scale[width=\textwidth]{CHAPTER}} \globaldisablemode[chapterpage] } { \setlayer [chapter] [preset=middle] {\scale[width=\textwidth]{WHATEVER}} } \placelayer[chapter] \stopsetups \startsetups chapter:before \globalenablemode[chapterpage] \stopsetups \setuphead [chapter] [before=\setup{chapter:before}] \starttext \chapter{foo} test \page test \chapter{bar} test \page test \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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
* Re: Disable overlay on chapter pages 2017-08-04 7:53 ` Hans Hagen @ 2017-08-04 12:06 ` Mikael P. Sundqvist 0 siblings, 0 replies; 12+ messages in thread From: Mikael P. Sundqvist @ 2017-08-04 12:06 UTC (permalink / raw) To: mailing list for ConTeXt users On Fri, Aug 4, 2017 at 9:53 AM, Hans Hagen <pragma@wxs.nl> wrote: > On 8/3/2017 8:11 PM, Mikael P. Sundqvist wrote: > >> that solves the other problem that appeared. What about the one I >> originally posted in this thread? Is it possible to pause backgrounds >> on chapter pages? > > one of the many ways ... > > \definelayer > [chapter] > [width=\paperwidth, > height=\paperheight] > > \defineoverlay > [pagebackground] > [\directsetup{pagebackground}] > > \setupbackgrounds > [page] > [background=pagebackground] > > \startsetups pagebackground > \doifelsemode {chapterpage} { > \setlayer > [chapter] > [preset=middle] > {\scale[width=\textwidth]{CHAPTER}} > \globaldisablemode[chapterpage] > } { > \setlayer > [chapter] > [preset=middle] > {\scale[width=\textwidth]{WHATEVER}} > } > \placelayer[chapter] > \stopsetups > > \startsetups chapter:before > \globalenablemode[chapterpage] > \stopsetups > > \setuphead > [chapter] > [before=\setup{chapter:before}] > > \starttext > \chapter{foo} test \page test > \chapter{bar} test \page test > \stoptext > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ Many thanks! It now works as expected. Just if someone finds this thread in the future, to get the texts into the margin, I ended up with something like the code below. /Mikael \showframe \setuppagenumbering[alternative=doublesided] \setuplayout[ %alternative=doublesided, location=middle, width=10cm, backspace=2in, ] \definelayer [chapter] [width=\paperwidth, height=\paperheight, location=right] \defineoverlay [pagebackground] [\directsetup{pagebackground}] \setupbackgrounds [page] [background=pagebackground] \startsetups pagebackground \doifelsemode {chapterpage} { \setlayer [chapter] [x=\dimexpr\backspace+\textwidth+\rightmargindistance\relax, y=3in, location={right,bottom}] {\getmarking[chapternumber]} \globaldisablemode[chapterpage] } { \setlayer [chapter] [x=\dimexpr\backspace+\textwidth+\rightmargindistance\relax, y=3in, location={right,bottom}] {\doifrightpageelse{\getmarking[chapter]}{}} } \placelayer[chapter] \stopsetups \startsetups chapter:before \globalenablemode[chapterpage] \stopsetups \define[2]\mychaptercommand{\midaligned{#2}} \setuphead [chapter] [align=middle,style=\tfa,align=middle,command=\mychaptercommand,before=\setup{chapter:before}] \starttext \chapter{foo} test \page test \page test \page test \chapter{bar} test \page test \page test \page test \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).