NAME

Lout.pm - Module providing txt2lout, htmlentity2lout and pod2lout functions

SYNOPSIS

use Lout ;

$lout = Lout::txt2lout( $text ) ;
$lout = Lout::pod2lout( $pod ) ;
$lout = Lout::htmlentity2lout( $html ) ;

# If doing lots of htmlentity2lout this is faster:
Lout::set_option( -html => 1 ) ;
foreach $html ( @html ) {
    $lout .= Lout::txt2lout( $html ) ;
}

DESCRIPTION

Lout::txt2lout

This function converts a plain text string into a string of lout. It is influenced by the following options (all of which are set by calling Lout::set_option once for each option - defaults are shown):

Lout::set_option( -html => 0) - Treat the input as plain text; set to 1 to treat the input as HTML. If on then -verbatim is off.

Lout::set_option( -hyphen => 0) - Convert space delimited hyphens to lout double hyphens.

Lout::set_option( -smartquotes => 1) - Convert single and double quotes to `smart' quotes.

Lout::set_option( -superscripts => 1) - Convert the letters after numbers to superscripts, e.g. for 1st, 2nd, 3rd, 4th, etc.

Lout::set_option( -tex => 0) - Convert TeX and LaTeX to @TeX and @LaTeX; this assumes that you are using a lout document type which has these macros defined.

Lout::set_option( -verbatim => 1) - On for text and pod, off for html. Allows @Verbatim Lout in your text to go through unchanged.

Lout::htmlentity2lout

This is merely a wrapper around Lout::txt2lout which effectively calls Lout::set_option( -html => 1) first. For processing lots of html entity strings it is quicker to set the option once and call Lout::txt2lout direct.

NB This is the equivalent of Gisle Aas HTML::Entities::decode except that it produces Lout instead of plain text. It does not deal with HTML tags - use my HTML::LoutParser.pm module for that.

Lout::pod2lout

This calls Lout::txt2lout (so all the options which are set apply), and then performs pod-specific translations.

NB This only translates pod `entities' like E>gt<, etc. For full pod translation use my pod2lout program.

Lout::set_option

(This sets the options used by Lout::txt2lout and Lout::htmlentity2lout as described above.)

EXAMPLES

(See DESCRIPTION.)

BUGS

None that I know of!

CHANGES

1999/07/18 First properly documented release.

1999/07/28 Put %Entity2char in the symbol table so that other perl programs can access it, for example lout2html.

1999/08/08 Changed licence to LGPL.

1999/08/15 Added -hyphen and -verbatim options.

1999/09/04 Tiny improvement.

AUTHOR

Mark Summerfield. I can be contacted as <summer@chest.ac.uk> - please include the word 'lout' in the subject line.

COPYRIGHT

Copyright (c) Mark Summerfield 1999. All Rights Reserved.

This module may be used/distributed/modified under the LGPL.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 322:

Deleting unknown formatting code V<>