-
Notifications
You must be signed in to change notification settings - Fork 30
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
Pandoc support #18
Comments
@abhishekchugh: Your request seems to be quite similar to So I added Please have a closer look into that pandoc usage and test it. Thanks |
Closing ... please reopen in case of pandoc usage problems. |
@goessner : Thank you so much for working on this request. The new code identified '$$-quoted' latex strings correctly. There are couple of minor issues that can be easily resolved:
I don't know if introduces any other bugs, but I didn't find any. Also, you may want to fix this for all delimiter types (not just 'pandoc') because this makes the plugin inconsistent with pandoc's general philosophy of ignoring single-line breaks. |
Unfortunately it only works by accident. Having a closer look into the pandoc inline rules shows, that only the
I forgot, what exactly is responsible, why BTW: Forcing an inline rule I would keep
I would like to eliminate those Taking the second alternative in combination with a simple preprocessing from your side, which is changing I need to publish Version 0.6.6 in time, so ... what do you think? |
Stefan, I copy the plugin code in this repository and modify slightly (coz I need to modify the rendering so that I create a custom Angular plugin). So I have created custom delimiters which I needed (pasted at the end of this comment). If I find any issues, I will use your pre-processing suggestion. Having said that, pandoc support will make this more plugin more widely used since pandoc is extremely popular and multi-line support feels quite important when you are working with large formulas. In any case, I am grateful for this work - I just can't wrap my head around how markdown-it plugins work and the authors refuse to write better documentation. Feel free to come back to this if you think this is important and you have time to spend on this.
|
ok ... simply change the first inline rule from
in order to get a display mode formula to
and you will see, that it will be not invoked due to the match of the second ... good luck |
@abchugh: I finally found some time and successfully implemented your requested features ... at least I think so. Can you please test it in your environment? At the same time I removed the texmath.rules['pandoc'] = texmath.rules['dollars']; somewhere. thanks |
@goessner I finally got some time to update the code with the latest updates. The inline block-mode worked quite well. Did you add support for inline tex overflowing into multi-line lines? I couldn't get that working. Could be a mistake at my end too. |
Firstly, thank you so much for this awesome plugin. It is what powers my large parts of my new non-profit.
This feature request for making this plugin compatible with pandoc (the best/most-widely known open-source document converter).
A large portion of our project is to convert latex documents into markdown so that they can be used on our website (eg see bit.ly/sphz-art ). To do this, we use pandoc to convert latex to markdown and use the markdown-it-texmath for rendering.
However, there are a couple of major issues when rendering pandoc output:
For example both these issues show up in the following text generated by pandoc:
I would be really glad if you could provide support for this.
The text was updated successfully, but these errors were encountered: