Perl6::Pod::FormattingCode::U - Unusual text


Perl6-Pod documentation Contained in the Perl6-Pod distribution.

Index


Code Index:

NAME

Top

Perl6::Pod::FormattingCode::U - Unusual text

SYNOPSIS

Top

        =para
        the contained text is U<unusual>

DESCRIPTION

Top

The U<> formatting code specifies that the contained text is unusual or distinctive; that it is of minor significance. Typically such content would be rendered in an underlined style.

to_xhtml

    U<sample>

Render xhtml:

    <em class="unusual" >sample</em>

Use css style for underline style:

     .unusual {
     font-style: normal;
     text-decoration: underline;
     }

to_docbook

    U<sample>

Render to

   <emphasis role='underline'>test</emphasis> 

SEE ALSO

Top

http://zag.ru/perl6-pod/S26.html, Perldoc Pod to HTML converter: http://zag.ru/perl6-pod/, Perl6::Pod::Lib

AUTHOR

Top

Zahatski Aliaksandr, <zag@cpan.org>

COPYRIGHT AND LICENSE

Top


Perl6-Pod documentation Contained in the Perl6-Pod distribution.
package Perl6::Pod::FormattingCode::U;

#$Id$

use warnings;
use strict;
use Data::Dumper;
use Perl6::Pod::FormattingCode;
use base 'Perl6::Pod::FormattingCode';

sub to_xhtml {
 my ( $self, $parser, @in ) = @_;
 my @content = $parser->_make_events(@in);
 my $emp =  $parser->mk_element('em')->add_content(@content);
 $emp->attrs_by_name->{class} = 'unusual';
 return $emp
}

#http://old.nabble.com/docbook-with-style-info-td25857763.html

sub to_docbook {
 my ( $self, $parser, @in ) = @_;
 my @content = $parser->_make_events(@in);
 my $emp = $parser->mk_element('emphasis')->add_content(@content);
 $emp->attrs_by_name->{role} = 'underline';
 return $emp;
}

1;
__END__