Contents Up << >>

### image:2

This is translated to a PSBOX macro package `\psboxto` command in LaTeX, the first argument being a sizing command and the second a filename.

In HTML mode, the second argument is used to generate a PostScript file reference.

In RTF mode, the second argument is tried with first a BMP extension and then a WMF extension to find a suitable Windows bitmap file, placeable metafile, or segmented hypergraphics file (.SHG). If a suitable file is found, in Windows Help mode a `bmc` command is inserted into the RTF file with a reference to the file. In linear RTF mode, the bitmap or metafile is converted into hex and inserted into the RTF document.

Note that only RGB-encoded Windows bitmaps, or placeable metafiles, are valid for input to Tex2RTF. You can convert a RLE (run length encoded) bitmap file into a (bigger) RGB file using a program such as Paintshop Pro. A placeable metafile has a special header with dimension information. One may be constructed by a wxWidgets program by calling the function wxMakeMetafilePlaceable. The Microsoft Windows SDK has a sample program that loads and steps through placeable and ordinary metafiles.

Another wrinkle is that programs differ in the methods they use to recognise pictures in RTF files. You may need to use the bitmapMethod setting, which can be "hex'' (embed the hex data in the file with a `\dibitmap` keyword), "includepicture'' (use the MS Word 6.0 INCLUDEPICTURE field) or "import'' (an earlier name for INCLUDEPICTURE).

Here is an example of using the `\image` command.

        \begin{figure}
        $$\image{5cm;0cm}{heart.ps}$$

        \caption{My picture}\label{piccy}
        \end{figure}

The dollars centre the image in the horizontal plane. The syntax of the first argument to `\image` is taken from syntax used by the `\psbox` package: it allows specification of the horizontal and vertical dimensions of the image. Scaling will take place for PostScript and metafile images. A value of zero indicates that the image should be scaled in proportion to the non-zero dimension. Zeros for both dimensions will leave the image unscaled in the case of metafiles, or scaled to fit the page in the case of PostScript.

See also `\imagel`, `\imager` for aligned images in HTML.