Epub: Difference between revisions

From 太極
Jump to navigation Jump to search
Line 37: Line 37:
pandoc test.md -o test.epub
pandoc test.md -o test.epub
</syntaxhighlight>
</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 epub =
= Word to epub =

Revision as of 10:54, 10 October 2015

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

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.

Markdown to epub

Some Examples

Online markdown editor

http://dillinger.io/

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 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

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!