From: "Mikael P. Sundqvist" <mickep@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Disable overlay on chapter pages
Date: Fri, 4 Aug 2017 14:06:26 +0200 [thread overview]
Message-ID: <CAHy-LL8SVaMV26p8VkYy7sA7n+aXsx7d-E9eaoBCSnOUJSYj0g@mail.gmail.com> (raw)
In-Reply-To: <f6e89974-6d8a-c0c8-185e-45e1a0c2ba97@wxs.nl>
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
___________________________________________________________________________________
prev parent reply other threads:[~2017-08-04 12:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 10:00 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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHy-LL8SVaMV26p8VkYy7sA7n+aXsx7d-E9eaoBCSnOUJSYj0g@mail.gmail.com \
--to=mickep@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).