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  There  Test   first Hello hello  second  third
#title test Hello  There  Test  Hello hello  first  second  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 succeeds. 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.
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.
The unified diff between the footnotes and the references' list
Return a string with the errors caught, undef otherwise.
Return the directory name used internally to hold the temporary files.