From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/11639 Path: main.gmane.org!not-for-mail From: Giuseppe Bilotta Newsgroups: gmane.comp.tex.context Subject: Re[4]: Backgrounds Date: Tue, 25 Mar 2003 15:36:23 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <9619582618.20030325153623@iol.it> References: <5.1.0.14.1.20030325094633.031a8c80@server-1> <5.1.0.14.1.20030325094633.031a8c80@server-1> <5.1.0.14.1.20030325131938.01d9af40@server-1> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1048603279 18692 80.91.224.249 (25 Mar 2003 14:41:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 25 Mar 2003 14:41:19 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Tue Mar 25 15:41:17 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18xpc2-0004r6-00 for ; Tue, 25 Mar 2003 15:41:14 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 878C510B1B; Tue, 25 Mar 2003 15:41:10 +0100 (MET) Original-Received: from smtp2.libero.it (smtp2.libero.it [193.70.192.52]) by ref.ntg.nl (Postfix) with ESMTP id 64DFC10B18 for ; Tue, 25 Mar 2003 15:38:15 +0100 (MET) Original-Received: from [151.29.142.136] (151.29.142.136) by smtp2.libero.it (6.7.015) id 3E48BA3400FEBB12 for ntg-context@ntg.nl; Tue, 25 Mar 2003 15:38:17 +0100 X-Mailer: The Bat! (v1.63 Beta/7) X-Priority: 3 (Normal) Original-To: ntg-context@ntg.nl In-Reply-To: <5.1.0.14.1.20030325131938.01d9af40@server-1> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:11639 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:11639 Tuesday, March 25, 2003 Hans Hagen wrote: >>The problem is still that I cannot separate the behaviour at the >>end of the background from the behaviour at a split. What I'm >>looking for is something like this: HH> guess what, this time your demands for features are fulfilled on forehand! HH> there is an array available HH> multilocs[...] HH> 1 = top HH> 2 = mid HH> 3 = bottom HH> shape; this is how i could handle the example in details with different HH> shades per kind of frame Almost perfect! Only a few things need refining: (1) "top" is also used when there is no split; it should be possible to detect the "no-split" situation (multilocs=0?) (2) I still need a to find a way to make only certain corners rounded, but I guess that's just a matter of MetaPosting a little. Up to now, I came up with the following: \starttext \setupcolors[state=start] \definetextbackground[gb][state=start] \startuseMPgraphic{mpos:par:columnset} path p, q; for i := 1 upto nofmultipars : p := counterclockwise simplified multipars[i] leftenlarged 5pt rightenlarged 5pt ; if multilocs[i] = 1 : q := p topenlarged 5pt ; fill q withcolor green ; draw topboundary q withcolor red ; draw leftboundary q withcolor red ; draw rightboundary q withcolor red ; elseif multilocs[i] = 2 : q := p ; fill q withcolor green ; draw leftboundary q withcolor red ; draw rightboundary q withcolor red ; else: q := p bottomenlarged 5pt; fill q withcolor green ; draw bottomboundary q withcolor red ; draw leftboundary q withcolor red ; draw rightboundary q withcolor red ; fi endfor ; \stopuseMPgraphic \starttextbackground[gb] \input tufte \stoptextbackground \blank[2*big] \starttextbackground[gb] \dorecurse{10}{\input tufte \par} \stoptextbackground \blank \input tufte \stoptext As you can see, the first background doesn't split and behaves like multilocs=1, while one would wish it to behave differently. -- Giuseppe "Oblomov" Bilotta