From b0d2697f689348976da7aefd506b3d8b6fdee420 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sun, 1 Mar 2015 23:08:44 +0200 Subject: Switch to Texinfo 5.0 * doc/Config: Rewrite. * doc/Makefile.am: Use Makeinfo 5 instead of texi2htm * doc/gendocs_template: Ps is not built * imprimatur: Upgrade. --- doc/Config | 404 ++++++++++++++++--------------------------------------------- 1 file changed, 101 insertions(+), 303 deletions(-) (limited to 'doc/Config') diff --git a/doc/Config b/doc/Config index 12fa9f5..62ee61a 100644 --- a/doc/Config +++ b/doc/Config @@ -1,5 +1,5 @@ -# Texi2html configuration for GNU Pies documentation. -*- perl -*- -# Copyright (C) 2009, 2010, 2013 Sergey Poznyakoff +# Texi2any configuration for pies documentation. -*- perl -*- +# Copyright (C) 2009, 2010, 2013, 2015 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 @@ -13,353 +13,151 @@ # # You should have received a copy of the GNU General Public License # along with GNU Pies. If not, see . +use strict; -$top_html_dir="/software/pies"; -$graphics_dir="$top_html_dir/graphics"; - -## texi2html configuration - +my $top_html_dir="/software/pies"; +my $graphics_dir="$top_html_dir/graphics"; + # Show TOC in place of the @contents directive. -$INLINE_CONTENTS = 1; +set_from_init_file('INLINE_CONTENTS', 1); # Do not show Texinfo menus. -$SHOW_MENU = 0; +set_from_init_file('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; +set_from_init_file('CSS_LINES', ''); -$BODYTEXT = ""; +set_from_init_file('BODYTEXT', ""); -$EXTRA_HEAD=qq{ - +set_from_init_file('EXTRA_HEAD', qq{ + - }; + }); -$AFTER_BODY_OPEN=qq{ +set_from_init_file('AFTER_BODY_OPEN', qq{ }; - -$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 = ''; +sub gray_end_file($) +{ + my $self = shift; + my $program_text = ''; + if ($self->get_conf('PROGRAM_NAME_IN_FOOTER')) { + my $program_string = &{$self->{'format_program_string'}}($self); + $program_text = "

+ $program_string +

"; + } + my $pre_body_close = $self->get_conf('PRE_BODY_CLOSE'); + $pre_body_close = '' if (!defined($pre_body_close)); + return " +
+$program_text + +$pre_body_close +
+ + + +"; +} -# 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', '', - ' ', '' - ); +texinfo_register_formatting_function('end_file', \&gray_end_file); -@SECTION_BUTTONS = - ( - \&gray_document_title, - \&gray_sec_ref, - 'Back', 'Forward', - \&gray_chap_ref, 'FastBack', 'Up', 'FastForward', - \&gray_doc_ref, - 'Contents', 'Index', - ' ','About', - ); +set_from_init_file('PRE_BODY_CLOSE', + 'Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.'); -@SECTION_FOOTER_BUTTONS = @SECTION_BUTTONS; -@NODE_FOOTER_BUTTONS = @SECTION_BUTTONS; +# Print generating program name at the bottom of a page. +set_from_init_file('PROGRAM_NAME_IN_FOOTER',1); -# buttons for misc stuff -@MISC_BUTTONS = ( - \&gray_document_title, - 'Contents', - 'Index', - ' ', - 'About' - ); +# Disable horizontal bars +set_from_init_file('DEFAULT_RULE', ''); +set_from_init_file('BIG_RULE', ''); +# Turn off footer buttons in section split +set_from_init_file('SECTION_FOOTER_BUTTONS', undef); +#set_from_init_file('SECTION_BUTTONS', undef); +# Turn off navigation bars at the bottom of each section in chapter split mode +set_from_init_file('HEADERS', undef) + if (get_conf('SPLIT') and (get_conf('SPLIT') eq 'chapter')); +# Use navigation icons -$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; +set_from_init_file('ICONS', 1); - $text =~ s/

//; - $text =~ s/<\/p>//; - if ($row_macro eq 'headitem') +set_from_init_file('ACTIVE_ICONS', { - return '' . $text . ''; - } - return '' . $text . ''; -} - -sub gray_print_About -{ - return &$print_misc(@_) if (!($SPLIT eq '') or $SECTION_NAVIGATION); -} + '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' => '', + ' ' => '' + }); sub gray_split_status() { - if ($SPLIT eq '') { + my $split = get_conf('SPLIT'); + if ($split eq '') { return ''; - } elsif ($SPLIT eq 'node') { + } elsif ($split eq 'node') { return ' (split by node)'; - } elsif ($SPLIT eq 'section') { + } elsif ($split eq 'section') { return ' (split by section)'; - } elsif ($SPLIT eq 'chapter') { + } elsif ($split eq 'chapter') { return ' (split by chapter)'; } } sub gray_document_title($$) { - my $fh = shift; - my $vertical = shift; + my $self = shift; + my $direction = 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:}; + return q{} . $self->{title_string} . '' .$status . q{:}; } sub gray_sec_ref($$) { - my $fh = shift; - my $vertical = shift; - print $fh qq{Section:}; + return q{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{\n"; - print $fh "\n" if $vertical; - $class = "nav"; - } - print $fh "" unless $vertical; - print $fh "\n"; -} - -sub gray_print_head_navigation($$) -{ - my $fh = shift; - my $buttons = shift; - - return if ($SPLIT eq ''); - if ($VERTICAL_HEAD_NAVIGATION) - { - print $fh < - - -EOT - } - main::print_lines($fh, $Texi2HTML::THIS_HEADER); - &$print_navigation($fh, $buttons, $VERTICAL_HEAD_NAVIGATION); - if ($VERTICAL_HEAD_NAVIGATION) - { - print $fh < - -EOT - } -} - -sub gray_print_foot_navigation -{ - my $fh = shift; - - return if ($SPLIT eq ''); - if ($VERTICAL_HEAD_NAVIGATION) - { - print $fh < - - -EOT - } + return q{Chapter:}; } -sub gray_print_page_foot($) -{ - my $fh = shift; - my $program_string = program_string(); - print $fh < -$program_string -EOT - if (defined($PRE_BODY_CLOSE) && $PRE_BODY_CLOSE) { - print $fh "

$PRE_BODY_CLOSE

"; - } - print $fh < - - -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)); - } -} +my @gray_buttons = (\&gray_document_title, ' ', + \&gray_sec_ref, 'Back', 'Forward', ' ', + \&gray_chap_ref, + 'FastBack', ' ', 'Up', ' ', 'FastForward', ' ', + 'Contents', 'Index' ); + +set_from_init_file('SECTION_BUTTONS', \@gray_buttons); +set_from_init_file('CHAPTER_BUTTONS', \@gray_buttons); +set_from_init_file('MISC_BUTTONS', + [\&gray_document_title, + 'Contents', + 'Index', + ' ', + 'About' + ]); -- cgit v1.2.1