From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15622 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: textbackground Date: Tue, 29 Jun 2004 11:23:35 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <40E13517.6080707@wxs.nl> References: <02953FC4-C76F-11D8-A876-003065568054@science.uva.nl> <40DDBCDA.1080406@wxs.nl> <6B62B759-C815-11D8-9564-003065568054@science.uva.nl> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1088501188 17505 80.91.224.253 (29 Jun 2004 09:26:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 29 Jun 2004 09:26:28 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Tue Jun 29 11:26:20 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BfEsd-00070N-00 for ; Tue, 29 Jun 2004 11:26:19 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 271E710AE3; Tue, 29 Jun 2004 11:26:16 +0200 (MEST) Original-Received: from mailrelay02.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ref.ntg.nl (Postfix) with ESMTP id A12ED10ACF for ; Tue, 29 Jun 2004 11:23:37 +0200 (MEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id i5T9NZcI016137 for ; Tue, 29 Jun 2004 11:23:35 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 59746235B7; Tue, 29 Jun 2004 11:23:36 +0200 (CEST) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 054FB18517 for ; Tue, 29 Jun 2004 09:23:34 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en Original-To: ntg-context@ntg.nl In-Reply-To: <6B62B759-C815-11D8-9564-003065568054@science.uva.nl> X-Virus-Scanned: clamd / ClamAV version 0.73, clamav-milter version 0.73a on mailrelay02.solcon.nl X-Virus-Status: Clean 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:15622 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15622 dr. Hans van der Meer wrote: > > On 26-jun-04, at 20:13, Hans Hagen Outside wrote: > >> dr. Hans van der Meer wrote: >> >>> Hans, >>> >>> I definitely see problems with the >>> \starttextbackground[]-\stoptextbackground environment (discussed in >>> the "displays"-brochure). >>> >>> When the textbackground falls at a page crossing -- i.e. starts at >>> the top of a page -- the coloring extends backwards on the page just >>> left. >>> It can be remedied by putting a \null just in front of >>> \starttextbackground. The extra vertical space this introduces just >>> manages to constrain the background to its own page. However, this >>> is not a general solution, on other places the extra vertical space >>> is certainly not wanted. >>> >>> I cannot find the exact nature of the problem. I suspect it has to >>> do with the \output-routines, but these are not my speciality, to >>> say the least. So, not much help there, >>> >>> Also, the \starttextbackground does not respect footnotes, these are >>> colored. In contrast, the old \startbackground-\stopbackground does >>> respect footnotes. The coloring stops at the footnote and restarts >>> at the next page. I should like that for \starttextbackground as well. >> >> >> can you make me a minimal example of where things go wrong (keep in >> mind that there are two methods, tex and paragraph) >> with respect to footnotes, maybe i can make that an option (there are >> more exceptions) >> Hans >> > > Here is the smallest one I could construct that shows the page > crossing effect. I used the "location=paragraph". With "location=text" > I did not experiment. > Here follows the code: > > % testing textbackgroundcolor > \setupbodyfont[12pt] % using the default cmr font > \setuppapersize[S6][S6] > \setuplayout[width=middle,location=middle,header=0pt,footer=4ex] > \setuppagenumbering[location={footer,inright},alternative=singlesided] > % > \setupcolors [state=start] > \definecolor [lavender] [r=.901961,g=.901961,b=.980392] > \definecolor [lavenderblush] [r=1,g=.941176,b=.960784] > % general page coloring > > \setupbackgrounds[page][background=color,backgroundcolor=lavenderblush] > % > % special background coloring for parts of the text > \definetextbackground[A][frame=off,location=paragraph, > backgroundcolor=lavender,backgroundoffset=0pt] > \starttext > % > \dorecurse{10}{Some text that must fill a portion of the page. }\par > \dorecurse{10}{Some text that must fill a portion of the page. }\par > \dorecurse{10}{Some text that must fill a portion of the page. }\par > % > % WITH 8 AND 9 IN THE NEXT RECURSION THE FIRST PARAGRAPH ON PAGE 2 HAS > % THE BACKGROUND COLORED BUT THE WHITESPACE BELOW THE LAST PARAGRAPH ON > % PAGE 1 IS COLORED TOO. > % CHANGE THE 8/9 TO 10 AND THE COLORING ON PAGE 1 DISPAPPEARS. > % I HAVE BECOME ACROSS SITUATIONS WERE THE COLORING EXTENDED STILL > % FURTHER BACK OVER MORE PRECEDING PARAGRAPHS, BUT IT IS DIFFICULT TO > % CONSTRUCT A MINIMAL EXAMPLE FOR THAT. > \dorecurse{9}{Some text that must fill a portion of the page. }\par > % > % THIS SHOULD COLOR THE FIRST PARAGRAPH ON PAGE 2 > \starttextbackground[A] > \dorecurse{5}{Text with the background. } > \stoptextbackground > \dorecurse{10}{Some text that must fill a portion of the page. }\par > % > \stoptext > > I hope you can find what causes it, because I like the effects. i think i found a way out and will send you a test file Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------