mur2_editor icon indicating copy to clipboard operation
mur2_editor copied to clipboard

$${a^b}^{c}$$ konstrukció nem mindig megy

Open sajozsattila opened this issue 3 years ago • 3 comments

Reported error by email:

És még arra lettem figyelmes, hogy az $${a^b}^{c}$$ konstrukció nem mindig megy. Néha $${a^b}^{{c}}$$-t kell írnom, ami több gépelést jelent.

sajozsattila avatar May 27 '21 16:05 sajozsattila

At the moment I could not reproduce, need to try multiple time, ideally with an automatic test.

sajozsattila avatar May 27 '21 16:05 sajozsattila

Here is an example that is not working: $${1^2}^{34}$$ In LaTeX this document compiles and displays well:

\documentclass{article}
\begin{document}
$${1^2}^{34}$$
\end{document}

kovzol avatar May 27 '21 20:05 kovzol

I have managed to locate the root cause of the problem: the markdown-it-attrs has a conflict with all of the math processing solution. The issue is already raised with the developers (by katex users). The developers pointing out the issue is just happening when the {} is on the end of a block. So the bellow wil work:

$${1^2}^{35}$$ inline. 

$$
{1^2}^{36}
$$

What need to see there:

  1. in inline math formula need to be some character after the closing $$. It can be anything except white space. This could be problematic, very occasionally, however, I believe 95% of the time the sentence can be rewritten.
  2. in block math formula the opening and closing $$ in separated line. (Personally, I think it is a clean formating and I generally recommend doing like this. )

The ideal solution could be to patch the markdown-it-attrs, however, the ticket is open for half a year, and do not looks like a priority for the plugin developers. I will have a look at the plugin and try to figure out how it is working.

sajozsattila avatar Jun 02 '21 22:06 sajozsattila