From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/52279 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Multi-line labels in MetaPost Date: Thu, 13 Aug 2009 09:15:04 -0400 (EDT) Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-944198947-1250169305=:7289" X-Trace: ger.gmane.org 1250169349 26382 80.91.229.12 (13 Aug 2009 13:15:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Aug 2009 13:15:49 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Aug 13 15:15:43 2009 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.50) id 1Mba9X-0005bi-TM for gctc-ntg-context-518@m.gmane.org; Thu, 13 Aug 2009 15:15:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 837C2C9A92; Thu, 13 Aug 2009 15:15:35 +0200 (CEST) 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 PCt8-moqIxjb; Thu, 13 Aug 2009 15:15:33 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2AA80C9A86; Thu, 13 Aug 2009 15:15:33 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 521C6C9A86 for ; Thu, 13 Aug 2009 15:15:31 +0200 (CEST) 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 oJZ6zdFm27Xc for ; Thu, 13 Aug 2009 15:15:20 +0200 (CEST) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by balder.ntg.nl (Postfix) with ESMTP id 9FF6DC9A81 for ; Thu, 13 Aug 2009 15:15:19 +0200 (CEST) Original-Received: FROM wireless-165-124-139-37.nuwlan.northwestern.edu (wireless-165-124-139-37.nuwlan.northwestern.edu [165.124.139.37]) By hellskitchen.mr.itd.umich.edu ID 4A8411E6.75899.2453 ; Authuser adityam; 13 Aug 2009 09:15:18 EDT In-Reply-To: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) 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:52279 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-944198947-1250169305=:7289 Content-Type: TEXT/PLAIN; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 13 Aug 2009, richard.stephens@converteam.com wrote: >=20 >=20 > > > Hello, > > > > > > Is it possible to generate multi-line labels in MetaPost? =A0I have = =A0 > > > naively tried the following hoping to get a line feed between the =A0 > > > two words, but it doesn't work! > > > > > > label.rt( btex One \crlf Two etex, (0,0)); > > > > \defineframed[mplabel][frame=3Doff,align=3Dright,width=3Dfit] > > > > label.rt(textext("\mplabel{One\\Two}"),origin) ; > > > > Wolfgang >=20 > Thank-you for a very elegant solution, Wolfgang, unfortunately I get an e= rror: >=20 > ! Argument of \dododefinecolor has an extra }. >=20 > I have fixed this by using: >=20 > label.rt(textext("\framed[frame=3Doff,align=3Dright]{One\\Two}"),origin); >=20 > which works okay. It's not as elegant but as the code is generated > automatically it does not require any more typing on my part! Section 4.2 of Mojca's MyWay on sometxt http://dl.contextgarden.net/myway/sometxt.pdf provides another solution. Aditya --8323328-944198947-1250169305=:7289 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --8323328-944198947-1250169305=:7289--