3.11 Skribe User Manual -- Image

Images are defined by the means of the image function

(image :file [:ident] [:class] [:url] [:width] [:height] [:zoom] comment)
identhtml latex xml The node identifier.
classhtml latex xml The node class.
filehtml latex The file where the image is stored on the disk (see image path). The image is converted (see convert-image) into a format supported by the engine. This option is exclusive with the url option.
urlhtml latex The URL of the file. This option is exclusive with the file option.
widthhtml latex The width of the image. It may be an integer for a pixel size or a floating point number for a percentage.
heighthtml latex The height of the image. It may be an integer for a pixel size or a floating point number for a percentage.
zoomlatex A zoom factor.
commentA text describing the image.
See also
skribe-image-path convert-image
(image :file "linux.gif" "A first image")
(image :height 50 :file "linux.gif" "A smaller one")
(image :file "bsd.gif" "A second image")
(image :width 50 :file "bsd.gif")
(image :width 200 :height 40 :file "bsd.gif")
Ex. 15: The image markup


A first imageA smaller oneA second image

3.11.1 Image formats

Images are unfortunately unportable. The various Skribe output formats support different image formats. For instance, HTML supports gif and jpeg while the LaTeX back-end only supports ps. Skribe tries, only when needed, to automatically convert images to a format supported by the target to be produced. For this, it uses external tools. The default Skribe translation scheme is:

  • Do not translate an image that needs no conversion.
  • Uses the fig2dev external tool to translate Xfig images.
  • Uses the convert external tools to translate all other formats.

Engines support different image formats. Each engine may specify a converter to be applied to an image. The engine custom image-format specifies the list of supported image formats. This list is composed of a suffix such as jpeg or gif.

The function convert-image tries to convert an image according to a list of formats. All the specified formats are successively tried. On the first success, the function convert-image returns the name of the new converted image. On failure, it returns #f.

(convert-image file formats)
fileThe image file to be converted. The file is searched in the skribe-image-pathimage path.
formatsA list of formats into which images are converted to.
See also

This Html page has been produced by Skribe.
Last update Tue Jun 29 09:37:13 2010.