From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74223 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Still Problems With TextBackground bottomoffset / topoffset Date: Tue, 31 Jan 2012 19:25:49 -0500 (EST) Message-ID: References: <1322100246.11972.8.camel@kip-laptop> <1327983515.2903.59.camel@kip-laptop> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1328055975 1487 80.91.229.3 (1 Feb 2012 00:26:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Feb 2012 00:26:15 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Feb 01 01:26:14 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RsO1e-0001W0-8V for gctc-ntg-context-518@m.gmane.org; Wed, 01 Feb 2012 01:26:14 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5A870CB265; Wed, 1 Feb 2012 01:26:13 +0100 (CET) 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 pgbCFKRujEZC; Wed, 1 Feb 2012 01:26:09 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id ABE49CB25D; Wed, 1 Feb 2012 01:26:09 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B4D1DCB25D for ; Wed, 1 Feb 2012 01:26:07 +0100 (CET) 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 PIzK3Hjp+ypq for ; Wed, 1 Feb 2012 01:25:56 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 6125DCB25C for ; Wed, 1 Feb 2012 01:25:56 +0100 (CET) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q110PrWQ019984 for ; Wed, 1 Feb 2012 01:25:55 +0100 Original-Received: FROM [10.0.2.15] (wpa045216.Wireless.McGill.CA [142.157.45.216]) By hellskitchen.mr.itd.umich.edu ID 4F28868F.ED2CA.18478 ; Authuser adityam; 31 Jan 2012 19:25:52 EST In-Reply-To: <1327983515.2903.59.camel@kip-laptop> User-Agent: Alpine 2.02 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.82; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03GsopSKQ - 89dcb9c39ba3 - 20120201 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 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:74223 Archived-At: On Mon, 30 Jan 2012, Kip Warner wrote: > Hey Hans, Aditya, and Wolfgang, > > You gentlemen seem to be very knowledgeable with ConTeXt, so I will run > a question by you that has been plaguing me for months. I am using the > following to typeset a text box containing text. > > \definetextbackground[GeneralDocument][ > location=paragraph, > color=color_text, > background=color, > backgroundcolor=colour_page, > framecolor=colour_text, > topoffset=1.0cm, > bottomoffset=1.0cm, > leftoffset=1.0cm, > rightoffset=1.0cm, > before={ > \blank[2*big] > }, > after={ > \blank[2*big] > }, > style=small, > corner=round, > frame=on] > > This works fine, but I still have a problem if the text box spans > multiple pages because bottomoffset / topoffset seem to be ignored at > the points where the page breaks. The text just goes right to the edge > of the page top or bottom without any whitespace. Do you have to use textbackground (assuming, of course, that you are using MkIV)? Regular backgrounds take care of top and bottom offsets: \definebackground [whatever] [topoffset=1cm, bottomoffset=1cm, frame=on] \starttext \input ward \startwhatever \dorecurse{6}{\input knuth \endgraf} \stopwhatever \input ward \stoptext The main advantage of textbackground is that they adapt to pararagraph shapes (if you use things like \startplacefigure[location=left] ... \stopplacefigure), and can be nested. Aditya ___________________________________________________________________________________ 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-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________