I used pandoc first to generate epub from markdown text. But I can't generate the epub has satisficated format. Then, I try to generate epub by Perl5. There is EBook::EPUB module on CPAN. EBook::EPUB is great module. It can generate good epub. Here is a source code to generate perl-testing-handbook.epub. #!/usr/bin/env perl use strict; use warnings; use utf8; use 5.010000; use autodie; use EBook::