[metapost] How to use MetaPost
rjerrard at math.concordia.ab.ca
Mon Nov 26 18:33:05 CET 2007
On Mon, 2007-26-11 at 13:09 +0100, Nizar Fakhfakh wrote:
> I'm beeing to manipulate Miktex and I'm needed to use MetaPost but I'm
> not understand how beging, how to compile MetaPost source code... I
> use Vista Home Premium operating system.
> Thanks to answer me.
Hi Nizar, I don't use Miktex but I do use MetaPost and LaTeX. I have
quite useful for metapost examples.
The user manual is at:
The idea is to create a text file, say graphs.mp (always use the .mp
extension), with the appropriate metapost commands in it then run the
from a command line.
In your tex file, say file.tex, use commands like:
in the preamble and:
in the body of the text. When you latex file.tex, the resulting file.dvi
will have the graph in it. I usually create a postscript file for
viewing with the command:
dvips file.dvi -o
which creates file.ps and it can be viewed with any postscript viewer.
Files like graphs.1 are generated when you mpost the .mp file and are
numbered according to the figure numbers in the .mp file.
It is also possible to embed the metapost commands inside the tex file
with the use of metagraph.mp which is available at:
Metagraph was created for drawing directed and undirected graphs but
allows one to embed metpost into a tex file also.
Dr. Robert J. Jerrard, Professor of Mathematics,
Concordia University College of Alberta,
7128 Ada Blvd., Edmonton, Alberta, T5B 4E4, Canada.
Phone: (780) 479-9291, Fax: (780) 474-1933.
More information about the metapost