View Single Post
Old 05-16-2009, 10:16 AM   #12
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Thanks for all the helpful comments! It is good to know I am not the only one bemoaning carelessly typeset eBooks.

It seems to me that GutenMark (as per this page: http://www.sandroid.org/GutenMark/features.html) does more or less what my dream Python script ought to do. Admittedly I am not thrilled with the resulting PDFs, particularly not from an eBook reader device viewing standpoint. However, it seems to me that either (1) I ought to be able to adjust the LaTeX files to have the PDFs better match my taste, or (2) the sort of script I was thinking about is [as evidenced by GutenMark] reasonably possible to do and the GutenMark source might yield many a tips and tricks toward that.

Let me also add, that smart quotes are not as difficult as they may first seem. It is not something that can be blindly done by regexes; but a parser that treats the content as a stream and keeps in mind its current states (i.e.: am I currently in a quoted portion of the text?) ought to be able to fairly reliably restore them. Assuming of course that the original text did not take too many liberties. Most lack of matching front and back quotes is due to the convention of using only a back quote (and not a front one) on non-first paragraphs of a multi-paragraph quote by a single speaker.

I'll share any great discoveries, epiphanies, and gorgeously typeset books this endeavour may lead to.

Thanks again!

AHI
ahi is offline   Reply With Quote