-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Error Processing LaTeX stems #326
Comments
It appears to start working after commenting and uncommenting the STEM block. |
Thanks for reporting this. I'll look into it. As a workaround: please enable uncheck the setting "Replace preview contents without flicker (JavaFX preview only)" for a more robust preview generation. Using this option the preview will flicker, but the error will not show up. I'll update this issue once a fix is available. |
…h problems, plus popup hint with MathML error message in preview (#326)
@dillonredding - a new pre-release 0.30.2 is available that fixes this issue. latexmath-style formulas are now displayed correctly. The new pre-release of the plugin is available from GitHub releases and the IntelliJ AsciiDoc EAP repository. I've also added a feature that when the latexmath-parsing fails, the error message is directly visible in the preview. Please let me know if this works for you. I'll then publish the version for everyone else. |
@ahus1 I tried the early access version and it appears to work! Thanks! I did notice, however, that the preview seems to slow down significantly after awhile. Not sure if it's because of multiple STEM blocks or just having it open after some amount of time. I tried removing a majority of the content, but the previewer didn't speed up any. |
@dillonredding thank you for this information. How many math elements do you have in the preview (current file and maybe included files)? The number of equations will slow down the preview. How long is the lag from keystroke to preview refresh in seconds? With mathml there is a lag, but I try to keep it below one second. This might vary on hardware type and document size. Is the preview faster again when you close the editor and reopen the editor (just the editor of the current file)? This action will initialize the preview and would clear any memory leaks that might be there. How long does it take for the preview to get slow (please estimate the number of characters typed if that is possible, as it is an equivalent of how the preview needs to refresh)? Your answers will help me to investigate this. Thanks! |
I started IntelliJ back up and it took about 2 seconds for the previewer to render everything after it was finished initializing. This is much faster than what I was seeing two days ago. I started with 167 It seems to get worse as I add more. I noticed that if I take it down to one I'm running all this on a laptop with these specs: It's probably worth noting that I updated IntelliJ before doing all this. Here's the info: |
Thank for for answering the questions. I did some local tests reproduced the slowdown. There must have been a memory leak triggered on every refresh of the preview. The refresh of the preview is triggered on every edit. While MathML is quite slow, it grew slower with every edit. A new preview version 0.30.3 is available that shouldn't slow down any more. Please give it a try. This now waits up to three seconds for the refresh to complete. With a single stem the preview should be well below one second, with your number of stems I hope it will stay below three seconds. The lag of the preview correlates with the number of stems. You might want to consider breaking down your document into smaller chapters. Smaller chapters will allow for a faster preview. A master document can the in include the different chapters. At the moment the preview is refreshed completely even for small text changes. Due to the nature of MathML future versions might cache MathML to speed up the preview on text-only changes. I need to find out if this is possible. It would take some effort and time to complete, and I wouldn't be a able to tell when it be available. Another option would be to add an option in the plugin's configuration to disable math. This could be a straight-forward option with a short lead-time that could be implemented in one of the upcoming pre-releases. Please let me know what you would prefer from a user's point of view. Thanks! |
Thanks for the update! I'll try it out next chance I get and let you know. I like the idea of separating out "chapters" into individual files! That might be my preferred option. The option to disable math might be useful, but not for my scenario. I want to see the rendered math without having to compile the document each time. Would it be possible to only refresh the part of the preview being viewed, rather than the entire thing? |
I consider the original issue to be fixed. To optimize the speed of the preview I've opened #333 |
When using the following STEM block using
latexmath
, the previewer displays "[Math Processing Error]" in red italics:I expect this to display what's displayed when compiling the AsciiDoc using the
asciidoctor
CLI. This does work sometimes, but not always. It also doesn't happen for everylatexmath
STEM block. It seems to be breaking on the\begin{align*}...\end{align*}
commands. I haven't figured out what triggers it start working, but when it does work, it starts breaking after editing the document.AsciiDoc Plugin Version: 0.29.10
IDE Name and Version:
IntelliJ IDEA 2019.2.1 (Community Edition)
Build #IC-192.6262.58, built on August 20, 2019
Runtime version: 11.0.3+12-b304.39 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 980M
Cores: 4
Registry:
Non-Bundled Plugins: CMD Support, Lombook Plugin, org.asciidoctor.intellij.asciidoc, com.cursiveclojure.cursive, izhangzhihao.rainbow.brackets, in.1ton.idea.spring.assistant.plugin, org.jetbrains.spek.spek-idea-plugin, org.zalando.intellij.swagger
The text was updated successfully, but these errors were encountered: