SDF 2.001: SDF Reference: use Macro

Contents | Parent Topic | Previous Topic | Next Topic
Home | Catalog

# 6. Macros

## 6.1. Overview

The macros available are summarised below.

Name | Purpose
General: |
build_title | build a title page
block | begin a block of text
endblock | end a block of text
include | include another file
execute | include output from a command
Variables: |
init | initialise variables (before loading configuration files)
define | set a variable
default | set a variable (if not already set)
undef | clear a variable
export | export a variable to the format driver (and/or mark it for later exporting)
restrict | declare a restricted family of variables
Figures: |
import | import an external object (e.g. figure)
clear | reset text wrapping around a figure
Libraries: |
inherit | inherit entities from a library
use | load a library module
Macros: |
macro | begin a macro definition
endmacro | end a macro definition
insert | call a macro
Classes: |
class | define a class of objects
catalog | build a catalog from objects already loaded
Conditional text: |
if | begin conditional text
elsif | begin a conditional section
else | begin alternative section
endif | end conditional text
elseif | same as elsif
Event processing: |
on | specify processing for an event
off | disable processing previously specified
File processing: |
output | dynamically change the output file used
script | execute a line of Perl
message | output a message during execution
line | change message parameters
slide_down | decrease heading levels (e.g. H2 -> H3)
slide_up | increase heading levels (e.g. H2 -> H1)
Extraction: |
getdoc | extract documentation embedded in source code
getcode | extract source code (i.e. non-documentation) from a file
getcli | extract command-line interface information
perlapi | extract API information from a Perl library
Miscellaneous: |
jumps | generates lines of jumps
subsections | specify the subsections for a topic
continued | continue a heading from a previous page
end_topic | mark the end of a topic

Further details on these are provided below.

block Macro

build_title Macro

catalog Macro

class Macro

clear Macro

continued Macro

default Macro

define Macro

else Macro

elseif Macro

elsif Macro

end_topic Macro

endblock Macro

endif Macro

endmacro Macro

execute Macro

export Macro

getcli Macro

getcode Macro

getdoc Macro

if Macro

import Macro

include Macro

inherit Macro

init Macro

insert Macro

jumps Macro

line Macro

macro Macro

message Macro

off Macro

on Macro

output Macro

perlapi Macro

restrict Macro

script Macro

slide_down Macro

slide_up Macro

subsections Macro

undef Macro

use Macro