LaTeX seems like it fits the bill.
I dont think either of them have to be turing complete though.
I recently started using it because Lyx does not work on my ARM based Linux tablet and its not too bad when used with a GUI editor.
It is a lot more powerful than other things I use (Markdown, Sphinx) and a lot better for version tracking and multiple output formats than word processors.