You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using katex to write math formulaes, it is first processed in markdown then in katex, resulting in many broken formulaes without any feedback from katex, as it didn't understand it was supposed to be its.
Minimum reproducible examples
$$$$
The newline creates two empty paragraphs, instead of a katex block in a single paragraph.
$$ {a}\_1 + a\_{1} $$
The _ are not escaped, resulting in emphasis in markdown, instead of subscripts for katex.
$$f(x) = x* y* z$$
The * create a list in markdown, instead of a multiplication in katex.
...and so on.
Possible solution
For my website, I wrote two simple shortcodes to solve the issue:
<!-- texblock -->$${{.Inner}}$$
and
<!-- texline -->\({{.Inner}}\)
Then in markdown files, I first use {{< katex >}} to include katex, then either {{< texblock >}} or {{< texline >}} to write formulaes.
I'm new to hugo and congo, so this might not be the best solution or most elegant one (is it possible to automatically include katex if any tex shortcode is found?), but it does the job. I'm more than willing to do a PR if you want.
This issue has been automatically marked as stale because it has not had any recent activity.
If you are still experiencing this issue, please review the issue history and add a reply with any requested and/or additional information in order to keep the issue open.
This issue will automatically close in 30 days if no further activity occurs.
Issue description
Issue description
When using katex to write math formulaes, it is first processed in markdown then in katex, resulting in many broken formulaes without any feedback from katex, as it didn't understand it was supposed to be its.
Minimum reproducible examples
The newline creates two empty paragraphs, instead of a katex block in a single paragraph.
The
_
are not escaped, resulting in emphasis in markdown, instead of subscripts for katex.The
*
create a list in markdown, instead of a multiplication in katex....and so on.
Possible solution
For my website, I wrote two simple shortcodes to solve the issue:
and
Then in markdown files, I first use
{{< katex >}}
to include katex, then either{{< texblock >}}
or{{< texline >}}
to write formulaes.I'm new to hugo and congo, so this might not be the best solution or most elegant one (is it possible to automatically include katex if any tex shortcode is found?), but it does the job. I'm more than willing to do a PR if you want.
Note: bug previously mentioned in #586
Theme version
v2.6.1
Hugo version
v0.117.0
Which browser rendering engines are you seeing the problem on?
Chromium (Google Chrome, Microsoft Edge, Brave, Vivaldi, Opera, etc.), Firefox (Mozilla Firefox)
URL to sample repository or website
No response
Hugo output or build error messages
No response
The text was updated successfully, but these errors were encountered: