Text-based Diagramming in Writing Technical Documentation
In a previous article, I described a text-based approach to draw different kinds of diagrams and serve them programmatically. Let’s explore various open-source solutions that can be leveraged to write technical documentation, along with using a text-based approach for diagramming.
There are several advantages of using a text-based approach for diagramming.
- Version control is easy. The developer can track changes made to the diagrams easily. Diagrams are now treated as part of your source code or document repository.
- Standardization. No more diagrams with different styles, and the presentation is always consistent.
Let’s start with Emacs. Though it is a nearly 40 years old editor, Emacs is still one of the best and widely used editors with large support from the communities.
In a previous article, I demonstrated to you how to write and generate technical documentation using Emacs.
Writing Technical Documentation with Emacs
Writing technical documentation using Emacs Org mode.
Install mermaid-cli globally using npm.
npm i -g @mermaid-js/mermaid-cli
Install the Emacs mermaid package.
(setq ob-mermaid-cli-path "/usr/bin/mmdc")
Create a mermaid diagram.
#+begin_src mermaid :file diagram.png
title My working day
section Go to work
Make tea: 5: Me…