How can I render $
-delimited text as math/LaTeX at build time to avoid including additional Javascript in the final html? Ideally, LaTeX in the markdown should be turned into either an svg, or html which can be rendered via custom css.
No you cannot
The integration uses JS
Maybe if you switch to asciidoc for these pages …but not sure according to the docs it seems possible: Configure markup | Hugo
GetRemote is cheating
With that Hugo will even be able to brew a coffee
If it’s @jmooring who’s suggesting it, then it’s the way to go for me. Only thing I’d improve is the ability to set the width of the image. Sometimes you want the equations to be full width. Just change the <img>
line to this:
<img src="{{ $url }}" alt="mathematical expression or equation" width="{{ (.Get "width") }}">
A little premature, but I’m deep into testing out wasm/wasi modules in Hugo, and I thought that a good proof of concept could be MathJax. It looks promising.
I don’t like the dependence on an external service, or the syntax to invoke the math environment, but this seems like the best solution so far. On a related note, I tried using pandoc and it seems it is not configurable which is a shame since the webtex and katex options are very promising.
I’ll mark this as the solution for now, though it isn’t really a solution I prefer.
21 hours from “promising” to PR. Quite a pace
It’s still a draft, but it’s been a while since I have been this “exited” about a (for me) relatively new tech thing. I have been watching it from a distance for a while, but it has matured a lot the last couple of years. The sandboxing/security and portability of this is incredible. Having end users include runnable binaries as part of their Hugo project was not something I imagined ever would be possible.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.