From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Linebreak in Metapost/Metafun Label
Date: Fri, 27 Mar 2009 20:33:54 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.2.00.0903272028150.7665@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <loom.20090328T001036-395@post.gmane.org>
On Sat, 28 Mar 2009, CuriousLearn wrote:
> Aditya Mahajan <adityam <at> umich.edu> writes:
>
>
>>>
>>> Any ideas why it may not be working for me?
>>
>> Because I did not test before posting :)
>>
>> Try \framed[align=normal, width=5cm, frame=no]{....}
>>
>> Aditya
>
> Awesome! That works great. Before asking I tried searching a lot in metafun
> manual and on the web but could not find anything. I am not yet clear about the
> logic. When I saw that I could color labels using the \color[red]{red} command
> by putting it between btex...etex, it seemed to me that any context command
> would work if put in there. So I tried \crlf to get a linebreak and that did not
> work. So I thought maybe only very few specific commands work. Now after seeing
> your solution, again I am wondering, what determines which commands work and
> which do not. Anyhow, I am not asking for an explanation, because it will most
> probably beyond me and may be a long one for someone to explain. But I
> appreciate the solution.
Here is a simplified picture. Basically, anything inside btex ... etex (or
textext(...) or \sometxt{...}) is in what is known as TeX's horizontal
mode. Think of this as what you will get if you put the same argument in a
\hbox (see the TeXbook or TeX for the impatient for details). To get
multiple lines you need tex to be in the vertical mode, a \vbox. A vanilla
\framed is like a \hbox. Framed with align=normal is like a \vbox. So, for
most purposes you can you \framed. There are some commands that need to
know the width of the box (like \start stop formula). In those cases you
need to specify width=something to \framed.
Of course, certain objects like floats, footnotes, marginpars, will never
work inside metapost. (I think you can get floats and footnotes to work,
but that will require some hackery)
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2009-03-28 0:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 20:52 CuriousLearn
2009-03-27 21:02 ` Aditya Mahajan
2009-03-27 22:55 ` CuriousLearn
2009-03-27 23:45 ` Aditya Mahajan
2009-03-28 0:17 ` CuriousLearn
2009-03-28 0:33 ` Aditya Mahajan [this message]
2009-03-28 0:49 ` Wolfgang Schuster
2009-03-28 2:09 ` Aditya Mahajan
2009-03-28 1:09 ` CuriousLearn
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.0903272028150.7665@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).