I hacked through mdbook and pulldown-cmark to add funky features for writing markdown documents


#1

I hacked through mdbook and pulldown-cmark to add funky features for writing markdown documents.
Here’s what it looks like - Demo

The source code is hosted in github

The Book’s code used in the demo is also hosted in github

FYI

mdbook is the code used to generate the book in www.rustbyexample.com
pulldown-cmark is code for rendering markdown to html


#2

Yay! I’ve always wanted to add text-based diagrams to books, and I went with https://yuml.me/ but that means that whoever sees the book needs an internet connection (and who knows if yuml will be forever).

If svgbob evolves and defines a way to specify colour, this would be even more awsome :smiley:


#3

I’d rather preserve svgbob’s original goal, that is to make a 1:1 match for ascii and the resulting svg render. This enables just about everyone to do scribbles without reading the manual. Adding colors would make a clutter to this design. I have a hard time figuring out how to incorporate colors into the diagrams since color names are a bit long and can’t be expressed in single letters while avoiding collision with each other.

Ok, let’s try:

      .----------.             .--------.
     ( Alice {r}  )  ---->    / Bob{b} /
      `----------'           '--------'

	  {r} - red 
	  {g} - green
	  {b} - blue
	  {y} - yellow
	  {o} - orange
	  {p} - pink
	  {v} - violet
	  {w} - white
	  {b} - black <-- conflicts with blue - {bla} ? 
	  {g} - gray <- conflicts with green  - {gra} ?

      3 letter web colors: 
	  {fff} - white
	  {000} - black
	  {ccc} - gray

#4

Cross linking svgbobrus#11 to continue the styling discussion there