Node: Image Syntax, Next: , Up: Images



Image Syntax

Here is the basic synopsis of the @image command:

     @image{filename [,width] [,height] [,alttext] [,extension]}
     

The filename argument is mandatory, and must not have an extension, because the different processors support different formats:

The width and height arguments are described in the next section.

When producing html, makeinfo sets the alt attribute for inline images to the optional fourth argument to @image, if supplied. If not supplied, makeinfo uses the full file name of the image being displayed.

If you do not supply the optional fifth argument, makeinfo first tries filename.png; if that does not exist, it tries filename.jpg. If that does not exist either, it complains. (We cannot support GIF format directly due to software patents.)

In Info output, makeinfo writes a reference to the binary image file (with the .extension, .png, or .jpg suffix) if it exists. It also physically includes the .txt file if that exists. This way, Info readers which can display images (such as the Emacs Info browser) can do so, whereas Info readers which can only use text (such as the standalone Info reader) can display the textual version.

The implementation of this is to put the following construct into the Info output:

     ^^H[image src="binaryfile" text="txtfile"
                alt="alttext ... ^^H]
     

(If one of the files is not present, the corresponding argument is omitted.)

The reason for mentioning this here is that older Info browsers (this feature was introduced in Texinfo version 4.6) will display the above literally, which, although not ideal, should not be harmful.