[pdftex] square root in metapost

margarida margarid at ime.unicamp.br
Fri Feb 23 18:53:01 CET 2001


I am having trouble including the square root symbol in a
metapost picture. If I process the picture in metapost  by
itself, everything works fine. The troble arises when trying
to use pdflatex to process the metapost commands directly as
in the error.tex file below

\input supp-pdf.tex
\immediate \openout\mpfile = \jobname.mp
\immediate \write \mpfile {
label.lft (btex $\displaystyle \frac{a-b}{2}$ etex, (1cm,0));

label.top (btex $\sqrt{ab}$ etex, (3cm,0));
\immediate \closeout \mpfile
\immediate \write 18 {mpost \jobname.mp} % call metapost on




The log says

This is pdfTeX, Version 3.14159-14f-released-20000525
(CMacTeX) (format=pdflatex 2001.2.23)  23 FEB 2001 18:32
**&pdflatex error.tex

LaTeX2e <2000/06/01>
Babel <v3.6Z> and hyphenation patterns for american, french,
german, portuges,
nohyphenation, loaded.
----- snip, snip (nonrelevant material, I think) -----
loading : Context Support Macros / Missing
----- snip, snip -----
loading : Context Support Macros / PDF
----- snip, snip -----
! Use of \@sqrt doesn't match its definition.
\IfFileExists #1#2#3->\openin \@inputcheck #1
\@inputcheck \ifx \inpu...
l.12 end;}

? x

Without the square root text the file runs OK.  Any help is



 Margarida P. Mello              Dept. of Applied Math.
 Tel.: +55 19 3289-4547 (home)     IMECC - Unicamp
       +55 19 3788-5966 (work)
 Fax:  +55 19 3289-1466
 e-mail: margarid at ime.unicamp.br

More information about the pdftex mailing list