From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62696 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 09:32:31 +0200 Message-ID: References: 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 1287387165 12482 80.91.229.12 (18 Oct 2010 07:32:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Oct 2010 07:32:45 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Oct 18 09:32:44 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 1P7kD5-0007Sd-R1 for gctc-ntg-context-518@m.gmane.org; Mon, 18 Oct 2010 09:32:43 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3BCB6CA701; Mon, 18 Oct 2010 09:32:43 +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 cfZgL8CJjM1Y; Mon, 18 Oct 2010 09:32:39 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 34037CA761; Mon, 18 Oct 2010 09:32:39 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AB86ECA761 for ; Mon, 18 Oct 2010 09:32:37 +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 gE7mR1m5UrJR for ; Mon, 18 Oct 2010 09:32:35 +0200 (CEST) Original-Received: from filter5-ams.mf.surf.net (filter5-ams.mf.surf.net [192.87.102.73]) by balder.ntg.nl (Postfix) with ESMTP id 76F93CA701 for ; Mon, 18 Oct 2010 09:32:35 +0200 (CEST) Original-Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) by filter5-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9I7WYw4030842 for ; Mon, 18 Oct 2010 09:32:35 +0200 Original-Received: by wwa36 with SMTP id 36so23543wwa.2 for ; Mon, 18 Oct 2010 00:32:34 -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=Nd5aJ1hS4tHkRGqNEwmhLkZapaH04vp2cet/KLFuOSg=; b=CpIxqn6/oce1x9MsYIv9mQJILSXr7BCxYejHvoFukXHCS1gFzNabE/y+8o0vvglmLc 8Evse/cjliUjUEJOvKu1kQOQ0hA3Z5NVnp2ZcMGlqR5upiPv+BX6pmPAWwJqaHbEIu1u +HTxnRh1jGcQgZYK5cOjFxgQmryugGDjln1hI= 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=MwQo+NDuVRw5wpgcdFYa3YiBSsSsLnKxncH71dGl5DIKPldum6Uf57J61fosjSmAuC TO5jO8Vge+/DwNc5/rv5FgCrndIzkBLEjo3I0q6lH17kmiD/7It+ObqEuMuQhTR8q5iO 8HtOx8GZTrIeOBFraDhqjS7JcJ9PWNwTj78zw= Original-Received: by 10.216.0.206 with SMTP id 56mr4219361web.33.1287387154476; Mon, 18 Oct 2010 00:32:34 -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 b10sm9987866wer.41.2010.10.18.00.32.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 18 Oct 2010 00:32:33 -0700 (PDT) In-Reply-To: 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: 0BDk7wyLn - 533f8ffc2f15 - 20101018 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.73 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:62696 Archived-At: On 16 oct. 2010, at 17:30, Emanuele Sacco wrote: > A solution by Luigi: > [=85] Hi Emmanuele, Hi Luigi, Please excuse me if I get involved in the thread of your discussions=85 I was interested both by the question ad the solutions, since I had a simil= ar problem some time ago, but I gave up. Now that you give a solution with \definetextbackground (the solution below= ), I would like to point out that with this definition the beginning of the= highlighted text does not have the upper frame turned on, while at the end= the bottom frame is turned on (of course this is what we want). So my question is: can one have both the upper frame turned on at the begin= ing of the highlighted text (and only there) and also the bottom frame turn= ed on at the end (and only there). In other words, a highlighted framed text spanning over two (or more) pages= , would be like a big rectangle of which the upper and the bottom frame, as= well as the left and right frames, are shown. Thanks in advance for you attention: OK > An alternative solution with the command \definetextbackground: > = > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > \setupcolors[state=3Dstart] > \enableregime[utf] > \def\Linea{\startMPcode > draw (0,0) -- (\the\textwidth-1,0) withpen pencircle scaled 1bp withcolor= red; > \stopMPcode > } > \definetextbackground > [Prova] > [ > mp=3Dbackground:mp, > location=3Dparagraph, > rulethickness=3D1pt, > width=3Dbroad, > leftoffset=3D1em, > rightoffset=3D1em, > after=3D{\Linea} > ] > \startuseMPgraphic{background:mp} > path p; > for i =3D 1 upto nofmultipars : > p =3D (multipars[i] > topenlarged 5pt > bottomenlarged 10pt); > fill p withcolor lightgray ; > draw leftboundary p withpen pencircle scaled 1bp withcolor red ; > draw rightboundary p withpen pencircle scaled 1bp withcolor red ; > endfor; > \stopuseMPgraphic > = > = > \starttext > = > \startProva > \input knuth > \input knuth > \input knuth > \input knuth > \input knuth > \stopProva > = > \stoptext > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > = ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________