Word processor with textual storage format
I am looking for a word processor that stores its data in a textual format.
In particular, the textual format should give useful diffs using git diff
or similar commands.
Things that I need:
- The usual stuff: bold, italic, strikethrough, underline, titles.
- Page breaks. (This rules out anything Markdown-based, unless it's a Markdown dialect that goes beyond the usual.)
- Format templates. I want to have one definition of "this is a security warning", "this is source code", and "this is user input".
- Some way to integrate graphviz .dot files (or images in general).
- Some way to export to PDF.
Nice to have:
- Centered text for titles and subtitles.
- Easy integration of graphviz .dot files.
- Easy PDF export.
I tried various combinations of keywords in search engines, but search results either talked about word processors with no mention of a textual storage format (too general), or about Markdown-based editors (too specific and with the wrong specialization).
Markdown and later RMarkdown were invented for this purpose.
To edit Markdown files you can use any simple text editor including CLI versions, or use rich text editors like Kate. If you want GUI editor with some kind of WYSIWYG - use one of ReText, MarkText and so on.
Then write your own unique interface to pandoc or go using bookdown path.
Development of own bookdown projects are usually done in RStudio, but you still can edit any Rmd files using plain text editor and put them in git-repository.
To start using bookdown read https://bookdown.org/home/about/ .
To know all the features read https://bookdown.org/yihui/bookdown/ .
Using graphviz is possible, and Tikz. Pagebreaks are possible for PDF default output and while using addons as https://github.com/rstudio/pagedown or maybe https://github.com/pzhaonet/bookdownplus .
More stuff to read - https://bookdown.org/yihui/rmarkdown-cookbook/ .
In short - you have to try RMarkdown and bookdown. They are very useful instruments. They work on any currently supported Ubuntu versions.