From katepano at gmail.com Fri Jan 29 06:24:50 2021 From: katepano at gmail.com (Dimitris) Date: Fri, 29 Jan 2021 07:24:50 +0200 Subject: [metapost] A nice setting for working with Metapost Message-ID: <14500ca4-4a3f-de97-dca4-9a1b00c32c74@gmail.com> Dears, I just want to tell you about a nice setting for working with Metapost! I use ktikz (https://github.com/fhackenberger/ktikz) a well known editor for pgf/tikz graphics. It exists for linux and windows. You just have to use the following template for ktikz: ------------------------- \documentclass{article} \usepackage{luamplib} \usepackage{amsmath,amsfonts,amsthm,amssymb} \usepackage[usenames,dvipsnames,svgnames]{xcolor} \usepackage{color} \usepackage[active,pdftex,tightpage]{preview} %\PreviewEnvironment[]{tikzpicture} %\PreviewEnvironment[]{pgfpicture} \PreviewEnvironment[]{mplibcode} \begin{document} \begin{footnotesize} <> \end{footnotesize} \end{document} -------------------------- and the actual mp file in the form, ---------------------- \begin{mplibcode} beginfig(1) prologues:=3; u:=1.3cm; pair k[], w[]; path p[], c[]; ..... ..... endfig; end; \end{mplibcode} --------------------------- and select "lualatex" in the ktikz configuration. This gives you instant display of the graph you are doing, and export to pdf or png or any of the other formats available in ktikz. I think this is a very handy setting, which i didn't see anywhere else, so I thought I share it with you, BR Dimitris -------------- next part -------------- An HTML attachment was scrubbed... URL: