| Perl6-Pod documentation | Contained in the Perl6-Pod distribution. |
Perl6::Pod::FormattingCode::U - Unusual text
=para
the contained text is U<unusual>
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.
U<sample>
Render xhtml:
<em class="unusual" >sample</em>
Use css style for underline style:
.unusual {
font-style: normal;
text-decoration: underline;
}
U<sample>
Render to
<emphasis role='underline'>test</emphasis>
http://zag.ru/perl6-pod/S26.html, Perldoc Pod to HTML converter: http://zag.ru/perl6-pod/, Perl6::Pod::Lib
Zahatski Aliaksandr, <zag@cpan.org>
Copyright (C) 2009-2011 by Zahatski Aliaksandr
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
| 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__