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

28
votes
2answers
898 views

What is Metapost/Metafont and how can I get started using it?

Inspired by Why Metapost discrimination?, I'd like to come to know Metapost far better than I do now. All I really know is that Metapost is a language for describing graphics, and Metafont is used ...
89
votes
8answers
8k 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 ...
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 ...
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. ...
25
votes
3answers
3k views

Create a symbol font from SVG symbols

Is it possible to create an own scalable font from a set of symbols (~700), all in SVG format. All of them are symbols (like Zapf Dingbats), so there would be no need for special settings like ...
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 ...
38
votes
8answers
6k views

Is anybody using TeX for business reporting?

Would TeX (LaTeX, ConTeXt, etc) be a good solution for PDF business reports that require dynamically generated graphs and tables? I need to create financial reports that must look top-notch in their ...
3
votes
2answers
350 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} ...
47
votes
6answers
2k views

How to automatically draw tree diagram of prime factorization with LaTeX?

I want to have a simple interface to automatically draw tree diagrams of prime factorization. For example, by invoking the following code, \PrimeTree{36} \PrimeTree{90} \PrimeTree{112} ...
25
votes
3answers
710 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 ...
12
votes
2answers
250 views

Is there another better way to have a region with gradient opacity?

My objective is to get a region with gradient opacity. In the following MWE, the region is a quarter of a disk on the top a bird. I made the gradient opacity by partitioning the sector into 45 ...
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 ...
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 ...
6
votes
1answer
291 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. ...
31
votes
6answers
2k views

How to make the length of a car moving on a roller coaster track remain unchanged?

For any arbitrary parametric smooth curve, how can I make the length of a car remain unchanged? \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot,pst-node} \pstVerb { ...
40
votes
9answers
3k views

The Spiral of Roots in TikZ

How can one create a spiral of roots as shown in the diagram below: where one can use a command to draw more parts to the spiral. For example, a command like \sqrtspiral{1}, \sqrtspiral{2}, ...
44
votes
13answers
2k views

What is the simplest way to draw this triangle exactly?

I want to see how we can exactly construct the following diagram as simple as possible. It means that the manual calculation should be avoided. Note that the angle marks attached to angles ...
26
votes
2answers
663 views

Chaotic billiard with TikZ

I'm looking for a TikZ library that could help me to represent different shapes of chaotic billiards. Any idea?
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 ...
5
votes
1answer
198 views

MetaPost: Randomly variably thick curves

Overview Looking to emulate the following sinusoidal wave having random variations in both its filled and outline thickness: The wave has two parts: a variably thick filling and a variably thick ...
5
votes
1answer
331 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- | ...
9
votes
2answers
552 views

automatic resizing of edges with long labels

I would like to know if there is a way to automatically resize edges when they have long labels. For example, the following code \documentclass[10pt]{article} \usepackage{tikz} ...
6
votes
1answer
575 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 ...
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 : ...
4
votes
1answer
239 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 = ...
4
votes
2answers
2k views

metapost pictures in pdflatex

To include metapost pictures in a latex file compiled by pdflatex I usually do something like \usepackage[pdftex]{graphicx} ... \includegraphics{filename-without-mps} but this requires all metapost ...
10
votes
2answers
304 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.: ...
10
votes
1answer
1k views

Embedding MetaPost in LaTeX document

I have problem using the emp package in TeXlive 2010. When I try to use it with empcmds it prints contents to output. If I use emp it parser fails after first character. Also - how should I import ...
6
votes
1answer
239 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] ...
2
votes
1answer
296 views

Metapost External Figure

I have a metapost file image.mp containing the following lines: beginfig(0); draw p0; externalfigure "/Users/dsg/tex/images/image.png" xyscaled r0 shifted r1; endfig; When I run mptopdf scene.mp ...