aboutsummaryrefslogtreecommitdiff
path: root/doc/Config
blob: 104c9f6054ce2917191a6f8654188490af312193 (plain)
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
# Texi2html configuration for GNU Pies documentation. -*- perl -*-
# Copyright (C) 2009, 2010 Sergey Poznyakoff
#
# GNU Pies is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Pies is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Pies.  If not, see <http://www.gnu.org/licenses/>.

$top_html_dir="/software/pies";
$graphics_dir="$top_html_dir/graphics";

## texi2html configuration

# Show TOC in place of the @contents directive.
$INLINE_CONTENTS = 1;
# Do not show Texinfo menus.
$SHOW_MENU = 0;
# Inhibit output of CSS lines in page headers.
$CSS_LINES='';
# Print footnotes at the end of each file (if the document is split).
$SEPARATED_FOOTNOTES = 0;    

$BODYTEXT = "";

$EXTRA_HEAD=qq{
  <link rev="made" href="mailto:gray@gnu.org.ua">
  <link rel="stylesheet" type="text/css" href="${top_html_dir}/gray.css">
  <link rel="stylesheet" type="text/css" href="${top_html_dir}/texi.css">
  <link rel="icon" type="image/png" href="/graphics/gnu-head-icon.png">};

$AFTER_BODY_OPEN=qq{
<!--#include virtual="${top_html_dir}/inc/header.html" -->
<ul class="tabs">
  <li><a href="${top_html_dir}/pies.html">Main</a></li>
  <li><a href="${top_html_dir}/example.html">Examples</a></li>
  <li><a href="${top_html_dir}/download.html">Downloads</a></li>
  <li><a class="active" href="${top_html_dir}/manual.html">Documentation</a></li>
</ul>};

$PRE_BODY_CLOSE="Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.";
    
$format_map{'multitable'}='table class="multitable"';

$SMALL_RULE = '';
$DEFAULT_RULE = '';
$MIDDLE_RULE = '';
# This is output at the end of a section.
$BIG_RULE = '';

# Use navigation icons
$ICONS = 1;
%ACTIVE_ICONS =
    (
     'Top',         "$graphics_dir/top.png",
     'Contents',    "$graphics_dir/ctx.png",
     'Overview',    '',
     'Index',       "$graphics_dir/idx.png",
     'This',        '',
     'Back',        "$graphics_dir/left.png",
     'FastBack',    "$graphics_dir/bwd.png",
     'Prev',        "",
     'Up',          "$graphics_dir/up.png",
     'Next',        "$graphics_dir/right.png",
     'NodeUp',      "$graphics_dir/left.png", 
     'NodeNext',    "$graphics_dir/up.png",   
     'NodePrev',    "$graphics_dir/right.png",
     'Following',   "$graphics_dir/right.png",
     'Forward',     "$graphics_dir/right.png",
     'FastForward', "$graphics_dir/fwd.png",
     'About' ,      '',
     'First',       '',
     'Last',        '',
     ' ',           ''
    );

@SECTION_BUTTONS =
    (
     \&gray_document_title,
     \&gray_sec_ref,
     'Back', 'Forward',
     \&gray_chap_ref, 'FastBack', 'Up', 'FastForward',
     \&gray_doc_ref,
     'Contents', 'Index',
     ' ','About',
    );

@SECTION_FOOTER_BUTTONS = @SECTION_BUTTONS;
@NODE_FOOTER_BUTTONS = @SECTION_BUTTONS;

# buttons for misc stuff
@MISC_BUTTONS = (
    \&gray_document_title,
    'Contents',
    'Index',
    ' ',
    'About'
    );


$print_section = \&gray_print_section;
$print_navigation = \&gray_print_navigation;
$print_head_navigation = \&gray_print_head_navigation;
$print_foot_navigation = \&gray_print_foot_navigation;
$print_About	      = \&gray_print_About;
$cell = \&gray_multitable_cell;
$print_page_foot = \&gray_print_page_foot;
    
sub gray_multitable_cell($$)
{
    my $text = shift;
    my $row_macro = shift;

    $text =~ s/<p>//;
    $text =~ s/<\/p>//;
    if ($row_macro eq 'headitem')
    {
        return '<th>' . $text . '</th>';
    }
    return '<td>' . $text . '</td>';
}

sub gray_print_About
{
    return &$print_misc(@_) if (!($SPLIT eq '') or $SECTION_NAVIGATION);
}

sub gray_split_status()
{
    if ($SPLIT eq '') {
	return '';
    } elsif ($SPLIT eq 'node') {
	return ' <span class="splitstatus">(split by node)</span>';
    } elsif ($SPLIT eq 'section') {
	return ' <span class="splitstatus">(split by section)</span>';
    } elsif ($SPLIT eq 'chapter') {
	return ' <span class="splitstatus">(split by chapter)</span>';
    }
}

sub gray_document_title($$)
{
    my $fh = shift;
    my $vertical = shift;
    my $status = gray_split_status();
    print $fh qq{<td class="title">} . $Texi2HTML::THISDOC{title} . $status . ":</td>\n";
}

sub gray_node_ref($$)
{
    my $fh = shift;
    my $vertical = shift;
    print $fh qq{<span class="navtext">Node:</span>};
}

sub gray_sec_ref($$)
{
    my $fh = shift;
    my $vertical = shift;
    print $fh qq{<span class="navtext">Section:</span>};
}

sub gray_chap_ref($$)
{
    my $fh = shift;
    my $vertical = shift;
    print $fh qq{<span class="navtext">Chapter:</span>};
}

sub gray_doc_ref($$)
{
    my $fh = shift;
    my $vertical = shift;
    print $fh qq{<span class="navtext">Doc:</span>};
}

sub gray_print_navigation
{
    my $fh = shift;
    my $buttons = shift;
    my $vertical = shift;
    my $spacing = 1;
    my $class="nav";

    print $fh qq{<table class="nav">\n};

    print $fh "<tr>" unless $vertical;
    for my $button (@$buttons)
    {
	if ($button =~ /^\@class=(.*)/) {
	    $class = "$class $1";
	    next;
	}
        print $fh "<tr>\n" if $vertical;
        print $fh qq{<td class="$class">};

        if (ref($button) eq 'CODE')
        {
            &$button($fh, $vertical);
        }
        elsif (ref($button) eq 'SCALAR')
        {
            print $fh "$$button" if defined($$button);
        }
        elsif (ref($button) eq 'ARRAY')
        {
            my $text = $button->[1];
            my $button_href = $button->[0];
            # verify that $button_href is simple text and text is a reference
            if (defined($button_href) and !ref($button_href) 
               and defined($text) and (ref($text) eq 'SCALAR') and defined($$text))
            {             # use given text
                if ($Texi2HTML::HREF{$button_href})
                {
                  print $fh "" .
                        &$anchor('',
                                    $Texi2HTML::HREF{$button_href},
                                    $$text
                                   ) 
                                    ;
                }
                else
                {
                  print $fh $$text;
                }
            }
        }
        elsif ($button eq ' ')
        {                       # handle space button
            print $fh
                ($ICONS && $ACTIVE_ICONS{' '}) ?
                    &$button_icon_img($BUTTONS_NAME{$button}, $ACTIVE_ICONS{' '}) :
                        $NAVIGATION_TEXT{' '};
            #next;
        }
        elsif ($Texi2HTML::HREF{$button})
        {                       # button is active
            my $btitle = $BUTTONS_GOTO{$button} ?
                'title="' . $BUTTONS_GOTO{$button} . '"' : '';
            if ($ICONS && $ACTIVE_ICONS{$button})
            {                   # use icon
                print $fh '' .
                    &$anchor('',
                        $Texi2HTML::HREF{$button},
                        &$button_icon_img($BUTTONS_NAME{$button},
                                   $ACTIVE_ICONS{$button},
                                   $Texi2HTML::SIMPLE_TEXT{$button}),
                        $btitle
                      );
            }
            else
            {                   # use text
                print $fh
                    '' .
                        &$anchor('',
                                    $Texi2HTML::HREF{$button},
                                    $NAVIGATION_TEXT{$button},
                                    $btitle
                                   );
            }
        }
        else {                       # button is passive
            print $fh '<span class="passive">' .
                ($ICONS && $PASSIVE_ICONS{$button} ?
                    &$button_icon_img($BUTTONS_NAME{$button},
                                          $PASSIVE_ICONS{$button},
                                          $Texi2HTML::SIMPLE_TEXT{$button}) :

                                          $NAVIGATION_TEXT{$button}) . '</span>';
        }
        print $fh "</td>\n";
        print $fh "</tr>\n" if $vertical;
	$class = "nav";
    }
    print $fh "</tr>" unless $vertical;
    print $fh "</table>\n";
}

sub gray_print_head_navigation($$)
{
    my $fh = shift;
    my $buttons = shift;

    return if ($SPLIT eq '');
    if ($VERTICAL_HEAD_NAVIGATION)
    {
        print $fh <<EOT;
<table class='nav'>
<tr>
<td>
EOT
    }
    main::print_lines($fh, $Texi2HTML::THIS_HEADER);
    &$print_navigation($fh, $buttons, $VERTICAL_HEAD_NAVIGATION);
    if ($VERTICAL_HEAD_NAVIGATION)
    {
        print $fh <<EOT;
</td>
<td>
EOT
    }
}

sub gray_print_foot_navigation
{
    my $fh = shift;

    return if ($SPLIT eq '');
    if ($VERTICAL_HEAD_NAVIGATION)
    {
        print $fh <<EOT;
</td>
</tr>
</table>
EOT
    }
}

sub gray_print_page_foot($)
{
    my $fh = shift;
    my $program_string = program_string();
    print $fh <<EOT;
<div class="copyright">
$program_string
EOT
    if (defined($PRE_BODY_CLOSE) && $PRE_BODY_CLOSE) {
	print $fh "<p>$PRE_BODY_CLOSE</p>";
    }
    print $fh <<EOT;
</div>
</body>
</html>
EOT
}

sub gray_print_section
{
    my $fh = shift;
    my $first_in_page = shift;
    my $previous_is_top = shift;
    my $buttons = \@SECTION_BUTTONS;

    if ($first_in_page) {
	&$print_head_navigation($fh, $buttons)
    } else {
	main::print_lines($fh, $Texi2HTML::THIS_HEADER);
    }
    my $nw = main::print_lines($fh);
    if (defined $SPLIT
        and ($SPLIT eq 'node')) {
        &$print_foot_navigation($fh);
        print $fh "$SMALL_RULE\n";
        &$print_navigation($fh, \@NODE_FOOTER_BUTTONS) if (!defined($WORDS_IN_PAGE) or (defined ($nw)
                                    and $nw >= $WORDS_IN_PAGE));
    }
}

Return to:

Send suggestions and report system problems to the System administrator.