7.2 Images

A straightforward way to include an image is demonstrated here:
View Image

Figure 1: Distribution of the quantities ϕ, u and γ on the numerical grid.
Figure 1View Image is generated using the command sequence in exImage.tex.
exImage.tex
View File Download File
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}.1

View Image

Figure 2: A figure included using includegraphics.
Figure 3View Image is generated using the command sequence in exImage2.tex.
exImage2.tex
View File Download File
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:
View Image

Figure 3: A figure composed from several subfigures.
The source code for this example is available in exImage3.tex:
exImage3.tex
View File Download File

  Go to previous page Go up Go to next page