Problem using LaTeX in MetaPost

Carlos Mallen <[email protected]>
Newsgroups gmane.comp.tex.miktex
Message-ID <[email protected]>
Hi,

I'm using MiKTeX version 2.9 and MetaPost version 1.504. I'm no longer able to use LaTeX in MetaPost. The file

verbatimtex
%&latex
\documentclass{article}
\begin{document}
etex

input latexMP;

filenametemplate "%j-%3c.mps";

beginfig(1);

  draw (0, 0)--(150, 150);
  label(btex $A$ etex, (0, 0));
  show mpversion;

endfig;

verbatimtex
\end{document}
etex

end
fails because LaTeX commands aren't recognized. The error file is

This is TeX, Version 3.1415926 (MiKTeX 2.9) (preloaded format=tex 2012.2.7)  7 FEB 2012 10:28
**mp632087.tex
(C:\Personal\MetaPost-Manual\1.005\Graphics\mp632087.tex
! Undefined control sequence.
l.2 \documentclass
                  {article}
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.

! Undefined control sequence.
l.3 \begin
          {document}
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.

[1] [1] )
Output written on mp632087.dvi (2 pages, 340 bytes).

I've also tried the option -tex=latex and the file compiles OK, but when I use YAP, the following error occurs:

MiKTeX Problem Report
Message: Some PostScript specials could not be rendered.
Data: Error: /undefined in cmmi10
Operand stack:
   --nostringval--   PermitFileReading   --nostringval--   PermitFileWriting   --nostringval--   (A)
Execution stack:
  
 %interp_exit   .runexec2   --nostringval--   --nostringval--   
--nostringval--   2   %stopped_push   --nostringval--   
--nostringval--   --nostringval--   false   1   %stopped_push  
 1914   1   3   %oparray_pop   1913   1   3   %oparray_pop   1897   1   
3   %oparray_pop   1787   1   3   %oparray_pop   --nostringval--   
%errorexec_pop   .runexec2   --nostringval--   --nostringval--   
--nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1166/1684(ro)(G)--   --dict:0/20(G)--   --dict:78/200(L)--   --dict:95/300(L)--   --dict:42/200(L)--
Current allocation mode is local
MiKTeX GPL Ghostscript  9.00: Unrecoverable error, exit code 1

Source: Libraries\MiKTeX\Dvi\Ghostscript.cpp
Line: 372
MiKTeX: 2.9
OS: Microsoft Windows XP Professional Service Pack 3 (build 2600)
Invokers:
 explorer/cmd
SystemAdmin: yes
PowerUser: no
Root0: C:\Documents and Settings\OSY98\Application Data\MiKTeX\2.9
Root1: C:\Documents and Settings\OSY98\Local Settings\Application Data\MiKTeX\2.9
Root2: C:\Documents and Settings\All Users\Application Data\MiKTeX\2.9
Root3: C:\Program Files\MiKTeX 2.9
UserInstall: C:\Documents and Settings\OSY98\Application Data\MiKTeX\2.9
UserConfig: C:\Documents and Settings\OSY98\Application Data\MiKTeX\2.9
UserData: C:\Documents and Settings\OSY98\Local Settings\Application Data\MiKTeX\2.9
CommonInstall: C:\Program Files\MiKTeX 2.9
CommonConfig: C:\Documents and Settings\All Users\Application Data\MiKTeX\2.9
CommonData: C:\Documents and Settings\All Users\Application Data\MiKTeX\2.9


I posted the problem in [email protected] and the people that answered the mail suggested to file a bug report.

Kind regards,
 
Carlos Mallén
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.