Closed MatrixRanger98 closed 5 months ago
By the way, I want word count and formatted pastes for Markdown as well. But such features are provided by other extensions already (though I think supporting them here is a cleaner solution). The live snippet is a unique feature that I haven't seen anywhere else and I like it very much.
Most math-related live snippets only works in latex, and due to difficulties in parsing them, they are even not supported in $$
. Supporting them in markdown would be fairly difficult.
If someone can come up with a solution (PR welcomed!) that can parse and handle inline math formulas like $$
, then I think it would be reasonable to support live snippets in markdown.
Yes. But supporting those non-math-related ones is already good enough for daily use. For now I am using a workaround by modifying the local source codes in LaTeX Utilities to let it regard Markdown as LaTeX. But I need to redo the trick after each update. It would be great just to have the option of activating the extension in Markdown. To be honest, most math-related ones are not that useful. My use case is mainly replacing ^{}
and _{}
by some two-key trigger. This speeds up math writing immensely.
Can you try open a blank .tex
file in your markdown project then see if live snippets work in markdown?
No. It doesn't work. If you look at the source code of Latex utilities, even when it is activated, the live snippets only react when the document is LaTeX. There is a judgment step in the code.
Yes, this line
I don't think adding markdown to
activationEvents
is a good idea because it will make everyone that writes markdown loads a slow extension.
Do you think that, add a command that does nothing but loading the extension, and allow setting language ids for live snippets a good approach?
Yeah that is good approach. I would appreciate it if the change can be made.
I too would love this!
Just wondering if this could be implemented soon. Thanks! It would help save a lot of time.
I'll see if I can squeeze some time this weekend
I'll try to publish it tomorrow....
@MatrixRanger98 This should be fixed now.
Feature Request
Is your feature request related to a problem? Please describe.
I would like to write TeX math in Markdown/RMarkdown/Quarto files as well and the live snippet is really a great feature. It saves so much time. I wonder if we could activate this extension for Markdown/RMarkdown/Quarto as well.
Describe the solution you'd like
Then add a setting that could disable the extension for Markdown/RMarkdown/Quarto.