ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Nigel King <king@dircon.co.uk>
Subject: Re: metafun and \input graph
Date: Fri, 29 Nov 2002 12:53:36 +0000	[thread overview]
Message-ID: <BA0D13D0.B644%king@dircon.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0211291224360.2355-100000@hahepc1.hahe>

The beginning of my files typically have something like this before the
first beginfig();

input metafun ;
input boxes;

verbatimtex
\setupcolors[state=start]
\setupencoding[default=texnansi]
\setupbodyfont[pos,11pt,ss]
\def\f#1{\framed[frame=off,align=middle]{#1}}
\starttext
\bf\ss
etex

input graph
        init_numbers
                (textext(btex $-$ etex),
                textext(btex $1$ etex),
                textext(btex ${\times}10$ etex),
                textext(btex ${}^-$ etex),
                textext(btex ${}^2$ etex));
        Fe_base := textext(btex $10$ etex) ;

> When I try to run some plain MetaPost foo.mp file, which includes an
> \input graph command, through mptopdf, e. g. by the call `mptopdf
> foo.mp' fails. Check with texexec --mptex foo.mp shows
> 
> ! Redundant equation.
> <to be read again>
>                  ;
> l.148 Ten_to0=1;
>                Ten_to1=10; Ten_to2=100; Ten_to3=1000; Ten_to4=10000;
> 
> These are redundant, since the lines appear first in mp-form.mp and then
> are again loaded from graph.mp.
> 
> Is there a way to use mptopdf for conversion of plain/non-metafun
> MetaPost files, e. g. a switch for mptopdf?

I hope this helps it took me a long time to get the this point!

I (with help from many others) wrote the following code for iTeXMax
compilation. For other systems ${iTMInput} is the basename of the metapost
source file.

setenv TEX texexec
mpost ${iTMInput}
texexec --pdf --fig=c ${iTMInput}.[0-9] ${iTMInput}.[0-9][0-9]
${iTMInput}.[0-9][0-9][0-9]
mv texexec.pdf ${iTMInput}.pdf

This produces the files to be referenced in a ConTeXt document and a pdf
with all the pictures to review them.

Nigel

  reply	other threads:[~2002-11-29 12:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-21  0:00 Automating a letter module style Nigel King
2002-11-21 14:40 ` John Culleton
2002-11-21 15:23 ` Bruce D'Arcus
2002-11-22 22:31   ` Hans Hagen
2002-11-22 23:40     ` Bruce D'Arcus
2002-11-25 16:58       ` Hans Hagen
2002-11-25 17:10         ` Bruce D'Arcus
2002-11-25 17:23           ` Hans Hagen
2002-11-29 11:36         ` metafun and \input graph Hartmut Henkel
2002-11-29 12:53           ` Nigel King [this message]
2002-11-29 12:58           ` Hans Hagen
2002-11-29 16:55             ` Hartmut Henkel
2002-11-29 17:12               ` Hans Hagen
2002-11-22 23:14 ` Automating a letter module style 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=BA0D13D0.B644%king@dircon.co.uk \
    --to=king@dircon.co.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).