Metapost(めも)

Metapostは比較的簡単にeps画像を作ることができる.

主な用途はtexに使うeps画像の作成だと思われる.

Metapostを少しつかってみたので,そのときのメモ.

とりあえず,今回つくった画像.

f:id:jeneshicc:20100103220132p:image

prologues:=3;
beginfig();
h=30;
w=100;
r=70;
d=5;
draw (, h)--(2w, h);
draw (w, )--(w, h+w);
dotlabel.rt(btex ${rm i}c$ etex, (w, h+40));
pickup pencircle scaled 2pt;
draw (w-r, h)--(w+r, h)..(w, h+r)..cycle;
draw (w+h, h+0.7d)--(w+h+d,h)--(w+h, h-0.7d);
endfig;
end.

まず,tex環境について.

  • texlive 2008
  • ptexlive 2008

がインストール済み.

labelにtexを使うときはtexlive(pでない,日本語化されていなほう)でないと

うまくいかないみたい(理由は分からない).

(理解できない)エラーメッセージとログは最後にのせる.

prologues:=3; と設定すると,数式のフォントがいつものtexになった.

pickup pencircle scaled 2pt; で線の太さを変更している.

ログ

This is MetaPost, Version 1.005 (Web2C 7.5.7) (mem=mpost 2010.1.2)  3 JAN 2010 21:55
**probablity_report2_path_of_int.mp
(probablity_report2_path_of_int.mp
>> probablity_report2_path_of_int.mp
>> probablity_report2_path_of_int.mpx
! Unable to make mpx file.
l.9   dotlabel.rt(btex
${\rm i}c$ etex, (w, h+40));
The two files given above are one of your source files
and an auxiliary file I need to read to find out what your
btex..etex blocks mean. If you don't know why I had trouble,
try running it manually through MPto -tex, TeX, and DVItoMP.

エラーメッセージ

This is MetaPost, Version 1.005 (Web2C 7.5.7)
(probablity_report2_path_of_int.mp
kpathsea: Running mktexfmt etex.fmt
fmtutil: running `pdftex -ini   -jobname=etex -progname=etex -translate-file=cp227.tcx *etex.ini' ...
This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7) (INITEX)
%&-line parsing enabled.
(/usr/local/texlive/p2008/texmf/web2c/cp227.tcx)
entering extended mode
(/usr/local/texlive/p2008/texmf-dist/tex/plain/config/etex.ini
(/usr/local/texlive/p2008/texmf-dist/tex/plain/etex/etex.src
(/usr/local/texlive/p2008/texmf-dist/tex/plain/base/plain.tex
Preloading the plain format: codes, registers, parameters, fonts, more fonts,
macros, math definitions, output routines, hyphenation
(/usr/local/texlive/p2008/texmf/tex/generic/hyphen/hyphen.tex
[skipping from \patterns to end-of-file...]))
(/usr/local/texlive/p2008/texmf-dist/tex/plain/etex/etexdefs.lib
Skipping module "grouptypes"; Loading module "interactionmodes";
Skipping module "nodetypes"; Skipping module "iftypes";)
(/usr/local/texlive/p2008/texmf/tex/generic/config/language.def
(/usr/local/texlive/p2008/texmf/tex/generic/hyphen/hyphen.tex)
! I can't find file `dehypht-x-2008-06-18.tex'.
\addlanguage ...me =#5 \uselanguage {#1}\input #2
\if *#3*\else \input #3 \f...
l.29 ...8-06-18}{dehypht-x-2008-06-18.tex}{}{2}{2}
(Press Enter to retry, or Control-D to exit)
Please type another input file name:
! Emergency stop.
\addlanguage ...me =#5 \uselanguage {#1}\input #2
\if *#3*\else \input #3 \f...
l.29 ...8-06-18}{dehypht-x-2008-06-18.tex}{}{2}{2}
No pages of output.
Transcript written on etex.log.
Error: `pdftex -ini  -jobname=etex -progname=etex -translate-file=cp227.tcx *etex.ini' failed
###############################################################################
fmtutil: Error! Not all formats have been built successfully.
Visit the log files in directory
/home/toru/.texlive2008/texmf-var/web2c
for details.
###############################################################################
This is a summary of all `failed' messages and warnings:
`pdftex -ini  -jobname=etex -progname=etex -translate-file=cp227.tcx *etex.ini' failed
warning: kpathsea: mktexfmt output `This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7) (INITEX)
%&-line parsing enabled.
(/usr/local/texlive/p2008/texmf/web2c/cp227.tcx)
entering extended mode
(/usr/local/texlive/p2008/texmf-dist/tex/plain/config/etex.ini
(/usr/local/texlive/p2008/texmf-dist/tex/plain/etex/etex.src
(/usr/local/texlive/p2008/texmf-dist/tex/plain/base/plain.tex
Preloading the plain format: codes, registers, parameters, fonts, more fonts,
macros, math definitions, output routines, hyphenation
(/usr/local/texlive/p2008/texmf/tex/generic/hyphen/hyphen.tex
[skipping from \patterns to end-of-file...]))
(/usr/local/texlive/p2008/texmf-dist/tex/plain/etex/etexdefs.lib
Skipping module "grouptypes"; Loading module "interactionmodes";
Skipping module "nodetypes"; Skipping module "iftypes";)
(/usr/local/texlive/p2008/texmf/tex/generic/config/language.def
(/usr/local/texlive/p2008/texmf/tex/generic/hyphen/hyphen.tex)
! I can't find file `dehypht-x-2008-06-18.tex'.
\addlanguage ...me =#5 \uselanguage {#1}\input #2
\if *#3*\else \input #3 \f...
l.29 ...8-06-18}{dehypht-x-2008-06-18.tex}{}{2}{2}
(Press Enter to retry, or Control-D to exit)
Please type another input file name:
! Emergency stop.
\addlanguage ...me =#5 \uselanguage {#1}\input #2
\if *#3*\else \input #3 \f...
l.29 ...8-06-18}{dehypht-x-2008-06-18.tex}{}{2}{2}
No pages of output.
Transcript written on etex.log.' instead of a filename.
makempx: Command failed: etex --parse-first-line --interaction=nonstopmode mpxerr.tex; see mpxerr.log
>> probablity_report2_path_of_int.mp
>> probablity_report2_path_of_int.mpx
! Unable to make mpx file.
l.9   dotlabel.rt(btex
${\rm i}c$ etex, (w, h+40));
Transcript written on probablity_report2_path_of_int.log.
More Reading
Newer// 大阪府…
Older// arctan !