From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85992 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Colored text's background, which the more "lcd-mkiv"? Date: Fri, 17 Jan 2014 12:16:02 -0500 (EST) Message-ID: References: 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: ger.gmane.org 1389978969 3835 80.91.229.3 (17 Jan 2014 17:16:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Jan 2014 17:16:09 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 17 18:16:18 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W4D1l-0007sb-SB for gctc-ntg-context-518@m.gmane.org; Fri, 17 Jan 2014 18:16:17 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 67C36101EE; Fri, 17 Jan 2014 18:16:17 +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 NsYV0yz3SkAE; Fri, 17 Jan 2014 18:16:15 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 60245101E6; Fri, 17 Jan 2014 18:16:15 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 36848101E6 for ; Fri, 17 Jan 2014 18:16:14 +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 7y4w23p02l35 for ; Fri, 17 Jan 2014 18:16:08 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 9F57D101E1 for ; Fri, 17 Jan 2014 18:16:08 +0100 (CET) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s0HHG6ex022885 for ; Fri, 17 Jan 2014 18:16:07 +0100 Original-Received: FROM adi-thinkpad.local ((null) [135.0.226.162]) By hackers.mr.itd.umich.edu ID 52D96554.3C18D.3812 ; Authuser adityam; 17 Jan 2014 12:16:04 EST In-Reply-To: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.81; 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: 0QLf5g6NX - bb8d3813fe00 - 20140117 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:85992 Archived-At: On Fri, 17 Jan 2014, Elspeth McGullicuddy wrote: > [Colored text's background, which the more "lcd-mkiv"?; > plus: Metapost variable "text" with "\definetextbackground"; > plus: {\input ward}] > > Hi list, > > What would be the best, also the more up to date, way to put colored > background behind text, that could cross page boundaries. > > I have found three ways of doing this: I would like to know which is > best practice, and also the more "lua context document" fashion. > > 1- Using "\startbar[underbar] \input zapf \stopbar" as described p. 39 > of "hybrid.pdf". Use this one, unless the underbars are indequate, as was the case for the OP of the TeX.SX question. > 2- Using "\startMPpositionmethod{mpos:placeholder}", found in > http://tex.stackexchange.com/questions/125162/rounded-box-around-placeholder-text-that-supports-line-breaking/125323 > (Thanks to Aditya). > A bit tricky, but perhaps the more versatile or universal? > > 3- Start with: "\definetextbackground" (same ref. as previous). > > %%%%%%%%%%%%% > > % About the third one I have had some difficulties, that might be > thought of as a bug. > % You might want and try the following example: it doesn't work if you > have a MetaPost variable > % whose name is "text". (Untested). Normally this means that there is already a variable with the name text. You can use: save text; numeric text; or newnumeric text; which is shortcut for the former. 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 ___________________________________________________________________________________