The BlogLiterately-diagrams package

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.


A plugin for BlogLiterately ( which turns inline diagrams code into images. This library also provides an executable, BlogLiteratelyD, providing a standard instance of BlogLiterately extended with support for inline diagrams code. For most users it should suffice to simply use BlogLiteratelyD in place of BlogLiterately.

To use it, include code blocks with the dia or dia-def class (using pandoc's special extended Markdown syntax (, or BlogLiterately's extended syntax for tagged code blocks (, like so:

    -- This block produces no output but its
    -- declarations will be in scope in all the
    -- rest of the diagram blocks.

    gSq = square 1 # fc green

NOTE: Square brackets below should be replaced
by curly braces.  Haddock chokes on curly

Here is a green square:

```[.dia width='200']
dia = gSq

Green squares like `gSq`[.dia height='16']
and blue circles like `circle 1 # fc blue`[.dia height='16']
are extremely important.

Note that attributes like width and height can also be specified, but be sure to put the numbers in quotes or else they will not parse properly.

Running this through BlogLiteratelyD (after replacing square brackets with curly braces) should result in HTML that looks something like this:

In addition to simple diagrams, IO actions producing diagrams may also be used. In that case the IO action will simply be run, and the resulting diagram rendered. This can be useful, for example, when producing a diagram built from some external data or using randomness.


Versions0.1.0.0,, 0.1.1,,, 0.1.2,,,,, 0.1.3,, 0.1.4,,,, 0.2,,,,,,,
Change logCHANGES
Dependenciesbase (>=4.3 && <4.11), BlogLiterately (>=0.6 && <0.9), BlogLiterately-diagrams, containers, diagrams-builder (>=0.5 && <0.9), diagrams-lib (>=1.3 && <1.5), diagrams-rasterific (>=1.3 && <1.5), directory, filepath, JuicyPixels (==3.2.*), pandoc (>=1.16 && <2.2), safe (==0.3.*) [details]
CopyrightCopyright 2012-2015 Brent Yorgey
AuthorBrent Yorgey
Bug tracker
Source repositoryhead: git clone git://
UploadedMon Feb 19 05:10:12 UTC 2018 by BrentYorgey




Maintainers' corner

For package maintainers and hackage trustees