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
Inline math unsupported in reST documents #117
Comments
What syntax did you use to include the inline math? There is no standard syntax for math in RST (to my knowledge -- this may be out of date), so the RST reader doesn't read anything as math. (In particular, it doesn't assume that text between $$ is math, as the pandoc markdown reader does.) In the RST writer, we render math as follows: .. role:: math(raw) Google Code Info: |
Maybe I'm misunderstanding the spirit of the inline Math feature, but the user's guide says, "Anything between two $ characters will be treated as TeX math. The opening $ must have a character immediately to its right, while the closing $ must have a character immediately to its left." To me, that says that I should be able to write "$x$" in any input document format and have it result in an Inline in the Pandoc AST representing an InlineMath object. Am I off my rocker here? In my RST document I used the "$...$" form. My modification to the RST parser just copies the Markdown parser's behavior when parsing "$...$" and "$$...$$". Google Code Info: |
You're looking at the part of the README entitled "Pandoc's markdown vs. standard markdown". It isn't meant to apply to RST, only to markdown. Google Code Info: |
Ahh, fair enough. I didn't even notice that. In that case, I'll try (extended) Markdown as my input format. I'm an RST fan but the math parsing is a must. :) Sorry! Google Code Info: |
I suppose one could write an "extended RST" reader that parses "$...$"-style math, although I'm not excited about opening that can of worms for every input format. In any case, my motivation for wanting "$...$" is mostly that it's easier to type that than the RST 'math' role repeatedly. Google Code Info: |
Google Code Info: |
Math is now supported in RST reader and writer! |
Inline: :math:`E=mc^2` Block: .. math: E = mc^2 .. math:: E = mc^2 a = b^2 (This latter will turn into a paragraph with two display math elements.) Closes jgm#117.
What steps will reproduce the problem?
What is the expected output? What do you see instead?
I expected EQ tags in the case of --gladtex, specifically.
What version of the product are you using? On what operating system?
Pandoc 1.5.1.1, Ubuntu 10.04, GHC 6.10.4.
Please provide any additional information below.
It was pretty straightforward to add support for math by copying the Markdown inline math-parsing code into the RST reader module (then removing 'failIfStrict'). Maybe it just got forgotten? Or maybe something about reST causes trouble for inline math parsing?
One final note: I'm filing this as a defect only because I haven't found evidence in the documentation that it's unsupported, so I was surprised to find out it wasn't. In any case, thanks for Pandoc!
Google Code Info:
Issue #: 249
Author: drcyg...@gmail.com
Created On: 2010-07-19T05:34:01.000Z
Closed On: 2010-12-07T04:43:43.000Z
The text was updated successfully, but these errors were encountered: