Changes

Jump to navigation Jump to search
1,997 bytes added ,  17:28, 8 June 2020
m
no edit summary
< Some lucky people will be able to produce all their documents in [[GraphicsMetaPost]]and ConTeXt and never have to worry about the ugly world of MS Word, PowerPoint and Visio. Unfortunately, most of us will, at some point, have to share our graphics with colleagues who are unenlightened. This page includes methods of sharing graphics/figures with co-workers who do not use ConTeXt.This includes importing to and exporting from ConTeXt.
= Sharing graphics =
This page includes methods of sharing graphics= Exporting MetaPost drawings as PDF files =PDF can be generated from MetaPost code using [http://www.pragma-ade.com/general/sources/figures with comptopdf.pdf MPtoPDF] or <code>texexec -workers who (probably) do not use -mptex</code>. But where a drawing uses ConTeXt.This includes importing to and exporting from ConTeXtgenerate formatted text or labels, it is necessary to generate a document which contains the graphic.
== Exporting MetaPost drawings as PDF files ==Sometimes one wants to create a PDF file from a [[MetaPost]]/[[MetaFun]] drawingThis can be achieved, with the pageclipped cropped to the size of the drawing. This can be achieved graphic, using the following construct:
<texcode>
\stoptext
</texcode>
 
See also {{cmd|startMPpage}}.
 
= Importing MetaPost drawings into MS Word or PowerPoint =
MS Word can import pictures in many graphics formats, but not PDF. Two of the available options are:
* Use encapsulated postscript (EPS). This provides graphics which print perfectly (on a PS printer) but which look blocky on screen, so are unsuitable for PowerPoint presentations.
* Use scalable vector graphics (SVG) as an intermediate format between PDF and the MS Visio tool.
 
== Converting to EPS ==
MetaPost drawings can be converted to encapsulated postscript as follows:
* Create a PDF drawing (see "Exporting MetaPost drawing as PDF files" above).
* From the command line, convert to EPS using pdftops:
<code>
pdftops -eps -pagecrop myfile.pdf
</code>
* Import the EPS file as a picture into Word.
Note that the preview on-screen in Word is of poor quality, but when printed it should have the full quality of the original.
 
==Converting to Visio via SVG ==
Visio is another Microsoft product whose .VSD files can be imported directly into Word or PowerPoint, giving good reproduction on screen and (usually) in print. Luckily, Visio will import SVG files. The steps to achieve this are:
* Create a SVG file directly by running metapost 1.2 with <tt>-soutputformat="svg"</tt>
or
* Create an SVG file by conversion via
** MP to PDF (see above).
** [http://www.tlhiv.org/MetaPost/tools/mptosvg MPtoSVG] to convert to SVG.
* Load SVG into Visio.
* Save as VSD file from Visio.
* Import VSD into Word or PowerPoint.
Phew!
[[Category:Graphics]]
[[Category:Metapost]]
[[Category:Sciences]]

Navigation menu