ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* "Unable to make mpx file"
@ 2002-05-29  4:54 Johannes Hüsing
  2002-05-29  7:57 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Hüsing @ 2002-05-29  4:54 UTC (permalink / raw)


Greetings,

when including TeX expressions within Metapost within a ConTeXt source, 
I get the error cited in the subject line.

An examination of the mpxerr.log file reveals that the verbatimtex 
inclusions \global\loadfontfileoncetrue are not to TeX's liking.

Grepping context/base for \loadfontfileoncetrue yields no result. 
Where is Metapost's TeX engine supposed to get the definition from?

Sorry I have asked this question before (on Apr 14th), but not yet received 
an answer.

Greetings 

Johannes
-- 
Johannes Hüsing   There is something fascinating about science. One gets
hannes@ruhrau.de  such wholesale returns of conjecture from such a 
                  trifling investment of fact.                Mark Twain


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

* Re: "Unable to make mpx file"
  2002-05-29  4:54 "Unable to make mpx file" Johannes Hüsing
@ 2002-05-29  7:57 ` Hans Hagen
  2002-05-29 21:43   ` Johannes Hüsing
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2002-05-29  7:57 UTC (permalink / raw)
  Cc: ntg-context

At 06:54 AM 5/29/2002 +0200, Johannes Hüsing wrote:
>Greetings,
>
>when including TeX expressions within Metapost within a ConTeXt source,
>I get the error cited in the subject line.
>
>An examination of the mpxerr.log file reveals that the verbatimtex
>inclusions \global\loadfontfileoncetrue are not to TeX's liking.
>
>Grepping context/base for \loadfontfileoncetrue yields no result.
>Where is Metapost's TeX engine supposed to get the definition from?
>
>Sorry I have asked this question before (on Apr 14th), but not yet received
>an answer.

 >grep \\ifloadfontfileonce *.tex
font-ini.tex:\newif\ifloadfontfileonce
font-ini.tex:     {\ifloadfontfileonce

so, adding \newif\ifloadfontfileonce to your cont-new.tex will solve th 
eproblem

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


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

* Re: "Unable to make mpx file"
  2002-05-29  7:57 ` Hans Hagen
@ 2002-05-29 21:43   ` Johannes Hüsing
  0 siblings, 0 replies; 7+ messages in thread
From: Johannes Hüsing @ 2002-05-29 21:43 UTC (permalink / raw)


On Wed, May 29, 2002 at 09:57:39AM +0200, Hans Hagen wrote:
> At 06:54 AM 5/29/2002 +0200, Johannes Hüsing wrote:
[...]
> >inclusions \global\loadfontfileoncetrue are not to TeX's liking.
> >
[...]
> >grep \\ifloadfontfileonce *.tex
> font-ini.tex:\newif\ifloadfontfileonce
> font-ini.tex:     {\ifloadfontfileonce
> 
> so, adding \newif\ifloadfontfileonce to your cont-new.tex will solve th 
> eproblem

Indeed, this solves the problem.

I have another problem with an "Emergency stop" message from MetaPost 
which doesn't show up when I include the MP code in beginfig/endfig and 
process it through Metapost: Could anyone give me a clue?

\setupoutput[pdftex]
\runMPgraphicstrue

\startMPinclusions
input boxes
\stopMPinclusions

\starttext
\startuseMPgraphic{hinkepott}

  boxit.eins(btex 1 etex);
  boxit.zwei(btex 2 etex);
  boxit.drei(btex 3 etex);
  boxit.vier(btex 4 etex);
  boxit.fuenf(btex 5 etex);
  boxit.sechs(btex 6 etex);
  boxit.sieben(btex 7 etex);
  boxit.acht(btex 8 etex);
  boxit.neun(btex 9 etex);

  boxjoin(eins.n=zwei.s;
    zwei.n=drei.s;
    drei.n=vier.s;
    drei.nw=fuenf.so;
    drei.no=sechs.sw;
    vier.n=sieben.s;
    sieben.n=acht.so=neun.sw;);

  drawboxed(eins, zwei, drei, vier, fuenf, sechs, sieben, acht, neun);

\stopuseMPgraphic

\useMPgraphic{hinkepott}
\stoptext

-- 
Johannes Hüsing   There is something fascinating about science. One gets
hannes@ruhrau.de  such wholesale returns of conjecture from such a 
                  trifling investment of fact.                Mark Twain


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

* Re: "Unable to make mpx file"
  2002-07-08 19:54   ` Johannes Hüsing
@ 2002-07-09  8:50     ` Hans Hagen
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2002-07-09  8:50 UTC (permalink / raw)
  Cc: ntg-context

At 09:54 PM 7/8/2002 +0200, Johannes Hüsing wrote:

>This is TeX, Version 3.14159 (Web2C 7.3.3.1) (format=tex 2002.2.24)  8 JUL 
>2002 21:41
>**mpx1150.tex
>(./mpx1150.tex
>! Undefined control sequence.
>l.1 \global \loadfontfileoncetrue
>                                  %
>The control sequence at the end of the top line
>of your error message was never \def'ed. If you have
>misspelled it (e.g., `\hobx'), type `I' and the correct
>spelling (e.g., `I\hbox'). Otherwise just continue,
>and I'll forget about whatever was undefined.

 >grep loadfontfile *.tex
FONT-INI.TEX:\newif\ifloadfontfileonce
FONT-INI.TEX:     {\ifloadfontfileonce
FONT-INI.TEX:%D When \type {\loadfontfileoncetrue}, such files are
meta-ini.tex:     \global\loadfontfileoncetrue
meta-ini.tex:  \global\loadfontfileoncetrue

>%  Hack, um " nicht als active character zu definieren,
>%  während Metapost bearbeitet wird
>\appendtoks \let\handlecompoundcharacter\string \to \everyMPgraphic

i think that this is now ok in the latest release (i had to take care of 
the active colon anyway)

>This produces the "Unable to ..." messages, only twice now. Now I run
>MetaPost on the myfile-mpgraph.mp file. It contains only the second
>example, but it compiles ok, and the resulting file myfile-mpgraph.2
>looks like proper Postscript to me.
>The problems appeared after reinstalling TeXLive 6 underneath a newer ConTeXt.

hm, this should be no problem, unless some of those mpost mem problems is 
plyaing up, do you use the latest texutil?

otherwise, can you send me the minimal failing file?

(maybe this mpx env var is spoiling things)

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


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

* Re: "Unable to make mpx file"
  2002-07-08  7:46 ` Hans Hagen
@ 2002-07-08 19:54   ` Johannes Hüsing
  2002-07-09  8:50     ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Hüsing @ 2002-07-08 19:54 UTC (permalink / raw)


On Mon, Jul 08, 2002 at 09:46:58AM +0200, Hans Hagen wrote:
> At 12:04 PM 7/7/2002 +0200, you wrote:

Hi Hans and list,

[...]
> so you have enabled write 18 in texmf.cnf
> 

yes.

[...]
> >\startMPinclusions
> >verbatimtex
> >\newif\ifloadfontfileonce
> >etex
> >\stopMPinclusions
> 
> hm, is that one still needed?
> 

Let me put it this way: When MetaPost is run from within texexec, no 
mpxerr.log is generated. When I run MetaPost myself on the test-mpgraph.mp
without the above inclusion, mpxerr.log is generated and reads:

This is TeX, Version 3.14159 (Web2C 7.3.3.1) (format=tex 2002.2.24)  8 JUL 2002 21:41
**mpx1150.tex
(./mpx1150.tex
! Undefined control sequence.
l.1 \global \loadfontfileoncetrue
                                 %
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! You can't use a prefix with `\shipout'.
<to be read again> 
                   \shipout 
l.2 \shipout
            \hbox{\smash{\hbox{\hbox{% line 88 test-mpgraph.mp
I'll pretend you didn't say \long or \outer or \global.

[1] )
Output written on mpx1150.dvi (1 page, 208 bytes).

> texexec --automp yourfile
> 
> this does a 'run in between job' instead of realtime.
> 

What I am doing now is using texexec --automp myfile after editing
myfile.tex by including a second example:

\setupoutput[pdftex]
\mainlanguage[de]
\useencoding[win]

\runMPgraphicstrue
%\protectbufferstrue

%  Hack, um " nicht als active character zu definieren,
%  während Metapost bearbeitet wird
\appendtoks \let\handlecompoundcharacter\string \to \everyMPgraphic

\setupbodyfont
  [sansserif, 18pt]

\startMPinclusions
verbatimtex
\newif\ifloadfontfileonce
etex
\stopMPinclusions

\starttext

\startuseMPgraphic{beispiel}
label(btex Hallo Welt etex, origin);
\stopuseMPgraphic

\useMPgraphic{beispiel}

\startuseMPgraphic{voorbeeld}
label(btex Hallo wereld etex, origin);
\stopuseMPgraphic

\useMPgraphic{voorbeeld}

\stoptext

This produces the "Unable to ..." messages, only twice now. Now I run
MetaPost on the myfile-mpgraph.mp file. It contains only the second 
example, but it compiles ok, and the resulting file myfile-mpgraph.2 
looks like proper Postscript to me.

Now I repeat texexec --automp on the tex file, which compiles without an 
error. This is the transcript:

This is pdfeTeX, Version 3.14159-pre-1.0-unofficial-20010704-2.1 (Web2C 7.3.3.1) (format=cont-en 2002.4.7)  8 JUL 2002 21:47
entering extended mode
**&cont-en test.tex
(./test.tex{/usr/local/TeX/texmf-var/pdftex/config/pdftex.cfg}

ConTeXt  ver: 2002.3.27  fmt: 2002.4.7  int: english  mes: english

language       : language en is active
system         : cont-new loaded
(/usr/local/TeX/texmf-local/tex/context/base/cont-new.tex
systems        : beware: some patches loaded from cont-new.tex!
system (E-TEX) : [line 458] \dimexpr 
)
system         : cont-old loaded
(/usr/local/TeX/texmf-local/tex/context/base/cont-old.tex
loading        : Context Old Macros
)
system         : cont-fil loaded
(/usr/local/TeX/texmf-local/tex/context/base/cont-fil.tex
loading        : Context File Synonyms
)
system         : cont-sys loaded
(/usr/local/TeX/texmf-local/tex/context/base/cont-sys.tex
symbols        : loading symbolset nav
(/usr/local/TeX/texmf-local/tex/context/base/symb-nav.tex
pdftex         : needs map file: original-context-symbol.map
)
symbols        : loading symbolset mvs
(/usr/local/TeX/texmf-local/tex/context/base/symb-mvs.tex
pdftex         : needs map file: original-vogel-symbol.map
))
bodyfont       : 12pt rm is loaded
language       : patterns 2:2-en-2 4:2-de-2 loaded
specials       : tex,postscript,rokicki loaded
\openout2 = `test.tui'.

system         : test.top loaded
(./test.top)
\openout0 = `test-mpgraph.mp'.

\openout0 = `test-mprun.mp'.

\openout0 = `mpgraph.mp'.

\openout0 = `mprun.mp'.

specials       : loading definition file tpd
(/usr/local/TeX/texmf-local/tex/context/base/spec-tpd.tex
specials       : loading definition file fdf
(/usr/local/TeX/texmf-local/tex/context/base/spec-fdf.tex <unprotect 3>
system (E-TEX) : [line 1615] \ifcsname 
<protect 3>)
specials       : fdf loaded
)
specials       : fdf,tpd loaded
encoding       : coding win is loaded
(/usr/local/TeX/texmf-local/tex/context/base/enco-win.tex)
bodyfont       : bodyfont 12.5pt is defined (can better be done global)
bodyfont       : bodyfont 12.5pt is defined (can better be done global)
bodyfont       : bodyfont 10.8pt is defined (can better be done global)
bodyfont       : bodyfont 10.8pt is defined (can better be done global)
bodyfont       : bodyfont 21.5pt is defined (can better be done global)
bodyfont       : bodyfont 21.5pt is defined (can better be done global)
bodyfont       : bodyfont 18pt is defined (can better be done global)
bodyfont       : bodyfont 18pt is defined (can better be done global)
(./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo)
(./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo)
(./test.tuo)
systems        : begin file test at line 23
\openout5 = `test-mpgraph.mp'.

Randomizer initialized to 1530918609.
system(mpost -progname=mpost -mem=metafun test-mpgraph)...executed.

 [MP to PDF] (./test-mpgraph.1)
\openout5 = `test-mpgraph.mp'.

system(mpost -progname=mpost -mem=metafun test-mpgraph)...executed.

[MP to PDF] (./test-mpgraph.2) [1.1{/usr/local/TeX/texmf/pdftex/config/psfonts.
map}{/usr/local/TeX/texmf-local/pdftex/config/psfonts-local.map}
Warning: pdfetex (file rawfonts.map): cannot open font map file

Warning: pdfetex (file csfontd.mapfile): cannot open font map file
]
systems        : end file test at line 37
 ) 
Here is how much of TeX's memory you used:
 1348 strings out of 36741
 20557 string characters out of 803867
 4377871 words of memory out of 5530425
 28111 multiletter control sequences out of 10000+50000
 16111 words of font info for 51 fonts, out of 500000 for 1000
 14 hyphenation exceptions out of 1000
 49i,16n,67p,168b,243s stack positions out of 5000i,500n,5000p,200000b,40000s
</usr/local/TeX/texmf/fonts/type1/bluesky/cm/cmr10.pfb></usr/local/TeX/texmf/
fonts/type1/bluesky/cm/cmss10.pfb>
Output written on test.pdf (1 page, 7669 bytes).

Sadly, now test-mpgraph.1 and test-mpgraph.2 are identical, a "diff" between 
both renders no output.

The problems appeared after reinstalling TeXLive 6 underneath a newer ConTeXt.

Any help is appreciated.

Greetings

Johannes
-- 
Johannes Hüsing   There is something fascinating about science. One gets
hannes@ruhrau.de  such wholesale returns of conjecture from such a 
                  trifling investment of fact.                Mark Twain


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

* Re: "Unable to make mpx file"
  2002-07-07 10:04 Johannes Hüsing
@ 2002-07-08  7:46 ` Hans Hagen
  2002-07-08 19:54   ` Johannes Hüsing
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2002-07-08  7:46 UTC (permalink / raw)
  Cc: ntg-context

At 12:04 PM 7/7/2002 +0200, you wrote:
>Greetings,
>
>again, I am experiencing problems with MetaPost creating files with text
>included.
>
>The following is the contents of test-mpgraph.log after processing a file
>calles test.tex:
>
>This is MetaPost, Version 0.641 (Web2C 7.3.3.1) (mem=metafun 
>2002.4.10)  10 APR 2002 22:25
>**test-mpgraph
>(test-mpgraph.mp
>{randomseed:=525}
>write0 = `test-mpgraph.mpo'.
>
>
> >> test-mpgraph.mp
> >> test-mpgraph.mpx
>! Unable to make mpx file.
>l.90 label(btex
>                 Hallo wereld etex
>The two files given above are one of your source files
>and an auxiliary file I need to read to find out what your
>btex..etex blocks mean. If you don't know why I had trouble,
>try running it manually through MPto -tex, TeX, and DVItoMP.
>
>This is what the source looks like:
>
>\setupoutput[pdftex]
>\mainlanguage[de]
>\useencoding[win]
>
>\runMPgraphicstrue
>%\protectbufferstrue

so you have enabled write 18 in texmf.cnf

>%  Hack, um " nicht als active character zu definieren,
>%  während Metapost bearbeitet wird
>\appendtoks \let\handlecompoundcharacter\string \to \everyMPgraphic
>
>\setupbodyfont
>   [sansserif, 18pt]
>
>\startMPinclusions
>verbatimtex
>\newif\ifloadfontfileonce
>etex
>\stopMPinclusions

hm, is that one still needed?

>\starttext
>
>\startuseMPgraphic{beispiel}
>label(btex Hallo wereld etex, origin);
>\stopuseMPgraphic
>
>\useMPgraphic{beispiel}
>
>\stoptext
>
>What could be the reason?

This kind of things is hard to trace from a distance. The problem is that 
mp needs those conversion programs (although i'm thinking of replacing mp 
to tex i.e. handle it in texexec since it seems to fail occasionally).

Can you try

texexec --automp yourfile

this does a 'run in between job' instead of realtime.

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


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

* "Unable to make mpx file"
@ 2002-07-07 10:04 Johannes Hüsing
  2002-07-08  7:46 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Hüsing @ 2002-07-07 10:04 UTC (permalink / raw)


Greetings,

again, I am experiencing problems with MetaPost creating files with text
included.

The following is the contents of test-mpgraph.log after processing a file
calles test.tex:

This is MetaPost, Version 0.641 (Web2C 7.3.3.1) (mem=metafun 2002.4.10)  10 APR 2002 22:25
**test-mpgraph
(test-mpgraph.mp
{randomseed:=525}
write0 = `test-mpgraph.mpo'.

>> test-mpgraph.mp
>> test-mpgraph.mpx
! Unable to make mpx file.
l.90 label(btex
                Hallo wereld etex
The two files given above are one of your source files
and an auxiliary file I need to read to find out what your
btex..etex blocks mean. If you don't know why I had trouble,
try running it manually through MPto -tex, TeX, and DVItoMP.

This is what the source looks like:

\setupoutput[pdftex]
\mainlanguage[de]
\useencoding[win]

\runMPgraphicstrue
%\protectbufferstrue

%  Hack, um " nicht als active character zu definieren,
%  während Metapost bearbeitet wird
\appendtoks \let\handlecompoundcharacter\string \to \everyMPgraphic

\setupbodyfont
  [sansserif, 18pt]

\startMPinclusions
verbatimtex
\newif\ifloadfontfileonce
etex
\stopMPinclusions

\starttext

\startuseMPgraphic{beispiel}
label(btex Hallo wereld etex, origin);
\stopuseMPgraphic

\useMPgraphic{beispiel}

\stoptext

What could be the reason? 

Greetings

Johannes
-- 
Johannes Hüsing   There is something fascinating about science. One gets
hannes@ruhrau.de  such wholesale returns of conjecture from such a 
                  trifling investment of fact.                Mark Twain


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

end of thread, other threads:[~2002-07-09  8:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-29  4:54 "Unable to make mpx file" Johannes Hüsing
2002-05-29  7:57 ` Hans Hagen
2002-05-29 21:43   ` Johannes Hüsing
2002-07-07 10:04 Johannes Hüsing
2002-07-08  7:46 ` Hans Hagen
2002-07-08 19:54   ` Johannes Hüsing
2002-07-09  8:50     ` Hans Hagen

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