Random ramblings about Mac, Python, TeX, programming, and more  |     |          |     |  

MetaPost figures (in LaTeX)

May 19, 2022  |  publ, latex

I prefer to produce documents using LaTeX (and other TeX friends), and draw figures using MetaPost. A long, long time ago (when I did my PhD), I even created a MetaPost package, aaobj (documentation).

Recently, I have moved towards using the Lua implementation of TeX (see also the LuaLaTeX documentation). I will not discuss why in detail here, but one of the reasons is that inline MetaPost in LaTeX documents is possible with LuaLaTeX.

To use MetaPost with LuaLaTeX, you should use the luamplib package. See this example of an embedded MetaPost diagram in LaTeX.

Last updated: April 2, 2024