OpenOffice can be a very useful tool for generating figures.
Unfortunately, it can be a bit tricky to use in conjunction with
Latex. It is possible to export a file to postscript with the
File->Export command (selecting EPS as the output type).
Unfortunately, the resulting file does not have a valid bounding box.
It is also possible to print a single page to a file, which will be in
PostScript format as well, but still without the bounding box.
I have a solution to this problem which is just slightly tricky.
First, you define a new printer which calls a custom PostScript
converter. The convert uses standard tools to add the bounding box.
Unfortunately, those tools leave behind a huge bitmap. The converter
then calls another script which strips off the bitmap, leaving behind
a pristine EPS file.
Step-by-Step Instructions
- add the script epsfile to your path.
- add the script strip.preview to your path.
- open the OpenOffice Printer Setup tool (part of the OpenOffice
installation, command is 'oopadmin').
- select 'New Printer...'
- choose 'Connect a PDF converter'
- select 'Generic Printer'
- enter the command 'epsfile "(OUTFILE)"'
- give the converter an appropriate name
Now, when you want to create the PostScript output, select "print" and
set the printer to the name of the printer you have created above.
The output file will now have an appropriate bounding box and will not
have the preview bitmap.