From: Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
Subject: Re: \sometxt in staticMPfigure
Date: Wed, 27 Sep 2006 00:29:27 -0400 [thread overview]
Message-ID: <E1GSR31-0001z6-NM@approximate.corpus.cam.ac.uk> (raw)
In-Reply-To: Your message of "Tue, 26 Sep 2006 22:11:59 +0200." <4519898F.4070903@wxs.nl>
Hans Hagen wrote:
the problem (if you look into the mp file) is that there is *no*
beginfig; this is because we now use a more stupid (stripped down)
variant of saving the graphic.
Right, I looked into the mp file and saw the new plan.
\startstaticMPfigure{fig}
beginfig(1);
boxit.h(btex h etex);
drawboxed(h);
endfig;
\stopstaticMPfigure
i'll add the b/e to the main macro.
I briefly thought about adding the beginfig..endfig by hand, but I
figured it would fail because texexec would wrap another
beginfig..endfig around it -- since it didn't know that some parts of
the file needed to go outside the beginfig..endfig.
However, a simple experiment trumps a fine theory: I added the
beginfig..endfig and it worked. But the theory wasn't all wrong.
Here's a snippet of texexec-mpgraph.mp
==============================================
beginfig(1);
verbatimtex \global \loadfontfileoncetrue etex;
input boxes
beginfig(1)
boxit.h(btex h etex
);
drawboxed(h);
endfig;
;
endfig;
==============================================
Not sure how metapost managed to deal with the nested beginfig's, but it
did. Here's what the log said:
2 output files written: texexec-mpgraph.1 .. texexec-mpgraph.1
It looks like a fragile method. Instead the beginfig..endfig should be
put in explicitly into the mp file (just as you said) and the inclusions
should go outside the beginfig..endfig.
-Sanjoy
`A society of sheep must in time beget a government of wolves.'
-- Bertrand de Jouvenal
next prev parent reply other threads:[~2006-09-27 4:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-25 3:51 Sanjoy Mahajan
2006-09-25 13:45 ` Hans Hagen
2006-09-25 20:39 ` Sanjoy Mahajan
2006-09-25 22:06 ` Hans Hagen
2006-09-25 23:04 ` Sanjoy Mahajan
2006-09-26 10:04 ` Hans Hagen
2006-09-26 12:11 ` Sanjoy Mahajan
2006-10-04 22:01 ` Aditya Mahajan
2006-10-05 8:00 ` Hans Hagen
2006-10-05 12:56 ` Sanjoy Mahajan
2006-09-26 0:53 ` Sanjoy Mahajan
2006-09-26 9:57 ` Hans Hagen
2006-09-26 12:02 ` Sanjoy Mahajan
2006-09-26 12:30 ` Hans Hagen
2006-09-26 13:33 ` Sanjoy Mahajan
2006-09-26 20:11 ` Hans Hagen
2006-09-27 4:29 ` Sanjoy Mahajan [this message]
2006-09-26 16:17 ` Sanjoy Mahajan
2006-09-26 16:21 ` Hans Hagen
2006-09-27 4:06 ` Sanjoy Mahajan
2006-09-27 8:03 ` Hans Hagen
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=E1GSR31-0001z6-NM@approximate.corpus.cam.ac.uk \
--to=sanjoy@mrao.cam.ac.uk \
--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).