I'm thinking of making a simple script to turn Project Gutenburg texts into LaTeX documents, so that they are nicely typeset and ready for reading. However to do that I'll need a fairly good list of what characters I should be handling specially.
My plan is to run a sed script on it, making substitutions, then add a basic preamble at the start, end document at the end, then run LaTeX on it. It doesn't seem too hard, but given the length of most of these ebooks I'd rather not try and find all the things my script misses by hand.
Here is the list I have so far:
- If I use UTF8 I should already be able to use most fancy characters without adjustment.
"foo"
for``foo''
'foo'
with`foo'
- Replacing
...
with\ldots
- Replacing hyphens with --- when appropriate (that could be a challenge)
~
with$\sim$
What else am I missing?
I know using the HTML versions would look a lot nicer, but the eBooks have lots of fancy stuff that looks really hard to convert.
Also, does anyone know much about GutenMark? It seems to do the same thing as I just proposed.
Mr. Drofnats
toMr.\ Drofnats
, or betterMr.~Drofnats
. – Werner Dec 19 '11 at 18:22csquotes
package. See fontspec with Helvetica breaks quotes for an example. – Alan Munn Dec 19 '11 at 18:44