Friday, October 1, 2010

Baseball Field Chalking

LaTeX is EPUB - the easy way

Wimmerowi Paul was jealous of his blog entry Guide Contents Checkout: Sigil - ePub lightly, easily and pleasantly where he described how to create your "first" e-book using the free wdytora Sigil .
As with everything I use L A T E X and ...

L A T E X in some circles is considered to be an excellent program for (professional) desktop publishing. They like it and use a particular environment "technical" (but not only). Nothing prevents to use it to publish a book fiction.

very easy to use it to get high quality PDF file with an electronic image of the book.

Today, more and more popular e-book readers using the "lighter" than the PDF format. The most popular nalkeżą EPUB and Mobipocket . The first one is used by virtually all readers of electronic books, the latter is actually the only format available for Kindle.

question arises whether you can use L A T E X to produce a book in one of these formats.

L A T E X is EPUB - the easy way

You will need:
  1. A text editor ( T E X works in my case).
  2. L A T E X . Other developers
  3. L A T E X a T E X 4HT.
  4. Calibre - free software to convert and manage electronic books.
Procedure:
  1. Using your editor, you type what you tell us your mind. You must know L A T E X in the very basic and give the document to the basic structure of the chapters, subsections (not forgetting the table of contents and title page).
  2. "compile" a book to PDF format. It can be used in electronic readers (if you prefer that format) and on an ordinary computer.
  3. We do
  4. conversion to HTML using T E X 4HT. I have done the following command:




    htlatex testowybook.tex "xhtml, 2, charset = utf-8" \\
    "-cunihtf-utf8 "
    (Additional parameters used in the quoted bid XHTML and split the file according to the division book chapter (2) and use the UTF-8 (the other).)
  5. As a result of this action on record the resulting files carry the following:




    testowybookli2.html
    testowybookli1.html
    testowybook.html
    testowybookch3. html
    testowybookch2.html
    testowybookch1.html
    testowybook.css
  6. caliber Let's use this thing to convert for something strawniejszego ...

    • After starting caliber add a book to the library, choose "Add books from the single directory" pointing to all the html files. (Caliber is so smart that it automatically finds and joins images.)




    • caliber behaves quite strange: each of the chapters of the book appears as a separate item, while all the chapters went to the archives zip ...



    • we convert by selecting the "Convert Individually. I add metadata (author name), you can think of adding the cover (just ask when you edit the metadata to get something generated caliber). Convert the EPUB format zip.



    • I still generate by variant. Mobi (Kindle, if a holder wished to look here.)
    're done!
    subtitle "the easy way" means so much that we got a product which is not ideal ! remaining remnants of links for navigation between the HTML files.
Subsequent chapters are just to see how (and whether) runs the table of contents.

1.2 Files

If anyone interested can share source files (and output):
  1. testowybook.tex
  2. testowybook.pdf
  3. testowybook.epub
  4. testowybook.mobi

0 comments:

Post a Comment