Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Easier KaTeX Integration #859

Open
mbkma opened this issue Aug 6, 2024 · 1 comment
Open

Feature Request: Easier KaTeX Integration #859

mbkma opened this issue Aug 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@mbkma
Copy link

mbkma commented Aug 6, 2024

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.

@xoxys xoxys added the enhancement New feature or request label Aug 6, 2024
@xoxys
Copy link
Member

xoxys commented Aug 6, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants