Quote:
Originally Posted by frabjous
Could you have the program keep track of how many open braces there are, and then, when there's any kind of change, close them all, and then reopen the ongoing ones?
|
Yeah, that might be the trick. It still feels like a bit of a cop-out... but (EDIT->)
not a terrible one.
I'm a little surprised that doing the ideal thing seems to be a fairly non-straightforward problem.
I'm happy to report though that the development version I am working on really seems to be free of unicode errors, and is shaping up to work remarkably well.
Thanks to HTML's <H1> ... <H6> tags, pacify.py should be able to convert cleanly formatted HTML files well-nigh directly into PDF via LaTeX.
I'm also on the verge of starting to add interactive processing algorithms... (which do clean-up and/or address ambiguous cases after automated processing, and which can be disabled)
The first interactive plugin (or rather interactive portion of a plugin) will be for detecting errors/problems with auto-smartened quotation marks.
i.e.: If number of open quotation marks and closed quotation marks do not add up [unless it's a multi-paragraph quotation] or open/close incorrectly, ask the user for advice on what to do.
The second one I plan to work on will try to autodetect chapter/setion/et cetera headers when they are imported from RTF or plaintext files (in which cases they are not as unambiguous as when imported from HTML that uses H1 ... H6).
- Ahi