# Images in man pages

Images in man pages are not recommended. It's better to use an ASCII representation (ASCII art) if possible.

## Timing diagrams

Timing diagrams can be created using link:https://wavedrom.com/editor.html[Wavedrom]. +
To use them in a man page as ASCII art folloe these steps:

1. Save in a text file
2. Use link:https://github.com/Wren6991/asciiwave[asciiwave] to create the ascii output
3. Copy into the man page using `.br` as line separator

Here an example:

.toggle2nist: Timing diagram source code
----
{'signal': [
  {name: 'in', wave:  'lHx.l.Hx.l'},
  {name: 'on', wave: 'lh.l......' }, 
  {name: 'off', wave: 'l.....h.l.' }, 
  {name: 'is-on', wave: 'l..h....l.' }, 
]}
----



.toggle2nist: ASCII art generated by asciiwave
----
       ┐     ┏─────xxxxxxxxxxxx┐           ┏─────xxxxxxxxxxxx┐     
.br
in   : └─────┛     xxxxxxxxxxxx└───────────┛     xxxxxxxxxxxx└─────
.br
       ┐     ┌───────────┐                                         
.br
on   : └─────┘           └─────────────────────────────────────────
       ┐                                   ┌───────────┐           
.br
off  : └───────────────────────────────────┘           └───────────
.br
       ┐                 ┌─────────────────────────────┐           
.br
is-on: └─────────────────┘                             └───────────

----


## Diagrams

ASCII art diagrams can be drawn e.g., with link:https://asciiflow.com/[asciiflow]

.toggle2nist: Diagram drawn with asciiflow
----
    toggle2nist
   ┌───────────┐
 ──┤in       on├──
   │           │
 ──┤is-on   off├──
   └───────────┘
----