Thomas Forgione, Matthieu Le Boucher, Matthieu Pizenberg
An attempt to make a modern alternative to LaTeX
2019
SpanDeX is an attempt at a better LaTeX. It aims to build beautiful documents fast, with great error messages when compilation fails.
It started with the following observations:
After experiencing languages with great error messages such as Rust or Elm, going back to other languages such as LaTeX is really painful and frustrating due to the lack of alternatives. Few open source typesetting systems exist such as Patoline (not very mature) and Sile, but it will be more fun to make one of our own in Rust. There exists already some Rust crates to generate pdf documents, such as pdf-canvas and printpdf that we are using.
Of course, if we want to rewrite LaTeX, we need a language. For now, we chose to make a markdown-like language, and maybe in the future, extend it with template-style syntax. Currently, a typical SpanDeX source code looks like follows.
# Hello world
Lorem ipsum dolor sit amet, *consectetur* adipisicing elit,
sed do eiusmod tempor incididunt ut /labore et dolore magna
aliqua/. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
/*Duis aute irure dolor*/ in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur.
*Excepteur sint occaecat* cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, *consectetur* adipisicing elit.
## Hello again
Lorem ipsum dolor sit amet, *consectetur* adipisicing elit,
sed do eiusmod tempor incididunt ut /labore et dolore magna
aliqua/. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
And is rendered as follows.
All the instructions are available on the homepage. Briefly, you need to:
curl -sSf https://sh.rustup.rs | sh
)cargo install spandex
)spandex init example
)cd example
)spandex build
)The output will be saved to output.pdf
.
You can play with the main.dex
file and re-run spandex build
.
Some basic features will need to be supported such as includes, lists, code blocks, maths and images. Here are some features that we would also like to have on the long term: