Thomas Churchman
Forum Replies Created
-
Forum: Plugins
In reply to: [KaTeX] Unloading KaTeX scripts from pages where not in useHi there,
Looking at the page you linked, it appears you are using a plugin to fetch content from the server dynamically (the quiz plugin?). The text with KaTeX content is fetched when the user finishes the quiz, but this only fetches the text, not this plugin’s KaTeX scripts.
When text content is fetched dynamically, this plugin cannot automatically know in advance whether KaTeX will or won’t be used on a specific page.
With such a setup there unfortunately is nothing this plugin can do to help, and you would need to always load the KaTeX resources. Perhaps the plugin doing the dynamic loading could be changed to perform some magic in automatically detecting and injecting missing scripts. That probably isn’t easy to do, though.
I would assume that if Perfmatters removes the KaTeX resources from pages it doesn’t detect KaTeX usage on, that KaTeX would also stop rendering on the quiz page.- This reply was modified 1 year, 3 months ago by Thomas Churchman.
Forum: Reviews
In reply to: [KaTeX] RTL equation in RTL websites!Hi there,
Please see: https://www.ads-software.com/support/topic/incompatible-with-rtl-languages/#post-14859106
You would need to do the reverse (i.e., set direction: ltr).
This is a known issue upstream (e.g., see https://github.com/KaTeX/KaTeX/issues/343 and the related issues mentioning that issue).- This reply was modified 1 year, 3 months ago by Thomas Churchman.
Forum: Plugins
In reply to: [KaTeX] How do I get a “doubled” 1 with KaTeX ?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 PluginThank you for your review.
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.
Forum: Plugins
In reply to: [KaTeX] from QuickLateX to KaTeX ?eqnarray*
is not supported. It is recommended to usealign*
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
Forum: Plugins
In reply to: [KaTeX] from QuickLateX to KaTeX ?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.
Forum: Plugins
In reply to: [KaTeX] from QuickLateX to KaTeX ?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://www.ads-software.com/plugins/search-regex/
As a side-note, because you mentioned having a lot of TeX in your articles, you may want to go with
[latex]..[/latex]
shortcodes, rather thankatex
. That’ll make it easier for you to switch plugins in the future, if ever required.- This reply was modified 3 years, 2 months ago by Thomas Churchman.
Forum: Plugins
In reply to: [KaTeX] from QuickLateX to KaTeX ?Hi!
Inline TeX expressions must be enclosed in
[katex]..[/katex]
or optionally[latex]..[/latex]
shortcodes. There are KaTeX blocks for easier editing of display-mode TeX.Tags such as
$
or\[
are not supported.See also
– https://www.ads-software.com/support/topic/not-rendering-mathjax-shortcodes/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!
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.
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?
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.
- This reply was modified 3 years, 2 months ago by Thomas Churchman.
This should be fixed in version 2.2.2.
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.
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?
- This reply was modified 3 years, 2 months ago by Thomas Churchman.