diagrams-pandoc alternatives and similar packages
Based on the "Text" category.
Alternatively, view diagrams-pandoc alternatives based on common mentions on social networks and blogs.
-
pandoc-citeproc
Library and executable for using citeproc with pandoc -
prettyprinter
A modern, extensible and well-documented prettyprinter. -
scholdoc
Fork of Pandoc for the implementation of a ScholarlyMarkdown parser -
blaze-from-html
A blazingly fast HTML combinator library for Haskell. -
skylighting
A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions -
commonmark
Pure Haskell commonmark parsing library, designed to be flexible and extensible -
text-offset
Emits code crossreference data for Haskell sources. -
regex-genex
Given a list of regexes, generate all possible strings that matches all of them. -
regex-applicative
Regex-based parsing with an applicative interface -
pandoc-csv2table
A Pandoc filter that renders CSV as Pandoc Markdown Tables. -
servant-checked-exceptions
type-level errors for Servant APIs. -
pretty-show
Tools for working with derived Show instances in Haskell. -
double-conversion
A fast Haskell library for converting between double precision floating point numbers and text strings. It is implemented as a binding to the V8-derived C++ double-conversion library. -
text-format
A Haskell text formatting library optimized for ease of use and high performance. -
hyphenation
Knuth-Liang Hyphenation for Haskell based on TeX hyphenation files
Collect and Analyze Billions of Data Points in Real Time
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of diagrams-pandoc or a related project?
README
A pandoc filter to express diagrams inline using the haskell EDSL diagrams.
Usage
Create an input file called demo.md
with the following text:
This is how to draw a circle:
~~~ diagram
example = circle 1
~~~
Install diagrams-pandoc, then run pandoc as follows:
pandoc -t html demo.md --filter diagrams-pandoc -o demo.html -s
The file demo.html should now have an img tag pointing at a PNG of a circle.
Attributes
You can specify attributes to control how the diagram is generated. The following, for example,
~~~ {.diagram width=800 height=400}
example = circle 1
~~~
will override the default width and height of the generated diagram. The following attributes are supported:
width
: The width of the generated diagram, in pixels. The default is 500.height
: The height of the generated diagram, in pixels. The default is 200.
Details
diagrams-pandoc
compiles code blocks containing diagrams expressions
and includes the resulting images in the pandoc markup. It is meant
to be run as a
pandoc filter as
shown above.
diagrams-pandoc
evaluates the diagrams expression example
by
default. This can be modified by passing a command line argument.
diagrams-pandoc
is aware of two code block classes. A block with
the diagram
class will be replaced by the resulting image---the code
will not appear in the output. A block with the diagram-haskell
class will produce both an image and a (syntax highlighted) code
block. The input block is replaced by image appears before the code
block, and the diagram-haskell
class is replaced by the haskell
class, so that pandoc can perform syntax highlighting as usual.
diagrams-pandoc
produces images in the pdf
format when used with
the latex
and beamer
writers of pandoc
and produced png
output
otherwise.
I have only tested with pandoc's markdown reader. In particular, the rst reader does not attach classes to code blocks, only to Div elements.
Installing
diagrams-pandoc
is on Hackage. To install, run cabal install diagrams-pandoc
TODO
- use pandoc output type to pick an image file format
- for formats which are more human-readable (eg, markdown, rst), leave code block alone?
- provide command-line flags to override default behavior
- add Backends besides Cairo
- Support RST by handling
Div class=diagram [CodeBlock foo bar]
the same asCodeBlock class=diagram bar
- Alternate install directions using
stack