diagrams / diagrams-pandoc

A pandoc filter to express diagrams inline using the haskell EDSL diagrams.
BSD 3-Clause "New" or "Revised" License
37 stars 9 forks source link

New builder #1

Open cchalmers opened 9 years ago

cchalmers commented 9 years ago

Work in progress — don’t merge.

Changes related to improving diagrams-doc: https://groups.google.com/forum/#!topic/diagrams-discuss/LQvPrTfMvng

I’ve been playing around with builder and pandoc and had some ideas. The ticked boxes are things that are at least partially implemented in the PRs. I’d like to hear thoughts/suggestions.

lib changes

Still not entirely happy with how hashing/results are returned.

This still needs a lot of work but the basic idea is there.

I think doc should ditch Cairo in favour of Rasterific, SVG and PGF (for PDFs) so we can all build the same documentation.

bergey commented 9 years ago

As far as I know, pandoc HEAD has all the RST features we use. In particular, see https://github.com/jgm/pandoc/pull/1781 and https://github.com/jgm/pandoc/pull/1805

I think that also means we can use pandoc to convert .rst to .md if we want. I don't have a strong preference, but I think it would be nice to have all the docs in one format.

I'm not sure how much work it is to convert Xml2Html to a pandoc filter, but that's probably my next step.

bergey commented 9 years ago

On a quick read, the rest of this PR looks good. I'd still like cairo as an option, (behind a flag) but I agree it makes sense to have the easier-to-build pure Haskell libraries as the default.

bergey commented 9 years ago

pandoc-1.13.2 includes the .rst changes.

bergey commented 9 years ago

There are a few related things I want to do when I have some time:

cchalmers commented 9 years ago

Ah, the changes to the rst reader are much better, although it looks like containers are ignored (would be nice if they where in a div too). It shouldn't be much work to convert the tutorials to .md. I'd prefer if everything was was markdown since it's more popular, simpler and has better pandoc support.

I planned to add other backends to diagrams-pandoc with CPP. It's just -doc I wanted to keep "pure Haskell" backends.

cchalmers commented 9 years ago

Those additions sound nice. I was thinking about using the yaml heading for global options like default backend, extra imports etc.

bergey commented 9 years ago

Adding container directives to pandoc looks very easy. There's also an outstanding issue about internal references: https://github.com/jgm/pandoc/issues/262 which I expect to get to eventually....

bergey commented 9 years ago

pandoc-types is now BSD3, so diagrams-pandoc no longer needs to be GPL. I'd like to make it BSD to match the rest of Diagrams. @cchalmers, if this is merged, you're the only other contributor. What do you think?

No rush. My timeline is Diagrams release 1 April, then sort out new-builder over the next few weeks, then release diagrams-pandoc, if possible.

cchalmers commented 9 years ago

I'm happy to make it BSD3.