#+##############################################################################
#
# inlinestyle.init: style is inlined instead of being in a css file
#
#    Copyright (C) 2003-2008  Patrice Dumas <dumas@centre-cired.fr>
#
#    This program 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 2 of the License, or
#    (at your option) any later version.
#
#    This program 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 this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
#    02110-1301  USA
#
#-##############################################################################

$NO_BULLET_LIST_ATTRIBUTE = $NO_BULLET_LIST_ATTRIBUTE . " style=\"$NO_BULLET_LIST_STYLE\"";

# we empty CSS_LINES as all styles are inlined
$CSS_LINES = "";

$style_map{'sansserif'} = 
     { 'attribute' => "span style=\"$css_map{'span.sansserif'}\""};
$style_map{'r'} = 
     { 'attribute' => "span style=\"$css_map{'span.roman'}\""};

# formatting functions

$preformatted      = \&t2h_inlinestyle_preformatted;
$summary_letter    = \&t2h_inline_summary_letter;

sub t2h_inlinestyle_preformatted($$$)
{
    my $text = shift;
    my $pre_style = shift;
    my $class = shift;

    return '' if ($text eq '');
    my $open = '<pre';
    if ($pre_style)
    {
        $open .=  " style=\"$pre_style\"";
    }
    return $open .= " class=\"$class\">$text</pre>";
}

sub t2h_inline_summary_letter($$$)
{
   my $letter = shift;
   my $file = shift;
   my $identifier = shift;
   return &$anchor('', $file . '#' . $identifier, '<b>' . &$protect_html($letter) . '</b>', 'class="summary-letter" style="text-decoration: none"');

}

1;
