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
|
# -*-perl-*-
#+##############################################################################
#
# noheaders.init: output html without headers. Obsoleted by --no-header
#
# Copyright (C) 2003-2008 Patrice Dumas <dumas@centre-cired.fr>
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
#
#-##############################################################################
#$SPLIT = 'none';
$print_section = \&T2H_NOHEAD_print_section;
#$print_element_header = \&T2H_NOHEAD_print_element_header;
$print_element_header = \&T2H_NOHEAD_noop;
$end_section = \&T2H_NOHEAD_end_section;
$one_section = \&T2H_NOHEAD_one_section;
#$print_Top_header = \&T2H_NOHEAD_print_Top_header;
$print_Top_footer = \&T2H_NOHEAD_print_Top_footer;
$print_Top = \&T2H_NOHEAD_print_Top;
#$print_misc_header = \&T2H_NOHEAD_print_misc_header;
$print_misc_footer = \&T2H_NOHEAD_print_misc_footer;
#$print_misc = \&T2H_NOHEAD_print_misc;
#$print_head_navigation = \&T2H_NOHEAD_print_head_navigation;
$print_head_navigation = \&T2H_NOHEAD_noop;
$about_body = \&T2H_NOHEAD_about_body;
#$toc_body = \&T2H_NOHEAD_toc_body;
sub T2H_NOHEAD_noop
{
return '';
}
########################################################################
# Layout for html for every sections
#
sub T2H_NOHEAD_print_section
{
my $fh = shift;
my $first_in_page = shift;
my $previous_is_top = shift;
my $nw = main::print_lines($fh);
}
sub T2H_NOHEAD_one_section($$)
{
my $fh = shift;
my $element = shift;
main::print_lines($fh);
print $fh "$SMALL_RULE\n";
&$print_page_foot($fh);
}
###################################################################
# Layout of top-page I recommend that you use @ifnothtml, @ifhtml,
# @html within the Top texinfo node to specify content of top-level
# page.
#
# If you enclose everything in @ifnothtml, then title, subtitle,
# author and overview is printed
# Texi2HTML::HREF of Next, Prev, Up, Forward, Back are not defined
# if $T2H_SPLIT then Top page is in its own html file
sub T2H_NOHEAD_print_Top_footer($$)
{
my $fh = shift;
print $fh "$SMALL_RULE\n";
}
sub T2H_NOHEAD_print_Top
{
my $fh = shift;
my $has_top_heading = shift;
# FIXME take what is in texi2html.init, or maybe this is not needed
# anymore
if (@$Texi2HTML::THIS_SECTION)
{
# if top-level node has content, then print it with extra header
#print $fh "<h1>$Texi2HTML::NAME{Top}</h1>\n"
# print $fh "<h1 class=\"settitle\">$Texi2HTML::NAME{Top}</h1>\n"
# unless ($has_top_heading);
main::print_lines($fh, $Texi2HTML::THIS_SECTION);
}
else
{
# top-level node is fully enclosed in @ifnothtml
# print fulltitle, subtitle, author, Overview
# redo the titlepage with the actual state
my ($titlepage_text, $titlepage_no_texi, $titlepage_simple_text) = main::do_special_region_lines('titlepage',$Texi2HTML::THISDOC{'state'});
&$titlepage([],$titlepage_text, $titlepage_no_texi, $titlepage_simple_text);
print $fh $Texi2HTML::TITLEPAGE;
if (@{$Texi2HTML::OVERVIEW})
{
print $fh '<h2> ' . &$I('Overview:') . "</h2>\n" . "<blockquote>\n";
my $nw = main::print_lines($fh, $Texi2HTML::OVERVIEW);
print $fh "</blockquote>\n";
}
elsif (@{$Texi2HTML::TOC_LINES})
{
print $fh '<h1> ' . &$I('Table of contents') . "</h1>\n";
my $nw = main::print_lines($fh, $Texi2HTML::TOC_LINES);
}
}
}
###################################################################
# Layout of Toc, Overview, and Footnotes pages
# By default, we use "normal" layout
# Texi2HTML::HREF of Next, Prev, Up, Forward, Back, etc are not defined
# use: my $buttons = [...] to redefine navigation buttons
sub T2H_NOHEAD_print_misc_header
{
my $fh = shift;
&$print_page_head($fh) if $SPLIT;
}
sub T2H_NOHEAD_print_misc_footer
{
my $fh = shift;
print $fh "$SMALL_RULE\n";
if ($SPLIT)
{
&$print_page_foot($fh);
}
}
sub T2H_NOHEAD_print_misc
{
my $fh = shift;
&$print_misc_header($fh);
print $fh "<h1>$Texi2HTML::NAME{This}</h1>\n";
main::print_lines($fh);
&$print_misc_footer($fh);
}
sub T2H_NOHEAD_end_section($)
{
my $fh = shift;
print $fh "$BIG_RULE\n";
}
###################################################################
# Layout of navigation panel
sub T2H_NOHEAD_about_body
{
}
|