Doconce promises the moon: write one flavor of markup and process the result into LaTeX, HTML, Jupyter, etc!

This is a rough description of how I’m setting up my Doconce evironment. It’s mostly intended to be a guide for me to reproduce it, but perhaps others will find it useful.


Doconce is just a Python package.

pip install doconce

Check if installation worked with which doconce. If a directory is returned, you’re good.

A simple document

Here’s a simple doconce document. Some of it is ripped straight from here.

TITLE: A Title
AUTHOR: Rico A.R. Picone {copyright|CC BY} at Department of Mechanical Engineering, Saint Martin's University.
DATE: today

This is a paragraph with the heading ``Summary.''

## Include table of contents (latex and html; sphinx always has a toc).
## (Lines starting with ## are not propagated to the output file,
## otherwise comments lines starting with # are visible in the
## output file.)

TOC: on

======= A Foo Section =======

## Purpose: it's perhaps ambitious to believe this has a purpose.

idx{key thing to say} idx{and another}

We address making things up

x'(t) &= -ax(t), \quad t \in (0,T_0], label{ode}\\
x(0)  &= I,                         label{initial:value}
where $a$, $I$, and $T$ are maths.

By convention, all doconce documents should be given the extension .do.txt. Save the above as and run the following command to generate a LaTeX version.

doconce format pdflatex doc --latex_font=palatino \
        --latex_admon=yellowicon '--latex_admon_color=yellow!5' \
        --latex_fancy_header --latex_code_style=pyg \
        --latex_section_headings=blue --latex_colored_table_rows=blue