[metapost] Unable to make mpx file. Btex and etex issue
ozhan fenerci
o_fenerci at yahoo.com.tr
Fri Sep 3 16:36:39 CEST 2010
Dear Taco,
Thanks for the answer. I followed what you said:
$ latex --parse-first-line --interaction=nonstopmode mpxerr.tex
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
restricted \write18 enabled.
entering extended mode
(./mpxerr.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, romanian, irish, coptic, serbian, turkish, welsh, esperanto, uppers
orbian, estonian, indonesian, interlingua, icelandic, kurmanji, slovenian, load
ed.
(/usr/share/texmf-texlive/tex/latex/base/book.cls
Document Class: book 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/bk10.clo)) (./dvidrv.sty
(/etc/texmf/tex/latex/config/color.cfg)
The DVI driver is set to dvips.
) (./hrefout.sty (./hrefout.cfg)
href output is turned on? no.
) (./bookjh.sty (/usr/share/texmf-texlive/tex/latex/graphics/color.sty
(/etc/texmf/tex/latex/config/color.cfg)
(/usr/share/texmf-texlive/tex/latex/graphics/dvips.def)
(/usr/share/texmf-texlive/tex/latex/graphics/dvipsnam.def))
(/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty
(/usr/share/texmf-texlive/tex/latex/graphics/trig.sty)
(/etc/texmf/tex/latex/config/graphics.cfg))) (./linalgjh.sty
(/usr/share/texmf-texlive/tex/latex/jknapltx/mathrsfs.sty)
(/usr/share/texmf-texlive/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texmf-texlive/tex/latex/amsmath/amstext.sty
(/usr/share/texmf-texlive/tex/latex/amsmath/amsgen.sty))
(/usr/share/texmf-texlive/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texmf-texlive/tex/latex/amsmath/amsopn.sty))
(/usr/share/texmf-texlive/tex/latex/amsfonts/amsfonts.sty
Package amsfonts Warning: The 'psamsfonts' option is obsolete in AMSFonts v3.
) (/usr/share/texmf-texlive/tex/latex/amsfonts/amssymb.sty)
(/usr/share/texmf-texlive/tex/latex/amscls/amsthm.sty (./text.thm))
(/usr/share/texmf-texlive/tex/latex/tools/array.sty)
(/usr/share/texmf-texlive/tex/latex/amsmath/amscd.sty)
(/usr/share/texmf-texlive/tex/latex/tools/dcolumn.sty)
(/usr/share/texmf-texlive/tex/latex/jknapltx/ursfs.fd)
(/usr/share/texmf-texlive/tex/latex/amsfonts/umsa.fd)
(/usr/share/texmf-texlive/tex/latex/amsfonts/umsb.fd))
(/usr/share/texmf-texlive/tex/latex/base/makeidx.sty)
(/usr/share/texmf-texlive/tex/latex/fancyhdr/fancyhdr.sty) (./shadethm.sty)
(/usr/share/texmf-texlive/tex/latex/footnpag/footnpag.sty)
(/usr/share/texmf-texlive/tex/latex/tools/verbatim.sty) (./engnum.sty
TeX or LaTeX sub-style EngNum <93-Jul-22 jh>
)) (./mpxerr.aux)
! LaTeX Error: Can not include graphics of type: mps.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.6 \begin{document}
%
[1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1]
[1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1]
[1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1]
[1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1]
[1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1]
[1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1]
[1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1]
[1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1]
[1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1]
[1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] (./mpxerr.aux)
)
(see the transcript file for additional information)
Output written on mpxerr.dvi (178 pages, 17600 bytes).
Transcript written on mpxerr.log.
Hence it gives error something about "! LaTeX Error: Can not include graphics of type: mps."
Here is the beginning part of ch1.mp file:
------------------------------------------------------>--------------------------------
% CH1.mp
% MetaPost input file with chapter one pictures.
verbatimtex
%&latex
\documentclass{book}
\usepackage{dvidrv} \usepackage{hrefout}
\usepackage{bookjh,linalgjh}
\usepackage{verbatim}
\begin{document}
etex
input jh
ahangle:=40;
%..........................................
% dblarrow_with_label
% draw this: |<----label----->|
%def dblarrow_with_label(expr ptone, pttwo, lbl)=
% begingroup
% pickup updown_tick;
% drawdot ptone; drawdot pttwo;
% drawdblarrow (ptone+.5(tickwidth,0v))--(pttwo-.5(tickwidth,0v));
% pic p;
% p=thelabel(btex lbl etex,.5[ptone,pttwo]);
% unfill bbox p;
% draw p;
% endgroup
%enddef;
%--------------------------------
% Fulcrum and Balls (1) and (2)
% section 1.1
beginfig(1);
numeric u; %scaling factor
numeric v; %vertical scaling factor
numeric w; %horizontal scaling factor
u:=.015in; v:=u; w:=v;
% the teeter-totter
linecap:=butt;
z0=(-55w,0v); z1=-z0;
pickup pencircle scaled line_width_light;
draw z0--z1;
path fulcrum;
z2=(-8w,-5v); x3=-x2; y3=y2;
fulcrum=(0w,0v)--z2--z3--cycle;
filldraw fulcrum withcolor shading_color; draw fulcrum;
% the masses
numeric unitmass, c, h, two;
unitmass=16pt; % with c=4 and h=1, solved for (4/3)\pi x^3.
c=0.98475*unitmass; h=0.62035*unitmass; two=0.78159*unitmass;
draw fullcircle scaled c shifted (-15w,.5c);
label(btex {\small $c$} etex,(-15w,.5c));
draw fullcircle scaled h shifted (-40w,.5h);
label(btex {\small $h$} etex,(-40w,.5h));
draw fullcircle scaled two shifted (50w,.5two);
label(btex {\small $2$} etex,(50w,.5two));
% the decorations
linecap:=squared;
pickup pencircle scaled line_width_light;
y4=1.3unitmass; y5=-.9unitmass;
picture picc, pich, pictwo;
picc=thelabel(btex {\tiny $15$} etex,(.5*(-15w),y5));
pich=thelabel(btex {\tiny $40$} etex,(.5*(-40w),y4));
pictwo=thelabel(btex {\tiny $50$} etex,(.5*(50w),y4));
interim ahangle:=30;
drawarrow ((-15w,y5)-(10pt,0v))--((-15w,y5)-(.5tickwidth,0v));
drawarrow ((0w,y5)+(10pt,0v))--((0w,y5)+(.5tickwidth,0v));
unfill bbox picc;
draw picc;
drawdblarrow ((-40w,y4)+(.5tickwidth,0v))--((0w,y4)-(.5tickwidth,0v));
unfill bbox pich;
draw pich;
drawdblarrow ((0w,y4)+(.5tickwidth,0v))--((50w,y4)-(.5tickwidth,0v));
unfill bbox pictwo;
draw pictwo;
pen vert_bar;
vert_bar:=pensquare xscaled tickwidth yscaled 4pt;
pickup vert_bar;
drawdot (-15w,y5); drawdot (0w,y5);
drawdot (-40w,y4); drawdot (0w,y4);
drawdot (0w,y4); drawdot (50w,y4);
endfig;
--------------------------<-------------------------------------------------------
I got the book source from "ftp://joshua.smcvt.edu/pub/hefferon/book/linear_algebra.zip" which includes many metapost figures.
Regards,
Ozhan
--- 03/09/10 Cum tarihinde Taco Hoekwater <taco at elvenkind.com> şöyle yazıyor:
Kimden: Taco Hoekwater <taco at elvenkind.com>
Konu: Re: [metapost] Unable to make mpx file. Btex and etex issue
Kime: "ozhan fenerci" <o_fenerci at yahoo.com.tr>
Kopya: metapost at tug.org
Tarihi: 3 Eylül 2010 Cuma, 16:45
On 09/03/2010 02:07 PM, ozhan fenerci wrote:
> Dear List,
>
> I am trying to learn metapost. I found a book which uses metapost
> extensively. I wanted to compile the a few example from it but I failed.
>
> mpost works until it hits the line " label(btex{\small $c$}
> etex,(-15w,.5c));". Mpost gives the error like :
>
> $mpost ch1.mp
>
>
> This is MetaPost, version 1.208 (kpathsea version 5.0.0)
> (./ch1.mp (./jh.mp (/usr/share/texmf-texlive/metapost/base/boxes.mp)
> (/usr/share/texmf-texlive/metapost/base/graph.mp
> (/usr/share/texmf-texlive/metapost/base/marith.mp
> (/usr/share/texmf-texlive/metapost/base/string.mp))
> (/usr/share/texmf-texlive/metapost/base/format.mp
> (/usr/share/texmf-texlive/metapost/base/string.mp)
> (/usr/share/texmf-texlive/metapost/base/texnum.mp))))fatal: Command
> failed: latex --parse-first-line --interaction=nonstopmode mp518785.tex;
> see mpxerr.log
> >> ch1.mp
> >> ch1.mpx
> ! Unable to make mpx file.
> l.54 label(btex
> {\small $c$} etex,(-15w,.5c));
> Transcript written on ch1.log.
>
> I don't know what have gone wrong but sometihing about "btex and etex"
> issue.
Running latex failed. The metapost command above will have left you
with mpxerr.tex in the current directory, please try to run
$ latex --parse-first-line --interaction=nonstopmode mpxerr
to see what the actual latex error was.
Best wishes,
Taco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/metapost/attachments/20100903/fc848cc2/attachment.html>
More information about the metapost
mailing list