Blame Manual/repository.init

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

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

d7b2cd
d7b2cd
        
d7b2cd
d7b2cd
    
d7b2cd
d7b2cd
    

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