top | item 37553199

(no title)

adiM | 2 years ago

I use ConTeXt, and it is relatively simple to get each environment to whatever you want (plus you can code everything in Lua).

discuss

order

sivakon|2 years ago

how do you use Context to make graphs or mind maps or flow charts? I have a hard time setting it up

thangalin|2 years ago

KeenWrite integrates https://kroki.io/. A mind map in Markdown would be:

    ``` diagram-plantuml
    @startmindmap
    ...
    @endmindmap
    ```
See: https://kroki.io/examples.html#mind-map

The SVG output is written to a local file. KeenWrite converts Markdown to XHTML (XML), which references the local file. ConTeXt then typesets the XML, importing the local vector graphics file and formats it according to the setups defined by the theme.

Kroki has other text-based formats for flow charts, Gantt charts, UML diagrams, packet diagrams, network diagrams, etc.

To be concrete, create a file named "example.md":

    Mind Map:

    ``` diagram-plantuml
    @startmindmap
    skinparam monochrome true
    + OS
    ++ Ubuntu
    +++ Linux Mint
    +++ Kubuntu
    +++ Lubuntu
    +++ KDE Neon
    ++ LMDE
    ++ SolydXK
    ++ SteamOS
    ++ Raspbian
    -- Windows 95
    -- Windows 98
    -- Windows NT
    --- Windows 8
    --- Windows 10
    @endmindmap
    ```
Then run:

    ./keenwrite.sh -i example.md --theme-dir=themes/boschet -o output.pdf
That outputs a PDF file with the following vector graphic (on page 3):

https://i.ibb.co/SJzzYRN/output.png

adiM|2 years ago

The same way that one would use markdown :-) (you JS libs or TikZ or Metapost packages).