From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62709 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: background over two page Date: Mon, 18 Oct 2010 17:22:50 +0200 Message-ID: <6D2C32DB-832A-4038-911B-8E705C558AED@gmail.com> References: <5EC1C613-30AD-448A-8048-455DE97762D8@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 1287415504 14481 80.91.229.12 (18 Oct 2010 15:25:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Oct 2010 15:25:04 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Oct 18 17:25:01 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 1P7ra8-0002WD-61 for gctc-ntg-context-518@m.gmane.org; Mon, 18 Oct 2010 17:25:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 32DBDCA778; Mon, 18 Oct 2010 17:24:59 +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 AGtKeEPm8sL8; Mon, 18 Oct 2010 17:24:56 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F0187CA762; Mon, 18 Oct 2010 17:24:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4E999CA762 for ; Mon, 18 Oct 2010 17:24:55 +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 cGLYvE5jHigX for ; Mon, 18 Oct 2010 17:24:43 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id C955BCA760 for ; Mon, 18 Oct 2010 17:24:43 +0200 (CEST) Original-Received: from mail-yx0-f169.google.com (mail-yx0-f169.google.com [209.85.213.169]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9IFOgjF012896 for ; Mon, 18 Oct 2010 17:24:43 +0200 Original-Received: by yxm34 with SMTP id 34so542682yxm.14 for ; Mon, 18 Oct 2010 08:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.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=BOb3fkUDO+HX6R+AwICTxkaYOeGRsmAqwFqR9laN8wE=; b=mtXUKIAHLPOYESdf0Cu35IToGc0+IElyIesiiAfnYE9bcQt979GcyGAgqUW8JP8kMm z8qHRzq+qFdToov3h2Sdfw1czp6/cuIuuwBccuw5yYAyrY6ReveE3LhoAqm6miYjt13b bWtHKyFWkdyP6uHkH4s6W8gExeH936MPz1kPA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=MIFcnt8Nq18hR90vvquroLb8dlWnal2iUsTvYyh1w+7puCTnm87RzlpRk7gqQcnHuJ rB8pi5uAMm1Ccsbt4LzCHUcZEaPBiz+yShgQSQzYEihh7xmGDiO1fH+Wns2qo+D2xvrd QKBgjVuuara+HZhqfhvPHaBFQUIOrskPG1nWY= Original-Received: by 10.103.215.4 with SMTP id s4mr2538340muq.111.1287415417017; Mon, 18 Oct 2010 08:23:37 -0700 (PDT) Original-Received: from [192.168.2.23] (p5B2930F4.dip.t-dialin.net [91.41.48.244]) by mx.google.com with ESMTPS id u8sm4272583fah.12.2010.10.18.08.23.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 18 Oct 2010 08:23:24 -0700 (PDT) In-Reply-To: <5EC1C613-30AD-448A-8048-455DE97762D8@gmail.com> X-Mailer: Apple Mail (2.1081) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.213.169; 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: 05DkfoGAe - 291e478738e8 - 20101018 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.216 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:62709 Archived-At: Am 18.10.2010 um 14:18 schrieb Otared Kavian: > Your solution works as intended when the framed, highlighted text with ba= ckground spans over two pages (though it doesn't when it spans over three p= ages 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:\Current= Background} \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 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 ___________________________________________________________________________= ________