-
Notifications
You must be signed in to change notification settings - Fork 14
math: support output to markdown #69
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
Conversation
Also, parameterize the THML output markers.
|
I added support for |
|
Hold on. Escaping is missing. |
|
In Pandoc's tex_math_dollars extension, the dollar sign can be escaped with a backslash: Same thing in GitHub Flavored Markdown (GFM) renders as Thus, the solution I'm proposing is the support backslash escape $ signs when parsing and emit backslash escaped dollar signs when needed plus the zero-width space for GFM. |
|
I pushed a new version, that parses escapes properly. However, printing seems to have no provision for extended escape chars or am I missing something? |
Works with inline math:
$x_0$
$`x_0`$
$$x_0$$ text
and block (display) math:
$$x_0$$
- To avoid rendering "between $5 and $6" with inline math, both the
opening and the closing $ character must be followed / preceded by
a non-space character. This agrees with Pandoc. The other forms do
not have such restriction.
- In the block format, the opening $$ can only be preceded by
spaces, and the closing $$ can only be followed by spaces on its
own line.
|
This latest version does proper escaping in printing too, but it does not yet have the zero-width space workaround for the lack of escaping |
|
not sure about the github escaping thing, maybe with an option to disable it? |
|
The zero-width space implementation wouldn't fit nicely into the existing escaping logic, and it needs the output stream to be unicode capable . I think I'll implement this in PAX after all. |
Also, parameterize the output markers.