Re: Problem using LaTeX in MetaPost

Carlos Mallen <[email protected]>
Newsgroups gmane.comp.tex.miktex
Message-ID <[email protected]>
I don't have that version of the manual. In my MiKTeX distribution the manual is version 1.005 and at http://www.tug.org/metapost.html the version is 1.212. Could you send me the manual?


The content of the MetaPost file is:

input TEX;
TEXPRE("%&latex" & char(10) & "\documentclass{article}\begin{document}"); TEXPOST("\end{document}");

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

beginfig(1);

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

endfig;

end


Is this OK?

 
Carlos Mallén


________________________________
 From: George N. White III <[email protected]>
To: Carlos Mallen <[email protected]>; A place for MiKTeX users to discuss MiKTeX related questions. <[email protected]> 
Sent: Tuesday, February 7, 2012 4:54 PM
Subject: Re: [MiKTeX] Problem using LaTeX in MetaPost
 
On Tue, Feb 7, 2012 at 6:16 PM, Carlos Mallen <[email protected]> wrote:
> 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

Page 64 of the MetaPost 1.504 manual gives a quite different example
using LaTeX:

input TEX;
TEXPRE("%&latex" & char(10) &
"\documentclass{article}\begin{document}"); TEXPOST("\end{document}");
beginfig(100)
  last := 10;
  for i := 0 upto last:
    label(TEX("\( n_{" & decimal(i) & "} \)"), (5mm*i,0));
  endfor
  ...
endfig;

Have you tried this form?

-- 
George N. White III <[email protected]>
Head of St. Margarets Bay, Nova Scotia
------------------------------------------------------------------------------
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.