ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem using mptopdf with Metapost containing LaTeX
@ 2007-01-04  7:50 Martin Buchmann
  2007-01-04  9:32 ` Hans Hagen
  2007-01-04  9:44 ` Taco Hoekwater
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Buchmann @ 2007-01-04  7:50 UTC (permalink / raw)


Hi,

I am not really a ConTeXt user but use the mptopdf script to convert my 
mp drawings directly into pdf which was working great in the past. 
Yesterday and the day before i updated my TeX system using Gerben's 
i-Installer to the new gwTeX foundation and to the latest ConTeXt beta 
and since then I get an error if my Metapost file contains LaTeX control 
sequences:

> MPtoPDF 1.3.2 : running 'texexec --mptex '
> TeXExec | processing graphic 'mp-minimal.mp'
> TeXExec | using internal mptotex converter
> TeXExec | processing document 'mp-minimal-temp.tex'
> TeXExec | no ctx file found
> TeXExec | tex processing method: context
> TeXExec | writing option file mp-minimal-temp.top
> TeXExec | using randomseed 1177
> TeXExec | tex engine: pdfetex
> TeXExec | tex format: cont-en
> This is pdfTeX, Version 3.141592-1.40.0-rc4 (Web2C 7.5.5)
>  (/usr/local/gwTeX/texmf.pkgs/web2c/natural.tcx)
> entering extended mode
> (./mp-minimal-temp.tex
> 
> ConTeXt  ver: 2007.01.02 13:44 MK II  fmt: 2007.1.3  int: english/english
> 
> language        : language en is active
> system          : cont-new loaded
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/cont-new.tex
> systems         : beware: some patches loaded from cont-new.tex
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/cont-new.mkii))
> system          : cont-old loaded
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/cont-old.tex
> loading         : Context Old Macros
> )
> system          : cont-fil loaded
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/cont-fil.tex
> loading         : Context File Synonyms
> )
> system          : cont-sys.rme loaded
> (/usr/local/gwTeX/texmf.pkgs/tex/context/user/cont-sys.rme
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-exa.tex)
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-syn.tex)
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-enc.tex)
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-siz.tex)
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-map.tex)
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-spe.tex)
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-akb.tex))
> bodyfont        : 12pt rm is loaded
> language        : patterns en->ec:ec->1->2:3 uk->ec:ec->2->2:3 de->texnansi:tex
> nansi->3->2:3 de->ec:ec->4->2:3 fr->texnansi:texnansi->5->2:3 fr->ec:ec->6->2:3
>  es->ec:ec->7->2:3 pt->texnansi:texnansi->8->2:3 pt->ec:ec->9->2:3 it->texnansi
> :texnansi->10->2:3 it->ec:ec->11->2:3 nl->texnansi:texnansi->12->2:3 nl->ec:ec-
>>13->2:3 cz->il2:il2->14->2:3 cz->ec:ec->15->2:3 sk->il2:il2->16->2:3 sk->ec:ec
> ->17->2:3 pl->pl0:pl0->18->2:3 pl->ec:ec->19->2:3 pl->qx:qx->20->2:3 loaded
> specials        : tex,postscript,rokicki loaded
> system          : mp-minimal-temp.top loaded
> (./mp-minimal-temp.top
> specials        : loading definition file dvi
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/spec-dvi.tex)
> specials        : tex loaded
> specials        : loading definition file ps
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/spec-ps.tex)
> specials        : tex,postscript loaded
> specials        : loading definition file tr
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/spec-tr.tex)
> specials        : tex,postscript,rokicki loaded
> )
> systems         : system commands are disabled
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/sort-def.tex)
> (/usr/local/gwTeX/texmf.pkgs/tex/context/base/sort-lan.tex)
> systems         : begin file mp-minimal-temp at line 42
> ! Undefined control sequence.
> l.44 \documentclass
>                    [12pt,a4paper]{article}
> ?
> ! Emergency stop.
> l.44 \documentclass
>                    [12pt,a4paper]{article}
> No pages of output.
> Transcript written on mp-minimal-temp.log.
> TeXExec | runtime: 0.529086
> This is MetaPost, Version 0.993 (Web2C 7.5.5)
> (/usr/local/gwTeX/texmf.pkgs/web2c/natural.tcx)
> (mp-minimal.mp
>>> mp-minimal.mp
>>> mp-minimal.mpx
> ! Unable to make mpx file.
> l.9   label(btex
>                  Test etex, (1,1) );
> Transcript written on mp-minimal.log.
> TeXExec | runtime: 0.865779
> 
> MPtoPDF 1.3.2 : no filename matches mp-minimal  

Here is my minimal example:

prologues:=2;
verbatimtex
\documentclass[12pt,a4paper]{article}
\begin{document}
etex

beginfig(1);

   label(btex Test etex, (1,1) );

endfig;
end

I tried to understand which script is actual called when i call mptopdf 
but got kind of lost in the sequence of shell script calling ruby 
scripts calling perl scripts, etc. So, I wasn't able to find out the 
right command line options, etc. for making mpost aware of calling latex 
instead of tex. Can someone help me out here?

Best regards
   Martin

-- 
If you didn't get caught, did you really do it?

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

* Re: Problem using mptopdf with Metapost containing LaTeX
  2007-01-04  7:50 Problem using mptopdf with Metapost containing LaTeX Martin Buchmann
@ 2007-01-04  9:32 ` Hans Hagen
  2007-01-04 10:30   ` Taco Hoekwater
                     ` (2 more replies)
  2007-01-04  9:44 ` Taco Hoekwater
  1 sibling, 3 replies; 6+ messages in thread
From: Hans Hagen @ 2007-01-04  9:32 UTC (permalink / raw)


Martin Buchmann wrote:
>
> Here is my minimal example:
>
> prologues:=2;
> verbatimtex
> \documentclass[12pt,a4paper]{article}
> \begin{document}
> etex
>
> beginfig(1);
>
>    label(btex Test etex, (1,1) );
>
> endfig;
> end
>
> I tried to understand which script is actual called when i call mptopdf 
> but got kind of lost in the sequence of shell script calling ruby 
> scripts calling perl scripts, etc. So, I wasn't able to find out the 
> right command line options, etc. for making mpost aware of calling latex 
> instead of tex. Can someone help me out here?
>   
does adding a --latex directive help?

Hans

-- 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: Problem using mptopdf with Metapost containing LaTeX
  2007-01-04  7:50 Problem using mptopdf with Metapost containing LaTeX Martin Buchmann
  2007-01-04  9:32 ` Hans Hagen
@ 2007-01-04  9:44 ` Taco Hoekwater
  1 sibling, 0 replies; 6+ messages in thread
From: Taco Hoekwater @ 2007-01-04  9:44 UTC (permalink / raw)




Martin Buchmann wrote:
> Hi,
> 
> I am not really a ConTeXt user but use the mptopdf script to convert my 
> mp drawings directly into pdf which was working great in the past. 
> Yesterday and the day before i updated my TeX system using Gerben's 
> i-Installer to the new gwTeX foundation and to the latest ConTeXt beta 
> and since then I get an error if my Metapost file contains LaTeX control 
> sequences:

Same here. I am guessing this is a bug in the ruby version of texexec,
because it used to work with the perl version, for sure.

Taco

> 
>>MPtoPDF 1.3.2 : running 'texexec --mptex '
>>TeXExec | processing graphic 'mp-minimal.mp'
>>TeXExec | using internal mptotex converter
>>TeXExec | processing document 'mp-minimal-temp.tex'
>>TeXExec | no ctx file found
>>TeXExec | tex processing method: context
>>TeXExec | writing option file mp-minimal-temp.top
>>TeXExec | using randomseed 1177
>>TeXExec | tex engine: pdfetex
>>TeXExec | tex format: cont-en
>>This is pdfTeX, Version 3.141592-1.40.0-rc4 (Web2C 7.5.5)
>> (/usr/local/gwTeX/texmf.pkgs/web2c/natural.tcx)
>>entering extended mode
>>(./mp-minimal-temp.tex
>>
>>ConTeXt  ver: 2007.01.02 13:44 MK II  fmt: 2007.1.3  int: english/english
>>
>>language        : language en is active
>>system          : cont-new loaded
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/cont-new.tex
>>systems         : beware: some patches loaded from cont-new.tex
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/cont-new.mkii))
>>system          : cont-old loaded
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/cont-old.tex
>>loading         : Context Old Macros
>>)
>>system          : cont-fil loaded
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/cont-fil.tex
>>loading         : Context File Synonyms
>>)
>>system          : cont-sys.rme loaded
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/user/cont-sys.rme
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-exa.tex)
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-syn.tex)
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-enc.tex)
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-siz.tex)
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-map.tex)
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-spe.tex)
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/type-akb.tex))
>>bodyfont        : 12pt rm is loaded
>>language        : patterns en->ec:ec->1->2:3 uk->ec:ec->2->2:3 de->texnansi:tex
>>nansi->3->2:3 de->ec:ec->4->2:3 fr->texnansi:texnansi->5->2:3 fr->ec:ec->6->2:3
>> es->ec:ec->7->2:3 pt->texnansi:texnansi->8->2:3 pt->ec:ec->9->2:3 it->texnansi
>>:texnansi->10->2:3 it->ec:ec->11->2:3 nl->texnansi:texnansi->12->2:3 nl->ec:ec-
>>
>>>13->2:3 cz->il2:il2->14->2:3 cz->ec:ec->15->2:3 sk->il2:il2->16->2:3 sk->ec:ec
>>
>>->17->2:3 pl->pl0:pl0->18->2:3 pl->ec:ec->19->2:3 pl->qx:qx->20->2:3 loaded
>>specials        : tex,postscript,rokicki loaded
>>system          : mp-minimal-temp.top loaded
>>(./mp-minimal-temp.top
>>specials        : loading definition file dvi
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/spec-dvi.tex)
>>specials        : tex loaded
>>specials        : loading definition file ps
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/spec-ps.tex)
>>specials        : tex,postscript loaded
>>specials        : loading definition file tr
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/spec-tr.tex)
>>specials        : tex,postscript,rokicki loaded
>>)
>>systems         : system commands are disabled
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/sort-def.tex)
>>(/usr/local/gwTeX/texmf.pkgs/tex/context/base/sort-lan.tex)
>>systems         : begin file mp-minimal-temp at line 42
>>! Undefined control sequence.
>>l.44 \documentclass
>>                   [12pt,a4paper]{article}
>>?
>>! Emergency stop.
>>l.44 \documentclass
>>                   [12pt,a4paper]{article}
>>No pages of output.
>>Transcript written on mp-minimal-temp.log.
>>TeXExec | runtime: 0.529086
>>This is MetaPost, Version 0.993 (Web2C 7.5.5)
>>(/usr/local/gwTeX/texmf.pkgs/web2c/natural.tcx)
>>(mp-minimal.mp
>>
>>>>mp-minimal.mp
>>>>mp-minimal.mpx
>>
>>! Unable to make mpx file.
>>l.9   label(btex
>>                 Test etex, (1,1) );
>>Transcript written on mp-minimal.log.
>>TeXExec | runtime: 0.865779
>>
>>MPtoPDF 1.3.2 : no filename matches mp-minimal  
> 
> 
> Here is my minimal example:
> 
> prologues:=2;
> verbatimtex
> \documentclass[12pt,a4paper]{article}
> \begin{document}
> etex
> 
> beginfig(1);
> 
>    label(btex Test etex, (1,1) );
> 
> endfig;
> end
> 
> I tried to understand which script is actual called when i call mptopdf 
> but got kind of lost in the sequence of shell script calling ruby 
> scripts calling perl scripts, etc. So, I wasn't able to find out the 
> right command line options, etc. for making mpost aware of calling latex 
> instead of tex. Can someone help me out here?
> 
> Best regards
>    Martin
> 

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

* Re: Problem using mptopdf with Metapost containing LaTeX
  2007-01-04  9:32 ` Hans Hagen
@ 2007-01-04 10:30   ` Taco Hoekwater
  2007-01-04 13:24   ` Martin Buchmann
  2007-01-04 13:55   ` Sanjoy Mahajan
  2 siblings, 0 replies; 6+ messages in thread
From: Taco Hoekwater @ 2007-01-04 10:30 UTC (permalink / raw)




Hans Hagen wrote:
> 
> does adding a --latex directive help?

Not here:

[taco@glenlivet tmp]$ mptopdf --latex mpfile.mp

MPtoPDF 1.3.2 : running 'texexec --mptex '
TeXExec | processing graphic 'mpfile.mp'
TeXExec | using internal mptotex converter
TeXExec | processing document 'mpfile-temp.tex'
TeXExec | no ctx file found
TeXExec | tex processing method: context
...

ends in the same error (context complaining about \documentclass)

Best,
Taco

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

* Re: Problem using mptopdf with Metapost containing LaTeX
  2007-01-04  9:32 ` Hans Hagen
  2007-01-04 10:30   ` Taco Hoekwater
@ 2007-01-04 13:24   ` Martin Buchmann
  2007-01-04 13:55   ` Sanjoy Mahajan
  2 siblings, 0 replies; 6+ messages in thread
From: Martin Buchmann @ 2007-01-04 13:24 UTC (permalink / raw)


Hans Hagen said the following on 04.01.2007 10:32 Uhr:

> does adding a --latex directive help?

No, I get the same error message as before.

-- 
Bureaucrats cut red tape -- lengthwise.

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

* Re: Problem using mptopdf with Metapost containing LaTeX
  2007-01-04  9:32 ` Hans Hagen
  2007-01-04 10:30   ` Taco Hoekwater
  2007-01-04 13:24   ` Martin Buchmann
@ 2007-01-04 13:55   ` Sanjoy Mahajan
  2 siblings, 0 replies; 6+ messages in thread
From: Sanjoy Mahajan @ 2007-01-04 13:55 UTC (permalink / raw)


> does adding a --latex directive help?

I also tried 'TEX=latex mptopdf thatfile.mp' but it didn't work,
though 'TEX=latex mpost thatfile.mp' worked.  Not sure if any of the
included post to c.t.t. is relevant, although I can no longer
reproduce this part -- not sure why:

  But setting the TEX env variable worked (without the %&
  line):

    TEX=latex mptopdf yourfile.mp

-Sanjoy

===========================================================

Date:    03 Jan 2007 16:47:11 GMT
From:    Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
Subject: Re: Problems using mptopdf
To:      comp.text.tex

> I tried to add '%&LaTeX' after the verbatimtex line but it doesn't
> change anything.

Did you try %&latex ?  Not sure if the MacOS filesystem is case
sensitive, but on regular Unix/Linux it matters.

Does 'mpost yourfile.mp' work?  Even when I put in %&latex (lowercase)
after the verbatimtex, it didn't work at first here (Ubuntu 6.10,
mostly TeXLive 2005 with 2006.12.27 context, mpost 0.993, i386).  This
subcommand failed:

   tex --parse-first-line --interaction=nonstopmode mpxerr.tex

Running it by hand shows where the failure is:

  This is TeXk, Version 3.141592 (Web2C 7.5.5)
   %&-line parsing enabled.
  ---! /var/lib/texmf/web2c/latex.fmt was written by pdftex
  (Fatal format file error; I'm stymied)

The problem is that latex is nowadays a symlink to pdftex (or pdfetex)
so when latex.fmt was generated, it was generated by pdfetex.  Whereas
'tex' is still regular (non-pdf) tex, so when it reads the '%&latex'
line, it loads latex.fmt and cannot understand it.

So I made tex a symlink to pdfetex, and 'mpost yourfile.mp' worked
then.

But 'mptopdf yourfile.mp' fails in the same place as for you.  Not
sure why.  But setting the TEX env variable worked (without the %&
line):

  TEX=latex mptopdf yourfile.mp

You might post your example to the context mailing list
(ntg-context@ntg.nl), where you will get more expert assistance.

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)

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

end of thread, other threads:[~2007-01-04 13:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-04  7:50 Problem using mptopdf with Metapost containing LaTeX Martin Buchmann
2007-01-04  9:32 ` Hans Hagen
2007-01-04 10:30   ` Taco Hoekwater
2007-01-04 13:24   ` Martin Buchmann
2007-01-04 13:55   ` Sanjoy Mahajan
2007-01-04  9:44 ` Taco Hoekwater

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