ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MetaFun on Mac OS X
@ 2001-10-22 20:02 Nigel King
  2001-10-23  8:42 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Nigel King @ 2001-10-22 20:02 UTC (permalink / raw)


All,
I have recently tried starting to use ConTeXt on Mac OS X. I have had
reasonable success. The problem that I have is in incorporating MetaPost
pictures. I have used the installer by Gerben Wierda, Gerben_Wierda@rna.nl
the release notes show;

Versions in this installer:
    pdfTeX (Web2C 7.3.3.1) 3.14159-0.14h-released-20010417
        (with some patches)
    TeX (Web2C 7.3.1) 3.14159
        (with some patches)
    GS 6.01
    TeXUtil 7.3 - ConTeXt / PRAGMA ADE 1992-2000
and quite a few additions, patches and updates.

Running texexec with the following command does not give me test-mpgraph.1
how ever many times I run the same command, or simply "texexec test"
prompt% texexec --automprun test
....
mpost -progname=mpost -mem=metafun test-mpgraph
figures        : figure test-mpgraph can not be found
....

prompt% mpost test-mpgraph gives me test-mpgraph.1 and then runing "texexec
test" again gives me the output file I want.

The problem appears to be with -mem=metafun so I ran "texexec --make --alone
metafun" which gave me metafun.mem and I put it in
/usr/local/teTeX/share/texmf/web2c/metafun.mem   and
/usr/local/teTeX/share/texmf.local/web2c/metafun.mem
which was in a message from Hans Hagen.

I just tried the local command
mpost -progname=mpost -mem=metafun test-mpgraph
and it worked 
Now, why doesn't it work in texec? Any ideas

-- 
Nigel King, CTO PipingHot Networks


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MetaFun on Mac OS X
  2001-10-22 20:02 MetaFun on Mac OS X Nigel King
@ 2001-10-23  8:42 ` Hans Hagen
  2001-11-04  9:33   ` Nigel King
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2001-10-23  8:42 UTC (permalink / raw)
  Cc: ntg-context

At 09:02 PM 10/22/2001 +0100, Nigel King wrote:
>All,
>I have recently tried starting to use ConTeXt on Mac OS X. I have had
>reasonable success. The problem that I have is in incorporating MetaPost
>pictures. I have used the installer by Gerben Wierda, Gerben_Wierda@rna.nl
>the release notes show;
>
>Versions in this installer:
>     pdfTeX (Web2C 7.3.3.1) 3.14159-0.14h-released-20010417
>         (with some patches)
>     TeX (Web2C 7.3.1) 3.14159
>         (with some patches)
>     GS 6.01
>     TeXUtil 7.3 - ConTeXt / PRAGMA ADE 1992-2000
>and quite a few additions, patches and updates.
>
>Running texexec with the following command does not give me test-mpgraph.1
>how ever many times I run the same command, or simply "texexec test"
>prompt% texexec --automprun test
>....
>mpost -progname=mpost -mem=metafun test-mpgraph
>figures        : figure test-mpgraph can not be found
>....
>
>prompt% mpost test-mpgraph gives me test-mpgraph.1 and then runing "texexec
>test" again gives me the output file I want.
>
>The problem appears to be with -mem=metafun so I ran "texexec --make --alone
>metafun" which gave me metafun.mem and I put it in
>/usr/local/teTeX/share/texmf/web2c/metafun.mem   and
>/usr/local/teTeX/share/texmf.local/web2c/metafun.mem
>which was in a message from Hans Hagen.
>
>I just tried the local command
>mpost -progname=mpost -mem=metafun test-mpgraph
>and it worked
>Now, why doesn't it work in texec? Any ideas

the automp option is rather new, can you find the string "automp" in your 
texexec.pl?

if you run mp 'runtime', you also have to enable write18 in texmf.cnf; see 
cont-sys.rme for other details.

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
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MetaFun on Mac OS X
  2001-10-23  8:42 ` Hans Hagen
@ 2001-11-04  9:33   ` Nigel King
  2001-11-04 11:26     ` Patrick Gundlach
  0 siblings, 1 reply; 4+ messages in thread
From: Nigel King @ 2001-11-04  9:33 UTC (permalink / raw)


> if you run mp 'runtime', you also have to enable write18 in texmf.cnf; see
> cont-sys.rme for other details.

Thanks for previous help, I am afraid I have still not got mp runtime
working (after much trial and error). I think I have found most of the
documentation on the subject (and mailinglist output) but still do not get
runtime graphics inclusion and update.

>From cont-sys.rme:-
% Enabling run time \METAPOST\ (also enable \write18 in texmf.cnf):

>From metafun-s.pdf:-
"When you are using the web2c distribution, CONTEXT can call METAPOST at
runtime and thereby use the right graphics instantaneously. In order to use
this feature, you have to enable \write18 in the file texmf.cnf. Also, in
the file cont-sys.tex, that holds local preferences, or in the document
source, you should say:

\runMPgraphicstrue

This enables runtime generation of graphics using the low level TEX command
\write18. First make sure that your local brand of TEX supports this
feature. A simple test is making a TEX file with the following line:

\immediate\write18{echo It works}

If this fails, you should consult the manual that comes with your system,
locate an expert or ask around on the CONTEXT mailing list."

My problems here are:-

1. I do not know how to "enable \write18". Exactly how is this written into
the file texmf.cnf, and

2. I do not know whether the test "\immediate\write18{echo It works}"
passes, there is no error message and "echo It works" appears on the
terminal demonstrating that \write18 has gone passed without obvious error.
However TeX does not exit so I type \end. The logfile is included
immediately below:-
------
This is TeX, Version 3.14159 (Web2C 7.3.1) (format=tex 2001.10.24)  4 NOV
2001 08:00
**testwrite18
(testwrite18.tex
echo It Works
system()...disabled.

)
*\end
No pages of output.
-------
Thanks in advance for your help
-- 
Nigel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MetaFun on Mac OS X
  2001-11-04  9:33   ` Nigel King
@ 2001-11-04 11:26     ` Patrick Gundlach
  0 siblings, 0 replies; 4+ messages in thread
From: Patrick Gundlach @ 2001-11-04 11:26 UTC (permalink / raw)


Hi,

sorry I cannot help you with macos x now. Maybe in a month when I got new 
ibook (not sure yet if I really should buy it...)

> 1. I do not know how to "enable \write18". Exactly how is this written
> into the file texmf.cnf, and

on my linux box, I have in texmf.cnf:

% Enable system commands via \write18{...}?
shell_escape = t

but with web2c tex (I think it should work with yor tex)  you can also say 

tex --shell-escape myfile.tex

> 2. I do not know whether the test "\immediate\write18{echo It works}"
> passes, there is no error message and "echo It works" appears on the
> terminal demonstrating that \write18 has gone passed without obvious
> error. However TeX does not exit so I type \end. The logfile is included
> immediately below:-

ok, here is my testfile:
----------------write18test.tex--------------
\immediate\write18{cat write18test.tex}

\bye
------------------end of file--------------
the answer with write18 enabled is
---------
This is TeX, Version 3.14159 (Web2C 7.3.1)
(write18test.tex\immediate\write18{cat write18test.tex}

\bye

 )
No pages of output.
Transcript written on write18test.log.
-----------
and without write18 feature enabled:
-----------
This is TeX, Version 3.14159 (Web2C 7.3.1)
(write18test.tex
cat write18test.tex
 )
No pages of output.
Transcript written on write18test.log.
------------

`cat' in the first line of the tex source is a unix specific command that 
outputs its argument, which in this case is my tex-source itself. So in the 
first output (write18 enabled) you see that the source file is output again 
and in the second case (no write18 enabled) there is only the line with 
`cat write18test.tex'. You can also say
\immediate\write18{ls]
to output the listing of the current working directory (only works on 
unix-like systems, so it should be fine on your macos x)

HTH
Patrick, who is getting close to a texshow integrated in emacs... :-)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-11-04 11:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-22 20:02 MetaFun on Mac OS X Nigel King
2001-10-23  8:42 ` Hans Hagen
2001-11-04  9:33   ` Nigel King
2001-11-04 11:26     ` Patrick Gundlach

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).