ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
Subject: Re: sometxt vs textext behaving different
Date: Tue, 18 Jul 2006 18:48:01 +0200	[thread overview]
Message-ID: <6faad9f00607180948h5ee65180yd50e23b6a0b0bfd2@mail.gmail.com> (raw)
In-Reply-To: <5DFB0B12-B491-4062-9279-615D6ED0ECD5@science.uva.nl>

On 7/16/06, Hans van der Meer wrote:
>
> Thus while textext delivers a picture sometxt does not. This seems strange,
> because I understood that sometxt was meant as a dropin replacement for
> textext (except for MP loops, as Hans Hagen mentioned in a previous email).
> Is this correct or do I have to make more changes to switch over from
> textext to sometxt?

I don't know if sometxt is meant to be used as a metapost command. I use it as

\setupcolors[state=start]
\def\nicecommand#1{nice \quotation{#1}}

\starttext
\startMPcode
draw \sometxt{abc \color[red]{def} $\sqrt{x}$ and quote: " \nicecommand{text}};
\stopMPcode
\stoptext

textext had to write the text in a separate file, run its own instance
of ConTeXt and include that one into metapost and consequently into
the original document. It meant:
- being slow
- \def's don't work
- you have to specify everything in MPenvironment since those labels
don't see your earlier definitions in the document

But with \sometxt you can't use mp variables. To some extent you can
so something. See
http://archive.contextgarden.net/message/20060623.224940.fa179b0b.en.html.

Citing myself (from discussion about gnuplot):

I love the new Hans's \sometxt feature, because:
- it uses the same font as in the document without the need to specify
the font separately in MP environment
- no need for uncomfortable way of specifying the definitions/style in
gnuplot-locals.tex (simply all the definitions from the document work,
even \section-s)
- no need for 'verbatimtex ... etex' or for '\def-s' inside metapost
or inside MP environment (which didn't work)
- external figures can be used for points (YUPI :) !!!
- no problems with math and double quotes: I wasn't able to insert
double quotes with textext, now it's trivial
- text is still part of the graphic: can easily be positioned,
colored, shrinked & stretched, ... if I would have to separate it
(according to my first idea), I couldn't use metapost to control the
color, size, ... but I would have to remember the color for each label
separately and the outcome would be different (now I can still place
graphic over text)
- extremely fast
- extremely efficient
- extremely elegant to write


Hope that it can clarify you at least some things,
    Mojca

      parent reply	other threads:[~2006-07-18 16:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-16 16:41 Hans van der Meer
2006-07-17  7:26 ` Taco Hoekwater
2006-07-18 16:48 ` Mojca Miklavec [this message]

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=6faad9f00607180948h5ee65180yd50e23b6a0b0bfd2@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --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).