Re: Metapost - text alignment



On Mon, 2007-01-29 at 08:41 -0800, Rob McDonald wrote:
On 1/29/07, Lars Clausen <lars raeder dk> wrote:
Thanks, I'll give it a try.  Do you have a quick-and-dirty way to see if
metapost output is correct (e.g. convert MP files directly to PNG or
something)?  I'm not a metaposter myself.

Here is a fairly minimal LaTeX file to include MP figures.  First, run
LaTeX or PdfLaTeX on the test.tex file (with Diagram.mp in the same
directory).  This will create test.mp with all the metapost diagrams
from the file in one place.  Then, run 'mpost -tex=latex test.mp' to
do the MetaPost magic.  This will create 'text.1' which is a
postscript file with some extra goodies.  Finally, re-run LaTeX (or
PdfLaTeX) to create your final output.

There will be an error complaining about the end of the MP file.
Using the above stuff, I can work with a LaTeX document with lots of
MP figures, and they are all updated and compiled on the fly.  The
'\empfile' starts a bulk *.mp file, but I haven't found any way to end
it.  As far as I can tell, this error is totally harmless.

Let me know if you have any questions,

I do:  Why does it do this:

This is MetaPost, Version 0.641 (Web2C 7.5.4)
(test.mp (Diagram1.mp [1]
! A group begun on line 6 never ended.
<to be read again>
                   end
l.344 end
         ;
?

I installed the emp package, then ran 

  latex test.tex && mpost -tex=latex test.mp && latex test.tex

with the UML-demo diagram exported to Diagram1.mp.  Curiously, line 6 is
an empty line.

-Lars




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