## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 95 total)
• Plugin Author Thomas Churchman

(@beskhue)

Hi,

This isn’t possible in KaTeX currently, unfortunately.

I would chime in here that you’d like to see this: https://github.com/KaTeX/KaTeX/issues/2167

The following gets close, but it doesn’t look that nice.

\newcommand\identity{1\kern-0.25em\text{l}}

\identity

Unicode double-struck one (𝟙) also doesn’t work 🙁

Forum: Reviews
In reply to: [KaTeX] Nice Plugin
Plugin Author Thomas Churchman

(@beskhue)

One request to the author is that the font and related files are downloaded even on the pages that do not use katex.

This is configurable; please go to Settings -> KaTeX. To prevent assets from loading on pages without KaTeX, check “Load KaTeX assets conditionally”.

If KaTeX content may be loaded after WordPress has processed the page (for example, because some other plugin uses AJAX to load content), then it’s best to keep this unchecked.

Plugin Author Thomas Churchman

(@beskhue)

eqnarray* is not supported. It is recommended to use align* instead.

You can interactively try KaTeX expressions here: https://katex.org/

The same website has a table of (un)supported TeX functionality: https://katex.org/docs/support_table.html

Plugin Author Thomas Churchman

(@beskhue)

Good luck! If you find a neat way that works, it would be great if you could report back. It might be useful to others following the same trail.

Plugin Author Thomas Churchman

(@beskhue)

Technically, it’s possible. Practically, you’ll likely want to use a plugin to do this. The following might work if you know regular expressions, but I have not tested it:

https://wordpress.org/plugins/search-regex/

As a side-note, because you mentioned having a lot of TeX in your articles, you may want to go with $..$ shortcodes, rather than katex. That’ll make it easier for you to switch plugins in the future, if ever required.

Plugin Author Thomas Churchman

(@beskhue)

Hi!

Inline TeX expressions must be enclosed in [katex]..[/katex] or optionally $..$ shortcodes. There are KaTeX blocks for easier editing of display-mode TeX.

Tags such as \$ or \[ are not supported.

Plugin Author Thomas Churchman

(@beskhue)

Happy to hear the issue is resolved.

Getting this plugin compatible with many different third-party plugins has been a long process, as I wasn’t easily able to test with them. With the improvements to solve this issue, it should now work in almost all circumstances. So thanks a lot for your help debugging!

Plugin Author Thomas Churchman

(@beskhue)

Thank you. I’ve had yet another look and actually might’ve found the real cause. Released as 2.2.3. Please let me know if it works for you. If it does, it was kind of a silly mistake on my part.

A donation is by no means necessary, but of course it would be very much appreciated!

If PayPal works for you, my account is thomas [ at ] churchman [ dot ] nl.

Regarding customization services: I’m not familiar with Learndash, but we can always have a chat. You can reach me on the address as above.

Plugin Author Thomas Churchman

(@beskhue)

I changed the only thing I could think of that might’ve caused this.

My suggestion is to contact Learndash and send a link to this thread. They’ll have a good understanding of their asynchronous fetching of content so they’ll be able to fix this or give some pointers.

I’ll go into a bit of technical detail about my thinking for the change in 2.2.2. In this new version the shortcodes are now immediately registered, rather than only as a callback from the init hook as prior to 2.2.2.

So now in 2.2.2, on any page load, these shortcodes will be registered. Any content with [katex] should get handled automatically (and also [latex], if the option is set). My thinking thus is, if the shortcode is not handled, then the process fetching the content is doing something wrong.

I don't know why the other plugin you tested seems to work. What's the full name of that plugin?

Plugin Author Thomas Churchman

(@beskhue)

That’s surprising.

Hm, if doesn’t work in 2.2.2, then I’m really not sure where the issue would be, and it’s hard to debug like this.

Could you try using the [katex] shortcode instead of [latex], just to rule one more thing out?

If that still doesn't work, I think the issue is very likely to be on Learndash's side after all.

Plugin Author Thomas Churchman

(@beskhue)

This should be fixed in version 2.2.2.

Plugin Author Thomas Churchman

(@beskhue)

Thank you, that’s very helpful. I’ve just released version 2.2.2. I think the problem is solved in that version; please check it out and let me know.

Plugin Author Thomas Churchman

(@beskhue)

Thank you. The shortcodes are not being rendered to HTML. It looks to be an issue with Learndash: they are not correctly evaluating shortcodes for the fetched content.

Would you be able to check whether other third-party plugin shortcodes do work there?

Plugin Author Thomas Churchman

(@beskhue)

Thank you! That’s interesting. This means the front-end scripts are actually enqueued.

What do the shortcodes you typed show up as in the source code? Are they shown on the page and in the page’s source code as just what you entered, i.e., [katex]...[/katex]?

Depending on how Learndash works, if the content is loaded only after the page load it won’t show in the source code, so you might have to use the browser console to see how it shows up as HTML (usually you can bring it up with F12). You can use the “inspector” to navigate to where you see the KaTeX.

Plugin Author Thomas Churchman

(@beskhue)

Hi,

This will be difficult for me to track down, as I do not use Learndash.

Could you check in the source code of those pages whether the shortcode is correctly rendered to <span class="katex-eq">...</span>? If the HTML elements are correctly created, it’s likely that the plugin’s front-end scripts are not getting enqueued correctly. Perhaps these report pages are technically on the admin side (https://example.com/wp-admin)?

Viewing 15 replies - 1 through 15 (of 95 total)