Changes

Jump to navigation Jump to search
* <cmd>usestaticMPfigure</cmd> takes the first argument as the ''label'' of the figure to be inserted. The second argument has the same options as the second argument of <cmd>externalfigure</cmd>
* To force the figure files to be regenerated, remove all the <code>*.mp.md5</code> files from the current directory.
==Transparent colors in figures== You can use transparent colors! For example: <texcode>\runMPgraphicstrue\setupcolors[state=start]\starttext\startreusableMPgraphic{a}fill unitsquare scaled 1cm withcolor yellow;fill unitsquare shifted (0.5,0.5) scaled 1cm withcolor transparent(1,0.5,red);\stopreusableMPgraphic \placefigure[force,none]{}{\reuseMPgraphic{a}}\stoptext</texcode> If transparency you see black squares rather than a yellow one underneath a partially transparent red one, then you probably hit the 'missing specials' problem diagnosed by Taco (ntg-context list, 23 Sep 2006 22:00:42 +0200): <pre>This all sounds like the 'missing specials' problem that is causedby conflicting -progname= arguments when using the web2c versionof metapost. Make sure you do not workinghave conflicting memory settings for both main_memory.mpostas well as main_memory.metafun The best is to remove all trace of '.mpost' and '.metafun' memorysettings from your texmf.cnf, but at least make sure all the'.mpost' and 'metafun' values are the same . Then regenerate metafun using texexec --make, and all should bewell again.</pre> And indeed it fixed it for me (Sanjoy). These were the memory setting in the ''/etc/texmf/texmf.d/95NonPath.cnf''configlet that is part of Debian and Ubuntu distributions of TeX: <pre>main_memory = 1000000 % words of inimemory available; also applies to inimf&mpmain_memory.context =1500000main_memory.mpost =1500000</pre> I commented out the .mpost line (there was no separate metafun line,which I guess instead used the main_memory value of 1000000),regenerated ''/etc/texmf/texmf.cnf'' with ''update-texmf'' (as root), then regenerated metafun with ''texexec --make metafun'' (as me) and transparency worked. 
[[Category:Graphics]]
[[Category:Metapost]]
127

edits

Navigation menu