Transform Markdown docs into two-column PDFs.
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
example
fonts
img
lib
.gitignore
Rakefile
bookify.gemspec
readme.md

readme.md

A gem for converting Markdown documents to book style, two-column PDFs.

Example

This Markdown doc, run through bookify, gets converted into this PDF.

Usage

On the command line

gem install bookify
bookify document.md

You can specify the output file with a second argument (bookify document.md output.pdf), otherwise it will default to a PDF in your current directory with the same name as the input file.

Passing -l or --landscape as the first argument will render the document in a three-column landscape layout.

bookify -l document.md

In Ruby

require "bookify"
Bookify::Renderer.new("document.md", "output.pdf").render

Syntax

Supports basic Markdown (paragraphs, ul, ol, bold, italics, h1, h2, h3, tables) and limited html (img). You can also add divs with a class of "section-break" to immediately move to the next column, or "page-break" to immediately move to the next full page.

TODO

  • nested lists
  • tables with text centered within cells
  • set image width
  • images and headers that span the full page width
  • initial / "drop cap" letters
  • add outline h2 sections
  • fix bug where font size in tables is too large if table immediately follows a header