Skip to content
A tool for converting Wikisource books to LaTeX, in preparation for printing and binding
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Books for Binding

This is a system of producing LaTeX-formatted books, ready for binding, from Wikisource works.

Build Status

It's a work-in-progress and not really ready for anyone to look at yet.


git clone
cd books-for-binding
composer install --no-dev
./bin/booksforbinding --help


  1. Select a work on a Wikisource.
  2. Download the HTML of the book:
    ./bin/booksforbinding download -l en -t The_Nether_World -o directory/to/save-in
    This saves the HTML to a directory e.g. directory/to/save-in/The_Nether_World/html.
  3. Convert the HTML to LaTeX:
    ./bin/booksforbinding convert -i directory/to/save-in/html
    This saves the LaTeX to a directory e.g. directory/to/save-in/The_Nether_World/latex.
  4. Go into that directory and create a new Git repository with the contents therein:
    cd directory/to/save-in/The_Nether_World
    git init
    git add html latex
    git commit -am"First commit."
    git branch -m unchanged
    The idea is to have two branches: one for the unchanged source as it's generated by pandoc, and the other (the master) as the place to make edits. The former is merged into the latter whenever required.
  5. Start editing the LaTeX files:
    git checkout -b master
  6. Go back to the unchanged branch and update it, committing the changes.
  7. Go to master and merge unchanged.


This software is copyright 2018 Sam Wilson and licensed under the GPL, version 2 or later.

You can’t perform that action at this time.