-
Notifications
You must be signed in to change notification settings - Fork 325
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
Refined math #452
Refined math #452
Conversation
Sure, we can override them, but only override them in math is difficult, I have no idea to tell vscode to do so. Also, we need to get the context of the current position, i.e. am I in a math block? |
Thanks for the efforts.
I am not very convinced whether anyone would ever want to do it. At least it is not a common operation. Personally, I would like it to stay with only
It seems we cannot dynamically interact with the language configuration ( Lines 316 to 335 in 28a2f5b
Probably we can have something like However, I prefer not to override the built-in language configuration only for the For the |
I agree with you, but one more thing, too many states (currently 4) may be inconvenient for users want to quickly create the last state. How about creating a reverse loop using
Thanks for pointing it out, I will look into it.
I have seen this repo becomes more and more popular these days (much more popular than the official one), it's really not easy for you to maintain this big project. Thanks for your great works. I will try to find something easier to fixed
You are right, I will open a PR there and add |
Sounds interesting. After thinking for a while, I suggest changing the order to 1243. What do you think of it? |
Let us clarify the states (to avoid misunderstanding): State 1: not in any others states
State 2: $|$
State 3: $$ | $$
State 4:
$$
|
$$ Sorry, I finally realized you have implemented the first three states in your extension. I thought there is no Your implementation is very good. And only go back to the state 1 when there is no tex content in
I personally use displayed math a lot, so I prefer to put the state 4 before state 3. But why do you suggest place it before 3, what is your consideration? Finally, I think let the user reorder them is a better idea. Another thing, what do you think about add |
It is simply I can go with 1243 😂. I don't think many people are using In this way, I assume you would be happy with "2 steps to get display math". If it is, we don't need |
@yzhang-gh Haha, I have implemented it, it is really interesting~ |
as expected |
#421
@yzhang-gh Thanks for the suggestions, let's discuss the detail here.
Exactly the
Ctrl+M
shortcut to quickly add a math block and move the cursor to the middle of the block.Your idea is very good, but I think the user may need the cancel out the previously created math block, i.e. there are two states
created
&canceled
, the user can switch between them. So I keep the function ofCtrl+M
for inline blocks only and add another shortcutCtrl+Shift+M
for displayed blocks.Ctrl+M
will create an inline math block and move the cursor to the middle, and the user may write some tex. If the user wants to delete the math block quickly, he just pressesCtrl+M
again. The same applies to theCtrl+Shift+M
for displayed math.Do you like this way? If you would prefer only the
Ctrl+M
shortcut, I think it's well, too.For KaTeX rendering, we are currently using
markdwon-it-katex
. For highlighting, what are we using now? I think we can learn from it and switch correctly between three states:We can loop between them, for example:
0->1->2->3->0->...