[metapost] A nice setting for working with Metapost
Dimitris
katepano at gmail.com
Fri Jan 29 06:24:50 CET 2021
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: <https://tug.org/pipermail/metapost/attachments/20210129/d1f6d9f2/attachment.html>
More information about the metapost
mailing list.