Sunday, March 07, 2010

graph work flow in latex document preparation under linux

Graphs make document illustrative.

Eps or pdf can be used in latex document preparation. But not both. Eps is great at vector graph and so is pdf while pdf can handle nature image as well but not for eps. So the choice is to use pdf as the output format for our document.

Use
\usepackage[pdftex]{graphicx}
in the latex header part, and in the body part, use
\includegraphics[width=2in]{graphname}
graphname is the file name for the graph without the tail .pdf.

There are two source of graph. One is computer generated, the other is natural image.
For compute generated, we take diagram as example.

1. Open Dia to draw the diagram.
2. Save as .dia so we can modify the diagram later.
3. Save as .eps so we still know the boundary.
4. use convert to convert eps to pdf.
5. Open the .pdf file in Inkscape. In page setup, use fit size to selected option after select the content box.
6. Save the output .pdf from Inkscape.

For the natural image
1. Use convert command to convert other format to pdf.
2. Use Inkscape again to trim the pdf to proper size.

No comments: