From: Hans Hagen <pragma@wxs.nl>
Cc: NTG ConTeXt <ntg-context@ntg.nl>
Subject: Re: metafont en context MPmacros
Date: Tue, 06 Aug 2002 13:20:27 +0200 [thread overview]
Message-ID: <5.1.0.14.1.20020806131716.02b38ec0@server-1> (raw)
In-Reply-To: <655ACC2B-A89F-11D6-AB5A-003065568054@science.uva.nl>
At 08:16 PM 8/5/2002 +0200, dr. Hans van der Meer wrote:
>Het lijkt erop dat invoegen van een bestand met "input" door ConTeXt niet
>goed mogelijk is als daarin voor/met ConTeXt gedefinieerde \MP-zaken
>voorkomen.
One can think of something like this:
\unprotect
\def\appended#1#2#3{\@EA#1\@EA#2\@EA{#2#3}}
\definesystemvariable{lf}
\def\loadfile
{\dodoubleargument\doloadfile}
\def\doloadfile[#1][#2]
{\bgroup
\def\!!stringa{#1}%
\global\let\loadedfile\empty
\catcode12=\@@space
\catcode13=\@@space
\def\dodocommando
{\@EA\appended\@EA\gdef\@EA\loadedfile\@EA{\fileline}}%
\def\docommando##1%
{\doprocessfile\scratchread{##1}\dodocommando}%
\processcommalist[#2]\docommando
\egroup
\dodoglobal\letvalue{\??lf#1}\loadedfile}
\def\flushfile#1{\getvalue{\??lf#1}}
\protect
\starttext
% test.mp:
%
% def test =
% fill fullcircle scaled 3cm withcolor \MPcolor{red} ;
% enddef ;
\loadfile[test][test.mp]
\startMPcode
\flushfile{test}
test ;
\stopMPcode
\stoptext
But how on earth to explain al this functionality and the why/how to users -)
Maybe i should make a module m-misc.tex where such things can go into.
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
prev parent reply other threads:[~2002-08-06 11:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-05 18:16 dr. Hans van der Meer
2002-08-06 9:57 ` Hans Hagen
2002-08-06 11:20 ` Hans Hagen [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=5.1.0.14.1.20020806131716.02b38ec0@server-1 \
--to=pragma@wxs.nl \
--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).