Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hi, i have a problem using metapost

20 views
Skip to first unread message

juseung Lee

unread,
Aug 3, 2015, 3:16:16 AM8/3/15
to
hi, i am beginner of Latex

after i drew a block diagram using DIA, i exported my figure to .eps file and then, i checked out using latex. however, pdf fonts were not converted in latex (e.g : $s$ --> $s$)

i heard that i could convert fonts using metapost.

so, i would like to convert .mp to .eps by using metapost because the font for latex is not provided in DIA directly, which is drawing software tool.

but, error during converting .mp to .eps occurs. how could i solve this problem??
(error : Eun.mp Eun.mpx ! Unable to make mpx file. 1.71 draw btex {\usefont{OT1}{phv}{m}{n} } etex scaled 1.64t shifted)

this as below is my figure file(Eun.mp)

thank you in advance


beginfig(1);
verbatimtex
%&latex
\documentclass{minimal}
\begin{document}
etex
% Define macro for horizontal centering.
vardef hcentered primary P =
P shifted -(xpart center P, 0)
enddef;
% Define macro for right justification.
vardef rjust primary P =
P shifted -(xpart (lrcorner P - llcorner P), 0)
enddef;
% picture(9.943800,-10.743402)(16.715252,-8.085000)
x = 1.000000cm; y = -1.000000cm;

t = 1.000000;

% set_line_color 0.000000, 0.000000, 0.000000
% set_line_color 1.000000, 1.000000, 1.000000
% set_linewidth 0.050000
linejoin:=rounded;
path p;
p = (10.757500x,8.110000y)--(10.757500x,9.715000y)--(12.125000x,9.715000y)--(12.125000x,8.110000y)--cycle;
fill p withcolor (1.000000,1.000000,1.000000);
% set_line_color 0.000000, 0.000000, 0.000000
draw (10.757500x,8.110000y)--(10.757500x,9.715000y)--(12.125000x,9.715000y)--(12.125000x,8.110000y)--cycle
withpen pencircle scaled 0.0500x;
% set_linewidth 0.050000
linejoin:=mitered;
% set_line_color 0.000000, 0.000000, 0.000000
draw (12.125000x,8.912500y)--(16.509350x,8.912500y)--(16.509350x,10.406598y)
withpen pencircle scaled 0.0500x;
% set_line_color 0.000000, 0.000000, 0.000000
% fill_polygon
path p;
p = (16.509350x,10.631598y)--(16.359350x,10.331598y)--(16.509350x,10.406598y)--(16.659350x,10.331598y)--cycle;
fill p
withpen pencircle scaled 0.0500x;
% set_line_color 0.000000, 0.000000, 0.000000
draw (16.509350x,10.631598y)--(16.359350x,10.331598y)--(16.509350x,10.406598y)--(16.659350x,10.331598y)--cycle
withpen pencircle scaled 0.0500x;
% set_line_color 0.000000, 0.000000, 0.000000
draw hcentered btex {\usefont{OT1}{phv}{m}{n} $K_{p}$} etex scaled 2.05t shifted (11.441300x,9.230000y);
endfig;
end;

Paweł Wlaź

unread,
Aug 3, 2015, 4:30:07 AM8/3/15
to


On Mon, 3 Aug 2015, juseung Lee wrote:

> hi, i am beginner of Latex
>
> after i drew a block diagram using DIA, i exported my figure to .eps file and then, i checked out using latex. however, pdf fonts were not converted in latex (e.g : $s$ --> $s$)
>
> i heard that i could convert fonts using metapost.
>
> so, i would like to convert .mp to .eps by using metapost because the font for latex is not provided in DIA directly, which is drawing software tool.
>
> but, error during converting .mp to .eps occurs. how could i solve this problem??
> (error : Eun.mp Eun.mpx ! Unable to make mpx file. 1.71 draw btex {\usefont{OT1}{phv}{m}{n} } etex scaled 1.64t shifted)


You must look at the file mpxerr.log, probably you do not have some
fonts (phv) installed properly in you TeX system. Metapost file is
just fine. Here it generates file Eun.1 without problem.

--
PW

juseung Lee

unread,
Aug 3, 2015, 6:37:16 AM8/3/15
to
2015년 8월 3일 월요일 오후 5시 30분 7초 UTC+9, Paweł Wlaź 님의 말:
Thank you for your help

i just check my mpxerr.log file but, i don't know what problem is

log file shows as below

could you figure out what the problem is?

This is TeX, Version 3.1415926 (MiKTeX 2.9 64-bit) (preloaded format=tex 2015.7.13) 3 AUG 2015 19:32
**mp597926.tex
(C:\Users\Owner\Desktop\mp597926.tex
! Undefined control sequence.
l.2 \documentclass
{minimal}
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.

! Undefined control sequence.
l.16 {\usefont
{OT1}{phv}{m}{n} $K_{p}$}%
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 mp597926.dvi (2 pages, 412 bytes).

Herbert Schulz

unread,
Aug 3, 2015, 10:42:58 AM8/3/15
to
On 2015-08-03 10:37:11 +0000, juseung Lee said:

> This is TeX, Version 3.1415926 (MiKTeX 2.9 64-bit) (preloaded
> format=tex 2015.7.13) 3 AUG 2015 19:32
> **mp597926.tex
> (C:\Users\Owner\Desktop\mp597926.tex
> ! Undefined control sequence.
> l.2 \documentclass
> {minimal}
> 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.

Howdy,

You appear to be running TeX rather than LaTeX.

Good Luck,
Herb Schulz

Paweł Wlaź

unread,
Aug 3, 2015, 2:33:31 PM8/3/15
to
You are using format of plain tex but you are using latex syntax in
your metapost file.

In this case Metapost should use latex. On linux I use the following
command

mpost -tex=latex Eun.mp

maybe you can use a similar way.

--
PW
0 new messages