Showing posts with label book. Show all posts
Showing posts with label book. Show all posts

Sunday, March 14, 2010

Anna Karenina (Russian Novel)

I created an EPUB book containing Leo Tolstory's Anna Karenina in its original Russian language. It is not yet complete. Comments are welcome.




Все счастливые семьи похожи друг на друга, каждая несчастливая семья несчастлива по-своему.

Все смешалось в доме Облонских. Жена узнала, что муж был в связи с бывшею в их доме француженкою-гувернанткой, и объявила мужу, что не может жить с ним в одном доме. Положение это продолжалось уже третий день и мучительно чувствовалось и самими супругами, и всеми членами семьи, и домочадцами. Все члены семьи и домочадцы чувствовали, что нет смысла в их сожительстве и что на каждом постоялом дворе случайно сошедшиеся люди более связаны между собой, чем они, члены семьи и домочадцы Облонских. Жена не выходила из своих комнат, мужа третий день не было дома. Дети бегали по всему дому, как потерянные; англичанка поссорилась с экономкой и написала записку приятельнице, прося приискать ей новое место; повар ушел еще вчера со двора, во время обеда; черная кухарка и кучер просили расчета.

Korean short story: Death of a Prostitute

Death of a Prostitute is a Korean short story about a young prostitute found dead on a street. The ebook is written in Korean and meant for testing Korean on a digital reader supporting EPUB format.


Vietnamese Novel 'Thoi Xa Vang'

Thoi Xa Vang is a Vietnamese novel in EPUB format. It will work with Adobe Digital Editions, Nook and Sony digital reader.


Embedding Russian/Cyrillic/Unicode Fonts in EPUB books

I'd like to read Russian literature in its original language. So I downloaded Leo Tolstoy's Anna Karenina and put it in my Nook.


  1. The original format of the book was a Word document. I had to save it as text file and convert its character set from Windows Cyrillic (CP1251) to UTF-8 using Iconv.

    iconv -f CP1251 -t UTF-8 annakarenina.txt > annakarenina-u.txt


  2. I opened the text file with Sigil, formatted it and saved it as EPUB file.

  3. Put Unicode fonts in the EPUB file that have a cyrillic range. You can do so with 7-zip. I recommend Book Antiqua, MinionPro or DejaVu Serif.

    • antquab.ttf
    • antquabi.ttf
    • antquai.ttf
    • bkant.ttf


  4. Edit content.opf so that it has references to the fonts:

    <item id="font.bold" href="fonts/antquab.ttf" media-type="application/x-font-truetype"/>

    <item id="font.bolditalic" href="fonts/antquabi.ttf" media-type="application/x-font-truetype"/>

    <item id="font.italic" href="fonts/antquai.ttf" media-type="application/x-font-truetype"/>

    <item id="font.regular" href="fonts/bkant.ttf" media-type="application/x-font-truetype"/>

  5. Edit the stylesheet.

    @font-face {
    font-family: "Book Antiqua";
    font-weight: normal;
    font-style: normal;
    src: url(../fonts/bkant.ttf);
    }
    @font-face {
    font-family: "Book Antiqua";
    font-weight: normal;
    font-style: italic;
    src: url(../fonts/antquai.ttf);
    }
    @font-face {
    font-family: "Book Antiqua";
    font-weight: bold;
    font-style: normal;
    src: url(../fonts/antquab.ttf);
    }
    @font-face {
    font-family: "Book Antiqua";
    font-weight: bold;
    font-style: italic;
    src: url(../fonts/antquabi.ttf);
    }
    a {
    color: inherit;
    text-decoration: inherit;
    }
    em, i {
    font-family: "Book Antiqua", serif;
    font-weight: normal;
    font-style: italic;
    }
    strong, b, h1, h2, h3, h4, h5 {
    font-family: "Book Antiqua", serif;
    font-weight: bold;
    font-style: normal;
    }
    p {
    text-indent: 2em;
    margin-top: 0pt;
    margin-bottom: 0pt;
    }
    body {
    font-family: "Book Antiqua", serif;
    margin-left: 5pt;
    margin-right: 5pt;
    text-align: justify;
    }
    .sgc-1 {text-align: center}
    .sgc-2 {text-align: right}



To see how a Russian ebook might look on your Nook or any other reader, download and try my ebook Anna Karerina.

Saturday, March 13, 2010

Creating Korean eBooks in EPUB format

As far as I know, there aren't a lot of Korean ebooks in EPUB format. However, if you have a Korean literature of any kind, you can create an EPUB file for viewing on a digital reader. Assuming that you have a Korean text file in KSC5601 or UHC character set, you should convert your text file into Unicode encoding. You can do so with iconv.


iconv -f UHC -t UTF-8 oldtext.txt > newtext.txt

Open the new Unicode-encoded text in Sigil, edit it and save it as an EPUB file. Now you should add Korean fonts into your EPUB file. I recommend the following fonts.


  • H2GTRM.TTF
  • H2GTRB.TTF

Then, edit content.opf in your EPUB file so that the manifest section contains the following:


<item id="h2gtrm.ttf" href="fonts/h2gtrm.ttf" media-type="application/x-font-truetype"/>
<item id="h2gtrb.ttf" href="fonts/h2gtrb.ttf" media-type="application/x-font-truetype"/>

Start Sigil again and open your EPUB file. Select the dual editing mode and insert the following CSS definitions into the HTML header.


  @font-face {
font-family: HYGothic-Medium;
font-weight: normal;
font-style: normal;
src: url(../fonts/h2gtrm.ttf);
}
@font-face {
font-family: HYGothic-Bold;
font-weight: bold;
font-style: normal;
src: url(../fonts/h2gtrb.ttf);
}
a {
color: inherit;
text-decoration: inherit;
}
em, i {
font-family: HYGothic-Medium, sans-serif;
font-weight: normal;
font-style: italic;
text-decoration: underline;
}
strong, b, h1, h2, h3, h4, h5, h6 {
font-family: HYGothic-Bold, sans-serif;
font-weight: bold;
font-style: normal;
}
body {
font-family: HYGothic-Medium, sans-serif;
margin-left: 5pt;
margin-right: 5pt;
text-align: justify;
}

Test your ebook with Adobe Digital Editions. It should display Korean correctly.

Wednesday, March 10, 2010

How to embed Unicode fonts in EPUB ebooks

I own a Barnes and Noble's Nook and recently had a trouble reading a Vietnamese novel on Nook. But I resolved the issue by hacking the EPUB ebook as explained below:



  1. Get the Unicode fonts that you want for your ebook. The following fonts come with Adobe Reader and cover enough Unicode ranges.
    • MyriadPro-Bold.otf
    • MyriadPro-It.otf
    • MyriadPro-Regular.otf

    With 7-zip, put the Unicode fonts in your ebook.
  2. Extract content.opf from your ebook and insert the following lines in the manifest section:
    <item href="MyriadPro-Bold.otf" id="embedded.font.bold" media-type="font/opentype"/>

    <item href="MyriadPro-It.otf" id="embedded.font.italic" media-type="font/opentype"/>

    <item href="MyriadPro-Regular.otf" id="embedded.font.regular" media-type="font/opentype"/>
    Put content.opt back into the ebook file.
  3. Extract stylesheet.css from the ebook and append the following contents:
    @font-face {
    font-family: "Myriad Pro";
    font-weight: normal;
    font-style: normal;
    src: url(MyriadPro-Regular.otf);
    }
    @font-face {
    font-family: "Myriad Pro";
    font-weight: normal;
    font-style: italic;
    src: url(MyriadPro-It.otf);
    }
    @font-face {
    font-family: "Myriad Pro";
    font-weight: bold;
    font-style: normal;
    src: url(MyriadPro-Bold.otf);
    }
    a {
    color: inherit;
    text-decoration: inherit;
    }
    em, i {
    font-family: "Myriad Pro", sans-serif;
    font-weight: normal;
    font-style: italic;
    }
    strong, b, h1, h2, h3, h4, h5 {
    font-family: "Myriad Pro", sans-serif;
    font-weight: bold;
    font-style: normal;
    }
    body {
    font-family: "Myriad Pro", sans-serif;
    margin-left: 5pt;
    margin-right: 5pt;
    text-align: justify;
    }
    p {
    text-indent: 2em;
    margin-top: 0pt;
    margin-bottom: 0pt;
    }
    Put stylesheet back in your ebook.
  4. Try and read your ebook with Adobe Digital Editions or your favorite ebook reader.

Monday, October 20, 2008

Outlook on eBook Business

I've been aware of ebooks since long ago. In fact, I was scouring the
Internet for ebooks of all sorts, including literature and technical
books years ago. I haven't been collecting ebooks for quite a while,
but when I checked recently for an economy textbook, I found tons of
ebooks, including various collegiate books. That's intellectual bonanza.



Anyway,
what I am trying to say is, is it reasonably feasible to make profits
from ebooks? Just take a look at all the publications and audio books
circulating in the IRC networks and sharing networks.



When
a publisher sends manuscripts of books in PDF form to a printing house,
some of these manuscripts get leaked to the Internet. Even if the
manuscripts are in encrypted PDF form, it's possible to break the encryption. Years back, there was one hacker who succeeded in breaking the encryption but got arrested by FBI (Poor guy, what about freedom of speech).



However,
if someone becomes successful in selling ebooks for reading on cell
phones or iPods, ebooks can possibly become a profitable trend.



Recent rampant success of Apple iPhone and its App Store
has opened opportunities for many entrepreneurs. I don't own an iPhone,
hence I don't know what's available in the iPhone App Store. But
piggybacking on iPhone madness, developing an ebook reader for iPhone
and making deals with publishers or even wanna-be writers might be a
good business idea.



Anyway, if you are into serious classic literature without much concern for modern recyclable literary garbages, I recommend Project Gutenberg. Gutenberg is a wonderful philanthropic repository of copyright-free literature.

About This Blog

KBlog logo This blog is about current events and issues concerning general population. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

icon
Powered By Blogger