From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90855 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: overlay or layer for chapter head. Date: Thu, 2 Apr 2015 19:07:18 +0200 Message-ID: <77324F5F-6F8F-4BE4-948A-56122FED1207@gmail.com> References: <5367A272-0E1B-4057-8414-A1AC4F9AD930@csiro.au> <2E80F69B-DD7C-42C6-8282-4ADC0CA39F39@gmail.com> <20150402111229.1c2996ca@localb.wexfordpress.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/mixed; boundary="===============2051950929==" X-Trace: ger.gmane.org 1427994519 12921 80.91.229.3 (2 Apr 2015 17:08:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Apr 2015 17:08:39 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 02 19:08:27 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YdibS-0007kS-9U for gctc-ntg-context-518@m.gmane.org; Thu, 02 Apr 2015 19:08:26 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 87E2510233 for ; Thu, 2 Apr 2015 19:08:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id bdVeL5atrRBN for ; Thu, 2 Apr 2015 19:08:24 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id A425010235 for ; Thu, 2 Apr 2015 19:07:57 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D8D4110200 for ; Thu, 2 Apr 2015 19:07:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Y36Z59xFDunK for ; Thu, 2 Apr 2015 19:07:53 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 0F1E3101FA for ; Thu, 2 Apr 2015 19:07:52 +0200 (CEST) Original-Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [IPv6:2a00:1450:400c:c00::22d]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t32H7bbg028187 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 2 Apr 2015 19:07:38 +0200 Original-Received: by wgdm6 with SMTP id m6so91622351wgd.2 for ; Thu, 02 Apr 2015 10:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=lWbV7wDTv72YdPj7REEMIR2MRpsqT9QnA6oaoD6vehc=; b=iuHeUrvMtKzuPdKpI8vjH6ZM0KMx7eNHWhJNb/hcG6xkuwwaKcjHKMFOJPwTaJjUZh vYlzpTkbLXl/c4RkwbGAf2cW5WE+4Rxyj5IfqyolNg93Ay7fw5Hfw1up7ch+OSmEevrQ VdNszil4mdyckaPE5v0b88cW/DuERo/0HZuRCNHpQtbLiIky6SF+g7w5POC9LzgXuK/A AAUg4UNc2UnpMEgyvaOXrARmHcoovVBQbOZP/g0bJ0EwXXkgZCXEFGW6z+S54SofYXbG Rz9EHT9Lnx0yappgkF7GDje5HcTgVQQb0jx/zrNKu+p9kEfy2IC/2eo6NE/ckkDhp6Zz F7uA== X-Received: by 10.194.185.68 with SMTP id fa4mr93632415wjc.111.1427994457258; Thu, 02 Apr 2015 10:07:37 -0700 (PDT) Original-Received: from keima.localdomain (x2f238f0.dyn.telefonica.de. [2.242.56.240]) by mx.google.com with ESMTPSA id z13sm8041517wjr.44.2015.04.02.10.07.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Apr 2015 10:07:36 -0700 (PDT) In-Reply-To: <20150402111229.1c2996ca@localb.wexfordpress.net> X-Mailer: Apple Mail (2.2070.6) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c00::22d; country=IE; latitude=53.3478; longitude=-6.2597; http://maps.google.com/maps?q=53.3478,-6.2597&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01Ob57Bwu - 15ecec5933f4 - 20150402 (trained as not-spam) Received-SPF: pass (filter4-ams.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c00::22d as permitted sender) receiver=filter4-ams.mf.surf.net; client-ip=2a00:1450:400c:c00::22d; envelope-from=; helo=mail-wg0-x22d.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:90855 Archived-At: --===============2051950929== Content-Type: multipart/alternative; boundary="Apple-Mail=_56199BD1-7516-41B6-A5B6-A92BD7D95492" --Apple-Mail=_56199BD1-7516-41B6-A5B6-A92BD7D95492 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 02.04.2015 um 17:12 schrieb John Culleton : >=20 > On Thu, 02 Apr 2015 15:10:19 +0200 > Proch=C3=A1zka Luk=C3=A1=C5=A1 Ing. - Pontex s. r. o. > > wrote: >=20 >> Hello, >>=20 >> On Thu, 02 Apr 2015 14:46:11 +0200, Otared >> Kavian wrote: >>=20 >>> Hi, >>>=20 >>> Maybe you need to say state=3Drepeat in the >>> definition of your layer: >>>=20 >>> \definelayer[chapterbackground][state=3Drepeat] >>=20 >> '[state=3Drepeat]' causes all pages have the >> 'mill' background. >>=20 >> Best regards, >>=20 >> Lukas >>=20 >>=20 >=20 > I am not seeking a background but rather a > foreground. And I only need this for 7 chapter > heads. Here is how I put the page image into my > context file now: > ------------------------------------------------- > \startstandardmakeup[doublesided=3Dno] > \vskip -0.15in > \hskip -0.7in > \hbox{\externalfigure[chaphead2.pdf][width=3D\paperwidth, > height=3D\paperheight]} \stopstandardmakeup > \writetolist[chapter]{2}{Chapter 2: Understanding > the Food Industry}% > ------------------------------------------------ > This works but I want a less fiddly-more > reliable method. =20 \setupexternalfigures[location=3Ddefault] \definelayer[chaptertext][width=3D\paperwidth,height=3D\paperheight] \define[2]\ChapterCommand {\setlayerframed [chaptertext] [x=3D3cm, y=3D8cm] [frame=3Doff] {#1 =E2=80=93 #2}} \definemakeup[chapterpage][page] \setupmakeup [chapterpage] [pagestate=3Dstart, before=3D{\setupbackgrounds[page][background=3Dchapterimage]}, bottom=3D{\placelayer[chaptertext]}] = \defineoverlay[chapterimage][\overlayfigure{\structureuservariable{image}}= ] \setuphead [chapter] [ before=3D{\startmakeup[chapterpage]}, %command=3D\ChapterCommand, placehead=3Dempty, after=3D{\stopmakeup}] \setuphead [title] [ before=3D{\blank[big]}, after=3D{\blank[2*big]}, command=3D] \starttext \completecontent \startchapter[title=3D{Understanding the Food Industry}][image=3Dmill.png]= \input knuth \stopchapter Wolfgang= --Apple-Mail=_56199BD1-7516-41B6-A5B6-A92BD7D95492 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Am 02.04.2015 um 17:12 schrieb John Culleton <john@wexfordpress.com>:

On Thu, 02 Apr 2015 15:10:19 +0200
Proch=C3=A1zka Luk=C3=A1=C5=A1 Ing. - Pontex s. = r. o.
<LPr@pontex.cz> = wrote:

Hello,

On Thu, 02 Apr 2015 = 14:46:11 +0200, Otared
Kavian <otared@gmail.com> = wrote:

Hi,

Maybe you need to say = state=3Drepeat in the
definition of your layer:

= \definelayer[chapterbackground][state=3Drepeat]

'[state=3Drepeat]' causes all = pages have the
'mill' background.

Best regards,

Lukas



I am not seeking a background but rather = a
foreground. And I only = need this for 7 chapter
heads. Here is how I put = the page image into my
context file = now:
-------------------------------------------------
\startstandardmakeup[doublesided=3Dno]
\vskip -0.15in
\hskip -0.7in
\hbox{\externalfigure[chaphead2.pdf][width=3D\paperwidth,
height=3D\paperheight]} = \stopstandardmakeup

\writetolist[chapter]{2}{Chapter 2: Understanding
the Food Industry}%
------------------------------------------------
This works but I want a less = fiddly-more
reliable method. =  

\setupexternalfigures[location=3Ddefault]

\definelayer[chaptertext][width=3D\paperwidth,height=3D\paperhe= ight]

\define[2]\ChapterCommand
  = {\setlayerframed
    =  [chaptertext]
    =  [x=3D3cm,
      = y=3D8cm]
[frame=3Doff]
     {#1 =E2=80=93 #2}}
\definemakeup[chapterpage][page]

\setupmakeup
  = [chapterpage]
  [pagestate=3Dstart,
      = before=3D{\setupbackgrounds[page][background=3Dchapterimage]},
      = bottom=3D{\placelayer[chaptertext]}]

\defineoverlay[chapterimage][\overlayfigure{\structureuservaria= ble{image}}]

\setuphead
  [chapter]
  [   before=3D{\startmakeup[chapterpage]},
    %command=3D\ChapterCommand,
   placehead=3Dempty,
  =      after=3D{\stopmakeup}]

\setuphead
  = [title]
  [ before=3D{\blank[big]},
     after=3D{\blank[2*big]},
   command=3D]

\starttext

\completecontent
\startchapter[title=3D{Understanding = the Food Industry}][image=3Dmill.png]

\input knuth

\stopchapter

Wolfgang
= --Apple-Mail=_56199BD1-7516-41B6-A5B6-A92BD7D95492-- --===============2051950929== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============2051950929==--