Edit Links |
Windows /
MetafileToEPSConverter
<< | Page list | >>
Metafile to EPS ConverterLast update: version 1.5 (November 9, 2008). Supports Windows 2000/XP/Vista/Linux+Wine. 64-bit Windows is now also supported. Using the metafile to EPS Converter, LyX can automatically convert graphics from the Windows metafile format (EMF or WMF) to Encapsulated Postscript (EPS). EPS graphics can be included directly in Postscript files and can easily be converted to PDF graphics (LyX will do this automatically). WindowsThe Metafile to EPS Converter is included in the official Windows installer of LyX 1.5.5 and later and is automatically used by LyX. It is also available as a stand-alone application.
LinuxOn Linux, this tool can be run under Wine and will use the built-in metafile support of Wine (tested with version 0.9.53). While it is a bit more difficult to setup than the standard wmf2eps converter, the results will be better and EMF files are also supported.
A virtual printer needs to be installed that does the actual conversion. Using CUPS as printer spooler, this is the installation procedure: (There will be some differences if you are using other printer spoolers, or it might not work at all.)
<Printer Metafile to EPS Converter> Metafile to EPS Converter Location Here DeviceURI file:/dev/null Accepting Yes Shared Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy stop-printer </Printer> Again, do not change the name 'Metafile to EPS Converter'.
#! /bin/sh wine /home/<userid>/.wine/drive_c/Program\ Files/metafile2eps/metafile2eps.exe "$@" { the above script didn't work. Try this one which takes care of absolute and relative file paths between *nix and wine and works both for inline preview and output }
#!/bin/bash emf2eps="C:\\\\Program Files\\\\metafile2eps\\\\metafile2eps.exe" emf=$( echo Z:$([[ "${1:0:1}" != "/" ]] && echo $PWD/ )$1 | sed 's:/:\\\\:g' ) eps=$( echo Z:$([[ "${2:0:1}" != "/" ]] && echo $PWD/ )$2 | sed 's:/:\\\\:g' ) echo "$emf2eps" "$emf" "$eps" wine "$emf2eps" "$emf" "$eps" 2>/dev/null Don't forget to make it executable.
\converter "ps" "png" "convert PS:$$i PNG:$$o" "" Finally, start LyX and click Tools > Reconfigure. Note: You may have to restart cups with: $ sudo killall -HUP cupsd The installation is now completed. Source codeSource code (GPL license): metafile2eps-source.zip |