From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62714 Path: news.gmane.org!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Re: background over two page Date: Mon, 18 Oct 2010 22:20:52 +0200 Message-ID: <3B404CB6-C3A6-4ACD-BD34-91F6800FAC47@gmail.com> References: <5EC1C613-30AD-448A-8048-455DE97762D8@gmail.com> <6D2C32DB-832A-4038-911B-8E705C558AED@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1287433276 5202 80.91.229.12 (18 Oct 2010 20:21:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Oct 2010 20:21:16 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Oct 18 22:21:15 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P7wCp-0006J3-Aa for gctc-ntg-context-518@m.gmane.org; Mon, 18 Oct 2010 22:21:15 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 74C4CCA772; Mon, 18 Oct 2010 22:21:14 +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 M4oLgnFxXrVT; Mon, 18 Oct 2010 22:21:11 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 82C1BCA760; Mon, 18 Oct 2010 22:21:11 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D7DD7CA760 for ; Mon, 18 Oct 2010 22:21:09 +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 aYzbYgxF3is1 for ; Mon, 18 Oct 2010 22:20:57 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 47295CA71C for ; Mon, 18 Oct 2010 22:20:57 +0200 (CEST) Original-Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9IKKuPd010533 for ; Mon, 18 Oct 2010 22:20:56 +0200 Original-Received: by wwa36 with SMTP id 36so793737wwa.2 for ; Mon, 18 Oct 2010 13:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=cIyC38KcKliaYdDz8OwrvdA8BIQ/zs3HikN+pix+mmc=; b=utBWIa0uPYvAMnDcC4Et9wZ+p/jDgmGkIU1sU/F+dnop2b5Z+htrpYRJ52OXQdYktZ 5SrCodtN5MvdEUtojEfTCefvOmR7JZ/FAvz0AYwto51bVejaocip9k6IYMYROlZiP84f BL5hK0pV7/Iad7bORw0lhMz+6ehxXLvgVq+YM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=P5vU2skF6QBdBeeGWGNnaasNnzOp6+ZpVEhB4nCqGxW3azRa0JypXCfkNt5/jwA1EB DUSc6m8oN3TrVy0jvUilXbfkc6JqG5tSiA0IZkZxJPZoX9jPp6ZF0RFrIXSWRMZ/sPj4 0MoMdxYRpL/7g47PYuY7uichNRa5atJ9f8gY0= Original-Received: by 10.227.156.21 with SMTP id u21mr305423wbw.9.1287433256049; Mon, 18 Oct 2010 13:20:56 -0700 (PDT) Original-Received: from [192.168.0.11] (mna75-3-82-66-231-76.fbx.proxad.net [82.66.231.76]) by mx.google.com with ESMTPS id f14sm12637543wbe.20.2010.10.18.13.20.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 18 Oct 2010 13:20:54 -0700 (PDT) In-Reply-To: <6D2C32DB-832A-4038-911B-8E705C558AED@gmail.com> X-Mailer: Apple Mail (2.1081) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.45; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08DkkkUiJ - b3083154f01d - 20101018 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:62714 Archived-At: Hi Wolfgang, = Indeed your solution works without any flaw=85 Looking at your code, I learned that Overlaybox is an object which can be f= illed with a background color, as in: fill OverlayBox withcolor lightgray ; = so that the background can be in color. Should we add this kind of problems and solutions to the wiki? If yes, I am willing to do so. Best regards: OK On 18 oct. 2010, at 17:22, Wolfgang Schuster wrote: > = > Am 18.10.2010 um 14:18 schrieb Otared Kavian: > = >> Your solution works as intended when the framed, highlighted text with b= ackground spans over two pages (though it doesn't when it spans over three = pages or more, but this is not a real issue, since it is a bad idea to have= such long highlighted texts=85). > = > = > I guess this is also possible with textbackground: > = > \newcounter\CurrentBackground > = > \def\StartBackground > {\doglobal\increment\CurrentBackground > \setposition{Background:b:\CurrentBackground}% > \startbackground} > = > \def\StopBackground > {\stopbackground > \setposition{Background:e:\CurrentBackground}} > = > \def\DrawBackground > {\ifnum\MPp{Background:b:\CurrentBackground}=3D\MPp{Background:e:\Curren= tBackground} > \startMPcode > draw topboundary OverlayBox withcolor red ; > draw bottomboundary OverlayBox withcolor red ; > draw leftboundary OverlayBox withcolor red ; > draw rightboundary OverlayBox withcolor red ; > \stopMPcode > \else\ifnum\realpageno=3D\MPp{Background:b:\CurrentBackground} > \startMPcode > draw topboundary OverlayBox withcolor red ; > draw leftboundary OverlayBox withcolor red ; > draw rightboundary OverlayBox withcolor red ; > \stopMPcode > \else\ifnum\realpageno=3D\MPp{Background:e:\CurrentBackground} > \startMPcode > draw bottomboundary OverlayBox withcolor red ; > draw leftboundary OverlayBox withcolor red ; > draw rightboundary OverlayBox withcolor red ; > \stopMPcode > \else > \startMPcode > draw leftboundary OverlayBox withcolor red ; > draw rightboundary OverlayBox withcolor red ; > \stopMPcode > \fi\fi\fi} > = > \defineoverlay[DrawBackground][\DrawBackground] > = > \starttext > = > \setupbackground[background=3DDrawBackground] > = > \input knuth > = > \StartBackground > \dorecurse{12}{\input knuth\par} > \StopBackground > = > \input knuth > = > \StartBackground > \input knuth\par > \StopBackground > = > \input knuth > = > \stoptext > = > Wolfgang > = > _________________________________________________________________________= __________ > 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-co= ntext > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > _________________________________________________________________________= __________ ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________