[Haskell-cafe] Haddock - How to write formulas ?
Carter Schonwald
carter.schonwald at gmail.com
Tue Jan 7 01:42:23 UTC 2014
I would really love to use MathJax in the haddock HTML backend. Is there
any way (however hacky) that I could do that?
On Monday, January 6, 2014, Joachim Breitner wrote:
> Hi,
>
> it should also be possible to render Formulas to SVG, and embed the
> SVG-File using a data-URL, and get a vector rendering of your
> formular.... similar to the image in
>
> http://hackage.haskell.org/package/circle-packing-0.1.0.3/docs/Optimisation-CirclePacking.html
>
> But probably that will hit size bounds very soon.
>
> http://hackage.haskell.org/package/diagrams-haddock works similarly, and
> also explains how to ship the SVG files separately, to not hit size
> bounds.
>
> I guess a tool similar to that, latex-haddock, would be feasible and
> useful.
>
> Greetings,
> Joachim
>
>
> Am Dienstag, den 07.01.2014, 03:44 +0400 schrieb Alexander V Vershilov:
> > It's possible to use latex render sites [1], then shrink link by tiny
> > URL [2]. Then paste like usual image.
> >
> > [1] http://www.codecogs.com/latex/eqneditor.php
> > [2] http://tinyurl.com
> >
> > --
> > Alexander
> >
> > On Jan 7, 2014 2:20 AM, "Mateusz Kowalczyk" <fuuzetsu at fuuzetsu.co.uk>
> > wrote:
> > On 06/01/14 18:49, Peter Caspers wrote:
> > > Hi,
> > >
> > > I am still very new to Haskell, trying to start my very
> > first project.
> > > For its documentation I want to use Haddock and suitable
> > comments in
> > > the source code.
> > >
> > > I notice that (e.g. different from doxygen) there is no
> > direct way of
> > > writing formulas, say in TeX style. Looking into some
> > projects on
> > > Hackage, formulas there
> > > seem to be written in "pseudo-code" more or less like TeX
> > but not
> > > following any strict standard. As far as I can see.
> >
> > That's right, there's no direct way to embed maths in Haddock.
> > It has
> > been a somewhat requested feature for Haddock over summer when
> > I did
> > work on it but it didn't make it in.
> >
> > > What would be your recommendations concerning this ? Is
> > there some
> > > guideline on how to include formulas ? I understand that
> > there is
> > > "literal programming"
> > > where you can e.g. write a TeX article with embedded code
> > blocks that
> > > can be extracted for the compiler. However, I do not want to
> > follow
> > > this path, also the
> > > result is a bit different from what is produced in the
> > "traditional"
> > > approach, isn't it.
> >
> > If you want manually-written LaTeX, this is probably the only
> > way at the
> > moment. If all you want is some LaTeX snippets (maths), your
> > best bet is
> > to probably write those separately, make images out of them
> > and then
> > embed them into your documentation. There's currently no way
> > for Haddock
> > to do this for you. We do however have a LaTeX back-end so
> > it's not like
> > it's impossible to generate but it'd require some work that
> > has not yet
> > been put in.
> >
> > > Thanks a lot
> > > Peter
> > > _______________________________________________
> > > Haskell-Cafe mailing list
> > > Haskell-Cafe at haskell.org
> > > http://www.haskell.org/mailman/listinfo/haskell-cafe
> > >
> >
> >
> > --
> > Mateusz K.
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Joachim Breitner
> e-Mail: mail at joachim-breitner.de <javascript:;>
> Homepage: http://www.joachim-breitner.de
> Jabber-ID: nomeata at joachim-breitner.de <javascript:;>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140106/88faa189/attachment.html>
More information about the Haskell-Cafe
mailing list