1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
# $Id$
$VERSION{''.__FILE__} = '$Revision$';
#
# >>Title:: SDF Special Phrases Library
#
# >>Copyright::
# Copyright (c) 1992-1996, Ian Clatworthy (ianc@mincom.com).
# You may distribute under the terms specified in the LICENSE file.
#
# >>History::
# -----------------------------------------------------------------------
# Date Who Change
# 29-Feb-96 ianc SDF 2.000
# -----------------------------------------------------------------------
#
# >>Purpose::
# This library provides the built-in special phrases
# (implemented in [[Perl]]) for [[SDF]] files.
#
# >>Description::
#
# Switch to the user package
package SDF_USER;
##### General Special Tags #####
# CHAR - insert a character
sub CHAR_Special {
local(*style, *text, *attr) = @_;
# local();
# Set the style name
$style = '__char';
}
# INLINE - inline text
sub INLINE_Special {
local(*style, *text, *attr) = @_;
# local();
# Set the style name
$style = '__inline';
}
# IMPORT - insert a figure
sub IMPORT_Special {
local(*style, *text, *attr) = @_;
# local();
# Process the filename and attributes
&ProcessImageAttrs(*text, *attr);
# Set the style name
$style = '__import';
}
# PAGENUM - insert the current page number (into a header/footer)
sub PAGENUM_Special {
local(*style, *text, *attr) = @_;
# local();
# Set the style name
$style = '__pagenum';
}
# PAGECOUNT - insert the highest page number (into a header/footer)
sub PAGECOUNT_Special {
local(*style, *text, *attr) = @_;
# local();
# Set the style name
$style = '__pagecount';
}
# PARATEXT - insert paragraph text (into a header/footer)
sub PARATEXT_Special {
local(*style, *text, *attr) = @_;
# local();
# Set the style name
$style = '__paratext';
}
# PARANUM - insert paragraph number (into a header/footer)
sub PARANUM_Special {
local(*style, *text, *attr) = @_;
# local();
# Set the style name
$style = '__paranum';
}
# PARANUMONLY - insert paragraph number only (into a header/footer)
sub PARANUMONLY_Special {
local(*style, *text, *attr) = @_;
# local();
# Set the style name
$style = '__paranumonly';
}
# PARASHORT - insert paragraph short text (into a header/footer)
sub PARASHORT_Special {
local(*style, *text, *attr) = @_;
# local();
# Set the style name
$style = '__parashort';
}
# PARALAST - insert paragraph text last found on page (into a header/footer)
sub PARALAST_Special {
local(*style, *text, *attr) = @_;
# local();
# Set the style name
$style = '__paralast';
}
# package return value
1;
|