[metapost] Troubles rendeting text in PNG output

France Dacar France.Dacar at ijs.si
Wed Aug 20 17:15:46 CEST 2014


Hello there.

I am using MetaPost version 1.803 (mpost in MiKTeX 2.9).
I searched the Web, and in particular the MetaPost site, but could not find
the answer to my problem. The following test file

---------------------------------------
verbatimtex
\documentclass[11pt]{article}
\begin{document}
etex

outputformat := "png";
outputtemplate := "%j-%c.%o";

beginfig(1);
label(btex $(hs,f(s)t)$ etex, (0,0));
label(btex abracadabra etex, (0,-20));
endfig;

verbatimtex
\end{document}
etex
end
---------------------------------------

produces the expected result, though it spews out 20 warnings like

     Warning: invalid entry for `pkol0': unknown name `store' ignored

(Is it LaTeX, when consulted by MetaPost, that produces these warnings?  Why?)
Trying to write {\large abracadabra} in the second label, the text is rendered
truncated, as "abracadab".  When I change 11pt document to 10pt or 12pt document,
only the initial parenthesis survives, the rest is rendered as blank space.

So far I have not encountered any problems with the PNG output of the graphics proper
(line drawings etc).

I need PNG graphics (with text labels) to publish figures in Mathematics StackExchange
and mathoverflow.  The use of SVG graphics is discouraged there because browsers as yet
only partially support SVG graphic format.

Regards, France Dacar



-- 
Dr. France Dacar                      Email: france.dacar at ijs.si
Jozef Stefan Institute                Phone: +386 1 477 3813
Jamova 39, 1000 Ljubljana, Slovenia


More information about the metapost mailing list