4.1. Overview
4.1.1. Features
SDF supports a range of features related to figures:
- figures can be imported in a variety of formats including:
- EPS - Encapsulated PostScript
- WMF - Windows MetaFile
- MIF - Maker Interchange Format
- GIF - Graphics Interchange Format
- JPEG - JPEG File Interchange Format
- PNG - Portable Network Graphic Format
- BMP - Windows Bitmap Format
- logos can be easily added to title pages and online headers
- figure positioning can be controlled
- text can be wrapped around figures.
4.1.2. Importing Figures Into SDF Documents
The import macro is usually used to import a figure. The syntax is:
!import "filename" [; parameters]
For example:
!import "sdfarch"
4.1.3. Importing a Figure Into Paragraph Text
To import a figure into the middle of a paragraph, the IMPORT phrase style is used. The syntax is:
{{IMPORT:filename}}, or {{IMPORT[parameters]filename}}
For example:
Please visit our {{IMPORT:new}} web site!
4.1.4. Figure Extensions
It is generally best not to specify an extension for the filename containing the figure, as SDF will then use the best format it can find. The search rules are:
When generating | The search order is |
PostScript | epsi, eps, wmf, mif, gif |
HTML | jpeg, jpg, png, gif |
Windows Help | bmp |
So a GIF file is all that is necessary if you are generating PostScript and HTML. However, if SDF finds an EPS file when it is generating PostScript, it will use that instead.
4.1.5. Adding Logos
The default implementations of the build_title macro, title filter and HTML header macros provide an easy way to add a company logo: by defining variables. The variables are:
Variable | Description |
DOC_LOGO | the default logo |
DOC_TITLE_LOGO | used in the title of a PostScript document |
DOC_ADMIN_LOGO | used in the title of a PostScript admin. document |
DOC_HTML_LOGO | used in the title of a HTML document |
DOC_TOPIC_LOGO | used in the header of a HTML topic |
DOC_MANUAL_LOGO | used on the front cover of a PostScript manual |
DOC_COMPONENT_LOGO | used on the cover of each chapter in a PostScript manual |
In each case, the value of the variable is the filename containing the figure.
If a given logo variable is not set, DOC_LOGO is used if it is set. Therefore, a company logo can be added to most SDF documents by simply defining DOC_LOGO is a configuration module (or library) which is loaded into every SDF document via the use (or inherit) macro.