发布时间: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 -tex=latex test.mp

即可得到图如下:

57FWAK)$P1{OT07G042D(4U


点赞(1)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部