Text::Amuse::Preprocessor::Footnotes - Rearrange footnote numbering in muse docs
Given an input file, scan its footnotes and rearrange them. This means that such document:
#title test Hello [1] There [1] Test [1] [1] first Hello hello [1] second [1] third
will become
#title test Hello [1] There [2] Test [3] Hello hello [1] first [2] second [3] third
Given that the effects of the rearranging could be very destructive and mess up your documents, the module try to play on the safe side and will refuse to write out a file if there is a count mismatch between the footnotes and the number of references in the body.
The core concept is that the module doesn't care about the number. Only order matters.
This could be tricky if the document uses the number between square brackets for other than footnotes.
Also used internally by Text::Amuse::Preprocessor.
Constructor with the following options:
The input file. It must exists.
The output file. It will be written by the module if the parsing succeedes. If not specified, the module will run in dry-run mode.
Print some additional info.
Do the job, write out output and return output. On failure, set an arror and return false.
output
Internal method to rewrite the footnotes. Type can be primary or secondary.
Accesso to the error. If there is a error, an hashref with the following keys will be returned:
The total number of footnote references in the body.
The total number of footnotes.
The reference's numbers found in the body as a long string.
The footnote' numbers found in the body as a long string.
Return a string with the errors caught, undef otherwise.
Return the directory name used internally to hold the temporary files.
To install Text::Amuse::Preprocessor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Amuse::Preprocessor
CPAN shell
perl -MCPAN -e shell install Text::Amuse::Preprocessor
For more information on module installation, please visit the detailed CPAN module installation guide.