2

I am making a work and need some graphs from Open Office. I have read that you can import them with \includegraphics{image.format}

The question is: Any of the exporting formats is better for the resolution of the graphs?

One extra question: Is there any tool to convert graphs' data tables into latex format?

  • The Latex command is \includegraphics, not \includegraphic. The best way to export from OpenOffice depends on what format the graphs are in now. How did you get these graphs into OpenOffice in the first place? Were they imported as bitmaps, or did you create them as charts with Calc or something similar? In the latter case, exporting to PDF would be the most straightforward. That would also work with bitmaps, but in that case, it may be best to simply retrieve the bitmaps from an unzipped version of the document. – Michael Palmer Aug 25 '17 at 18:37
  • 2
    @MichaelPalmer From a previous question by the user I assume the graphs were generated within openoffice. – samcarter_is_at_topanswers.xyz Aug 25 '17 at 18:44
  • @MichaelPalmer they were generated in openoffice Calc! –  Aug 26 '17 at 02:03

2 Answers2

5

Libre/Open Office has a pdf export option. This is good for use with pdflatex, but the export looks rather like a printout (complete with page numbering) even if just the graph is selected. Thus it will need postprocessing.

It's easy to crop the pdf using inkscape (also free/opensource, and a very useful tool to have). With inkscape installed you have another option tool: svg export and the svg package.

Alternatively you can crop the pdf using the \includegraphics[trim] command -- if you have a few graphs you can use the same settings for all of them, both for export and for includegraphics so you only have to figure it out once.

Chris H
  • 8,705
4

If you don't want to deal with a suitable resolution, I suggest using a vector graphic format to export your graphs.

I don't use open office, but in its sibling, LibreOffice, the following export options are available:

enter image description here

While I don't know all of these formats, I can say that eps and svg are vector based. Please see the following two questions about how to use these formats in latex:

How to include SVG diagrams in LaTeX?

eps figures with pdflatex

(and whatever you decide to use, don't use jpeg for graphs)