thegeeklab/hugo-geekdoc

Feature Request: Easier KaTeX Integration

mbkma opened this issue · 1 comments

Feature Request: Easier KaTeX Integration

Description:
Currently, when using the Geekdoc theme in Hugo, I have to write {{< katex >}} every time I want to use LaTeX. This can be cumbersome, especially when working with many mathematical expressions. I am requesting an easier way to integrate KaTeX, such as using $$ for inline and block math.

Proposed Solution:
It would be highly beneficial if we could use $$ delimiters for KaTeX integration, similar to how other Markdown processors handle LaTeX. This would make the process more intuitive and reduce the overhead of repeatedly writing the shortcode.

Examples:

Instead of writing:

{{< katex >}}
\int_{a}^{b} f(x) \, dx
{{< /katex >}}

We could simply write:

$$
\int_{a}^{b} f(x) \, dx
$$

This change would streamline the writing process and improve the overall user experience for those frequently incorporating mathematical expressions into their content.

Additional Information:
If there's already a way to achieve this with the current setup or if there are any workarounds, please provide guidance.

Thank you for considering this feature request.

Thanks for your request. Should be possible with Hugo 0.122 now https://gohugo.io/content-management/mathematics/ As far as I can see this would require:

  • User configuration as described in step 1)
  • KaTex changes in the theme to enable delimitersas described in step 2) (and Enginessection)