vscode-reveal icon indicating copy to clipboard operation
vscode-reveal copied to clipboard

backtick ` to escape Latex not working

Open rleyvasal opened this issue 2 years ago • 2 comments

The use of backtick to escape Latex code is not working in markdown

Code to replicate

-   enclosed in `$ $`  such as  `$\sigma$` get $\sigma$

Current output

output latex

Expected output

expected latex

rleyvasal avatar May 12 '22 17:05 rleyvasal

Not sure how to fix this 🤨. Latex is parsing after all even escape is not working.

evilz avatar May 18 '22 07:05 evilz

My guess is that the problem lies in how Math uses backtick to render formulas. The $ can be escaped with <span>$</span> shown in following code. Although it is its a lot of typing if trying to show how latex is used with examples - hopefully there is an easier way to do it .

This works for inline code

<span>$</span>\sigma<span>$</span>

Or \backlash and \text as below

$`$\backslash \text{sigma}$`$

This also works, but not inline

```  
$\sigma$   
```

Modifying Latex above to make it inline, it does not work

``` $\sigma$ ```

rleyvasal avatar May 25 '22 23:05 rleyvasal