cinny icon indicating copy to clipboard operation
cinny copied to clipboard

Do not treat everything between two $ as TeX math

Open kfiven opened this issue 3 years ago • 4 comments

Typing $1 instead of $2 should not be treated as TeX math

The opening $ must have a non-space character immediately to its right, while the closing $ must have a non-space character immediately to its left, and must not be followed immediately by a digit. Thus, $20,000 and $30,000 won’t parse as math.

kfiven avatar Aug 02 '22 15:08 kfiven

Wouldn't these rules block something like $1 + 1$ as well?

ginnyTheCat avatar Aug 05 '22 15:08 ginnyTheCat

The rule is for the cases where we should parse input as TeX.

kfiven avatar Aug 05 '22 15:08 kfiven

so as per the rule $1 + 1$ will be a valid TeX.

kfiven avatar Aug 05 '22 15:08 kfiven

Ah sorry, I misread that the opening one is not allow to be followed by a digit instead of the closing one.

ginnyTheCat avatar Aug 05 '22 15:08 ginnyTheCat