noheaders.pm 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # -*-perl-*-
  2. #+##############################################################################
  3. #
  4. # noheaders.pm: output html without headers. Obsoleted by --no-header
  5. #
  6. # Copyright (C) 2004, 2007 Free Software Foundation, Inc.
  7. #
  8. # This program is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 3 of the License,
  11. # or (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. #
  21. # Originally written by Patrice Dumas.
  22. #
  23. #-##############################################################################
  24. #
  25. # does nothing in case of info (at least in the test suite)
  26. $print_section = \&T2H_NOHEAD_print_section;
  27. $end_section = \&T2H_NOHEAD_end_section;
  28. $one_section = \&T2H_NOHEAD_one_section;
  29. $print_Top_footer = \&T2H_NOHEAD_print_Top_footer;
  30. $print_misc_footer = \&T2H_NOHEAD_print_misc_footer;
  31. $print_head_navigation = \&T2H_NOHEAD_noop;
  32. $print_navigation = \&T2H_NOHEAD_noop;
  33. $about_body = \&T2H_NOHEAD_about_body;
  34. sub T2H_NOHEAD_noop
  35. {
  36. return '';
  37. }
  38. ########################################################################
  39. # Layout for html for every sections
  40. #
  41. sub T2H_NOHEAD_print_section
  42. {
  43. my $fh = shift;
  44. my $first_in_page = shift;
  45. my $previous_is_top = shift;
  46. my $nw = main::print_lines($fh);
  47. }
  48. sub T2H_NOHEAD_one_section($$)
  49. {
  50. my $fh = shift;
  51. my $element = shift;
  52. main::print_lines($fh);
  53. print $fh "$DEFAULT_RULE\n" if ($DEFAULT_RULE ne '');
  54. &$print_page_foot($fh);
  55. }
  56. ###################################################################
  57. # Layout of top-page I recommend that you use @ifnothtml, @ifhtml,
  58. # @html within the Top texinfo node to specify content of top-level
  59. # page.
  60. #
  61. # If you enclose everything in @ifnothtml, then title, subtitle,
  62. # author and overview is printed
  63. # Texi2HTML::HREF of Next, Prev, Up, Forward, Back are not defined
  64. # if $T2H_SPLIT then Top page is in its own html file
  65. sub T2H_NOHEAD_print_Top_footer($$)
  66. {
  67. my $fh = shift;
  68. print $fh "$DEFAULT_RULE\n" if ($DEFAULT_RULE ne '');
  69. }
  70. ###################################################################
  71. # Layout of Toc, Overview, and Footnotes pages
  72. # By default, we use "normal" layout
  73. # Texi2HTML::HREF of Next, Prev, Up, Forward, Back, etc are not defined
  74. # use: my $buttons = [...] to redefine navigation buttons
  75. sub T2H_NOHEAD_print_misc_header
  76. {
  77. my $fh = shift;
  78. &$print_page_head($fh) if (get_conf('SPLIT'));
  79. }
  80. sub T2H_NOHEAD_print_misc_footer
  81. {
  82. my $fh = shift;
  83. print $fh "$DEFAULT_RULE\n" if ($DEFAULT_RULE ne '');
  84. if (get_conf('SPLIT'))
  85. {
  86. &$print_page_foot($fh);
  87. }
  88. }
  89. sub T2H_NOHEAD_end_section($)
  90. {
  91. my $fh = shift;
  92. print $fh "$DEFAULT_RULE\n" if ($DEFAULT_RULE ne '');
  93. }
  94. ###################################################################
  95. # Layout of navigation panel
  96. sub T2H_NOHEAD_about_body
  97. {
  98. }