Images

You can add images to books. There are two types, block level images and inline images.

Block level images

Block level images take up an entire line and cannot be mixed in with text. A good example would be a map that covers half a page or a full page.

How it works

Add the $IMG tag before the address of the images, much like a website.

$IMG {{/path/to/image.png}}

The address is the path to the image relative to the book file itself. If you stick to the recommendations (see below) this is simple to work out.

You can add an optional caption to block level images which will be visible to the reader.

$IMG {{/path/to/image.png $CAP Caption text goes here.}}
Note: block level images are centered on the page automatically.

Inline images

Inline images are slotted into a line of text and do not sit on their own line. A good example might be the inclusion of an emoticon within a line of text.

They work in the same way as block level images.

These images can be added into a line of text $IMG {{/path/to/image.png}}.

Adding alternative text

You can add the optional $ALT tag to describe the image to those using assistive technology such as the blind. Just tag it on at the end.

$IMG {{/path/to/image.png $ALT Alternative text here}}

Recommendations

Images are placed inside an images folder for convenience, although this is not necessary. They can be used wherever an image is needed. For example, a publisher may wish to add their logo to the title page.

// Title page
$T The Lost World
$A Arthur Conan Doyle
$IMG {{/images/publisher-logo.png}}
$P John Murray Publishers, London, England
$B

Leave a Reply

Your email address will not be published. Required fields are marked *