From 4683f7830491d1d50c5097466d9a066cb41286c7 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Fri, 14 Aug 2015 08:07:26 +0300 Subject: Fix doc generation. The default Config file applies to all output formats, which is wrong. Use a dedicated configuration file for html output formats, and defaults for the rest. * doc/Config: Rename to doc/html.init (with changes). --- doc/Config | 163 --------------------------------------------------------- doc/html.init | 164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+), 163 deletions(-) delete mode 100644 doc/Config create mode 100644 doc/html.init (limited to 'doc') diff --git a/doc/Config b/doc/Config deleted file mode 100644 index 62ee61a..0000000 --- a/doc/Config +++ /dev/null @@ -1,163 +0,0 @@ -# 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 -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Pies 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 GNU Pies. If not, see . -use strict; - -my $top_html_dir="/software/pies"; -my $graphics_dir="$top_html_dir/graphics"; - -# Show TOC in place of the @contents directive. -set_from_init_file('INLINE_CONTENTS', 1); -# Do not show Texinfo menus. -set_from_init_file('SHOW_MENU', 0); -# Inhibit output of CSS lines in page headers. -set_from_init_file('CSS_LINES', ''); - -set_from_init_file('BODYTEXT', ""); - -set_from_init_file('EXTRA_HEAD', qq{ - - - - }); - -set_from_init_file('AFTER_BODY_OPEN', qq{ - -}); - -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 -
- - - -"; -} - -texinfo_register_formatting_function('end_file', \&gray_end_file); - -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.'); - -# Print generating program name at the bottom of a page. -set_from_init_file('PROGRAM_NAME_IN_FOOTER',1); - -# 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 - -set_from_init_file('ICONS', 1); - -set_from_init_file('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' => '', - ' ' => '' - }); - -sub gray_split_status() -{ - my $split = get_conf('SPLIT'); - 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 $self = shift; - my $direction = shift; - my $status = gray_split_status(); - - return q{} . $self->{title_string} . '' .$status . q{:}; -} - -sub gray_sec_ref($$) -{ - return q{Section:}; -} - -sub gray_chap_ref($$) -{ - return q{Chapter:}; -} - - -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' - ]); diff --git a/doc/html.init b/doc/html.init new file mode 100644 index 0000000..1eb2d89 --- /dev/null +++ b/doc/html.init @@ -0,0 +1,164 @@ +# 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 +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Pies 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 GNU Pies. If not, see . +use strict; + +my $top_html_dir="/software/pies"; +my $graphics_dir="$top_html_dir/graphics"; + +# Show TOC in place of the @contents directive. +set_from_init_file('INLINE_CONTENTS', 1); +# Do not show Texinfo menus. +set_from_init_file('SHOW_MENU', 0); +# Inhibit output of CSS lines in page headers. +set_from_init_file('CSS_LINES', ''); + +set_from_init_file('BODYTEXT', ""); + +set_from_init_file('EXTRA_HEAD', qq{ + + + + }); + +set_from_init_file('AFTER_BODY_OPEN', qq{ + +}); + +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 +
+ + + +"; +} + +texinfo_register_formatting_function('end_file', \&gray_end_file); + +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.'); + +# Print generating program name at the bottom of a page. +set_from_init_file('PROGRAM_NAME_IN_FOOTER',1); + +# Disable horizontal bars +set_from_init_file('DEFAULT_RULE', ''); +set_from_init_file('BIG_RULE', ''); + +# Turn off navigation bars at the bottom of each section in chapter split mode, +# or subsection in section split mode. +set_from_init_file('HEADERS', undef) + if ((get_conf('SPLIT') eq 'chapter') or (get_conf('SPLIT') eq 'section')); +# Use navigation icons + +set_from_init_file('ICONS', 1); + +set_from_init_file('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' => '', + ' ' => '' + }); + +sub gray_split_status() +{ + my $split = get_conf('SPLIT'); + 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 $self = shift; + my $direction = shift; + my $status = gray_split_status(); + + return q{} . $self->{title_string} . '' .$status . q{:}; +} + +sub gray_sec_ref($$) +{ + return q{Section:}; +} + +sub gray_chap_ref($$) +{ + return q{Chapter:}; +} + + +my @gray_buttons = (\&gray_document_title, ' ', + \&gray_sec_ref, 'Back', 'Forward', ' ', + \&gray_chap_ref, + 'FastBack', ' ', 'Up', ' ', 'FastForward', ' ', + 'Contents', 'Index' ); + +set_from_init_file('TOP_BUTTONS', undef); +set_from_init_file('SECTION_BUTTONS', \@gray_buttons); +set_from_init_file('CHAPTER_BUTTONS', \@gray_buttons); +set_from_init_file('NODE_FOOTER_BUTTONS', \@gray_buttons); +set_from_init_file('SECTION_FOOTER_BUTTONS', \@gray_buttons); +set_from_init_file('MISC_BUTTONS', + [\&gray_document_title, + 'Contents', + 'Index', + ' ', + 'About' + ]); -- cgit v1.2.1