# A Quick MetaPost Example in TexnicCenter

Sometimes, to setup environment to use metapost may take a lot of time. With this post, to set up TeXnicCenter to develop metapost figure should take no time.

First of all, we should have MikTex and TeXnicCenter correctly installed. If you don't have that, here is a guide. Then, we can configrue TeXnicCenter for using metapost. Here is a video to show how to configure metapost for TeXnicCenter.

Video (Available in 1080p high quality)

The video also shows how to compile a meta post and then use it in latex file. The example simply draw a line, and the output looks like the following:

Code

file.tex

\documentclass{article}
\usepackage{graphicx}
\begin{document}

Hello World! \n
\includegraphics{file1.mps}

\end{document}

file.mp

filenametemplate "%j%c.mps";

beginfig(1)
draw (100, 100)--(350, 275);
endfig;

end

filenametemplate let the .mp generate mps file, then mps file is used in the latex file.

Category >> Uncategorized
If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:
<pre><code>
String foo = "bar";
</code></pre>


*