Some must use tools and best practices
apt-get install epubcheck calibre sigil fbreader pandoc tex4ht hevea
Some edition recommendations:
<link href="../Styles/ebook.css" rel="stylesheet" type="text/css" />
You can use the following style sheet as a starting point and customize it: cat ebook.css
edit epub manually with viepub format is just a zip you can unzip it and rezip it using the following command zip -rX ../my.epub mimetype META-INF/ OEBPS/ Now here are some vi search and replace commands that are interesting to get rid of word html ugly conversion: :%s/a name=/a id=/g :%s/"Image /"Image_/g :%s/align="[^"]*" //g :%s/<br clear="all"/<br/g :%s/.nbsp;//g :%s/ class="[^"]*" / /g :%s/ class="[^"]*">/>/g :%s/<span style="font-family:Calibri">//g For chapter *** separations: :%s/^ <p>\*<\/p>\n\n <p>\* \*<\/p>/ <p><br \/><\/p>\r\r <p style="text-align: center;">* * *<\/p>\r\r <p><br \/><\/p>/g :%s/^ <p>\*<\/p>\n\n <p>\*\*<\/p>/ <p><br \/><\/p>\r\r <p style="text-align: center;">* * *<\/p>\r\r <p><br \/><\/p>/g Also remove all <meta content="" name="Titre" /> <meta content="" name="Mots clés" /> <meta content="Microsoft Word 14 (filtered)" name="Generator" /> To clean ugly word save as html you can also make use of these: :%s/<a id="_Toc.*"><\/a>//g :%s/<a id="_Toc.*">//g :%s/<span[^>]*>//g :%s/<p style="[^"]*">/<p>/g :%s/<i style="[^"]*">/<p>/g :%s/<b style="[^"]*">/<p>/g :%s/<span>//g :%s/<\/span>//g equations in ebooksName of the game here is to include equations not as a bitmap and be able to scale them without loss of quality. The only easy way I found is to use svg format using this script:
Using the following command: ./eq2svg "\lim_{n\to +\infty}\frac{b-a}{n}\sum_{k=0}^{n-1}f\left(a+k\frac{b-a}{n}\right)=\int_a^bf(x)dx" riemann.svg 2000 generates following riemann svg file: Alternative methods can be found here: http://superuser.com/questions/315270/generating-svg-from-latex-tikz figures in ebooksHere again we can use this script to convert a postscript figure (e.g. printed from a word document) to a svg format:
kindle mobi format conversion
|
Main Page >