发布时间:2010-12-11 19:40:48
文章类别:TeX绘图
原文地址:http://blog.sina.com.cn/s/blog_5e16f1770100nl82.html
QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载
最新近版本包括(MIKTeX2.9,TeXLive2010,CTeX2.9)等等,mpost来运行带有label中嵌入公式的.mp文件会出现如下问题:
> ! Unable to make mpx file.
> l.54 label(btex
> {\small $c$} etex,(-15w,.5c));
会出现:运行mp文件没有结果
或者无法生产 fig.1 这样的文件,下面我介绍一下解决方案
【解决方案】
需要指定运行使用的引擎,
如下例子:
beginfig(1);
draw (0,0)--(100,0)--(100,100)--(0,100)--(0,0);
label.top(btex $a^2+\int f(x)$ etex,0.5[(100,100),(0,100)]);
endfig;
我们需要写为:
verbatimtex
%&LaTeX
\documentclass{article}
\begin{document}
etex
beginfig(1);
draw (0,0)--(100,0)--(100,100)--(0,100)--(0,0);
label.top(btex $a^2+\int f(x)$ etex,0.5[(100,100),(0,100)]);
endfig;
verbatimtex
\end{document}
etex
end;
保存为 test.mp
然后运行为:
mpost
即可得到图如下:
发表评论 取消回复