markup icon indicating copy to clipboard operation
markup copied to clipboard

Math example from GitHub docs broken

Open mlondschien opened this issue 2 years ago • 3 comments

This is an excerpt from the GitHub docs Writing mathematical expressions:

image

However, inserting verbatim:

**The Cauchy-Schwarz Inequality**

$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$

does not render:

The Cauchy-Schwarz Inequality

$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$

mlondschien avatar Sep 16 '22 12:09 mlondschien

@mlondschien I just tried this but with the empty line separator removed. It looks like it's rendering now?

Without empty line

**The Cauchy-Schwarz Inequality**
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$

The Cauchy-Schwarz Inequality $$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$

With empty line

**The Cauchy-Schwarz Inequality**

$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$

The Cauchy-Schwarz Inequality

$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$

Dusch4593 avatar Sep 16 '22 13:09 Dusch4593

Thanks, @Dusch4593. Is this intended?

mlondschien avatar Sep 18 '22 10:09 mlondschien

@mlondschien I'm not sure, really. I actually just tried this on a small repo and both examples I gave actually rendered correctly:

Screen Shot 2022-09-18 at 7 49 01 AM

But when I tried the same markdown in a thread comment (like you did initially in this issue), I got this:

Screen Shot 2022-09-18 at 7 50 06 AM

I'm starting to wonder if this issue is originating from MathJax since this is ultimately a rendering issue?

Dusch4593 avatar Sep 18 '22 11:09 Dusch4593