{"id":13760217,"url":"https://github.com/akosma/eBook-Template","last_synced_at":"2025-05-10T10:31:58.890Z","repository":{"id":2273351,"uuid":"3230081","full_name":"akosma/eBook-Template","owner":"akosma","description":"Template to create PDF, ePub and Kindle books with Asciidoctor","archived":false,"fork":false,"pushed_at":"2021-09-27T08:46:01.000Z","size":3310,"stargazers_count":190,"open_issues_count":1,"forks_count":47,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-03T10:12:44.864Z","etag":null,"topics":["asciidoc","asciidoctor","book","documentation","writing"],"latest_commit_sha":null,"homepage":"http://akosma.github.io/eBook-Template/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akosma.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.adoc","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-20T21:50:55.000Z","updated_at":"2024-11-06T06:47:50.000Z","dependencies_parsed_at":"2022-08-26T21:40:26.385Z","dependency_job_id":null,"html_url":"https://github.com/akosma/eBook-Template","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akosma%2FeBook-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akosma%2FeBook-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akosma%2FeBook-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akosma%2FeBook-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akosma","download_url":"https://codeload.github.com/akosma/eBook-Template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253401583,"owners_count":21902694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asciidoc","asciidoctor","book","documentation","writing"],"created_at":"2024-08-03T13:01:05.519Z","updated_at":"2025-05-10T10:31:58.430Z","avatar_url":"https://github.com/akosma.png","language":"CSS","funding_links":[],"categories":["CSS"],"sub_categories":[],"readme":"= Template for Writing an eBook\n\nThis is a new version of the classic template for eBooks. You can use this\ncode to kickstart your writing project from scratch.\n\n== Design Guidelines\n\nWhy using such a complex setup instead of just using a simpler tool like\nWord or Pages?\n\nThe primary motivation of this template is versioning. Being able to use\nplain text files as input for the book brings the possibility of\nversioning each change individually using Git, Subversion or any other\nsimilar tool. This also opens up the door to collaboration among team\nmembers when editing a document.\n\nThe second motivation is to separate the presentation and the layout of\nthe final book from its contents. Other output file types could be added\nin the future.\n\nThis also brings the possibility of using any text editor in just about\nany operating system; files are just plain text files that can be edited\nwith gEdit, Notepad, Emacs, Vim, TextEdit, or any other similar tool.\n\nMarkup languages like Markdown or Asciidoc (used in this template) are\nsimpler and more readable than LaTeX or other SGML-like languages, making\nthe files readable and lean even when edited in a text editor without any\nsyntax highlighting or formatting support.\n\nFinally, being able to streamline the creation of the three versions of\nthe book in just one command-line operation allows the whole setup to be\nautomatized.\n\nThe choice of http://asciidoctor.org[Asciidoctor] comes from the following\nfeatures:\n\n- Syntax highlighting of https://swift.org[Swift] and\n  https://kotlinlang.org[Kotlin] code in all outputs\n  (http://pandoc.org[Pandoc] does not support Swift at the moment.)\n- Multi-file projects (Pandoc, because of Markdown, does not support the\n  `include` mechanism that AsciiDoc provides.)\n\n== History\n\nThis toolkit started as a pure LaTeX workflow in 2009. In late 2011 the\nsystem moved to Markdown and it used Pandoc to generate the artifacts. In\n2012 the choice was http://asciidoc.org[AsciiDoc], and in 2016 this new\nsystem was finally developed, using AsciiDoctor.\n\n== How To Use\n\nThe `master.asciidoc` file at the root of this project provides the\nguiding structure of the book. Chapters can be shuffled around,\nindependently of their contents or internal structure.\n\nIndividual chapters are stored in the `chapters` folder, one file per\nchapter.\n\nImages are stored as PNG files in the `images` folder. Data files (XML,\nCSV, etc,) are located in the `data` folder.\n\nThe Makefile creates a temporary `_build` folder, copies all the different\nelements in it (the master file, the chapters and the images) and commands\nthe execution of the whole toolchain in order to get the final result:\n\n- Unix `man` page\n- Self-contained HTML5\n- PDF\n- EPUB3\n- Kindle (.mobi)\n\nUML diagrams are generated by text through http://plantuml.com[PlantUML].\n\n1. Execute the `make` command. This will create the PDF, ePub and HTML\n   versions of the book.\n2. `make pdf`, `make html`, `make epub` and `make kindle` each generate\n   the specified version of the booklet.\n3. `make clean` removes the `_build` folder.\n\nAfter the build process completes, the compiled eBooks will be available\nat the `_build` subfolder.\n\n== Requirements and Installation Instructions\n\nThis section explains the different required libraries, for both macOS and\nUbuntu Linux.\n\n=== macOS (Sierra)\n\nBefore using this template, make sure to have Homebrew and Rubygems installed,\nthen run the following commands to install the required dependencies:\n\n    $ xcode-select --install # (required for nokogiri, itself a requirement for asciidoc-epub3)\n    $ brew install plantuml glib gdk-pixbuf cairo pango cmake libxml2\n    $ gem install pygments.rb kindlegen asciimath asciidoctor asciidoctor-diagram asciidoctor-mathematical epubcheck\n    $ gem install asciidoctor-pdf asciidoctor-epub3 --pre\n\nInstall the font dependencies for `asciidoctor-mathematical`:\n\n    cd ~/Library/Fonts; \\\n    curl -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmex10.ttf \\\n         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmmi10.ttf \\\n         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmr10.ttf \\\n         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmsy10.ttf \\\n         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/esint10.ttf \\\n         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/eufm10.ttf \\\n         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/msam10.ttf \\\n         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/msbm10.ttf\n\nIf you experience compilation problems with `asciidoctor-mathematical` you can\n`brew link gettext --force` if needed. Follow the installation instructions from\nthe https://github.com/asciidoctor/asciidoctor-mathematical[project] in case of\nissues.\n\n=== Ubuntu Linux (16.04/16.10/18.04)\n\nInstall the following libraries:\n\n    sudo apt-get install -y plantuml cmake ruby-dev libxml2-dev libcairo2-dev \\\n        libpango1.0-dev bison flex libgdk-pixbuf2.0-dev libffi-dev ttf-lyx \\\n        intltool\n    sudo gem install pygments.rb kindlegen asciimath asciidoctor \\\n        asciidoctor-diagram epubcheck\n    sudo gem install asciidoctor-pdf asciidoctor-epub3 --pre\n    sudo MATHEMATICAL_SKIP_STRDUP=1 gem install mathematical\n    sudo gem install asciidoctor-mathematical\n\n[Unfortunately](https://github.com/asciidoctor/asciidoctor-epub3/issues/179)\nthe current versions of Asciidoctor on Ubuntu exhibit a weird behaviour when\nusing asciidoctor-diagram during the generation of EPUB output.\n\n=== Docker\n\nThe project includes a `Dockerfile` which can be built using the following\ncommand:\n\n`docker build -t \"ebook-template\" .`\n\nOnce built, the Docker container can be used as follows on the local folder\nwhere the Makefile is located:\n\n`docker run -v ${PWD}:/workdir ebook-template`\n\n== License\n\nSee the LICENSE.adoc file.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakosma%2FeBook-Template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakosma%2FeBook-Template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakosma%2FeBook-Template/lists"}