-
Notifications
You must be signed in to change notification settings - Fork 127
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
idea-multimarkdown and math equations #132
Comments
@JimStearns206, to have the equation in the text you need to embed it as an multi-line URL to some LaTex on line processor. http://www.codecogs.com/latex/eqneditor.php will handle creating images and producing encoded URLs. Here is an example: Markdown source: You can include text before ![LaTex Embedded Image](http://latex.codecogs.com/gif.latex?
\begin{align*}
x^2 + y^2 &= 1 \\
y &= \sqrt{1 - x^2}
\end{align*}
)
and after the the image but the after has to come on its own line, the closing `)`
has to be the only non-blank on its line so that the URL content is not constrained.
If you need to include a single `)` inside the content, just indent it by an extra 4
spaces and it will be ignored as a terminating `)` of URL content. Multi-line URL image tags were added specifically to handle online URL to image processing services, initially the request came in for UML diagrams. You don't get much control over alignment but it is a quick and cheap solution that displays math equations. Also requires support of the markdown processor that used in the rendering of the final document. GitHub will handle multi-line URLs for gravizo.com UML diagrams but not LaTex. At least not this one. Rendering in idea-multimarkdown: Rendering on GitHub: The other option is to use the single line image link with a url encoded: will render as: in idea-multimarkdown preview and should be handled correctly by most markdown processors. I could add a quick-fix into idea-multimarkdown that will let you convert between the multi-line and single line URL encoded formats so that you can edit and preview the results in comfort and then convert to the image tag that will be processed correctly by any markdown processor. When you need to edit and change it, you use the quick fix to make it a multi-line URL and when you are done convert it back for portability. |
@vsch, thanks for the prompt and helpful reply, complete with examples. They work. A future release with syntactic sugar to hide the machinery would be great, but the current methods you describe do what I need now. Thanks again! |
@JimStearns206, you are welcome. I will add the intention action to go from URL encoded image tag to multi-line URL and vice-versa to my To Do list. |
@vsch doesn't work for me =( |
@fathersson, can you please paste the markdown content you are using so I can try it out and see why it is not working. Please indent the text so it is treated as code or wrap the pasted text in:
So it is not processed by GitHub |
@fathersson, just realized you are not using idea-multimarkdown but Markdown Support plugin. You can have both installed but if 'Markdown Support' is enabled it will be used instead of idea-multimarkdown. You need to disable 'Markdown Support' in IDEA preferences (OS X)/settings (Windows/Linux) under plugins. Here is what it looks like in idea-multimarkdown: |
@vsch man, you're genius! I have no idea how did you figure that out, but you're totally right! I've tried several Idea plugins - thus I have three installed - Markdown, Markdown support and yours - the best - Multimarkdown. My understanding was that "Markdown support" is a must in order to support markdown in Intellij Idea. So I have turned on two - "... support" and MMD. Thanks a lot! =) |
@fathersson, you are welcome and thank you for the compliment. If I was a genius I would have noticed it right away, instead of after trying the sample. The toolbar over the markdown editor is different and the preview for Markdown Support does not have the GitHub like document title and frame. BTW, You don't need Markdown Support unless you want to use it as your Markdown plugin. |
@JimStearns206, latest EAP 2.3.0.16 has intention actions to convert markdown to HTML for image links and vice-versa. Specifically, multi-line URL image links, tables and definitions are supported. So you can convert to Markdown multi-line URL, edit and validate then when you are done use the Markdown To HTML intention to covert it to URL encoded image tag that should work with all markdown parsers. To enable EAP update channel: Then make the IDE check for updates. |
Does idea-multimarkdown or compatible plug-in support math symbols, as in${e}^{i\pi }+1=0$ ?
The text was updated successfully, but these errors were encountered: