marginalia icon indicating copy to clipboard operation
marginalia copied to clipboard

Bug or missing documentation for LaTex code when MD markup conflicts

Open fgiasson opened this issue 10 years ago • 1 comments

In some cases, there is a conflict between LaTeX markup and MD's. An example is:

\\(C_{1},...,C_{j}\\)

If you use that LaTeX code in your comment, then it won't be managed by MathJax. The issue is that Marginalia is parsing the LaTeX code within the LaTeX code and will add the <em>...</em> markup which will render MathJax nonoperational.

To fix that, you have to single escape the MD markup like this:

\\(C\_{1},...,C\_{j}\\)

And that will work.

However:

  1. this will only work in comments, not in docstrings.
  2. if you try that code in docstring, you will get a compilation error since it is single escaped (would need to be double escaped)

Could this kind of usecases be handled directly in Marginalia before processing the MD code?

fgiasson avatar Dec 15 '14 20:12 fgiasson

This was an issue for me as well. I'd have appreciated the above documentation that @fgiasson provided in the html.clj documentation.

abrooks avatar Sep 08 '15 11:09 abrooks