Text::Amuse::Functions - Exportable functions for Text::Amuse
This module provides some functions to format strings wrapping the OO interface to function calls.
use Text::Amuse::Functions qw/muse_format_line/ my $html = muse_format_line(html => "hello 'world'"); my $ltx = muse_format_line(ltx => "hello #world");
Output the given chunk in the desired format (html or ltx).
html
ltx
Accepts a third parameter with the language code. This is usually not needed unless you're dealing with French.
This is meant to be used for headers, or for on the fly escaping. So lists, footnotes, tables, blocks, etc. are not supported. Basically, we process only one paragraph, without wrapping it in <p>.
Open the file $file, which is supposed to be UTF-8 encoded. Decode the content and read its Muse header.
Returns an hash reference with the metadata.
If the second argument is set and is ltx or <html>, filter the hashref values through muse_format_line.
muse_format_line
It dies if the file doesn't exist or can't be read.
Format the $body text (assumed to be decoded) as HTML and return it. Header is discarded.
$body can also be a reference to a scalar to speed up the argument passing.
Format the $body text (assumed to be decoded) as LaTeX and return it. Header is discarded
Same as above, but returns the Text::Amuse document instead.
Rewrite the headers of the given file, adding/replacing the header where appropriate.
To install Text::Amuse, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Amuse
CPAN shell
perl -MCPAN -e shell install Text::Amuse
For more information on module installation, please visit the detailed CPAN module installation guide.