51 Comments

  1. James

    Nice job Matthew – looks nice on the Kindle, much better than the raw PDF. And I can live without the diacritic marks 🙂

    James

  2. Conor

    Loss of diacritics is sad, but I’m surprised you did ODT and mobi, but not EPUB! Either way, fantastic that you’re supporting access to this wild translation. Looking forward to finding a suitable version for mobile reading! Thanks again.

    • One of the Kindle’s little annoyances is that it doesn’t recognise epub formats. (For some reason Amazon don’t want you to have access to these popular formats…)

      But look no further, another commenter has produced a epub version too. See Blau’s comment.

  3. Next time you may want to check Briss– http://sourceforge.net/projects/briss/. Cross platform PDF cropping utility. It does a good job of removing the hard line feeds and irrelevant headers and footers. The result is still a PDF, but the cropped version can be converted easily by Calibre with text that will re-flow to fit different sized screens. I haven’t paid attention to what it does to footnotes, so that could still be a dealbreaker in some circumstances.

      • Conrad

        The following changes restore most of the missing diacritics in the ePub version.


        perl -pi -w -e 's/Barad- Dur/Barad-Dûr/g;' *.xhtml
        perl -pi -w -e 's/Barad-Dur/Barad-Dûr/g;' *.xhtml
        perl -pi -w -e 's/...'The World is Text,/...\‘The World is Text,/g;' *.xhtml
        perl -pi -w -e 's/'/\’/g;' *.xhtml
        perl -pi -w -e 's/\`/\‘/g;' *.xhtml
        perl -pi -w -e 's/ "/ “/g;' *.xhtml
        perl -pi -w -e 's/\("/\(“/g;' *.xhtml
        perl -pi -w -e 's/" /” /g;' *.xhtml
        perl -pi -w -e 's/"\n/”\n/g;' *.xhtml
        perl -pi -w -e 's/",/”,/g;' *.xhtml
        perl -pi -w -e 's/";/”;/g;' *.xhtml
        perl -pi -w -e 's/"\)/”\)/g;' *.xhtml
        perl -pi -w -e 's/N menor/Númenor/g;' *.xhtml
        perl -pi -w -e 's/N rnen/Núrnen/g;' *.xhtml
        perl -pi -w -e 's/Amon Sul/Amon Sûl/g;' *.xhtml
        perl -pi -w -e 's/Amon S l/Amon Sûl/g;' *.xhtml
        perl -pi -w -e 's/E:o/Éo/g;' *.xhtml
        perl -pi -w -e 's/Grima/Gríma/g;' *.xhtml
        perl -pi -w -e 's/alant r/alantír/g;' *.xhtml
        perl -pi -w -e 's/D nada/Dúnada/g;' *.xhtml
        perl -pi -w -e 's/D nedain/Dúnedain/g;' *.xhtml
        perl -pi -w -e 's/L rien/Lórien/g;' *.xhtml
        perl -pi -w -e 's/powers-that- be/powers-that-be/g;' *.xhtml
        perl -pi -w -e 's/An rien/Anórien/g;' *.xhtml
        perl -pi -w -e 's/azg l/azgûl/g;' *.xhtml
        perl -pi -w -e 's/Touch No!/Touché!/g;' *.xhtml
        perl -pi -w -e 's/lady- in-waiting/lady-in-waiting/g;' *.xhtml
        perl -pi -w -e 's/fianc No/fiancé/g;' *.xhtml
        perl -pi -w -e 's/prot Nog No/protégé/g;' *.xhtml
        perl -pi -w -e 's/step- three/step-three/g;' *.xhtml
        perl -pi -w -e 's/F Noanor/Fëanor/g;' *.xhtml
        perl -pi -w -e 's/Nomigr No/émigré/g;' *.xhtml
        perl -pi -w -e 's/m makil/mûmakil/g;' *.xhtml
        perl -pi -w -e 's/m mak /mûmak /g;' *.xhtml
        perl -pi -w -e 's/caf No/café/g;' *.xhtml
        perl -pi -w -e 's/d Noclass No/déclassé/g;' *.xhtml
        perl -pi -w -e 's/Khand- related/Khand-related/g;' *.xhtml
        perl -pi -w -e 's/Ephel D ath/Ephel Dúath/g;' *.xhtml
        perl -pi -w -e 's/E rendur/Eärendur/g;' *.xhtml
        perl -pi -w -e 's/L thien/Lúthien/g;' *.xhtml
        perl -pi -w -e 's/sans r proche/sans reproche/g;' *.xhtml
        perl -pi -w -e 's/Tzagan- Tzab/Tzagan-Tzab/g;' *.xhtml
        perl -pi -w -e 's/no- go/no-go/g;' *.xhtml
        perl -pi -w -e 's/twenty- seventh/twenty-seventh/g;' *.xhtml
        perl -pi -w -e 's/G- mandate/G-mandate/g;' *.xhtml
        perl -pi -w -e 's/to cal then Mountains/to call them Mountains/g;' *.xhtml
        perl -pi -w -e 's/And ril/Andúril/g;' *.xhtml
        perl -pi -w -e 's/werewolves-nin/werewolves -- nin/g;' *.xhtml
        perl -pi -w -e 's/counter- spy/counter-spy/g;' *.xhtml
        perl -pi -w -e 's/Sharya- Rana/Sharya-Rana/g;' *.xhtml

  4. Mark

    The .mobi/Kindle version seems to have a permanent white background on all of the text disallowing use of the alternate color schemes (I use white on black because of light sensitivity).
    Would there be a way to undo this so it works with the color schemes?

      • Mark

        I’m using the official Kindle App on my Mac, but I’m seeing the same result on the official Kindle app on my iPhone.
        However the text on the iPhone app is not actually changed to white but a gray, so you can still make out the letters, but it’s still highlighted with white.
        The color theme options are a function of the kindle app (white, black & Sepia) on both the Mac and iPhone not. The white highlight is also seen in the Sepia theme.

        • There’s some issues between OpenOffice and Calibre.

          It looks like Calibre is looking for a background colour for the text in the Document but if there isn’t anything set it chooses a white background.

          Interestingly when a file is created in OpenOffice it doesn’t set anything as the background colour – not even “No Colour” .

          You can fix this by manually selecting the text and choosing “No Fill”. I’ll try to get a new file up later today.

  5. Kate

    Has anyone else had problems with the Kindle for Android (v2.0.4.103870164) failing to open the .MOBI format file that’s linked above? All I get is white bars where text should be. Calibre opens the .MOBI file just fine, and I’m trying to use Calibre to re-convert the document.

    • Mark

      Kate, see my comments above. It sounds like you’re using a white text on black background theme yes? Try it with the white background and black text and you should be able to read it.
      It does seem to be the .mobi file itself as I’m seeing it on both my Mac and iPhone (and you on your Android).
      I was going to try the same thing with Calibre as well. I’d be curious about your results.

  6. Mark Valley

    Is seems to be a nice story! I’ve downloaded that for my kindle and will read as soon as i finish Cornwell stuff.

    Thanks!

  7. Came here looking for stuff on TwentyTen header rotation and stumbled across this, lovely stuff. I had the PDF version & wanted to read it on my Kindle – thanks for saving a lot of hassle on the conversion.

  8. Thank you so much! I’ve always had no end of trouble converting PDF files for my iPod Touch and Kindle. I wish people would stop using PDF as the primary ebook format of choice!

  9. Thomas B. Pryor

    Thanks. I was struggling to reformat The Last Ring-bearer” for my Kindle (the pdf type size was uncomfortably small) and luckily stumbled onto this website, which readily solved the problem. TBP

    • Glenn

      The problem seems to be that the Perl expressions ‘educate’ (make curly) the single and double quotes inside the XML tags. Here’s some Perl that does the ‘right’ thing:

      perl -pi -w -e 's/Barad- Dur/Barad-Dûr/g;' *.html
      perl -pi -w -e 's/Barad-Dur/Barad-Dûr/g;' *.html
      perl -pi -w -e "s/\.\.\.'The World is Text,/...\‘The World is Text,/g;" *.html
      perl -pi -w -e 's/"\.\.\./“.../g;' *.html
      perl -pi -w -e "s/'/\’/g;" *.html
      perl -pi -w -e 's/\`/\‘/g;' *.html
      perl -pi -w -e 's/"(\W)/”$1/g;' *.html
      perl -pi -w -e 's/"/“/g;' *.html
      perl -pi -w -e 'while (s/(<[^>]*?)“/$1"/g) {}' *.html
      perl -pi -w -e 'while (s/(<[^>]*?)”/$1"/g) {}' *.html
      perl -pi -w -e 'while (s/(<[^>]*?)’/$1"/g) {}' *.html
      perl -pi -w -e 's/N menor/Númenor/g;' *.html
      perl -pi -w -e 's/N rnen/Núrnen/g;' *.html
      perl -pi -w -e 's/Amon Sul/Amon Sûl/g;' *.html
      perl -pi -w -e 's/Amon S l/Amon Sûl/g;' *.html
      perl -pi -w -e 's/E:o/Éo/g;' *.html
      perl -pi -w -e 's/Grima/Gríma/g;' *.html
      perl -pi -w -e 's/alant r/alantír/g;' *.html
      perl -pi -w -e 's/D nada/Dúnada/g;' *.html
      perl -pi -w -e 's/D nedain/Dúnedain/g;' *.html
      perl -pi -w -e 's/L rien/Lórien/g;' *.html
      perl -pi -w -e 's/powers-that- be/powers-that-be/g;' *.html
      perl -pi -w -e 's/An rien/Anórien/g;' *.html
      perl -pi -w -e 's/azg l/azgûl/g;' *.html
      perl -pi -w -e 's/Touch No!/Touché!/g;' *.html
      perl -pi -w -e 's/lady- in-waiting/lady-in-waiting/g;' *.html
      perl -pi -w -e 's/fianc No/fiancé/g;' *.html
      perl -pi -w -e 's/prot Nog No/protégé/g;' *.html
      perl -pi -w -e 's/step- three/step-three/g;' *.html
      perl -pi -w -e 's/F Noanor/Fëanor/g;' *.html
      perl -pi -w -e 's/Nomigr No/émigré/g;' *.html
      perl -pi -w -e 's/m makil/mûmakil/g;' *.html
      perl -pi -w -e 's/m mak /mûmak /g;' *.html
      perl -pi -w -e 's/caf No/café/g;' *.html
      perl -pi -w -e 's/d Noclass No/déclassé/g;' *.html
      perl -pi -w -e 's/Khand- related/Khand-related/g;' *.html
      perl -pi -w -e 's/Ephel D ath/Ephel Dúath/g;' *.html
      perl -pi -w -e 's/E rendur/Eärendur/g;' *.html
      perl -pi -w -e 's/L thien/Lúthien/g;' *.html
      perl -pi -w -e 's/sans r proche/sans reproche/g;' *.html
      perl -pi -w -e 's/Tzagan- Tzab/Tzagan-Tzab/g;' *.html
      perl -pi -w -e 's/no- go/no-go/g;' *.html
      perl -pi -w -e 's/twenty- seventh/twenty-seventh/g;' *.html
      perl -pi -w -e 's/G- mandate/G-mandate/g;' *.html
      perl -pi -w -e 's/to cal then Mountains/to call them Mountains/g;' *.html
      perl -pi -w -e 's/And ril/Andúril/g;' *.html
      perl -pi -w -e 's/werewolves-nin/werewolves -- nin/g;' *.html
      perl -pi -w -e 's/counter- spy/counter-spy/g;' *.html
      perl -pi -w -e 's/Sharya- Rana/Sharya-Rana/g;' *.html

      The resulting epub works in iBooks as far as I can tell. When I finish reading the book, I’ll try to remember to fix any further errors and repost.

  10. Hi — It looks as though you got the conversion pretty well figured out, and I want to thank you for your efforts. (THANKS!) I just wanted to ask — did it ever occur to you to contact the translator and ask him for a non-PDF file? He seems to support your conversion, considering he links to it from his site; perhaps he could have saved you some work.

    So… did you ever get the issues worked out on the diacriticals?

    • I didn’t. But the purpose of this blog was to help with conversions in general, given available material. (I actually wasn’t aware the author had linked to my blog)

      The diachritics are not a problem usually, just in this specific case. I’ve updated the Kindle version with some of the improvements suggested in the comments. This version should be much more character complete.

  11. Heatblizzard

    This sounds like a very interesting AU fic. Too bad I cannot find the actual file to read it!

    I always thought that Gandalf hated science and technology but now it’s finally been confirmed and I know longer feel so crazy.

  12. Phil

    Hey, thanks for this MOBI conversion. I was attempting to read this in landscape (PDF) on my Paperwhite and it was terrible.

    Your conversion is great!

  13. Julliana

    Another method for converting PDFs might be this free converter tool kitpdf.com which lets users quickly make pdf to epub or mobi files. It doesn’t need to be installed, just upload files for results.

Leave a Reply

Your email address will not be published. Required fields are marked *