manpagez: man pages & more
info texinfo
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.2.1 Image Syntax

Here is the 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.

For TeX output, if an image is the only thing in a paragraph it will ordinarily be displayed on a line by itself, respecting the current environment indentation, but without the normal paragraph indentation. If you want it centered, use @center (see section @titlefont @center @sp).

For HTML output, makeinfo sets the alt attribute for inline images to the optional alttext (fourth) argument to @image, if supplied. If not supplied, makeinfo uses the full file name of the image being displayed. The alttext is taken as Texinfo text, so special characters such as ‘"’ and ‘<’ and ‘&’ are escaped in the HTML and XML output; also, you can get an empty alt string with @- (a command that produces no output; see section @- and @hyphenation: Helping TeX Hyphenate).

For Info output, the alt string is also processed as Texinfo text and output. In this case, ‘\’ is escaped as ‘\\’ and ‘"’ as ‘\"’; no other escapes are done.

If you do not supply the optional extension (fifth) argument, makeinfo first tries ‘filename.png’; if that does not exist, it tries ‘filename.jpg’. If that does not exist either, it complains.

In Info output, makeinfo writes a reference to the binary image file (trying filename suffixed with ‘extension’, ‘.extension’, ‘.png’, or ‘.jpg’, in that order) if one exists. It also literally includes the ‘.txt’ file if one exists. This way, Info readers which can display images (such as the Emacs Info browser, running under X) 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]

where ‘^@’ and ‘^H’ stand for the actual null and backspace control characters. 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 pretty, should not be harmful.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2025
Individual documents may contain additional copyright information.