From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/67205 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Text with background (overlay with a line by MP) Date: Sun, 20 Mar 2011 08:22:02 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1300605741 5714 80.91.229.12 (20 Mar 2011 07:22:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Mar 2011 07:22:21 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 20 08:22:16 2011 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 1Q1Cxp-00050V-Kn for gctc-ntg-context-518@m.gmane.org; Sun, 20 Mar 2011 08:22:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4EA6CCAB24; Sun, 20 Mar 2011 08:22:06 +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 Rr9oigO23kSN; Sun, 20 Mar 2011 08:22:06 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6C1DACAB18; Sun, 20 Mar 2011 08:22:03 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 70BD2CAB18 for ; Sun, 20 Mar 2011 08:22:02 +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 vu+GRn7Vi6gO for ; Sun, 20 Mar 2011 08:22:00 +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 73539CAB15 for ; Sun, 20 Mar 2011 08:22:00 +0100 (CET) Original-Received: from mail-bw0-f41.google.com (mail-bw0-f41.google.com [209.85.214.41]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p2K7M6wi024010 for ; Sun, 20 Mar 2011 08:22:06 +0100 Original-Received: by bwz17 with SMTP id 17so5901435bwz.14 for ; Sun, 20 Mar 2011 00:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to :x-mailer; bh=ZLNXhy/8eMRjlLdt2i25VlTAr1a8Z1QowfNyR9ZcjQw=; b=YkD3nyXIO4qhPoQ+xv9XK+f0jLlAj+EvkE8/Knj8of7u7+OU/cdyUUxSp1gRlLxIog MpbDg1qrE5Vd9gH6HaVjcvy8v9BXvBaARG21aECh423ZOgxxWOi8xayNu2n2EyE8l+vp Bd899fr/05rdlSV3zTTFVq8Zv/hdNZDSNzFHk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=TR7WW1ndog+2lg4Z+O4HWA7mHcF3m+cmsbD7DoGYAZ/53iuah538U82kN7T5KEhi31 newPx5hs78ypxED5YIYJ0YI/azvIvSMfYXCdDRo+y0UpYqCvRbNN53HYyTWwEt0SN0H0 AH5rGyDslIDNP+AgcE6S/cofXNfo39RieyR/Q= Original-Received: by 10.204.15.130 with SMTP id k2mr2539059bka.95.1300605725842; Sun, 20 Mar 2011 00:22:05 -0700 (PDT) Original-Received: from [192.168.2.23] (p5B297E3A.dip.t-dialin.net [91.41.126.58]) by mx.google.com with ESMTPS id t1sm3360813bkx.7.2011.03.20.00.22.03 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 Mar 2011 00:22:04 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; 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: 03Eljm6Ow - a12d075f4f2c - 20110320 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:67205 Archived-At: Am 19.03.2011 um 23:13 schrieb Aditya Mahajan: > On Sat, 19 Mar 2011, Proch=E1zka Luk=E1=9A wrote: > = >> Hello, >> = >> I'm trying to create an overlay - text with a line drawn bellow. >> = >> [...] >> = >> How to do it? > = > You do not need yshifted. But you need to set the bounding box of the res= ulting image correctly. > = > \startuniqueMPgraphic{Label} > path p; p :=3D (0,0) -- (OverlayWidth,0); > draw p withpen pencircle scaled 1mm withcolor .667red; > setbounds currentpicture to boundingbox OverlayBox ; > \stopuniqueMPgraphic You can also use the \framed-parameters: \startuniqueMPgraphic{Label} path p; p :=3D (0,0) -- (OverlayWidth,0); draw p withpen pencircle scaled \frameddimension{rulethickness} withcolor \= MPcolor{\framedparameter{framecolor}}; setbounds currentpicture to boundingbox OverlayBox ; \stopuniqueMPgraphic \defineoverlay[Label][\useMPgraphic{Label}] \defineframed[Text][background=3DLabel,frame=3Doff,location=3Dlow,framecolo= r=3Ddarkred,rulethickness=3D1mm] \starttext AAA \Text{BBB} CCC \Text[framecolor=3Dblue]{DDD} EEE \stoptext Wolfgang ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________