2.0.0 • Public • Published


A Language for Building Documents

Table Of Contents


What Booklisp Is

Booklisp is a language for people who want the compositional support LaTeX provides, but with the ease of Markdown authoring. Although Booklisp is still in the developmental stages, it is still possible to build large, complex documents without setting your hair on fire.

Booklisp content is just Markdown. Any Booklisp Markdown is valid Github Flavored Markdown (GFM) with embedded HTML comments.

Booklisp executable blocks are a simple DSL utilizing Lisp-style syntax, making the work of composing complex documents little more than declaring what you want... and a few parens.

This readme was even created with Booklisp!

What Booklisp Is Not

Booklisp is NOT a complete, standalone language. It is simply designed to make the process of compiling documents simpler for authors.

Booklisp is NOT a replacement for LaTeX. If you need the power, the language exists for a reason.

Booklisp is NOT finished. It is likely the project will continue to grow over time. To see the current state of the project it is worth having a look at the todo list.

How to Find Me

Find me online:

Setup and Running


Setting up Booklisp is simple:

  1. Make sure you have node installed on your computer
  2. Install Booklisp with npm:
    • Windows: npm i booklisp -g
    • Mac/Linux: sudo npm i booklisp -g


After installing Booklisp, you can compile documents like this:

  1. Open a terminal window and go to the directory where your markdown source is
  2. Run booklisp on your markdown source. Just provide the main source file where your table of contents is:
    • booklisp ./ ./

Advanced Setup

You can create a build script that remembers all of your file paths if you like. This is what the Booklisp readme build script (it's Javascript) looks like:

'use strict';
const childProcess = require('child_process');
childProcess.exec('booklisp ./readme-source/ ./', function(error) {
    if(error) {
        console.log('An error occurred: ', error.message);
    } else {
        console.log('Compile complete');

That's all there is to know!


The best example of Booklisp is to simply look at the source files for the readme doc you are reading right now. Here is the main source file as I write this examples file:

    (title "Booklisp")
    (subtitle "A Language for Building Documents"))

    (section-main "./readme-source/sections/")
    (section-main "./readme-source/sections/")
    (section-main "./readme-source/sections/")
    (section-main "./readme-source/sections/")
    (section-main "./readme-source/sections/")

In this example, the file metadata -- filemeta -- contains a title, "Booklisp", and a subtitle "A Language for Building Documents". The main source file also contains a table of contents which captures information about the chapters contained within the document.

Each of the identifiers here is a function:

  • filemeta
  • title
  • subtitle
  • table-of-contents
  • section-main

This means you can simply type what you mean and the compiler will interpret and create your document. Each document must contain a filemeta expression. All arguments to filemeta are optional.

Here's what a section-main file looks like:

    (title "My Chapter"))

In this section, we look at an example of a section-main. ;-)

Content can be included as either a section, section-main, or chapter; both inside and outside the table of contents:

    (chapter "./")
    (section-main "./"))
    (section "./"))

(chapter "./")
(section-main "./")
(section "./")

Also, if you want to write an example of a Booklisp executable block, use the noexec escape sequence:

(define! "do-not-execute" "This will not execute.")

Inserting Build Messages

If you want to print something out during the process of building, a build message can be inserted:

(build-message "This is a build message")

That's it!

To Dos

Upcoming Todos:

  • Section (non-chapter) content
  • Standalone section and chapter content (no table-of-contents function required)
  • Bibliographic Tooling
  • Non-chapter/section table of contents items, e.g. introduction, appendix, etc.

Release History


  • Introduced proper relative-path management


  • Introduced subsection-minor type content


  • Introduced subsection type content


  • Introduced section-main type content


  • Introduced section type content
  • Renders sections and chapters from outside a table of contents


  • First readme complete


  • Fixed bug in noexec command


  • Introduced noexec command


  • Removed requirement that table-of-contents receive a vector of chapters


  • First release




Package Sidebar


npm i booklisp

Weekly Downloads






Unpacked Size

68.1 kB

Total Files


Last publish


  • cmstead