markup
markup copied to clipboard
bug in latex rendering with multiple $ on a single line.
I found a bug in the latex rendering.
The following sample: if $i^n$ is reduced down to either $1, -1, i$ or $-i$ and
renders like this:

but it should render like this

Similar issue here: I noticed that when you put multiple (>= 3) inline math blocks on a single line, with the first and last ones containing escape signs '' and if there are regular text between them, the rendering system gets all confused.
Example: $\log$, $b$, $\log$
$\log$, $b$, $\log$
renders like this:
where it should be like this

Edit:
This seems to be a common error for all multiple $ conditions with the last $...$ starting with a non letter or digit character.
It happens when:
- there are >= 3 inline math blocks
$...$on a single line, - the 3rd or later math block starts with a non letter or digit character, and
- there is some regular text between that
$\...$block and the math block directly before it.
I can confirm this behaviour.
Let $G$ be a $(p, q)$-Graph and $v, v' \in V$
produces

It should be:

Also there seems to be an issue with unrecognized symbols like \varphi and \empty.
$L \neq \empty$

The minimal reproducible example I could find of this behaviour is:
A $\pi$ B $\pi$
If I tried like it is it should be rendered at A π B π , but it is instead rendered wrong (i.e. Aπ\pi$):
A $\pi$ B $\pi$ (A $\pi$ B $\pi$, should be A π B π but it is Aπ\pi$)
As soon as I remove either A or B, it works fine:
$\pi$ B $\pi$ ($\pi$ B $\pi$, renders correctly as π B π)
A $\pi$ $\pi$ (A $\pi$ $\pi$, renders correctly as A π π)
another example:
$(r_i, s_i)$ for messages $m_i$ one computes pairs $(a_i, b_i)$ with the property
$(r_i, s_i)$ for messages $m_i$ one computes pairs $(a_i, b_i)$ with the property