[metapost] How to convert .mp file into jpg file?

Liunian liunian at zju.edu.cn
Wed Aug 29 12:55:57 CEST 2007


liuqiang <fedora.qiang at gmail.com> writes:

> I use "mpost" to generate eps file. 
> My target is encapsulate jpg-styled images into my Emacs Muse files.
> So, next steps are followed:
> 1. mpost somefile.mp
> 2. generate one tex file:
> +--------------------------------------------------
> \documentclass{article}
> \usepackage{graphics}
> \begin{document}
> \begin{figure}[h]
>   \centering
>   \includegraphics{somefile.1}
> \end{figure}
> \end{document}
> +--------------------------------------------------
> 3. pdftoppm it.(convert pdf into images)
> 4. convert ppm style into jpg file.
>
> After fininished these steps, I found the jpg file was as large as one A4 paper.
> I know the default size of pdf is A4.
>
> I don't want this.
> Can anyone tell me how to get jpg-styled images as large as originial eps images?
>
> If I use "mptopdf" directly, the command fails:
mptopdf somefile.1
convert somefile-1.pdf somefile.jpg

> +--------------------------------------------------
> ! Undefined control sequence.
> l.44 \documentclass
>                    {article}
> ?
> +--------------------------------------------------
>
> Thank you.
>
> Btw:
> my tex distribution: TexLive 2007.


More information about the metapost mailing list