You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
I could actually see this mode of usage as being maybe a nice way to get away from things like TikZ, but maybe I'm being too hopeful - ultimately it is still probably desirable to support TikZ and PGF
The text was updated successfully, but these errors were encountered:
There used to be an attempt of writing a TikZ backend for diagrams, but AFAIK it never really worked and is unsupported.
Practically speaking, I find the sensible thing is to render the diagrams to .pdfusing the Cairo backend, and then includegraphics those files in the HaTeX document. This works quite smoothly and can be done inline if using HaTeX as LaTeXT IO.
Concerning this subject, I wonder if it would be worthwhile to add some tooling to HaTeX that would make such including of automatically-generated files easier. I've implemented something like that in the yeamer library, which handles all the filename disambiguation behind the scenes and allows simply writing
importPresentation.YeamerimportqualifiedDiagrams.PreludeasDiaimportqualifiedDiagrams.Backend.CairoasDia
myPresentation =do..."other content"
imageFromDiagram (
Dia.circle 1&Dia.lc Dia.red
)
"more other content"......imageFromDiagram::Dia.DiagramDia.Cairo->Presentation
imageFromDiagram dia = imageFromFileSupplier "png"$\tgtFile ->Dia.renderCairo tgtFile
(Dia.mkSizeSpec $Just640Dia.^&Just480) dia
I'm curious if it is possible to employ other Haskell libraries, particularly graphics libraries (e.g. https://archives.haskell.org/projects.haskell.org/diagrams/ ) in some fashion (maybe this has already been done, if so, apologies).
I could actually see this mode of usage as being maybe a nice way to get away from things like TikZ, but maybe I'm being too hopeful - ultimately it is still probably desirable to support TikZ and PGF
The text was updated successfully, but these errors were encountered: