Re: Problem using LaTeX in MetaPost

Ulrike Fischer <[email protected]>
Newsgroups gmane.comp.tex.miktex
Message-ID <[email protected]>
Am Tue, 7 Feb 2012 14:16:32 -0800 (PST) schrieb Carlos Mallen:
 
> 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

[...]

> 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


I knew I had seen this already ;-) And now I found it. The problem
has been discussed in april last year in fr.comp.tex.text

http://groups.google.com/group/fr.comp.text.tex/browse_thread/thread/8a570e588c5670fe/fdd526ffe7fc10e6?hl=de&ie=UTF-8&oe=utf-8

In this thread the source of the problem was that the (old) tex
engine doesn't understand the %&latex notation. You had to force
metapost to use pdftex. Either by setting the environment variable
TEX:

I:\Z-Test>set TEX=pdftex

I:\Z-Test>mpost test2.mp

or by calling mpost with the -tex=pdftex option:

I:\Z-Test>mpost -tex=pdftex test2

-- 
Ulrike Fischer 


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