0

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).

2
  • 2
    Note that markdown supports html embedding, and you can do page-breaks with CSS. Back when I was a student I managed to do my student papers formatting with Markdown + HTML + CSS. The only hitch I stumbled upon is some page-related CSS wasn't supported by Chrome nor Firefox, so I had to use some proprietary software to get PDF out of it, I don't remember what it was called.
    – Hi-Angel
    Sep 25, 2021 at 23:32
  • 1
    @Hi-Angel that's actually an answer even if it's incomplete.
    – user1450088
    Sep 26, 2021 at 7:59

2 Answers 2

2

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.

0
0

¿Could LaTeX be an option for you? It is more complex than Markdown but you should be able to achieve what you need.

You must log in to answer this question.