From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90006 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 17:34:50 +0100 Message-ID: <475204C3-A90A-404E-BBB9-2323A3703E96@gmail.com> References: <52301dbe3d341fb2c7484eebabac5f61.squirrel@webmail.xs4all.nl> 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="===============0200257821==" X-Trace: ger.gmane.org 1422635733 8022 80.91.229.3 (30 Jan 2015 16:35:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2015 16:35:33 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 30 17:35:33 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 1YHEXc-0005Jl-9f for gctc-ntg-context-518@m.gmane.org; Fri, 30 Jan 2015 17:35:32 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 55F0B10229 for ; Fri, 30 Jan 2015 17:35:31 +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 qtoJE7fX0nQx for ; Fri, 30 Jan 2015 17:35:30 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 678EB10201 for ; Fri, 30 Jan 2015 17:35:00 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 52E49101FD for ; Fri, 30 Jan 2015 17:34:56 +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 jtV4-_6xQ-yV for ; Fri, 30 Jan 2015 17:34:55 +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 2EF99101FB for ; Fri, 30 Jan 2015 17:34:54 +0100 (CET) Original-Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t0UGYp8L019416 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 30 Jan 2015 17:34:51 +0100 Original-Received: by mail-wi0-f171.google.com with SMTP id l15so4280079wiw.4 for ; Fri, 30 Jan 2015 08:34:53 -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=gy78cD9mPlgCM01lfCje0bRSAs4uzBUeZ4ovrs16Nv4=; b=nhejyiW5w4AscGKXjMYgDlUAOb27LmQkEyKWYAawJVUBaUz74b2O4DD07GRy/i5pll G1gWo5yfXy+ktIekd9FGRpq8QuXJg2c7hHtXmF9XAp/aYcfS0Pf6OhtxpmIE9B8f3F6G 9K2PDlcZxjjeFkk8dmRRkKjOkLWGWsFGzEInike04EZNKQJOpJpMFuaqEECiLmz8dX1N 2LBgZM0c6UY7SZTWqJqT+BKPsmnbbaQhT0AMqFDUasZCHo3KyEelV2JSAmgZG0xBT4GG U1h0anIQfdBwaH7/d3p+CMFo2CydwHkUK+yKWydpSQAuVQTp5qM7cB5bSu9z+XwfWE60 +oLw== X-Received: by 10.180.160.144 with SMTP id xk16mr6650945wib.12.1422635693349; Fri, 30 Jan 2015 08:34:53 -0800 (PST) Original-Received: from keima.localdomain (x2f22733.dyn.telefonica.de. [2.242.39.51]) by mx.google.com with ESMTPSA id i3sm7611857wie.23.2015.01.30.08.34.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Jan 2015 08:34:52 -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::22b; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07NKgyPt8 - 6c809f5a944a - 20150130 (trained as not-spam) Received-SPF: pass (filter1-utr.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c05::22b as permitted sender) receiver=filter1-utr.mf.surf.net; client-ip=2a00:1450:400c:c05::22b; envelope-from=; helo=mail-wi0-x22b.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:90006 Archived-At: --===============0200257821== Content-Type: multipart/alternative; boundary="Apple-Mail=_A8E1BF87-BF55-4297-9CE7-95657CE9D545" --Apple-Mail=_A8E1BF87-BF55-4297-9CE7-95657CE9D545 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 30.01.2015 um 17:18 schrieb Rob Heusdens : >=20 >> Hello list, >>=20 >> For the last section of every chapter I want a grey background for = the >> text, which otherwise should look the same as every other section, = except >> that it starts on a new page (I can set that by defining my own = section >> command). >>=20 >> The last section summarizes the chapter. >>=20 >> My current implementation is using a frame: >>=20 >>=20 >> \defineframed[achtergrond] >> [frame=3Doff, >> background=3Dcolor, >> backgroundcolor=3Dgray, >> width=3Dfit, >> height=3Dfit, >> offset=3D2ex, >> align=3D{flushleft,nothyphenated,verytolerant}] >>=20 >> And use it as: >>=20 >> \achtergrond{ >> \section{Last section} >>=20 >> \startitemize[n] >> \item ... >> \stopitemize >> } >>=20 >> But this does not accomodate sections longer then a page. And I can't >> place \page command in the middle of an itemize, and using = \stopitemize, >> \startitemize[continue] makes the pages vary in sizes. >>=20 >> Is there some way to achieve the desired effect (grey background = behind >> the text, and otherwise page layour identical to other sections) = without >> the problem that text exceeds the page size? >>=20 >> Greetings, >>=20 >> Rob >>=20 >> PS. The defined frame is also used elsewhere, but the last section = should >> in fact not have normal alignment like the other sections. >>=20 >>=20 >>=20 >=20 > What perhaps fixes this problem is defining my own section command = like this: >=20 > \definehead[summary][section] >=20 > \setuphead[summary] > [ > number=3Dno, > style=3Dbold, > before=3D{\page\setupbackgrounds[text][text][state=3Dstart] > = [background=3Dcolor,backgroundcolor=3Dgray]}, > after=3D{\setupbackgrounds[text][text][state=3Dstop]} > ] >=20 > According to the wiki > (http://wiki.contextgarden.net/Command/setupbackgrounds = ) that should = work, > but Context doesn't seem to understand the syntax and prints the part: > "[background=3Dcolor,backgroundcolor=3Dgray]" before the section = title. >=20 > What did I do wrong? 1. Put both assignments in the same argument, i.e. change = \setupbackgrounds[text][text][state=3Dstart][background=3Dcolor,background= color=3Dgray] to = \setupbackgrounds[text][text][state=3Dstart,background=3Dcolor,backgroundc= olor=3Dgray] 2. You have to finish the page before you disable the coloured = background. after=3D{\page\setupbackgrounds[=E2=80=A6]} Wolfgang= --Apple-Mail=_A8E1BF87-BF55-4297-9CE7-95657CE9D545 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Am 30.01.2015 um 17:18 schrieb Rob Heusdens <robheus@xs4all.nl>:

Hello list,

For the last = section of every chapter I want a grey background for the
text, which otherwise should look the same as every other = section, except
that it starts on a new page (I can set = that by defining my own section
command).

The last section summarizes the chapter.

My current implementation is using a frame:


\defineframed[achtergrond]
   [frame=3Doff,
   background=3Dcolor,
   backgroundcolor=3Dgray,
   width=3Dfit,
   height=3Dfit,
   offset=3D2ex,
   align=3D{flushleft,nothyphenated,verytolerant= }]

And use it as:

\achtergrond{
\section{Last section}

\startitemize[n]
\item ...
\stopitemize
}

But = this does not accomodate sections longer then a page. And I can't
place \page command in the middle of an itemize, and using = \stopitemize,
\startitemize[continue] makes the pages vary = in sizes.

Is there some way to achieve the = desired effect (grey background behind
the text, and = otherwise page layour identical to other sections) without
the problem that text exceeds the page size?

Greetings,

Rob

PS. The defined frame is also used elsewhere, but the last = section should
in fact not have normal alignment like the = other sections.




What perhaps fixes this = problem is defining my own section command like this:

\definehead[summary][section]

\setuphead[summary]
    [
    number=3Dno,
    style=3Dbold,
    before=3D{\page\setupbackgrounds[text][= text][state=3Dstart]
          &nb= sp;            = ;           [backgr= ound=3Dcolor,backgroundcolor=3Dgray]},
    after=3D{\setupbackgrounds[text][text][= state=3Dstop]}
    ]

According to the wiki
(http://wiki.contextgarden.net/Command/setupbackgrounds) that should work,
but Context doesn't seem to understand the = syntax and prints the part:
"[background=3Dcolor,backgroundcolor=3Dgray]" before the = section title.

What did I do = wrong?

1. Put both assignments in the same argument, i.e. = change

  =   = \setupbackgrounds[text][text][state=3Dstart][background=3Dcolor,background= color=3Dgray]

to

    = \setupbackgrounds[text][text][state=3Dstart,background=3Dcolor,backgroundc= olor=3Dgray]

2. = You have to finish the page before you disable the coloured = background.

  after=3D{\page\setupbackgrounds[=E2=80=A6]}

Wolfgang
= --Apple-Mail=_A8E1BF87-BF55-4297-9CE7-95657CE9D545-- --===============0200257821== 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= --===============0200257821==--