#! /usr/bin/perl # Script to pre-process XML input before processing it for various purposes. # Options specify which transformations are to be done. Monospaced literal # layout blocks are never touched. # Changes: # -ascii: Replace ’ by ' # Replace © by (c) # Replace † by * # Replace ‡ by ** # Replace   by a space # Replace – by - # Put quotes round text # # -quoteliteral: # Put quotes round text # # -bookinfo: Remove the element from the file # # -fi: Replace "fi" by fi except when it is in an XML element, or # inside a . # # -html: Certain things are done only for HTML output: # # If is followed by optional space and then a # newline, the space and newline are removed, because otherwise you # get a blank line in the HTML output. # # -noindex Remove the XML that generates indexes. # -oneindex Ditto, but add XML to generate a single index. # # -optbreak Insert an optional line break (zero-width space, ​) after # every underscore in text within