Potential components of a plain text legal solution:

  • Multi-Markdown
  • git
  • pandoc
  • LaTeX
  • HTML/CSS
  • Racket/Pollen
  • scripts (javascript or python)

I don’t think all of those will be needed. But they might be.