# Texi2html configuration for Wydawca documentation. -*- perl -*-
# Copyright (C) 2009, 2010 Sergey Poznyakoff
#
# Wydawca 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.
#
# Wydawca 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 Wydawca. If not, see .
$top_html_dir="/software/wydawca";
$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{
};
$AFTER_BODY_OPEN=qq{
';
}
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 ' (split by node)';
} elsif ($SPLIT eq 'section') {
return ' (split by section)';
} elsif ($SPLIT eq 'chapter') {
return ' (split by chapter)';
}
}
sub gray_document_title($$)
{
my $fh = shift;
my $vertical = shift;
my $status = gray_split_status();
print $fh qq{
} . $Texi2HTML::THISDOC{title} . $status . ":
\n";
}
sub gray_node_ref($$)
{
my $fh = shift;
my $vertical = shift;
print $fh qq{Node:};
}
sub gray_sec_ref($$)
{
my $fh = shift;
my $vertical = shift;
print $fh qq{Section:};
}
sub gray_chap_ref($$)
{
my $fh = shift;
my $vertical = shift;
print $fh qq{Chapter:};
}
sub gray_doc_ref($$)
{
my $fh = shift;
my $vertical = shift;
print $fh qq{Doc:};
}
sub gray_print_navigation
{
my $fh = shift;
my $buttons = shift;
my $vertical = shift;
my $spacing = 1;
my $class="nav";
print $fh qq{
\n};
print $fh "
" unless $vertical;
for my $button (@$buttons)
{
if ($button =~ /^\@class=(.*)/) {
$class = "$class $1";
next;
}
print $fh "
\n" if $vertical;
print $fh qq{
};
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 '' .
($ICONS && $PASSIVE_ICONS{$button} ?
&$button_icon_img($BUTTONS_NAME{$button},
$PASSIVE_ICONS{$button},
$Texi2HTML::SIMPLE_TEXT{$button}) :
$NAVIGATION_TEXT{$button}) . '';
}
print $fh "
\n";
}
sub gray_print_head_navigation($$)
{
my $fh = shift;
my $buttons = shift;
return if ($SPLIT eq '');
if ($VERTICAL_HEAD_NAVIGATION)
{
print $fh <