ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Multi-line labels in MetaPost
Date: Thu, 13 Aug 2009 09:15:04 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.0908130913380.7289@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <OF0112016C.D6AFD732-ON80257611.002E8AE0-80257611.002F1F88@converteam.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1000 bytes --]

On Thu, 13 Aug 2009, richard.stephens@converteam.com wrote:

> 
> 
> > > Hello,
> > >
> > > Is it possible to generate multi-line labels in MetaPost?  I have  
> > > naively tried the following hoping to get a line feed between the  
> > > two words, but it doesn't work!
> > >
> > > label.rt( btex One \crlf Two etex, (0,0));
> >
> > \defineframed[mplabel][frame=off,align=right,width=fit]
> >
> > label.rt(textext("\mplabel{One\\Two}"),origin) ;
> >
> > Wolfgang
> 
> Thank-you for a very elegant solution, Wolfgang, unfortunately I get an error:
> 
> ! Argument of \dododefinecolor has an extra }.
> 
> I have fixed this by using:
> 
> label.rt(textext("\framed[frame=off,align=right]{One\\Two}"),origin);
> 
> 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

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2009-08-13 13:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1061.1250104783.3069.ntg-context@ntg.nl>
2009-08-13  8:34 ` richard.stephens
2009-08-13 13:15   ` Aditya Mahajan [this message]
2009-08-22 19:07     ` Michail Vidiassov
2009-08-22 19:30       ` Aditya Mahajan
2009-08-22 20:09         ` Hans Hagen
     [not found] <mailman.1077.1250181719.3069.ntg-context@ntg.nl>
2009-08-14  8:54 ` richard.stephens
2009-08-14  9:37   ` Thomas A. Schmitz
2009-08-12 16:09 richard.stephens
2009-08-12 16:15 ` Wolfgang Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.00.0908130913380.7289@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).