7.2 Images
A straightforward way to include an image is demonstrated here:
Figure 1 is generated using the command sequence in exImage.tex.
Here figure.eps (see Line 3 of exImage.tex) is the name of the PostScript file. In
Line 3 one can also set the scaling factor (here 0.8, which means scaling to 80% of the original
size).
The option [h] in Line 2 instructs LATEX to position the figure right at the place where the figure
environment stands in the source with reference to the surrounding text paragraphs. Other options are [t]
or [b] which position the figure at the top or bottom of the page, resp.
Please add a caption to every figure. Labels for referencing the figure are also obligatory.
Recently, we added support for the graphics package. This allows you to insert a figure using the
well-known ∖includegraphics command. You need to insert the ∖usepackage{graphicx} after the
∖usepackage{epubtk}.
Figure 3 is generated using the command sequence in exImage2.tex.
Note that
you should not provide a suffix for the figure in the \includegraphhics command. You need
to provide proper versions of the graphics, i.e. a rasterized version as the first parameter of
epubtkImage and a pdf, png or jpg for inclusion in the pdf. Furthermore, it is possible to build a
figure out of several independant subfigures without first combining them to a single figure:
The source code for this example is available in exImage3.tex: