< Lists | Links > |
Instructional texts often need support by some graphics, pictures, or screenshots. STML supports two types of images in the texts: Stand-alone images and inline images. Both types have to be physically bitmap files of PNG, JPG, or GIF format.
Stand-alone images are always rendered as own entities between paragraphs. They have a name, a sequence number, and a label which can be used to reference them. Stand-alone images are defined by the one-line command “:image”:
See how to open a file in the screenshot below:
:image shots/open.png|Dialog to open files|fileopen
It's pretty easy.
See how to open a file in the screenshot below:
Dialog to open files
It's pretty easy.
As you see, the three parameters of the image command are separated by the vertical straight line, “|”. This allows the parameters themselves to contain spaces. The picture filename is relative to the file's position within the image library of the document's project.
Within lists, the “:image” command does potentially close all open lists and continues on the base document indentation level. If this is unwanted behaviour, leave out the blank line before the picture. In the same way, a paragraph after the picture is assumed to be a continuation paragraph of the current list item if no blank line follows the image clause.
Wonders of the nature:
- Mushrooms: Half plant, half animal.
- Sharks: Fierce creatures living in the High Seas.
:image animal/sharks.jpg|Some sharks|shark
Sharks eat other animals and humans.
- Ants: Can carry more than six times their own weight at once.
The output of the above example is exactly similar to the following one:
Wonders of the nature:
- Mushrooms: Half plant, half animal.
- Sharks: Fierce creatures living in the High Seas.
:image animal/sharks.jpg|Some sharks|shark
-. Sharks eat other animals and humans.
- Ants: Can carry more than six times their own weight at once.
Wonders of the nature:
Mushrooms: Half plant, half animal.
Sharks: Fierce creatures living in the High Seas.
Some sharks
Sharks eat other animals and humans.
Ants: Can carry more than six times their own weight at once.
If you had, however, inserted a blank line before the “:image” definition, the list would have been closed and a new one opened at the next list item. In case of an ordered list, numbers would start with “1” again in the output.
Inline images are written directly in the text using a scheme similar to bold or italic text. The indicator for an inline image is a double hash, “##”. Inline images do have up to two parameters: the filename and an alternative text. The parameters are separated by the already introduced vertical line, “|”. The alternative text is normally shown only if the viewer does not support showing images. Note that it cannot contain any STML markup.
If you have finished adjusting the parameters, press ##buttons/ok.png|the “OK” button##. Your changes will be saved.
If you have finished adjusting the parameters, press . Your changes will be saved.
< Lists | Links > |