Publish your book

A book in Pustakālaya is a git repository: a folder of chapters written in Markdown (or in LaTeX, or as HTML pages) and a short file that says what the book is called. The library reads the repository and builds the book; it never changes it. You keep writing in your own repository, and the book on this site follows it.

MarkdownLaTeXHTML

Four steps

  1. Start from the template

    The template is a ready repository, book-template, with a preface, two chapters that use every convention, a figure and the cover colours. On GitHub, choose Use this template. If you have the library's tools, one command makes the same thing on your computer:

    python tools/books.py new my-book --title "My Book" --author "Your Name"

    Write to nikhilrajput@gmail.com will send you the template if you do not have it.

  2. Write

    One Markdown file for each chapter, listed in book.yml. Headings, lists, tables, code with a language, figures with captions, boxes for notes and warnings, mathematics between dollar signs, exercises with folded answers: the template shows each of them once. Put pictures in images/. The whole format is on the Book Format page.

  3. Check

    Before you send it, let the checker read the book. It finds what would not build or would look wrong (a missing file, a broken link, an image that is too large, an unbalanced formula) and tells you which file is at fault. 0 errors is all that is needed; a warning is advice.

    python tools/books.py check my-book
  4. Send the address

    Push the repository to GitHub, or any git host, and send its address to nikhilrajput@gmail.com, with the name you want on the cover and the collection you think it belongs in. If the repository is private, say so: you will be told whom to add as a reader, and the book stays private until you say otherwise. The book is then built, checked and published; later changes to the repository reach this site when the library is next updated.

What your readers get

Nothing to set up. Every book gets the same reading room.

A reader

The book opens full screen, page by page, like an e-book. Readers choose the typeface, the size and the page colour; they bookmark, highlight and add notes; and the book remembers where they stopped.

Offline keeping

One tap on Keep for offline reading stores the whole book on the device, figures included, so it can be read on a train or in a village without a connection.

Search

Readers search the text of your book, section by section, and find a book of the library by its title from the front page.

Visualizations

Short videos, step-through figures, interactive models, diagrams written as text and mathematics typeset with MathJax: all of them work in the reader and offline.

Good to know

  • Your repository stays yours. The library only reads it, so nothing you write is ever overwritten.
  • The identifier of the book (its folder name on this site) is chosen once and not changed afterwards, because readers' saved places and links depend on it.
  • Photographs need a licence that allows publishing; put the credit in the caption. Your own drawings and diagrams are always welcome.
  • One repository can hold several books, for a series or a course.

Read the Book FormatWrite to nikhilrajput@gmail.com