@hackage / diagrams-builder

hint-based build service for the diagrams graphics EDSL.

Latest0.8.0.6

About

Metadata

  • Last updated , by BrentYorgey
  • License BSD-3-Clause
  • Categories Graphics
  • Maintained by: diagrams-discuss@googlegroups.com

  • Lottery factor: 0

Links

Installation

Tested Compilers

  1. 9.12.2
  2. 9.10.1
  3. 9.8.2
  4. 9.6.5
  5. 9.4.8
  6. 9.2.8
  7. 9.0.2
  8. 8.10.7

Package Flags

Use the -f option with cabal commands to enable flags

    cairo (off by default)

    install cairo-specific builder tool

    svg (off by default)

    install svg-specific builder tool

    ps (off by default)

    install postscript-specific builder tool

    postscript (off by default)

    install postscript-specific builder tool

    rasterific (off by default)

    install rasterific-specific builder tool

    pgf (off by default)

    install PGF-specific builder tool

Readme

Build Status

diagrams-builder provides backend-agnostic tools for dynamically turning code into rendered diagrams, using the hint wrapper to the GHC API. It supports conditional recompilation using hashing of diagrams source code, to avoid recompiling code that has not changed. It is useful for creating tools which compile diagrams code embedded in other documents. For example, it is used by the BlogLiterately-diagrams package (a plugin for BlogLiterately) to compile diagrams embedded in Markdown-formatted blog posts, and by the diagrams-latex.sty package for embedding diagrams in LaTeX documents (see below).

Executables specific to the cairo, svg, postscript, rasterific, and PGF backends are included. Each takes an input file and an expression to render and outputs an image file using the appropriate backend. You must explicitly enable whichever executables you want using flags like -fcairo, -fsvg, and so on.

A LaTeX package, diagrams-latex.sty, is also provided in the latex/ directory of the source distribution, which renders diagrams code found within diagram environments. It can make use of any of the diagrams-builder-cairo, diagrams-builder-postscript, or diagrams-builder-pgf executables, so if you want to use diagrams-latex.sty you should install diagrams-builder with the appropriate option. Note that diagrams-latex.sty is licensed under the GPL. For more information on using diagrams-latex.sty, see this tutorial.