MetaPost Programming Language Help For Students

Introduction to MetaPost

MetaPost is a programming language much like Knuth’s METAFONT except that it outputs vector graphics, either PostScript programs or SVG graphics, instead of bitmaps. Borrowed from METAFONT are the basic tools for creating and manipulating pictures. MetaPost is particularly well-suited to generating figures for technical documents where some aspects of a picture may be controlled by mathematical or geometrical constraints that are best expressed symbocially. In this manual, we’ll assume a stand-alone command-line executable of the MetaPost compiler is used, which is usually called mpost. The syntax and program name itself are system-dependent; sometimes it is named mp. The executable is actually a small wrapper program around mplib, a library containing the MetaPost compiler.

MetaPost Example:

{`

input macros; 

verbatimtex 

\documentclass[12pt]{article}

 \ usepackage[T1]{fontenc} 

\begin{document} 

etex 

 

beginfig(1) 

pair A, B, C; 

A:=(0,0); B:=(1cm,0); C:=(0,1cm);

 draw A--B--C; 

endfig;

`}
MetaPost Programming Language

Running METAPOST

You can run METAPOST on a windows platform, e.g., using MikTEXand the WinEdt shell ...