From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Marco <netuse@lavabit.com>
Subject: Re: Ampersand in Metapost
Date: Fri, 14 May 2010 12:39:50 +0200 [thread overview]
Message-ID: <4BED2876.9060807@wxs.nl> (raw)
In-Reply-To: <20100514120621.554d595d@vorbis>
On 14-5-2010 12:06, Marco wrote:
> iii) Why should I better use \sometxt?
sometxt was introduced in mkii to avoid text processing mp, i.e. it is
done at the context end in the current run and mp only gets dimensions;
so, it avoids the nested tex run
in mkii there is some more trickery and much showed up whem for in
instance Mojca wanted gnuplot to spit out mp
> What do you mean by »more reliable«? After having read your MyWay I would say
> that textext is more reliable because it can do dynamic text.
in mkiv textext is implemented differently; because we use mplib,
processing time is less an issue anyway
> I created a testfile to compare textext and \sometxt. The points to compare
> were those you mentionend in your MyWay as advantages of \sometxt. The
> testfile »t.tex« is attached. I processed it with
in mkiv there should be no big difference as it all boils down to the
same (sometxt has a command applied which textext doesn't)
> ConTeXt ver: 2010.05.08
> luatex, version beta-0.60.1-2010042821
>
> Here are my results:
>
> -There is one obvious reason: speed
>
> $ for i in `seq 5`; do context -mode=textext t | tail -1; done
> MTXrun | total runtime: 128.008
> MTXrun | total runtime: 37.893
> MTXrun | total runtime: 37.900
> MTXrun | total runtime: 38.391
> MTXrun | total runtime: 38.029
> $ rm t.{log,pdf,tuc}
> $ for i in `seq 5`; do context -mode=sometxt t | tail -1; done
> MTXrun | total runtime: 127.195
> MTXrun | total runtime: 40.131
> MTXrun | total runtime: 41.071
> MTXrun | total runtime: 37.424
> MTXrun | total runtime: 39.121
>
> Average runtime:
> textext variant: 56s
> \sometxt variant: 57s
>
> That is the same. Maybe my test file is not appropriate to test the speed. I'm
> sure you have performed more advanced tests.
you use mkiv
> -Document-wide definitions are seen
> [...] definitions with arguments will fail to work.
>
> The first line, a document-wide definition with arguments works in both
> versions.
>
> -Problems with expansion
> [...] as far as I remember math expressions (fractions perhaps) never
> worked as they were supposed to
>
> The second definition is a math expressions with fractions. It seems to work.
th emkii variant has some more limitations than the mkiv version
> -Less characters to escape
>
> Yes, that's the topic of this thread. I don't know, I didn't check. The only
> check I performed was the ampersand and it needs the same workaround using
> \letterbackslash as textext.
>
> I know, your MyWay is old. Maybe some things are fixed now. But I don't see
> many advantages for me using it.
don't expect mkii and mkiv to be 100% compatible in this area (mkii is
somewhat stretching things to the limit)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2010-05-14 10:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 19:18 Marco
2010-05-13 20:58 ` Hans Hagen
2010-05-13 21:40 ` Mojca Miklavec
2010-05-13 21:45 ` Marco
2010-05-13 22:37 ` Mojca Miklavec
2010-05-14 1:07 ` Aditya Mahajan
2010-05-14 10:09 ` Marco
2010-05-14 13:32 ` Hans Hagen
2010-05-14 10:06 ` Marco
2010-05-14 10:39 ` Hans Hagen [this message]
2010-05-14 10:44 ` Hans Hagen
2010-05-14 11:45 ` Marco
2010-05-14 12:17 ` Hans Hagen
2010-05-14 15:20 ` Mojca Miklavec
2010-05-14 19:34 ` Marco
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=4BED2876.9060807@wxs.nl \
--to=pragma@wxs.nl \
--cc=netuse@lavabit.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).