I sometimes attempt to use $\mathcal{MathJax}$ to write string-literals wrapped in quotes.
I expected the rendered result to look like this:
Instead the result was this:
For example, we might have the following markdown for a stack exchange posting:
Let $A$ be the set $\{ ``\mathtt{CAT}", ``\mathtt{CONCAT}", ``\mathtt{CONCATENATE}" \}$
The problem is that...
Stack Exchange uses back-ticks to render text in a
mono-spaced
teletype
font
$\mathcal{MathJax}$ and $\LaTeX$ use exactly two consecutive back-ticks to render a left-double quote
“
. ASCII straight double quotation marks are always treated as right-quotation mark.
There are various solutions.
I was hoping that the order of precedence would be:
- Triple back-tick
- Dollar signs for $\mathcal{MathJax}$
Another alternative is that a double back-tick with nothing in-between the ticks is treated as a special token by the tokenizer, parser, or compiler for stack exchange mark-up language.
Double back-tick with nothing in-between the two ticks could be rendered as the Unicode character left-double quote “
. People usually write somthing in-between back-ticks, such as:
`hello world`
If there are backticks with nothing in-between it could be rendered as a double left quote
``