.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Text::Textile 3pm" .TH Text::Textile 3pm "2016-01-02" "perl v5.22.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Text::Textile \- A humane web text generator. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use Text::Textile qw(textile); \& my $text = <process($text); \& print $html; .Ve .SH "ABSTRACT" .IX Header "ABSTRACT" Text::Textile is a Perl-based implementation of Dean Allen's Textile syntax. Textile is shorthand for doing common formatting tasks. .SH "METHODS" .IX Header "METHODS" .SS "new( [%options] )" .IX Subsection "new( [%options] )" Instantiates a new Text::Textile object. Optional options can be passed to initialize the object. Attributes for the options key are the same as the get/set method names documented here. .ie n .SS "set( $attribute, $value )" .el .SS "set( \f(CW$attribute\fP, \f(CW$value\fP )" .IX Subsection "set( $attribute, $value )" Used to set Textile attributes. Attribute names are the same as the get/set method names documented here. .ie n .SS "get( $attribute )" .el .SS "get( \f(CW$attribute\fP )" .IX Subsection "get( $attribute )" Used to get Textile attributes. Attribute names are the same as the get/set method names documented here. .SS "disable_html( [$disable] )" .IX Subsection "disable_html( [$disable] )" Gets or sets the \*(L"disable html\*(R" control, which allows you to prevent \s-1HTML\s0 tags from being used within the text processed. Any \s-1HTML\s0 tags encountered will be removed if disable html is enabled. Default behavior is to allow \s-1HTML.\s0 .SS "flavor( [$flavor] )" .IX Subsection "flavor( [$flavor] )" Assigns the \s-1HTML\s0 flavor of output from Text::Textile. Currently these are the valid choices: html, xhtml (behaves like \*(L"xhtml1\*(R"), xhtml1, xhtml2. Default flavor is \*(L"xhtml1\*(R". .PP Note that the xhtml2 flavor support is experimental and incomplete (and will remain that way until the \s-1XHTML 2.0\s0 draft becomes a proper recommendation). .SS "css( [$css] )" .IX Subsection "css( [$css] )" Gets or sets the \s-1CSS\s0 support for Textile. If \s-1CSS\s0 is enabled, Textile will emit \s-1CSS\s0 rules. You may pass a 1 or 0 to enable or disable \s-1CSS\s0 behavior altogether. If you pass a hashref, you may assign the \s-1CSS\s0 class names that are used by Text::Textile. The following key names for such a hash are recognized: .IP "class_align_right" 4 .IX Item "class_align_right" defaults to \*(L"right\*(R" .IP "class_align_left" 4 .IX Item "class_align_left" defaults to \*(L"left\*(R" .IP "class_align_center" 4 .IX Item "class_align_center" defaults to \*(L"center\*(R" .IP "class_align_top" 4 .IX Item "class_align_top" defaults to \*(L"top\*(R" .IP "class_align_bottom" 4 .IX Item "class_align_bottom" defaults to \*(L"bottom\*(R" .IP "class_align_middle" 4 .IX Item "class_align_middle" defaults to \*(L"middle\*(R" .IP "class_align_justify" 4 .IX Item "class_align_justify" defaults to \*(L"justify\*(R" .IP "class_caps" 4 .IX Item "class_caps" defaults to \*(L"caps\*(R" .IP "class_footnote" 4 .IX Item "class_footnote" defaults to \*(L"footnote\*(R" .IP "id_footnote_prefix" 4 .IX Item "id_footnote_prefix" defaults to \*(L"fn\*(R" .SS "charset( [$charset] )" .IX Subsection "charset( [$charset] )" Gets or sets the character set targeted for publication. At this time, Text::Textile only changes its behavior if the \*(L"utf\-8\*(R" character set is assigned. .PP Specifically, if utf\-8 is requested, any special characters created by Textile will be output as native utf\-8 characters rather than \s-1HTML\s0 entities. .SS "docroot( [$path] )" .IX Subsection "docroot( [$path] )" Gets or sets the physical file path to root of document files. This path is utilized when images are referenced and size calculations are needed (the Image::Size module is used to read the image dimensions). .SS "trim_spaces( [$trim] )" .IX Subsection "trim_spaces( [$trim] )" Gets or sets the \*(L"trim spaces\*(R" control flag. If enabled, this will clear any lines that have only spaces on them (the newline itself will remain). .SS "preserve_spaces( [$preserve] )" .IX Subsection "preserve_spaces( [$preserve] )" Gets or sets the \*(L"preserve spaces\*(R" control flag. If enabled, this will replace any double spaces within the paragraph data with the   \s-1HTML\s0 entity (wide space). The default is 0. Spaces will pass through to the browser unchanged and render as a single space. Note that this setting has no effect on spaces within \f(CW\*(C`
\*(C'\fR,
\&\f(CW\*(C`\*(C'\fR or \f(CW\*(C`