From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90009 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Grey background for pages belonging to last section of every chapter Date: Fri, 30 Jan 2015 18:27:45 +0100 Message-ID: <28763E80-A4F8-4CB6-8385-5A5FDED2E09B@gmail.com> References: <52301dbe3d341fb2c7484eebabac5f61.squirrel@webmail.xs4all.nl> <475204C3-A90A-404E-BBB9-2323A3703E96@gmail.com> 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="===============1972802633==" X-Trace: ger.gmane.org 1422638910 31711 80.91.229.3 (30 Jan 2015 17:28:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2015 17:28:30 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 30 18:28:26 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 1YHFMn-0000Ce-6a for gctc-ntg-context-518@m.gmane.org; Fri, 30 Jan 2015 18:28:25 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 96B8710229 for ; Fri, 30 Jan 2015 18:28:24 +0100 (CET) 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 T9jGIiSjvtKp for ; Fri, 30 Jan 2015 18:28:23 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 1432B10200 for ; Fri, 30 Jan 2015 18:27:54 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 17E35101FD for ; Fri, 30 Jan 2015 18:27:51 +0100 (CET) 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 IjZjRRHZIQ0I for ; Fri, 30 Jan 2015 18:27:50 +0100 (CET) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 483D0101FB for ; Fri, 30 Jan 2015 18:27:50 +0100 (CET) Original-Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t0UHRlan028581 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 30 Jan 2015 18:27:47 +0100 Original-Received: by mail-wi0-f177.google.com with SMTP id r20so4029446wiv.4 for ; Fri, 30 Jan 2015 09:27:48 -0800 (PST) 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=5IMah/pi33vmhXpyuRqwZ0JFnh96dNNWukQHTDv0/aU=; b=ZXkK+vTOwI7khUSCaHGs/b4kBYZ1v0fCgGU9+RMcHdWrxgngYm1u4KTHznmhUvYZrO QpW5QRijtiBSaIPoRLyT7MEXZx9S45MP6pqb4M2QzQnaYI0VabNJ1iZbvbpHDcYmLOwo +1+i59K4lh/a2KuvXzcfSUSOjNSEy80BaXyWdxDj2Vj/HnoodUVwnCDOtJuEFfKDgC9B 2Lu2rNLAkNXo45EwDWfNvSDBDIimMc8pMdeL3aYkTXaTsPxNdnoy9eHTGAsjbZV5XnzX YNUKPm+Wq0HLDGf5pvtoy7PIsUOyhNgFZDS1RXpDQfHkZEmInzMzRLF88LHWXmdCm8qQ uW3A== X-Received: by 10.180.37.77 with SMTP id w13mr6972403wij.66.1422638868565; Fri, 30 Jan 2015 09:27:48 -0800 (PST) Original-Received: from keima.localdomain (x2f22733.dyn.telefonica.de. [2.242.39.51]) by mx.google.com with ESMTPSA id u18sm15800399wjq.42.2015.01.30.09.27.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Jan 2015 09:27:47 -0800 (PST) In-Reply-To: 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:c05::231; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07NKhrLup - 43db29bbe9d2 - 20150130 (trained as not-spam) Received-SPF: pass (filter1-utr.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c05::231 as permitted sender) receiver=filter1-utr.mf.surf.net; client-ip=2a00:1450:400c:c05::231; envelope-from=; helo=mail-wi0-x231.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:90009 Archived-At: --===============1972802633== Content-Type: multipart/alternative; boundary="Apple-Mail=_9B478F38-3536-4FA1-A163-E4B1750D980C" --Apple-Mail=_9B478F38-3536-4FA1-A163-E4B1750D980C Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > Am 30.01.2015 um 18:17 schrieb Rob Heusdens : > > Problem is however resetting the background. In the after option of > \setuphead will not work, the \page is ejected directly after the section > title. I want to reset to normal background after the section itself > finishes. After this special section (summary) always a new chapter begins > (except perhaps the last summary). > > Should I add that manually as the last command of every summary (where > also the chapter ends), or is there some way to perform a command after > the summary itself (at the location where one would place \stopsummary if > using the \startsummary syntax) ends? > > The background should only be displayed behind the text itself, not the > whole text area (so if a section ends halfway of the page, the bottom part > should have no background) with some extra space surrounding it > (above,below,left,right) using the offset or perhaps backgroundoffset > options of \setupframed). Use text backgrounds. \definetextbackground [SummaryBackground] [frame=off, background=color, backgroundcolor=gray] \definehead[summary][section] \setuphead [summary] [before=, beforesection={\blank\starttextbackground[SummaryBackground]}, aftersection={\stoptextbackground\blank}] \starttext \startsection[title=Knuth] \input{knuth} \stopsection \startsummary[title=Zapf] \input{zapf} \stopsummary \stoptext Wolfgang --Apple-Mail=_9B478F38-3536-4FA1-A163-E4B1750D980C Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
Am 30.01.2015 um 18:17 schrieb Rob Heusdens <robheus@xs4all.nl>:

Problem is however = resetting the background. In the after option of
\setuphead will not work, the \page is ejected = directly after the section
title. I want to reset to = normal background after the section itself
finishes. After this special section (summary) = always a new chapter begins
(except perhaps the last = summary).

Should I add that manually = as the last command of every summary (where
also the chapter ends), or is there some way to = perform a command after
the summary itself (at the = location where one would place \stopsummary if
using the \startsummary syntax) ends?

The background should only be displayed behind = the text itself, not the
whole text area (so if a = section ends halfway of the page, the bottom part
should have no background) with some extra space = surrounding it
(above,below,left,right) = using the offset or perhaps backgroundoffset
options of \setupframed).

Use text backgrounds.

\definetextbackground
  = [SummaryBackground]
  [frame=3Doff,
   background=3Dcolor,
  =  backgroundcolor=3Dgray]

\definehead[summary][section]

\setuphead
  [summary]
  = [before=3D,
  =  beforesection=3D{\blank\starttextbackground[SummaryBackground]},
  =  aftersection=3D{\stoptextbackground\blank}]
\starttext

\startsection[title=3DKnuth]

\input{knuth}

\stopsection

\startsummary[title=3DZapf]

\input{zapf}

\stopsummary

\stoptext

Wolfgang
= --Apple-Mail=_9B478F38-3536-4FA1-A163-E4B1750D980C-- --===============1972802633== 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= --===============1972802633==--