hugo-book icon indicating copy to clipboard operation
hugo-book copied to clipboard

activating KaTeX per-page inserts `\(\)` at the beginnign of the page summary.

Open TheChymera opened this issue 2 years ago • 4 comments

Going by this suggestion: https://github.com/alex-shpak/hugo-book/issues/164#issuecomment-593593487 A weird string gets prepended to the page listing, as seen in the picture below: decohost_2022-04-15T01:47:09

Interestingly enough, this does not appear on the actual page. Any idea what can be done about it?

TheChymera avatar Apr 15 '22 05:04 TheChymera

Hmmm.... interestingly enough putting {{< katex />}} at the end of the file rather the beginning, both enables KaTeX on the page and inserts no string I could find. All-round pretty strange, though it would kind-of fix or at least obscure the issue.

TheChymera avatar Apr 15 '22 05:04 TheChymera

Hi! having standalone empty {{< katex />}} tag is okay, as more-less {{< katex />}} shortcode tag just enables KaTeX library for page. There is an issue with how hugo renders markdown under shortcodes making it escape \)\) sequence and causing KaTeX library to not pick up formulas. Wasn't able to fix it so far.

In this specific case, you see a .Summary field of page in blog listing. It does render differently by hugo comparing to regular markdown, unfortunately.

alex-shpak avatar Apr 18 '22 13:04 alex-shpak

Do you have your webiste published? so I can take a look.

alex-shpak avatar Apr 18 '22 14:04 alex-shpak

@alex-shpak http://www.opinions.chymera.eu/ code being here https://github.com/TheChymera/chymeric-hugo

The issue is not present right now, but I can break a blog post on purpose and link you to it if would help you help me :)

TheChymera avatar Apr 18 '22 18:04 TheChymera

Issue got lost unfortunately, tell me to reopen if you still need help.

alex-shpak avatar Nov 02 '22 22:11 alex-shpak