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: Metafun textext()
Date: Thu, 10 Jan 2013 08:18:13 -0500 (EST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1301100811480.5047@nqv-guvaxcnq> (raw)
In-Reply-To: <20130110140114.52c0a9be@sole>

On Thu, 10 Jan 2013, Alan BRASLAU wrote:

> On Thu, 10 Jan 2013 06:51:50 -0500
> Aditya Mahajan <adityam@umich.edu> wrote:
>
>> Since the beginning of MkIV, colors in metapost labels need to be set at
>> the ConTeXt end (Untested):
>>
>> T := thelabel(textext("\color[blue]{I'm seeing double}"), origin);
>>
>> Aditya
>
> I don't believe that this is true, but I am most likely wrong.

Well, I think it was true in the beginning (as I remember a discussion 
from Mojca on how to handle labels differently in the gnuplot module), 
but clearly that is not the case now.

> Indeed "\blue text" has worked, but 'draw T withcolor blue;' *should* work as well.
> The processing of textext() has changed recently, it seems.
>
> \startMPcode
> label(textext("I'm seeing double"),origin)     withcolor green ;
> label(textext("I'm seeing double"),(-1mm,1mm)) withcolor blue ;
> \stopMPcode
>
> DOES work.
>
> Of course, these are much simplified minimal examples of what I would like to do.

Minimal example to show what is happening:

\startbuffer[initialize]
   picture T;
   T := textext("Hello");

   picture Q;
   Q := T;
\stopbuffer

\startbuffer[T]
   draw T withcolor blue;
\stopbuffer

\startbuffer[Q]
   draw Q shifted (-1mm, 1mm) withcolor red;
\stopbuffer

\startlines
Only draw T: \processMPbuffer[initialize,T]
Only draw Q: \processMPbuffer[initialize,Q]
Draw T & Q : \processMPbuffer[initialize,T,Q]
Draw Q & T : \processMPbuffer[initialize,Q,T]
\stoplines

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
___________________________________________________________________________________


  parent reply	other threads:[~2013-01-10 13:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10 11:48 Alan BRASLAU
2013-01-10 11:51 ` Aditya Mahajan
2013-01-10 13:01   ` Alan BRASLAU
2013-01-10 13:17     ` Mojca Miklavec
2013-01-10 13:18     ` Aditya Mahajan [this message]
2013-01-11  0:01       ` Hans Hagen
2013-01-10 13:29     ` Alan BRASLAU

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.DEB.2.02.1301100811480.5047@nqv-guvaxcnq \
    --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).