From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90012 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 20:05:01 +0100 Message-ID: <2DDCC73C-2FCE-4D38-8DAF-932ECDCCC31A@gmail.com> References: <52301dbe3d341fb2c7484eebabac5f61.squirrel@webmail.xs4all.nl> <475204C3-A90A-404E-BBB9-2323A3703E96@gmail.com> <28763E80-A4F8-4CB6-8385-5A5FDED2E09B@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="===============1194022541==" X-Trace: ger.gmane.org 1422644747 657 80.91.229.3 (30 Jan 2015 19:05:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2015 19:05:47 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 30 20:05:46 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 1YHGsz-0004X8-KW for gctc-ntg-context-518@m.gmane.org; Fri, 30 Jan 2015 20:05:45 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C74411022C for ; Fri, 30 Jan 2015 20:05:44 +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 DOjiuU-QPTqN for ; Fri, 30 Jan 2015 20:05:43 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 29B8F10235 for ; Fri, 30 Jan 2015 20:05:12 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C8B78101FD for ; Fri, 30 Jan 2015 20:05:08 +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 p8eUGkaC_7VR for ; Fri, 30 Jan 2015 20:05:07 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id DBA17101FB for ; Fri, 30 Jan 2015 20:05:07 +0100 (CET) Original-Received: from mail-we0-x22a.google.com (mail-we0-x22a.google.com [IPv6:2a00:1450:400c:c03::22a]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t0UJ56p5003370 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 30 Jan 2015 20:05:06 +0100 Original-Received: by mail-we0-f170.google.com with SMTP id w55so23397215wes.1 for ; Fri, 30 Jan 2015 11:05:06 -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=cmKuHTLmikILkXYzLcVzWjK/tI2uS0RHk0lWPMTLQUM=; b=0HGit+WwdiRO/cZwAx7Ow1ks20Lfh7PnKTbj3ezqLOTMU/Va6QpAEofmOJYWfLzviZ 8g3aURnR4anxE5AjAw84h8QsnPLUdtjk4jh0hpG+wYP3QKbgmdP7zz0a+VwlD8b79kx6 DzF5A5xLXoqAhseE1+Zmp49kfToM57nMo+mIPZBmC4h2EfwlhM8yNsK3kZZrnLDbzUBW GMqWBYcL4W0coEBU/CvnbHN4m8SYCFJSGtDqcrzecd0fGYY9MaI2EXem5gDhixSk2oj2 7Pfb51UAtNR59F4haJf3V4G/eLwfObK0oqEFE+daqIQSKHeI0/03EjCfsTMOsYrFHWac msDA== X-Received: by 10.194.239.233 with SMTP id vv9mr15074983wjc.90.1422644706533; Fri, 30 Jan 2015 11:05:06 -0800 (PST) Original-Received: from keima.localdomain (x2f22733.dyn.telefonica.de. [2.242.39.51]) by mx.google.com with ESMTPSA id dt10sm8104181wib.23.2015.01.30.11.05.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Jan 2015 11:05:05 -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:c03::22a; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03NKj56Ea - 4bd999e08b67 - 20150130 (trained as not-spam) Received-SPF: pass (filter3-ams.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c03::22a as permitted sender) receiver=filter3-ams.mf.surf.net; client-ip=2a00:1450:400c:c03::22a; envelope-from=; helo=mail-we0-x22a.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:90012 Archived-At: --===============1194022541== Content-Type: multipart/alternative; boundary="Apple-Mail=_E0901221-9502-4464-B83F-9B1AEA0F3357" --Apple-Mail=_E0901221-9502-4464-B83F-9B1AEA0F3357 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 > Am 30.01.2015 um 19:28 schrieb Rob Heusdens : >=20 >> Use text backgrounds. >>=20 >> \definetextbackground >> [SummaryBackground] >> [frame=3Doff, >> background=3Dcolor, >> backgroundcolor=3Dgray] >>=20 >> \definehead[summary][section] >>=20 >> \setuphead >> [summary] >> [before=3D, >> beforesection=3D{\blank\starttextbackground[SummaryBackground]}, >> aftersection=3D{\stoptextbackground\blank}] >>=20 >> \starttext >>=20 >> \startsection[title=3DKnuth] >>=20 >> \input{knuth} >>=20 >> \stopsection >>=20 >> \startsummary[title=3DZapf] >>=20 >> \input{zapf} >>=20 >> \stopsummary >>=20 >> \stoptext >>=20 >> Wolfgang >=20 > Hello Wolfgang, >=20 > Your example works. After adjusting the \summary to using = \startsummary, > \stopsummary, and using your code, with only minor additions, as = below: >=20 > \definetextbackground > [SummaryBackground] > [frame=3Doff, > background=3Dcolor, > backgroundcolor=3Dgray, > backgroundoffset=3D2ex] % <- added >=20 > \definehead[summary][section] >=20 > \setuphead[summary] > [number=3Dno, % <- added > style=3Dbold, % <- added > before=3D, > beforesection=3D{\page\starttextbackground[SummaryBackground]}, % = <- > changed \blank to \page > aftersection=3D{\stoptextbackground\page}] % <- changed \blank to = \page >=20 > I get some unwanted result. See the picture. >=20 > The bold does not show up, and a small portion of the topleft corner = of > the background frame is missing.... >=20 > Changing bold to italic also has no effect. >=20 > Something strange.... >=20 > Also trying with \blank instead of \page, the background then starts = right > after the previous section, and it seems the indentation causes the > missing background on the first line. >=20 > So I placed "\noindentation\page" into beforesection (replacing = \blank) > and get the background result I want, but still the bold is missing in = the > summary title, and too much whitespace appears before the section = title. >=20 > The title should be placed in the same position as normal text would > appear (and as a side note: in fact I am copying a style that was used = in > a printed book that I typeset, in which each section title - except = for > the summary - is just a normal sentence (or 2) typeset bold, with the = rest > of the text appearing after the section title just as after a normal > sentence, so no vertical space between title and first sentence of the > section. Since it appears in the content also, I had to use section > commands, but is this behaviour duplicatable using setuphead for = section?) >=20 >=20 > How can I adjust that? Make a working minimal example which shows the problem because I=92cant reproduce the problems you mention. Wolfgang= --Apple-Mail=_E0901221-9502-4464-B83F-9B1AEA0F3357 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
Am 30.01.2015 um 19:28 schrieb Rob Heusdens <robheus@xs4all.nl>:

Use text backgrounds.

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

\definehead[summary][section]

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

\starttext

\startsection[title=3DKnuth]

\input{knuth}

\stopsection

\startsummary[title=3DZapf]

\input{zapf}

\stopsummary

\stoptext

Wolfgang

Hello Wolfgang,

Your example works. After adjusting the \summary = to using \startsummary,
\stopsummary, and using = your code, with only minor additions, as below:

\definetextbackground
 [SummaryBackground]
 [frame=3Doff,
  background=3Dcolor,
  backgroundcolor=3Dgray,
  backgroundoffset=3D2ex] % <- = added

\definehead[summary][section]

\setuphead[summary]
   [number=3Dno, =     % <- added
   style=3Dbold, =     % <- added
   before=3D,
   beforesection=3D{\page\starttextbackground[Su= mmaryBackground]}, % <-
changed \blank to = \page
   aftersection=3D{\stoptextbackground\page}] = % <- changed \blank to \page

I get some unwanted result. See the = picture.

The bold does not show up, = and a small portion of the topleft corner of
the background frame is missing....

Changing bold to italic also has no = effect.

Something = strange....

Also trying with \blank = instead of \page, the background then starts right
after the previous section, and it seems the = indentation causes the
missing background on the = first line.

So I placed = "\noindentation\page" into beforesection (replacing \blank)
and get the background result I want, but still = the bold is missing in the
summary title, and too = much whitespace appears before the section title.

The title should be placed in the same position = as normal text would
appear (and as a side = note: in fact I am copying a style that was used in
a printed book that I typeset, in which each = section title - except for
the summary - is just a = normal sentence (or 2) typeset bold, with the rest
of the text appearing after the section title = just as after a normal
sentence, so no vertical = space between title and first sentence of the
section. Since it appears in the content also, I = had to use section
commands, but is this = behaviour duplicatable using setuphead for section?)


How can I adjust that?

Make a working minimal example which shows the problem = because I=92cant
reproduce the problems you = mention.

Wolfgang
= --Apple-Mail=_E0901221-9502-4464-B83F-9B1AEA0F3357-- --===============1194022541== 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= --===============1194022541==--