MetaPost uses a language based on that of Metafont to produce precise technical illustrations. Its output is scalable PostScript or SVG, rather than the bitmaps Metafont creates. This tag is compatible with {diagrams}.

learn more… | top users | synonyms

10
votes
2answers
310 views

How to let text flow around irregular-shaped graphics in ConTeXt?

I have some illustrations which I need to scan and place within a document. The illustrations come in various shapes, with no straight edges, and are bound by lots empty white space, e.g.: ...
25
votes
3answers
735 views

How do I make a superellipse node shape in tikz?

A superellipse is a kind of closed curve which can be used as a "intermediate" shape between ellipse and rectangle. A parameter can control its "roundness". I find it a pleasant alternative to the ...
21
votes
1answer
4k views

Package for typesetting Feynman diagrams (efficiency of `feynmp` and `tikz`)

Is there any good package for typesetting lots of Feynman diagrams? My question arise because Feynmp: Circle with three vertices lead me take a look at the documentation for the feynmf/feynmp ...
4
votes
1answer
449 views

Getting “The memory dump file could not be found” when trying to compile mpost file

I am using texmaker with the following mp example: filenametemplate "%j%c.mps"; beginfig(1); z1=(0,0); z2=(10mm,10mm); drawarrow(z1--z2); label.ulft(btex $A$ etex, .5[z1,z2]); endfig; I keep ...
2
votes
0answers
246 views

Why no GUI for Metafont? [closed]

Why has no-one ever created a graphical user interface for Metafont ? One can easily imagine a system that would allow interactive adjustment of the font parameters, with near-real-time display of ...
4
votes
1answer
472 views

How to include a .mp file into a LaTex file?

I used metagraf to create the figure I wanted and saved it as a .mp file and I wanted to use the command "includegraphics{**.mps}" to include the corresponding figure but it said wrong, no such file ...
6
votes
1answer
294 views

btex and etex in luamplib labels

I've been experimenting with METAPOST and in particular with luamplib. I found that I couldn't have tex typeset labels with the btex/etex construct as apparently is possible with straight up METAPOST. ...
5
votes
1answer
113 views

Problems with mfplain

When I read the file mfplain into Metapost, I get about a dozen error messages complaining about redundant and inconsistent equations. It's hard to believe that there is really anything wrong with ...
23
votes
3answers
2k views

Why does anyone prefer Metapost?

TikZ (together with its PGF backend) is the most widely used picture drawing tool by regulars here, having more than 50x as many questions as for Metapost, alongside a wealth of documentation and user ...
3
votes
4answers
426 views

How can I draw a right angle with MetaPost?

I want to use MetaPost to draw a right angle BAC. A = (20,30), B = (0,0), the top of the angle is point A. How can I compute the coordinate of point C?
7
votes
1answer
349 views

Get all intersection points in MetaPost

On MetaPost, I can use p intersectionpoint q to get a intersection point. But It will only return one point. How can I get all intersection points?
2
votes
1answer
204 views

Code for reading Metafont definitions

I need some C code to generate Bezier curves from Metafont source code. Ideally, I'd like to have a C/C++ function with the following specifications: Input: an array of text strings (the lines in the ...
4
votes
1answer
147 views

How to fine-tune the vertical placement of characters in ConTeXt?

I need to insert a dot symbol, such as “•” or a METAPOST circle into my document, at different heights between the baseline and top of characters, like this example: _____ _____ ...
3
votes
1answer
368 views

How to change the font for metauml?

I am using the emp package in order to use metauml for drawing UML-models. So far so good. this is a minimal example: \documentclass{scrartcl} \usepackage{emp} \ifx\pdftexversion\undefined ...
2
votes
0answers
153 views

no output with \usepackage{emp} [closed]

I'm trying to embed MetaPost graphics inside a LaTeX file using the emp package, with pdflatex. When I include the line: \usepackage{emp} %part 1 pdflatex doesn't produce any output (it says 0 ...
5
votes
1answer
117 views

MetaPost label positioning based on the text baseline

We are all familiar with MetaPost labels: label.top(btex $a_t$ etex, z0); The problem with the above is that the positioning is based on the entire label, including the subscript. How do I ...
6
votes
1answer
240 views

ConTeXt MarkIV: Pagenumber in layer not working

I want to put pagenumber and navigation into a layer, but the counter for pagenumber is not working. Here's a minimal example: \usemodule[graph] \usesymbols[nav] \setupsymbolset[navigation 1] ...
6
votes
2answers
180 views

Errors Mpgraph in ConTeXt

I need to put some bar charts in a ConTeXt document. I'm using mkiv from TeX Live 2011, under Gentoo GNU/Linux. I tried using Gnuplot but I found mpgraph suits better my needs. I'm using this TeX ...
4
votes
1answer
243 views

Non-intersecting lines on class diagram

\documentclass{article} \usepackage[shellescape]{gmp} \begin{document} \begin{mpost}[use,mpsettings={input metauml;}] Class.A("A")()(); Class.B("B")()(); Class.C("C")()(); Class.D("D")()(); B.n = ...
1
vote
1answer
719 views

METAPOST (mptopdf) complains: can't open file `mp-tool'

I just did a clean install of Mountain Lion and MacTeX 2012. Now I can't compile my .mp files anymore using the "mptopdf" Terminal command. This is the output I get: MPtoPDF 1.4.1 : running 'mpost ...
4
votes
1answer
318 views

metauml: Realization link doesn't work

\documentclass{article} \usepackage[shellescape]{gmp} \begin{document} \begin{figure} \begin{mpost}[use] input metauml; Interface.A("Interface") (); A.info.iAttributeStack.top := 0; ...
4
votes
2answers
285 views

Underline in metauml

\documentclass{article} \usepackage[shellescape]{gmp} \begin{document} \begin{figure} \begin{mpost}[use] input metauml; Class.A("A") ("-instance: A") ("-A()", "+instance(): A"); ...
3
votes
2answers
355 views

Too many compiles when using latexmk with mpgraphics

\documentclass{article} \usepackage{mpgraphics} \begin{document} \begin{figure} . \label{fig:a} \caption{a} \end{figure} \begin{mpinline} draw (20,20)--(0,0)--(0,30)--(30,0)--(0,0) \end{mpinline} ...
3
votes
1answer
320 views

Multiple lines of TeX output between btex and etex in METAPOST

As you know, this is how to create labels in METAPOST: label(btex some text etex, (0,0)); How do I place text on multiple lines -- in this case such that "some" appears on one line, and "text" ...
76
votes
3answers
4k views

Fundamental differences : PSTricks, TikZ/PGF and others

OK, since this is a pretty vague and subjective question. I need to set up some borders around the discussion that I intend to benefit from. But before anything, I certainly do NOT want to excite the ...
13
votes
0answers
881 views

Industrial schematics [closed]

I'm investigating if it is possible to generate electrical schematics for industrial machinery with the LaTeX ecosystem. They are quite different from electronic circuits because are developed ...
6
votes
3answers
1k views

mpgraphics: Unable to compile using MikTex on Windows

This is an example from mpgraphics package documentation: \documentclass{article} \usepackage{mpgraphics} \begin{document} \begin{mpinline} draw (20,20)--(0,0)--(0,30)--(30,0)--(0,0) \end{mpinline} ...
5
votes
1answer
340 views

Creating a grid which fills available text area on a page in ConTeXt?

I have some pages containing only a small paragraph at the top and a large empty area where readers can add notes or draw, e.g.: _______________ | | | This is some | | text in a pa- | ...
12
votes
4answers
2k views

A good METAPOST alternative for plotting 3d surfaces

I find METAPOST to be a wonderful software to create 2d charts and figures. Can you name me a few good alternatives to METAPOST for drawing 3d surfaces? The crucial feature I'm looking for is the ...
2
votes
1answer
731 views

How to draw an optical lattice

I want to make in TikZ or MetaPost an image of a two dimensional lattice with oscillations like these: (Source: http://www.uibk.ac.at/th-physik/qo/research/opticallattices.html) or this one: ...
60
votes
6answers
2k views

Curve through a sequence of points with Metapost and TikZ

This question led to a new package: hobby I found Metapost best for drawing complex smooth curves (i.e., Bezier, splines), since you do not have to directly specify Bezier control points. ...
6
votes
1answer
262 views

How can I use german umlauts in MetaUML

I have the following files: metaumlfile.mp: input metauml; beginfig(1); Class.Benutzer("Benutzer") () ("+üben(): void"); drawObjects(Benutzer); endfig; end ...
3
votes
1answer
465 views

Draw rounded cube

How can I draw a rounded cube using Asymptote, Metapost or anything that produces high quality graphics? A rounded cube is for example the boundary of the minkovski sum C+S where C=[-1,1]^3 and S is ...
4
votes
1answer
2k views

feynmf with pdflatex [duplicate]

Possible Duplicate: How to use kile with feynmf or feynmp? I would like to use feynmf, or better feynmp, with pdflatex. My first idea was to replace all the files file.[0-9]* which are ...
7
votes
1answer
707 views

How to generate EAN barcodes with TikZ or MetaPost?

I'm looking for way to generate EAN barcodes with LuaLaTeX. I'm aware of this question; the solution to that needs pstricks, which won't work easily with LuaLaTeX (I don't want to install GhostScript ...
5
votes
2answers
2k views

metapost and pdflatex

I'm trying to use figures created with metapost in a TeX document compiled with pdflatex, but I have some troubles. I did as advised here, but it fails! My code is this : ...
1
vote
1answer
427 views

Metapost compiler freezes when I add labels

I installed texlive-metapost in Linux Mint (similar to Ubuntu), and each time I compile a MetaPost figure which contains a label, the compiler finishes the job, but the picture is not saved as ps, ...
2
votes
1answer
250 views

Metapost - Color portions of a curve with different colors

I searched a bit and didn't find something that relates to this. Suppose I created a closed curve in Metapost with the command p:=z_1..z_2..z_3..cycle. Is it possible to color pieces of this curve ...
4
votes
0answers
566 views

Creating a colored bar chart using MetaPost or pgfplots [closed]

Right now I have this: input graph input sarith beginfig(1) draw begingraph(3cm,2cm) gdata("data1.d", v, path p; augment p (v1,0); augment p (v1,v2); augment p (v1 Sadd ...
89
votes
8answers
9k views

Simulating hand-drawn lines

I am working on a project that will have some vector graphics, perhaps using TikZ (or a similar package). All of the graphics consists of lines, in shades of gray. However, the lines from TikZ appear ...
3
votes
1answer
213 views

Using Latexmk with mpost [duplicate]

Is it possible to tell latexmk to execute mpost paper.mp after each compilation run if paper.mp has changed? I tried to create a custom latexmkrc rule: add_cus_dep('mp', '1', 0, 'mpost'); sub mpost ...
7
votes
3answers
356 views

Which plotting tool is more likely to stay stable in the basics: MetaPost, PStricks or pgfplots?

I have been looking at the three (major ?) tools---MetaPost, PStricks or pgfplots for plotting data together with LaTeX. My experience is this: MetaPost code can demand lots of lines for simple ...
3
votes
1answer
403 views

graphing problems in metapost

I have some data as follows (first and second columns) in the file mydata.d that I want to graph: 8 98826 year 2008 9 104925 year 2009 10 140153 year 2010 11 178414 year 2011 As we have ...
11
votes
1answer
2k views

pgf/tikz vs metapost

Can the experts here comment on the pros and cons of these two languages? I have been using metapost for a long time and I was wondering if I should learn pgf/tikz also. How does both languages ...
1
vote
2answers
451 views

Metapost label based on variable value

I want to label a scale based on a variable value and I wrote a metapost code like this. $ := 1; for i = -.3cm step .6cm until 3.6cm: label.bot(str$,(i,-3.7cm)); $ := incr($); endfor; It ...
0
votes
1answer
396 views

metapost macro for drawing filled circle not working

The following macro draws a black circle only on the first invocation. The remaining three circles are unfilled. Where am I going wrong? def big(expr z) = begingroup save a; path a; a = fullcircle ...
6
votes
1answer
581 views

OpenType fonts for Metapost Labels

Is it possible to use OpenType fonts in MetaPost labels? I use MiKTeX 2.9. I hoped something like mpost --tex=dvilualatex <myfile>.mp might work, but no luck. Suggestions? I tried this, but ...
1
vote
1answer
371 views

Tutorial for emp package

I really like the idea of the emp package - you write your MetaPost sources directly in LaTeX source. However, I can't make this package work. I read the official readme, but to no avail. Some of my ...
2
votes
2answers
419 views

Change background color in metapost

I have a metapost diagram using colour that when displayed in normal latex (with a white background) works well. Now, I want to add the same diagram to a presentation done in Beamer (Warsaw theme) ...
0
votes
1answer
686 views

Metapost use venn package

I use TexShop, and I have successfully compiled an example which uses metapost code directly in LaTeX code ( by running pdflatex, then metapost, then finally pdflatex again). this code uses mpfic ...