Blame Identity/Manual/repository.init

728c6d
# -*-perl-*-
728c6d
#
40dd51
# repository.init -- This file initializes Texi2HTML program to
40dd51
# produce the repository documentation manual using the CentOS Web
40dd51
# Environment XHTML and CSS standard definition.
728c6d
#
40dd51
# Copyright (C) 2009-2011 Alain Reguera Delgado
40dd51
# 
40dd51
# This program is free software; you can redistribute it and/or modify
40dd51
# it under the terms of the GNU General Public License as published by
40dd51
# the Free Software Foundation; either version 2 of the License, or
40dd51
# (at your option) any later version.
40dd51
#  
40dd51
# This program is distributed in the hope that it will be useful, but
40dd51
# WITHOUT ANY WARRANTY; without even the implied warranty of
40dd51
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40dd51
# General Public License for more details.
40dd51
# 
40dd51
# You should have received a copy of the GNU General Public License
40dd51
# along with this program; if not, write to the Free Software
40dd51
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
40dd51
# USA.
40dd51
# ----------------------------------------------------------------------
40dd51
# $Id$
40dd51
# ----------------------------------------------------------------------
728c6d
728c6d
# -iso
728c6d
# if set, ISO8859 characters are used for special symbols (like copyright, etc)
728c6d
$USE_ISO = 1;
728c6d
c8f7b7
# -I
c8f7b7
# add a directory to the list of directories where @include files are
c8f7b7
# searched for (besides the directory of the file). additional '-I'
c8f7b7
# args are appended to this list.  (APA: Don't implicitely search .,
c8f7b7
# to conform with the docs!) my @INCLUDE_DIRS = (".");
c8f7b7
@INCLUDE_DIRS = ("/home/centos/artwork");
c8f7b7
eae056
# Extension used on output files.
728c6d
$EXTENSION = "xhtml";
728c6d
728c6d
# Horizontal rules.
728c6d
$DEFAULT_RULE = '

';
728c6d
$SMALL_RULE = $DEFAULT_RULE;
728c6d
$MIDDLE_RULE = $DEFAULT_RULE;
728c6d
$BIG_RULE = $DEFAULT_RULE;
728c6d
c8f7b7
# -split section|chapter|node|none
c8f7b7
# if $SPLIT is set to 'section' (resp. 'chapter') one html file per
c8f7b7
# section (resp. chapter) is generated. If $SPLIT is set to 'node' one
c8f7b7
# html file per node or sectionning element is generated. In all these
c8f7b7
# cases separate pages for Top, Table of content (Toc), Overview and
c8f7b7
# About are generated.  Otherwise a monolithic html file that contains
c8f7b7
# the whole document is created.
c8f7b7
$SPLIT = 'section';
c8f7b7
c8f7b7
# -sec-nav|-nosec-nav
c8f7b7
# if this is set then navigation panels are printed at the beginning
c8f7b7
# of each section.  If the document is split at nodes then navigation
c8f7b7
# panels are printed at the end if there were more than $WORDS_IN_PAGE
c8f7b7
# words on page.
c8f7b7
#
c8f7b7
# If the document is split at sections this is ignored.
c8f7b7
#
c8f7b7
# This is most useful if you do not want to have section navigation
c8f7b7
# with -split chapter. There will be chapter navigation panel at the
c8f7b7
# beginning and at the end of chapters anyway.
c8f7b7
$SECTION_NAVIGATION = 0;
c8f7b7
728c6d
$print_page_head	      = \&T2H_XHTML_print_page_head;
728c6d
$print_page_foot	      = \&T2H_XHTML_print_page_foot;
728c6d
$print_frame              = \&T2H_XHTML_print_frame;
728c6d
$button_icon_img	      = \&T2H_XHTML_button_icon_img;
728c6d
728c6d
#FIXME update once it is more stabilized in texi2html.init
728c6d
sub T2H_XHTML_print_page_head
728c6d
{
728c6d
    my $fh = shift;
728c6d
    my $longtitle = "$Texi2HTML::THISDOC{'title_unformatted'}";
728c6d
    $longtitle .= ": $Texi2HTML::UNFORMATTED{'This'}" if exists $Texi2HTML::UNFORMATTED{'This'};
728c6d
    $T2H_LANG='en';
40dd51
    @date=localtime(time);
40dd51
    $year=$date[5] += 1900;
728c6d
    print $fh <
c8f7b7
728c6d
728c6d
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
728c6d
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
728c6d
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$T2H_LANG" lang="$T2H_LANG">
728c6d
<head>
728c6d
728c6d
    <title>$longtitle</title>
728c6d
c8f7b7
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
728c6d
    <meta name="description" content="$longtitle" />
728c6d
    <meta name="keywords" content="$longtitle" />
728c6d
    <meta name="resource-type" content="document" />
728c6d
    <meta name="distribution" content="global" />
728c6d
    <meta name="generator" content="$Texi2HTML::THISDOC{program}" />
40dd51
    <meta name="copyright" content="2009-$year Alain Reguera Delgado" />
728c6d
728c6d
    <link href="/home/centos/artwork/trunk/Identity/Manual/repository.css" rel="stylesheet" type="text/css" media="screen projection" />
728c6d
728c6d
</head>
728c6d
728c6d
<body>
728c6d
728c6d
728c6d
728c6d
728c6d
728c6d
    
728c6d
728c6d
        
728c6d
728c6d
728c6d
EOT
728c6d
}
728c6d
728c6d
sub T2H_XHTML_print_page_foot
728c6d
{
728c6d
    my $fh = shift;
728c6d
    print $fh <
728c6d
728c6d
            

728c6d
728c6d
        
728c6d
728c6d
    
728c6d
728c6d
    

728c6d
728c6d
728c6d
728c6d
</body>
728c6d
728c6d
</html>
728c6d
EOT
728c6d
}
728c6d
728c6d
# / in 
728c6d
sub T2H_XHTML_button_icon_img
728c6d
{
728c6d
    my $button = shift;
728c6d
    my $icon = shift;
728c6d
    my $name = shift;
728c6d
    return '' if (!defined($icon));
728c6d
    if (defined($name) && $name)
728c6d
    {
728c6d
        $name = ": $name";
728c6d
    }
728c6d
    else
728c6d
    {
728c6d
        $name = '';
728c6d
    }
728c6d
    $button = "" if (!defined ($button));
728c6d
    return qq{$button$name};
728c6d
}
728c6d
728c6d
$simple_map{'*'} = '
';
728c6d
728c6d
# formatting functions
728c6d
728c6d
$def_line	       = \&t2h_xhtml_def_line;
728c6d
$index_summary     = \&t2h_xhtml_index_summary;
728c6d
$image             = \&t2h_xhtml_image;
728c6d
728c6d
# need / in 
728c6d
sub t2h_xhtml_image($$$)
728c6d
{
728c6d
   my $file = shift;
728c6d
   my $base = shift;
728c6d
   my $preformatted = shift;
728c6d
   return "[ $base ]" if ($preformatted);
728c6d
   return "\"$base\"";
728c6d
}
728c6d
728c6d
# process definition commands line @deffn for example
728c6d
# <u> replaced by 
728c6d
sub t2h_xhtml_def_line($$$$$)
728c6d
{
728c6d
   my $category = shift;
728c6d
   my $name = shift;
728c6d
   my $type = shift;
728c6d
   my $arguments = shift;
728c6d
   my $index_label = shift;
728c6d
   $index_label = '' if (!defined($index_label));
728c6d
   $name = '' if (!defined($name) or ($name =~ /^\s*$/));
728c6d
   $type = '' if (!defined($type) or $type =~ /^\s*$/);
728c6d
   if (!defined($arguments) or $arguments =~ /^\s*$/)
728c6d
   {
728c6d
       $arguments = '';
728c6d
   }
728c6d
   else
728c6d
   {
728c6d
       $arguments = '' . $arguments . '';
728c6d
   }
728c6d
   my $type_name = '';
728c6d
   $type_name = " $type" if ($type ne '');
728c6d
   $type_name .= ' ' . $name . '' if ($name ne '');
728c6d
   $type_name .= $arguments . "\n";
728c6d
   if (! $DEF_TABLE)
728c6d
   {
728c6d
       return '
'. '' . $category . ':' . $type_name . $index_label . "
\n";
728c6d
   }
728c6d
   else
728c6d
   {
728c6d
       
728c6d
       return "\n" . $type_name . 
728c6d
       "\n" . $category . $index_label . "\n" . "\n";
728c6d
   }
728c6d
}
728c6d
728c6d
# There is a br which needs / 
728c6d
sub t2h_xhtml_index_summary($$)
728c6d
{
728c6d
    my $alpha = shift;
728c6d
    my $nonalpha = shift;
728c6d
    my $join = '';
728c6d
    my $nonalpha_text = '';
728c6d
    my $alpha_text = '';
728c6d
    $join = "   \n
\n" if (@$nonalpha and @$alpha);
728c6d
    if (@$nonalpha)
728c6d
    {
728c6d
       $nonalpha_text = join("\n   \n", @$nonalpha) . "\n";
728c6d
    }
728c6d
    if (@$alpha)
728c6d
    {
728c6d
       $alpha_text = join("\n   \n", @$alpha) . "\n   \n";
728c6d
    }
728c6d
    #I18n
728c6d
    return "
Jump to:   " .
728c6d
    $nonalpha_text . $join . $alpha_text . '';
728c6d
}