
On Thu, January 26, 2012 12:35 pm, Marcello Perathoner wrote:
On 01/26/2012 07:48 PM, Lee Passey wrote:
This is, indeed, a thorny issue if you want to create a system where the user gets to choose between curly and straight punctuation. One solution is that which I proposed, which is to use' and rely on entity definitions to "make it look good."
A better solution, which is already implemented in epubmaker, is that you use apostrophe in the master file and the converter substitutes it with right curly quote.
Sure, it's always possible to solve the problem by re-writing the file; you could do it with regex and xsl among other tools. It's so simple that even BowerBird could do it in Python (although for this particular task maybe Perl would be better). The challenge is to produce a file that can be displayed differently according to the end user's preferences /without/ re-writing the file...