Re: Using MetaPost output in pdflatex...



Unfortunately, MetaPost croaks on all but the most trivial of files
exported
from Dia.

If I create a diagram with a single simple rectangle, everything works
great.

If I throw in a UML class and a line connecting it to the rectangle,
metapost starts complaining about the LaTeX-ish tags in the *.mp file.

! Misplaced alignment tab character &.
1.1 &
     latex
?

And

! Undefined control sequence.
1.2 \documentclass
                  {minimal}
?

If I throw a "% " in front of them, it gets past those complaints, but
then
complains like this...

! Undefined control sequence.
1.16 {\usefont
              {OT1}{phv}{b}{n} Class}\stopmpxshipout
?

Is anyone using dia and pdflatex to create and use nontrivial metapost
files?  What is the best way to do this?

I'm running Win2K with MiKTeX.  Everything is up to date.

I was running Dia 0.94 on Windows, but that crashed a lot, and had lots of
issues.  (I can provide reports if they're needed, but these problems
aren't
exactly hiding.).  So, I spent a day and a half installing coLinux (I've
been meaning to do that), and am now running Dia 0.94 in Linux, without
all
the problems I was having on Windows.

The above problems happen whether the file was exported from Dia Windows
or
Dia Linux.

Thanks in advance,

               Rob

I searched the Dia archives and found another person with the same problems
with Dia 0.94 back in October 2004.  Nobody replied then, so if you're
listening, I've found the solutions...

1) The MetaPost command line should be 'mpost' instead of 'mp'.  This makes
the \usefont error go away.
2) Put the -tex=latex parameter on the command line.  That makes the &latex
and \documentclass type errors go away.

I hope this helps some people.

With the above command line for MetaPost, and my inclusion idiom, it is very
easy to get Dia diagrams into LaTeX.

I still have a problem with the font size being _very_ wrong, but I'll work
on that.  Also, I'd like it to use the default LaTeX font instead of
something specific specified by Dia.  Any ideas?

Thanks,

           Rob




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]