summaryrefslogtreecommitdiff
path: root/Build/source/utils/texi2html/examples/makeinfo.init
blob: ec3cb92264fde562fda7b572ffafc663a157608a (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
# -*-perl-*-
$TOP_FILE = 'index.html';

$SHOW_MENU = 1;

$USE_NODES = 1;

$SPLIT = 'node';

$SECTION_NAVIGATION = 1;

$SHORT_REF = 1;

$NODE_NAME_IN_MENU = 1;

$AVOID_MENU_REDUNDANCY = 0;

$SPLIT_INDEX = 0;

$MENU_SYMBOL = '*';

$WORDS_IN_PAGE = 200;

$SEPARATED_FOOTNOTES = 0;

@SECTION_BUTTONS =
    (
     \"node: ", \$Texi2HTML::NODE{This}, [ 'NodeNext', \$Texi2HTML::NODE{Next} ] , \",", [ 'NodePrev', \$Texi2HTML::NODE{Prev} ], \",", [ 'NodeUp', \$Texi2HTML::NODE{NodeUp} ], 'Following'
    );

my $default_init_out = $init_out;
$init_out = \&makeinfo_like_init_out;

sub makeinfo_like_init_out()
{
   my $encoding = &$default_init_out();
   $NAVIGATION_TEXT{'Following'} = ' > ';
   return $encoding;
}


@MISC_BUTTONS = @SECTION_BUTTONS;

$foot_line_and_ref  = \&makeinfo_like_foot_line_and_ref;
$foot_lines         = \&makeinfo_like_foot_lines;
$index_summary      = \&makeinfo_like_index_summary;
$summary_letter     = \&makeinfo_like_summary_letter;
$index_entry        = \&makeinfo_like_index_entry;
$index_letter       = \&makeinfo_like_index_letter;
$print_index        = \&makeinfo_like_print_index;
$listoffloats       = \&makeinfo_like_listoffloats;
$listoffloats_entry = \&makeinfo_like_listoffloats_entry;

sub makeinfo_like_foot_line_and_ref($$$$$$$$)
{
    my $foot_num = shift;
    my $relative_num = shift;
    my $footid = shift;
    my $docid = shift;
    my $from_file = shift;
    my $footnote_file = shift;
    my $lines = shift;
    my $state = shift;
    
    my $foot_anchor = "<sup>" . &$anchor($docid, "$footnote_file#$footid", $relative_num) . "</sup>";
    $foot_anchor = &$anchor($docid, "$footnote_file#$footid", "($relative_num)") if ($state->{'preformatted'});
    unshift @$lines, "<li>";
    push @$lines, "</li>\n";
    return ($lines, $foot_anchor);
}

sub makeinfo_like_foot_lines($)
{
    my $lines = shift;
    unshift @$lines, "<hr>\n<h4>$Texi2HTML::I18n::WORDS->{'Footnotes_Title'}</h4>\n<ol type=\"1\">\n";
    push @$lines, "</ol>";
    return $lines;
}


sub makeinfo_like_index_summary
{
    return '';
}

sub makeinfo_like_summary_letter
{
    return '';
}

sub makeinfo_like_index_entry($$$$)
{
    my $text_href = shift;
    my $entry = shift;
    my $element_href = shift;
    my $element_text = shift;
    
    return '<li>' . $entry . ': ' .  &$anchor('', $element_href, $element_text)
    . "</li>\n";
}

sub makeinfo_like_index_letter($$$)
{
     my $letter = shift;
     my $id = shift;
     my $text = shift;
     return $text;
}

sub makeinfo_like_print_index($$)
{
    my $text = shift;
    my $name = shift;
    return "<ul class=\"index-$name\" compact>\n" . $text . "</ul>\n";
}

sub makeinfo_like_listoffloats_entry($$$$)
{
    my $style_texi = shift;
    my $float = shift;
    my $float_style = shift;
    my $caption = shift;
    my $href = shift;

    if ($caption ne '')
    {
        return '<li>' . &$I('%{href}: %{caption}', { 'href' => &$anchor('', $href, $float_style), 'caption' => $caption }) . "</li>\n";
    }
    else
    {
        return '<li>' . &$anchor('', $href, $float_style) . "</li>\n";
    }
}

sub makeinfo_like_listoffloats($$$)
{
    my $style_texi = shift;
    my $style = shift;
    my $float_entries = shift;

    my $result = "<ul class=\"listoffloats\">\n" ;
    foreach my $float_entry (@$float_entries)
    {
         $result .= $float_entry;
    }
    return $result . "</ul>\n";
}