Backticks adjacent to math mode doesn't work
Hi guys. The following codes renders as expected:
However, if you remove the white spaces, then there is trouble.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
hello
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
hello
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
hello
FWIW, I think you can do what you want to do by using triple backtick "math" blocks and no dollar signs within the math block:
r`_`s`_`n`_`t.dat
which was:
```math
r_s_n_t.dat
Also new bug:
```text
<code>```math
r`_`s`_`n`_`t.dat
```</code>
Apparently causes another display issue. But hopefully this gives you something to work with @darkmx
Er, well, I'm not sure what you were going for exactly, maybe you were going for:
r_s n_t.dat
But either way, the "```math" block has helped me get around the wonky $-math formatting.
I was aiming for this
That is, no spaces around the backticked elements.
r\_s\_n\_t.dat
```math
r\_s\_n\_t.dat
```
This doesn't work though:
$r\_s\_n\_t.dat$
Backticked elements are rendered with an special color in my markdown viewer, that's why I wanted to use _ and so on.
OK I think the problem is that _ in MathJax means "subscript". So r_s becomes $r_s$. You can't have a double subscript, that's why if you write r_s_n it gets mad at you. You can escape the subscripts using a double-backslash, like this: r\\_s\\_n which shows up as $r\_s\_n$. (NOTE: In a "```math" block, you only need to use a single backslash to escape.)
I think that'll fix it for you!
Why is this so complicated? Because "`" in MathJax was the original delimiter for mathematics. In Markdown, its was already used for "code". So they (GitHub) switched to dollar sign, like TeX. Your original example is like the parser's worst nightmare: you have backticks and dollar signs peppered all over that statement and no escapes so it's just like "code", "no math", "wait code", and it ends up thinking you're trying to do the double subscript operator, which it doesn't allow.