penrose: Create beautiful diagrams just by typing mathematical notation in plain text.

[ library, mit, program, unclassified ] [ Propose Tags ]

[Skip to Readme]
Versions [faq],,,, (info)
Change log
Dependencies ad, aeson, ansi-terminal, array, base, bytestring, containers, directory, docopt, extra, hmatrix, hslogger, http-types, megaparsec, mtl, multimap, network, old-time, parser-combinators, pretty, pretty-show, pretty-terminal, process, random, random-shuffle, scotty, split, text, unordered-containers, uuid, websockets [details]
License MIT
Author team-penrose
Home page
Source repo head: git clone
Uploaded by wodeni at 2019-06-25T03:31:21Z
Distributions NixOS:
Executables penrose
Downloads 1871 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
All reported builds failed as of 2019-06-27 [all 3 reports]


Maintainer's Corner

For package maintainers and hackage trustees

Readme for penrose-

[back to package description]

Penrose CircleCI

Penrose is an early-stage system that is still in development. Our system is not ready for contributions or public use yet, but hopefully will be soon. Send us an email if you're interested in collaborating.

  • See the site for more information and examples.
  • See the wiki for more system-specific information on building, running, testing, and debugging the system.
  • For even more documentation, see Nimo Ni's README.


Here's a simple Penrose visualization in the domain of set theory.

<img src="" width=300>

It's specified by the following Substance and Style programs.

  • tree.sub
    Set A
    Set B
    Set C
    Set D
    Set E
    Set F
    Set G
    Subset B A
    Subset C A 
    Subset D B
    Subset E B
    Subset F C
    Subset G C
    NoIntersect E D
    NoIntersect F G
    NoIntersect B C
  • venn.sty
    Set x {
        shape = Circle { }
        constraint contains(x, x.label)
    Intersect x y {
        constraint overlapping(x, y)
        constraint outsideOf(y.label, x)
        constraint outsideOf(x.label, y)
    NoIntersect x y {
        constraint nonOverlapping(x, y)
    Subset x y {
        constraint contains(y, x)
        constraint smallerThan(x, y)
        constraint outsideOf(y.label, x)
    NoSubset x y {
        objective repel(x, y)
        constraint outsideOf(x, y)
        constraint outsideOf(y.label, x)
        constraint outsideOf(x.label, y)
        constraint nonOverlapping(x, y)

Here's how the optimization looks live in the UI.

<img src="" width=500>