All Projects → akosma → Ebook Template

akosma / Ebook Template

Licence: other
Template to create PDF, ePub and Kindle books with Asciidoctor

Projects that are alternatives of or similar to Ebook Template

Infoq Mini Book
Template project for creating an InfoQ Mini-Book with Asciidoctor
Stars: ✭ 147 (-2%)
Mutual labels:  asciidoc, asciidoctor
Markdownmonster
An extensible Markdown Editor, Viewer and Weblog Publisher for Windows
Stars: ✭ 1,203 (+702%)
Mutual labels:  documentation, writing
Asciidoctor Html5s
Semantic HTML5 converter (backend) for Asciidoctor
Stars: ✭ 50 (-66.67%)
Mutual labels:  asciidoc, asciidoctor
Everything Curl
The book documenting the curl project, the curl tool, libcurl and everything related to this.
Stars: ✭ 885 (+490%)
Mutual labels:  documentation, book
Honkit
📖 HonKit is building beautiful books using Markdown - Fork of GitBook
Stars: ✭ 1,901 (+1167.33%)
Mutual labels:  book, asciidoc
Readteractive
Tool for writing and generating interactive books.
Stars: ✭ 23 (-84.67%)
Mutual labels:  book, writing
Vim Pencil
Rethinking Vim as a tool for writing
Stars: ✭ 1,186 (+690.67%)
Mutual labels:  writing, asciidoc
Asciidoctor.js
A JavaScript port of Asciidoctor, a modern implementation of AsciiDoc
Stars: ✭ 500 (+233.33%)
Mutual labels:  asciidoc, asciidoctor
Asciidocfx
Asciidoc Editor and Toolchain written with JavaFX 16 (Build PDF, Epub, Mobi and HTML books, documents and slides)
Stars: ✭ 1,533 (+922%)
Mutual labels:  asciidoc, asciidoctor
Kramdown Asciidoc
A kramdown extension for converting Markdown documents to AsciiDoc.
Stars: ✭ 97 (-35.33%)
Mutual labels:  asciidoc, asciidoctor
Asciidoc Kate
AsciiDoc/AsciiDoctor syntax highlighting plugin for Kate editor/KatePart
Stars: ✭ 5 (-96.67%)
Mutual labels:  asciidoc, asciidoctor
Fastdoc
Create publication-quality books from Jupyter notebooks
Stars: ✭ 134 (-10.67%)
Mutual labels:  book, asciidoc
Easybook
Book publishing as easy as it should be (built with Symfony components)
Stars: ✭ 744 (+396%)
Mutual labels:  documentation, book
Asciidoctor Pdf
📃 Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
Stars: ✭ 868 (+478.67%)
Mutual labels:  asciidoc, asciidoctor
Awesome Technical Writing
📚 A curated list of awesome resources : articles, books, videos, tools, podcasts about technical writing
Stars: ✭ 573 (+282%)
Mutual labels:  documentation, writing
Funbook Old
I have a dream, to be a novelist someday.
Stars: ✭ 65 (-56.67%)
Mutual labels:  book, writing
Asciidoctor
💎 A fast, open source text processor and publishing toolchain, written in Ruby, for converting AsciiDoc content to HTML 5, DocBook 5, and other formats.
Stars: ✭ 3,905 (+2503.33%)
Mutual labels:  asciidoc, asciidoctor
Progit2
Pro Git 2nd Edition
Stars: ✭ 4,528 (+2918.67%)
Mutual labels:  book, asciidoc
Writing It Books
프로그래머의 책쓰기: 나도 IT 책 잘 쓰면 소원이 없겠네!
Stars: ✭ 90 (-40%)
Mutual labels:  book, writing
Rx Book
xgrommx.github.io/rx-book
Stars: ✭ 1,660 (+1006.67%)
Mutual labels:  documentation, book

= Template for Writing an eBook

This is a new version of the classic template for eBooks. You can use this code to kickstart your writing project from scratch.

== Design Guidelines

Why using such a complex setup instead of just using a simpler tool like Word or Pages?

The primary motivation of this template is versioning. Being able to use plain text files as input for the book brings the possibility of versioning each change individually using Git, Subversion or any other similar tool. This also opens up the door to collaboration among team members when editing a document.

The second motivation is to separate the presentation and the layout of the final book from its contents. Other output file types could be added in the future.

This also brings the possibility of using any text editor in just about any operating system; files are just plain text files that can be edited with gEdit, Notepad, Emacs, Vim, TextEdit, or any other similar tool.

Markup languages like Markdown or Asciidoc (used in this template) are simpler and more readable than LaTeX or other SGML-like languages, making the files readable and lean even when edited in a text editor without any syntax highlighting or formatting support.

Finally, being able to streamline the creation of the three versions of the book in just one command-line operation allows the whole setup to be automatized.

The choice of http://asciidoctor.org[Asciidoctor] comes from the following features:

== History

This toolkit started as a pure LaTeX workflow in 2009. In late 2011 the system moved to Markdown and it used Pandoc to generate the artifacts. In 2012 the choice was http://asciidoc.org[AsciiDoc], and in 2016 this new system was finally developed, using AsciiDoctor.

== How To Use

The master.asciidoc file at the root of this project provides the guiding structure of the book. Chapters can be shuffled around, independently of their contents or internal structure.

Individual chapters are stored in the chapters folder, one file per chapter.

Images are stored as PNG files in the images folder. Data files (XML, CSV, etc,) are located in the data folder.

The Makefile creates a temporary _build folder, copies all the different elements in it (the master file, the chapters and the images) and commands the execution of the whole toolchain in order to get the final result:

  • Unix man page
  • Self-contained HTML5
  • PDF
  • EPUB3
  • Kindle (.mobi)

UML diagrams are generated by text through http://plantuml.com[PlantUML].

  1. Execute the make command. This will create the PDF, ePub and HTML versions of the book.
  2. make pdf, make html, make epub and make kindle each generate the specified version of the booklet.
  3. make clean removes the _build folder.

After the build process completes, the compiled eBooks will be available at the _build subfolder.

== Requirements and Installation Instructions

This section explains the different required libraries, for both macOS and Ubuntu Linux.

=== macOS (Sierra)

Before using this template, make sure to have Homebrew and Rubygems installed, then run the following commands to install the required dependencies:

$ xcode-select --install # (required for nokogiri, itself a requirement for asciidoc-epub3)
$ brew install plantuml glib gdk-pixbuf cairo pango cmake libxml2
$ gem install pygments.rb kindlegen asciimath asciidoctor asciidoctor-diagram asciidoctor-mathematical epubcheck
$ gem install asciidoctor-pdf asciidoctor-epub3 --pre

Install the font dependencies for asciidoctor-mathematical:

cd ~/Library/Fonts; \
curl -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmex10.ttf \
     -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmmi10.ttf \
     -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmr10.ttf \
     -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmsy10.ttf \
     -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/esint10.ttf \
     -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/eufm10.ttf \
     -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/msam10.ttf \
     -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/msbm10.ttf

If you experience compilation problems with asciidoctor-mathematical you can brew link gettext --force if needed. Follow the installation instructions from the https://github.com/asciidoctor/asciidoctor-mathematical[project] in case of issues.

=== Ubuntu Linux (16.04/16.10/18.04)

Install the following libraries:

sudo apt-get install -y plantuml cmake ruby-dev libxml2-dev libcairo2-dev \
    libpango1.0-dev bison flex libgdk-pixbuf2.0-dev libffi-dev ttf-lyx \
    intltool
sudo gem install pygments.rb kindlegen asciimath asciidoctor \
    asciidoctor-diagram epubcheck
sudo gem install asciidoctor-pdf asciidoctor-epub3 --pre
sudo MATHEMATICAL_SKIP_STRDUP=1 gem install mathematical
sudo gem install asciidoctor-mathematical

Unfortunately the current versions of Asciidoctor on Ubuntu exhibit a weird behaviour when using asciidoctor-diagram during the generation of EPUB output.

=== Docker

The project includes a Dockerfile which can be built using the following command:

docker build -t "ebook-template" .

Once built, the Docker container can be used as follows on the local folder where the Makefile is located:

docker run -v ${PWD}:/workdir ebook-template

== License

See the LICENSE.adoc file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].