[metapost] verbatimtex bug?

Dan Luecking luecking at uark.edu
Thu Oct 29 04:32:05 CET 2009


The following test file fails:

% test.mp
verbatimtex
  \font\viiipt=cmr8
etex;
verbatimtex
   \bgroup\egroup
etex;
beginfig(1);
label(btex \viiipt X etex,(0,0);
endfig;
end % end of test.mp

The screen error message is:

This is MetaPost, version 1.208 (kpathsea version 5.0.0)
(./test.mpkpathsea: Invalid fontname `cmr8{}', contains '{'
fatal: Command failed: etex --parse-first-line 
--interaction=nonstopmode mpa00536.tex; see mpxer
r.log
 >> test.mp
 >> test.mpx
! Unable to make mpx file.
l.9 label(btex
                \viiipt X etex,(0,0);
Transcript written on test.log.

I am using TeX Live 2009 but I get the same result in TeX Live 2008
(mpost version 1.005).

The error seems to come from the following output of mpto -tex. Note the
"%" right after cmr8, which causes TeX to continue reading the tfm name
until line 3, and thinks the font name is "cmr8{}":

\font\viiipt=cmr8%
% line 5 test.mp
\bgroup\egroup%
\gdef\mpxshipout{\shipout\hbox\bgroup
   \setbox0=\hbox\bgroup}
\gdef\stopmpxshipout{\egroup  \dimen0=\ht0 \advance\dimen0\dp0
   \dimen1=\ht0 \dimen2=\dp0
   \setbox0=\hbox\bgroup
     \box0
     \ifnum\dimen0>0 \vrule width1sp height\dimen1 depth\dimen2
     \else \vrule width1sp height1sp depth0sp\relax
     \fi\egroup
   \ht0=0pt \dp0=0pt \box0 \egroup}
\mpxshipout% line 9 test.mp
\viiipt X%
\stopmpxshipout
\end{document}

It seems to me that verbatimtex ought to be verbatim and line
ends ought not be commented out.

Note: I had to use TeX Live 2008's mpto.exe. It would certainly
help with debugging if the facilities of mpto were available with
the current metapost.

Dan

Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
Fayetteville, AR 72701 



More information about the metapost mailing list