-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MathJax does not produce results #2175
Comments
After trying to understand the (undocumented) codebase, I think I've narrrowed it down some. After debugging |
Hi! I tried debugging it too, thinking it was an easy fix, but there's definitely something shady going on. I don't remember much detail, but I believe it embeds the script into the HTML just fine. You can try generating dokka for
but for some reason the script is not kicking in and not formatting the formulas (now that I think of it, I should've checked if it was under If you get to the bottom of this and submit a PR, I'll be happy to merge it :) |
Can I ask how you're looking at the output source that I'm noticing that yes, the MathJax CDN is being included, but the paragraph block that contains the text of the documentation is completely missing. |
Never mind, I wrote this which outputs it to a directory—which goes inside the writerPlugin.writer.contents.entries.forEach {
File("build/test/nomathjax/${it.key}").also { File(it.parent).mkdirs() }.writeText(it.value)
} |
Think I figured out the bug. When applying the |
Nice, good job! :) I'll have a look at it today, thanks! |
* Fix MathJax rendering bug (#2175) Fix a bug where using the `@usesMathJax` custom tag would cause the documentation to fail to render.
* Fix MathJax rendering bug (#2175) Fix a bug where using the `@usesMathJax` custom tag would cause the documentation to fail to render.
Describe the bug
I am attempting to use the MathJax plugin to add math support for my documentation. Whenever I add the
@usesMathJax
annotation to a KDoc, the documentation fails to render.Expected behaviour
The documentation to appear with correct math rendering.
Screenshots
Given the following class and method,
this is what's rendered:
![image](https://user-images.githubusercontent.com/31376393/135900678-e2ca05b3-ad8f-412b-acfb-ac50ba116434.png)
A similar render appears with classic Javadoc (nothing appears for the documentation of the method).
To Reproduce
@usesMathJax
annotationdokkaHtml
(ordokkaJavadoc
)Dokka configuration
Installation
Additional context
I found little documentation on how to use this plugin, so it could be simply I'm using it all wrong. If that's the case, how can I appropriately use this plugin?
Are you willing to provide a PR?
Sure.
The text was updated successfully, but these errors were encountered: