Madoko: a scholarly markdown


February 2, 2015


Daan Leijen


MSR Redmond


During this talk I will be giving a demo of Madoko: a scholarly markdown processor that enables light-weight creation of high-quality scholarly and industrial documents with a focus on simplicity and plain text readability. In particular, Madoko is quite more pleasant to write than LaTeX, and can generate both high-quality HTML and PDF (through LaTeX). With Madoko, we also explore our vision of the future of documents: In particular, Madoko makes it very easy to define your own domain specific blocks (e.g. Exercise, Answer) and apply declarative styling and transformation rules. Through the close integration with HTML it is also easy to create interactive documents through Javascript fragments.

Building on its extensibility, Madoko has many features that make it suitable to write complex documents completely in markdown and get beautiful PDF and HTML output. For example, it handles standard BibTeX bibliographies, any LaTeX mathematics or publisher style files, do custom syntax highlighting on your favorite language, custom numbering, CSS styling, cross-references, figures, tables etc.

Madoko is both available as a command line program, but also runs on the web at It integrates seamlessly with Dropbox, Github, and, Onedrive, and automatically synchronizes all changes in the cloud. This way, your document is always available anywhere from any device. Moreover, this makes it very easy to collaborate on documents with others: everyone can edit the document where concurrent changes are automatically shown and merged by Madoko (using robust three-way merges).

Madoko was originally written as an example program for the (side-)effect inference language Koka (i.e. Markdown in Koka). During my talk I will not only demonstrate Madoko but also discuss some of the implementation experience, especially how the side-effect control enables Madoko to run seamlessly on the client- or server.

Give it a try for your next paper or presentation 

Ps. For the curious, here are some other complex examples of Madoko in use (please see links in the link tab of RESNET): •The anatomy of programming languages: A large part of the Anatomy of Programming Languages book by Prof. Dr. William Cook. •Software model checking with IC3: A math-heavy presentation for the VTSA summer school 2014 by Dr. Nikolaj Bjorner and others.


Daan Leijen

Daan Leijen has been researcher at MSR since 2006 doing research in programming language- and type system design. Coming from the Haskell community (doing Parsec), Daan loves beautiful programming. To this end he designed a novel language called Koka that fully infers and controls side-effects; ranging from non-termination to arbitrary I/O. Besides theoretical type systems, you may know Daan from more practical adventures, ranging from the Babel package in Visual Studio to the Task Parallel Library in .NET.