Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subscript by {} make a mess if one formula has multiple subscripts and latex {} pairs #22

Open
HowcanoeWang opened this issue Jun 5, 2020 · 4 comments

Comments

@HowcanoeWang
Copy link

image

As in the previous image shows, here is the code for test:

This works:    
text text text $$\mathbf{x}_0, \mathbf{x}_1 = A \mathbf{x}_0, \mathbf{x}_2 = A \mathbf{x}_1$$,  text text -> $$x_1$$ <- text

However if want $$x_{1+k}$$ in previous sentenses which has two inline forumlar:     

text text text $$\mathbf{x}_0, \mathbf{x}_1 = A \mathbf{x}_0, \mathbf{x}_2 = A \mathbf{x}_1$$,  text text -> $$x_{1+k}$$ <- text

Seems don't work
@HowcanoeWang
Copy link
Author

image

And also some interesting bugs, use `A_{B}` to replace `A_B` one by one:

original:

$$\mathbf{x}_0, \mathbf{x}_1 = A \mathbf{x}_0, \mathbf{x}_2 = A \mathbf{x}_1$$

replace 1 works

$$\mathbf{x}_{0}, \mathbf{x}_1 = A \mathbf{x}_0, \mathbf{x}_2 = A \mathbf{x}_1$$ 

replace 2 doesn't work

$$\mathbf{x}_{0}, \mathbf{x}_{1} = A \mathbf{x}_0, \mathbf{x}_2 = A \mathbf{x}_2$$ 

@HowcanoeWang HowcanoeWang changed the title subscript by {} make a mess if one sentence has two inline formula subscript by {} make a mess if one formula has multiple subscripts and latex {} pairs Jun 5, 2020
@obedm503 obedm503 added the bug label Jun 5, 2020
@obedm503
Copy link
Owner

obedm503 commented Jun 6, 2020

This is very similar to #21. By the time the extension gets to process the html, showdown has already converted underscores to italics. Perhaps the long term solution is to handle conversion before showdown does anything. I'll have a go at it in a different branch.

@obedm503
Copy link
Owner

obedm503 commented Jun 6, 2020

Begun conversion at feat-convert-to-lang. Help is welcome.

@VincentTam
Copy link

thanks for new feature :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants