ddoc latex/formulas?

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 16 09:03:44 PDT 2016


On Friday, 16 September 2016 at 15:45:36 UTC, bachmeier wrote:
> I'm not sure it's good to compare ddoc to Wikipedia. If I want 
> to output documentation from a .d file, I don't want to go 
> through a process like that.

It is again simple with my program: `adrdox yourfile.d`. It 
renders the latex to an image then embeds it in the html as a 
data uri (and the original latex source as the alt attribute 
which enables any fallback you can imagine).

With my thing, yes, the latex and dvipng programs need to be 
installed and available for an `executeShell` call... but that's 
not too hard, it was preinstalled on my linux anyway (and if it 
fails, it falls back to outputting the source anyway soooo it 
could still be used my mathjax i suppose).

It isn't really a difficult process and it is only 62 lines of 
code in my doc gen source. I don't do as much validation as 
Wikipedia but even if it were to, it'd just be a larger source 
file, no real trouble for the end user.


This isn't really a difficult problem!


More information about the Digitalmars-d mailing list