Epub: Difference between revisions

From 太極
Jump to navigation Jump to search
 
(26 intermediate revisions by the same user not shown)
Line 4: Line 4:
* http://hutchinson.belmont.ma.us/tth/ebooklatex.html
* http://hutchinson.belmont.ma.us/tth/ebooklatex.html
* Using [http://johnmacfarlane.net/pandoc/demos.html pandoc]
* Using [http://johnmacfarlane.net/pandoc/demos.html pandoc]
The <sample2e.tex> file from [http://en.wikibooks.org/wiki/LaTeX/Sample_LaTeX_documents wikibooks.org] works well although this tex file does not include any figure nor table.
<pre>
pandoc -f latex sample2e.tex -o sample2e.epub
</pre>


= XHTML to epub =
= XHTML to epub =
Line 10: Line 15:
* http://www.opensourceforu.com/2011/05/how-to-produce-ebook-in-epub-format/
* http://www.opensourceforu.com/2011/05/how-to-produce-ebook-in-epub-format/
* http://webdesign.about.com/od/epub/a/build-an-epub.htm
* http://webdesign.about.com/od/epub/a/build-an-epub.htm
== [https://epub.press/ EpubPress] ==
* The server (https://github.com/haroldtreen/epub-press) can be installed on local machine
* The client can be installed through [https://chrome.google.com/webstore/detail/epubpress-read-the-web-of/pnhdnpnnffpijjbnhnipkehhibchdeok Chrome store] or [https://github.com/haroldtreen/epub-press-clients/tree/master/packages/epub-press-chrome#usage-with-local-server by hand] if using with a local server.
== XML to epub ==
[http://journal.code4lib.org/articles/9462 An article] and [https://github.com/eirikhanssen/jats2epub its software called 'jats2epub' on github] to convert xml to epub especially for journal articles.
Consider the article ''Software for Computing and Annotating Genomic Ranges'' by Michael Lawrence
* [http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1003118 XML] and PDF version
* [http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3738458/ epub] version done by PubMed Central.
= Word/docx to md =
<pre>
pandoc --extract-media ./myMediaFolder -f docx -t markdown -o output.md input.docx
</pre>


= Markdown to epub =
= Markdown to epub =
* [http://johnmacfarlane.net/pandoc/epub.html pandoc]
* [http://johnmacfarlane.net/pandoc/epub.html pandoc] and the [http://pandoc.org/installing.html download] page contains deb for Debian/Ubuntu.
* https://puppetlabs.com/blog/automated-ebook-generation-convert-markdown-epub-mobi-pandoc-kindlegen
* https://puppetlabs.com/blog/automated-ebook-generation-convert-markdown-epub-mobi-pandoc-kindlegen


== Some Examples ==
== Some Examples ==
* [https://github.com/karlseguin/the-little-redis-book The little Redis book] and its [http://openmymind.net/2012/1/23/The-Little-Redis-Book/ webpage].
* [https://github.com/karlseguin/the-little-redis-book The little Redis book] and its [http://openmymind.net/2012/1/23/The-Little-Redis-Book/ webpage].
== Turn your book into a website (deploy it in GitHub) and an ePub using Pandoc ==
https://opensource.com/article/18/10/book-to-website-epub-using-pandoc
== Online markdown editor ==
* http://dillinger.io/ (simple)
* https://stackedit.io/editor (more complete)
* https://jbt.github.io/markdown-editor/ (github flavored)
After export the file to .md format, we can use pandoc to convert it to epub.
<syntaxhighlight lang='bash'>
pandoc test.md -o test.epub
</syntaxhighlight>
A test markdown file:
<pre>
# main.cpp
```sh
$ g++ foo.h main.cpp
```
```cpp
int main()
{
}
```
# foo.h
```h
#ifndef _foo_H
#define _foo_H
#include <iostream>
using namespace std;
...
#endif
```
# foo.cpp
```cpp
int foo()
{
}
```
</pre>
== Word to markdown converter ==
https://word-to-markdown.herokuapp.com/


= Word to epub =
= Word to epub =
* http://www.wikihow.com/Convert-a-Word-Document-to-Epub
* http://www.wikihow.com/Convert-a-Word-Document-to-Epub
= PDF to epub =
* Possibility 1: PDF to word to epub? But there is no way to convert pdf to word or open pdf in MS-Word.
* Possibility 2: PDF to html to epub. Use [http://www.ubuntugeek.com/howto-convert-pdf-files-to-html-files.html pdftohtml] program. The syntax is '''pdftohtml -c MyDocument.pdf''' where '-c' is to include graphics. Another one is called [https://github.com/coolwanglu/pdf2htmlEX pdf2htmlEX].


= Directly download epub file =
= Directly download epub file =
Line 28: Line 100:
** Download it as an ePub (beta).  
** Download it as an ePub (beta).  
** view a pdf version of the article.
** view a pdf version of the article.
= Online book download =
* http://www.allitebooks.com/
= Remove DRM =
[https://www.makeuseof.com/tag/ebook-converter-guide/ The Essential Ebook Converter Guide] using Calibre or [https://www.any-video-converter.com/any-ebook-converter-free/ Any eBook Converter Freeware]


= Create epub =
= Create epub =
* Using [http://www.epubli.co.uk/instruction/ebook/convert/calibre Calibre]. Calibre also has a [http://manual.calibre-ebook.com/edit.html cool interface] to edit an ebook file.
* [http://www.epubli.co.uk/instruction/ebook/convert/calibre Instructions on the creation of an ePUB with Calibre]. Calibre also has a [http://manual.calibre-ebook.com/edit.html cool interface] to edit an ebook. It also has a list of ebook creation tutorials on [http://calibre-ebook.com/help its web site].
* Create epub files manually http://www.jedisaber.com/eBooks/Introduction.shtml.
* Create epub files manually http://www.jedisaber.com/eBooks/Introduction.shtml.
* http://www.ibm.com/developerworks/xml/tutorials/x-epubtut/ (no special tools needed)
* http://www.ibm.com/developerworks/xml/tutorials/x-epubtut/ (no special tools needed)
Line 53: Line 131:
== [http://www.literatureandlatte.com/scrivener.php Scrivener] (licensed $40 for Windows | Mac) ==
== [http://www.literatureandlatte.com/scrivener.php Scrivener] (licensed $40 for Windows | Mac) ==
* [http://tomely.com/guides/using-scrivener Creating an ebook using Scrivener]
* [http://tomely.com/guides/using-scrivener Creating an ebook using Scrivener]
* It has a beta version for Linux distribution. See [http://www.literatureandlatte.com/forum/viewforum.php?f=33 forum].
* It has a beta version for Linux distribution. See [http://www.literatureandlatte.com/forum/viewforum.php?f=33 forum] and an [http://www.omgubuntu.co.uk/2011/03/scrivener-for-linux-gets-official-beta-release introduction] from omgubuntu.co.uk.
* https://www.literatureandlatte.com/video.php
* http://www.makeuseof.com/tag/scrivener-the-best-writing-program-for-the-mac-and-pc/


== BlueGriffon EPUB Edition (licensed) ==
== BlueGriffon EPUB Edition (licensed) ==
[http://www.bluegriffon-epubedition.com/BGEE.html BlueGriffon EPUB Edition]: a cross-platform Wysiwyg editor able to natively create and edit EPUB2 and EPUB3 ebooks!
[http://www.bluegriffon-epubedition.com/BGEE.html BlueGriffon EPUB Edition]: a cross-platform Wysiwyg editor able to natively create and edit EPUB2 and EPUB3 ebooks!
== R: bookdown ==
https://bookdown.org/yihui/bookdown/e-books.html#epub
= bookworm: Ebook reader =
http://ubuntuhandbook.org/index.php/2017/09/install-bookworm-ebook-reader-via-ppa-in-ubuntu-16-04-17-04/
Slow (no response). Interface not as useful as Calibre.
= Reading epub files in R =
* [https://cran.r-project.org/web/packages/epubr/ epubr] package. https://leonawicz.github.io/epubr/
= Modify PDF for ereaders =
== KROP ==
http://arminstraub.com/software/krop

Latest revision as of 14:26, 29 September 2022

ePub is an open ebook standard produced by the International Digital Publishing Forum.

Latex to epub

The <sample2e.tex> file from wikibooks.org works well although this tex file does not include any figure nor table.

pandoc -f latex sample2e.tex -o sample2e.epub

XHTML to epub

EpubPress

XML to epub

An article and its software called 'jats2epub' on github to convert xml to epub especially for journal articles.

Consider the article Software for Computing and Annotating Genomic Ranges by Michael Lawrence

  • XML and PDF version
  • epub version done by PubMed Central.

Word/docx to md

pandoc --extract-media ./myMediaFolder -f docx -t markdown -o output.md input.docx 

Markdown to epub

Some Examples

Turn your book into a website (deploy it in GitHub) and an ePub using Pandoc

https://opensource.com/article/18/10/book-to-website-epub-using-pandoc

Online markdown editor

After export the file to .md format, we can use pandoc to convert it to epub.

pandoc test.md -o test.epub

A test markdown file:

# main.cpp
```sh
$ g++ foo.h main.cpp
```

```cpp
int main()
{
}
```

# foo.h
```h
#ifndef _foo_H
#define _foo_H
#include <iostream>
using namespace std;
...
#endif
```

# foo.cpp
```cpp
int foo()
{
}
```

Word to markdown converter

https://word-to-markdown.herokuapp.com/

Word to epub

PDF to epub

  • Possibility 1: PDF to word to epub? But there is no way to convert pdf to word or open pdf in MS-Word.
  • Possibility 2: PDF to html to epub. Use pdftohtml program. The syntax is pdftohtml -c MyDocument.pdf where '-c' is to include graphics. Another one is called pdf2htmlEX.

Directly download epub file

For example the article Dispersion estimation and its effect on test performance in RNA-seq data analysis: a simulation-based comparison of methods can be accessed from www.ncbi.nlm.nih.gov/pubmed. It also provides a link to

  • Go to the original journal website
  • View the article like an ereader (called PubReader format) on web browser. From there, we can also view the article as

Online book download

Remove DRM

The Essential Ebook Converter Guide using Calibre or Any eBook Converter Freeware

Create epub

Calibre edit book (open source)

  • Right click an ebook and choose Edit book option to let you edit HTML, CSS and images in ePub and AZW3 books; this is a killer feature. Error checking, table of contents, merging, splitting, bulk renaming and so on. For details, see Calibre edit manual.
  • Click 'edit metadata' also works like a charm.
  • We can also save the modified ebook back to disk for future use.

Sigil (open source)

See the above XHTML_to_epub XHTML to epub. Have not tried it yet. It looks like it is very similar to Calibre except it has a mysterious home page.

Scriba (open source)

http://scribaebookmake.sourceforge.net/

Scrivener (licensed $40 for Windows | Mac)

BlueGriffon EPUB Edition (licensed)

BlueGriffon EPUB Edition: a cross-platform Wysiwyg editor able to natively create and edit EPUB2 and EPUB3 ebooks!

R: bookdown

https://bookdown.org/yihui/bookdown/e-books.html#epub

bookworm: Ebook reader

http://ubuntuhandbook.org/index.php/2017/09/install-bookworm-ebook-reader-via-ppa-in-ubuntu-16-04-17-04/

Slow (no response). Interface not as useful as Calibre.

Reading epub files in R

Modify PDF for ereaders

KROP

http://arminstraub.com/software/krop