Skip to content

opensourcedoc/asciidoc-ebook-cjk-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AsciiDoc eBook Boilerplate for CJK

Synopsis

Boilerplate project to generate eBook with AsciiDoctor toolchain.

System Requirements

Usage

Windows

Clone the project locally and change your working directory accordingly:

> git clone https://github.com/opensourcedoc/asciidoc-ebook-cjk-boilerplate.git my-ebook
> cd my-ebook

Migrate the project:

> migrate.bat

Several files are generated. Keep the template files as is.

Modify parameters.yml as needed. Migrate the parameters of the ebook in the project:

> ruby migrate.rb

To compile an EPUB ebook:

> epub.bat

To compile a MOBI ebook:

> mobi.bat

An intermediate EPUB ebook is compiled as well.

To compile a PDF ebook:

> pdf.bat

To compile a PDF ebook for print:

> print.bat

Clean all ebooks:

> clean.bat

Unix

Clone the project locally and change your working directory accordingly:

$ git clone https://github.com/opensourcedoc/asciidoc-ebook-cjk-boilerplate.git my-ebook
$ cd my-ebook

Migrate the project:

$ ./migrate

Several files are generated. Keep the template files as is.

Modify parameters.yml as needed. Migrate the parameters of the ebook in the project:

$ ruby migrate.rb

To compile an EPUB ebook:

$ ./epub

To compile a MOBI ebook:

$ ./mobi

An intermediate EPUB ebook is compiled as well.

To compile a PDF ebook:

$ ./pdf

To compile a PDF ebook for print:

$ ./print

Clean all ebooks:

$ ./clean

eBooks with Mixed Chinese and English Text

Sarasa gothic TC font doesn’t support ebooks with mixed Chinese and English text well. Ebooks with sarasa font will be rendered with incorrect line wrapping sometimes.

If you are writing an ebook with mixed Chinese and English, use WenQuanYi Zen Hei instead.

Migrate the CJK theme:

$ cp cjk-wqy-theme.yml cjk-theme.yml

Ebooks with sarasa font look better. Hence, we keep both. It is up to you to choose a font that suits your ebook.

Note

You have to edit epub.adoc, pdf.adoc and print.adoc separately to generate ebooks of different file formats, which is the limitation imposed by AsciiDoctor toolchain currently.

The boilerplate project itself is licensed under MIT.

You keep your own ebooks compiled with the boilerplate in any license you prefer.