[metapost] Problem using LaTeX in MetaPost
Yogeshwarsing Calleecharan
yogeshwarsing.calleecharan at ltu.se
Tue Feb 7 20:14:02 CET 2012
You can always switch to TeXLive which works very well on Windows.
Best Regards,
Y.Calleecharan
On 2/7/2012 7:06 PM, Karel wrote:
> Carlos Mallen napsal(a):
>> 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).
>>
>> What should I do?
>>
> Maybe version 1.504 of MP does not write the texfile correctly.
> Try to look in the corresponding file (you will find its name in
> the log file), if %&latex would not be at the first line, then
> perhaps try to find older MikTeX version of MP (1.212 works fine,
> I hope).
> Karel Horak
>
>
> --
> http://tug.org/metapost/
More information about the metapost
mailing list