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.