Thomas Churchman
Forum Replies Created
-
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.
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)?Forum: Plugins
In reply to: [KaTeX] Not Rendering Mathjax ShortcodesHi,
Thank you for the suggestion.
I am not planning to add this: it goes somewhat against normal usage of plugins in WordPress, so would likely result in confusion or breakage—especially in terms of compatibility with other plugins. That would be a relatively high maintenance burden.
See also:
– https://www.ads-software.com/support/topic/is-there-any-way-of-implementing-default-latex-behavior/
– https://www.ads-software.com/support/topic/can-we-use-dollar-signs-and/Forum: Plugins
In reply to: [KaTeX] Incompatible with rtl languagesActually, this may be a bit more future-proof, if this plugin ever changes the element layout a bit:
.katex-eq { direction: ltr; } .katex-eq[data-katex-display="false"] { display: inline-block; }
- This reply was modified 3 years, 2 months ago by Thomas Churchman.
Forum: Plugins
In reply to: [KaTeX] Incompatible with rtl languagesHmm, I see. I played around a bit and found something that does work.
.katex-eq { direction: ltr; } .katex-eq > .katex { display: inline-block; }
This works on your example page. I’m not sure why
inline-block
is required for the inline equations.There is a somewhat related issue upstream, you might want to chime in there: https://github.com/KaTeX/KaTeX/issues/343
Forum: Plugins
In reply to: [KaTeX] Incompatible with rtl languagesCould you provide an example page? The fix worked in my tests, so there must be something going on.
Forum: Plugins
In reply to: [KaTeX] Incompatible with rtl languagesHi!
Thank you for this issue report.
Please try adding the following to your site’s stylesheet. It should work even for inline KaTeX.
.katex-eq { direction: ltr; }
This’ll work with
<body dir="rtl">
. Depending on how RTL is set on your page, you may have to be more persuasive:.katex-eq { direction: ltr !important; }
Forum: Plugins
In reply to: [KaTeX] Need Help on AlignmentYou can add a custom class to blocks when in the post editor. Go to the block settings for the block you want to add a custom class to and click on “Advanced” to open the advanced settings. You can add your custom class names to the “Additional CSS class(es)” field.
To style them, add rules to your stylesheets, for example:
.katex-eq.my-custom-katex-class .katex { text-align: right !important; }
Thank you. I did not realize your were seeing this output on your page. It’s recommended for production websites to not log to the page. You can achieve this by setting
display_errors = Off
in your php.ini. That will suppress this message, and will also prevent other messages that might otherwise be a potential security risk.
I have a hunch you can also stop this message from appearing by:
1. going to the KaTeX plugin settings
2. checking “Load KaTeX assets conditionally”
3. saving
4. unchecking “Load KaTeX assets conditionally”
5. savingRegardless, I will look into the source of this message for a future version, but I don’t currently have time. It will likely take a month before I can get to it.
- This reply was modified 3 years, 3 months ago by Thomas Churchman.
Forum: Plugins
In reply to: [KaTeX] KaTeX parse error: {CD} can be used only in display mode.Thank you for reporting back with the solution to your issue!
Hi,
Thank you for the report.
This is not an error and won’t stop the plugin from working.
I’ll have a look into the cause of this message though.
Forum: Plugins
In reply to: [KaTeX] Katex plugin not rendering in Learndash QuizzesThis probably has a better solution now: it might work out of the box using version 2.2.1.
Also see https://www.ads-software.com/support/topic/katex-does-not-render-in-cm-tooltip-glossary
Forum: Plugins
In reply to: [KaTeX] KaTex does not render in CM Tooltip GlossaryHappy to hear! Thank you for confirming.
Forum: Plugins
In reply to: [KaTeX] KaTex does not render in CM Tooltip GlossaryThank you for the example page. I’ve released version 2.2.1 that should work in more (hopefully all?) cases. I think it’ll work for you. Please test it and let me know.
Forum: Plugins
In reply to: [KaTeX] KaTex does not render in CM Tooltip Glossary`1/ Formula showed “Katex is not defined” if unchecked “Using the jsDelivr CDN will make KaTeX load faster.” in Katex’s settings.
If checked, it’s ok.
(did not check “Load KaTeX assets conditionally”)2/ Formula in tooltip still not showing same as before (even marked “Using the jsDelivr…” or not”)`
Please empty your browser’s cache and try again (usually Ctrl+F5).
These two things sound related: the same file that points to the correct local KaTeX assets also implements the new rendering. It sounds like it was not updated correctly for you yet. I’m guessing that’d be due to your browser’s cache.