Template for Interleaf
This section describes a template with formatting commands for Interleaf. The final formatted output is the same as for the templates explained in the previous section.
TEMPLATE example;
-- Initiation Section
PARAMETER
STRING act_name; -- the activity for which the
-- report is written.
VARIABLE
ACTIVITY act_id; -- id of ’act_name’.
INTEGER st; -- return status code.
BEGIN
act_id := stm_r_ac(act_name, st);
END;
SEGMENT seg1;
BEGIN
INCLUDE (’interleaf_glob’);
INCLUDE (’my_glob’);
WRITE (’\n<doc_title>’);
WRITE (’\nDescription of ’,act_name);
WRITE (’\n<sect>’);
WRITE (’\n<Autonum, List8, 1, first-Yes><TAB>Overview’);
INCLUDE (’sys_overview’); -- ’sys_overview’ is an
-- include file in which
-- text with formatting
-- commands is written.
END;
VARIABLE
LIST OF ACTIVITY ac_list;
BEGIN
/@
<my_new_page>
<sect>
<Autonum, List8, 1><TAB>System Activities
<subsect>
<Autonum, List8, 2><TAB>Activity-chart
This is the chart that describes the activities of the system:
@/
title:= ’Plot of ’ + act_name;
-- plot of activity-chart.
stm_plt (act_id, ’ ’, 6.5, 9.0, ’F’, ’F’, true, 999,
’interleaf’, stm_plt_top, title, acty);
/@
<my_new_page>
<subsect>
<Autonum, List8, 2><TAB>Activities Description
Detailed description of each activity in the chart:
@/
ac_list := stm_r_ac_physical_sub_of_ac ({act_id}, st);
-- property report
stm_rpt_dictionary (ac_list, true, true,’’);
END;