-
Notifications
You must be signed in to change notification settings - Fork 54
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
Feature Request : Latex Support #138
Comments
I have never used latex so I have no experience working with it, so I am probably not the person you are looking for. This would most likely have to be done via another cli tool(like the one But that introduces a whole new range of things to do. I will have to see if there's something that can be done. |
How does it look on your machine? |
Just wanted to through in nabla.nvim, which seems to provide a similar feature, with the only difference being that the result is rendered in a floating window instead of being rendered inline. Maybe some inspiration could be drawn from there. |
I honestly don't like using too many I would rather have something simple like this which doesn't get in the way. latex-cropped.mp4 |
I am coming from Obsidian, so I am used to the "live-rendering" of LaTeX there. For me personally it would be really nice if the latex could be rendered just like it does there. In the end it comes down to personal taste, but how are you then planning to render things like integrals/limes/matrices/... ? |
Hmm. That's an issue too. Guess I will have to see if a less destructive way to show them is possible. |
@kusnezoff-alexander I have looked into the code of that plugin and I can only say that the approach that plugin is not exactly fast(it's checking a line letter-by-letter). And I don't know about you but I would prefer not to do something like this as it can easily start making the entire redraw slower as it doesn't lavarge For stuff like integrals, I would use something like this. ↓ Upper limit
∫ 0 ∞
↑ Lower limit I would then use highlighting to make it more readable. Is it perfect? No, but then again, this is a simple markdown previewer so this should be a good enough sacrifice.
|
@OXY2DEV Ah oke, I thought it was leveraging Regarding your approach, I would say that it could be difficult if not impossible to manually render all of what LaTeX has to offer. Another idea would be to use an existing renderer ( Honestly I don't understand your quote in this context, since a GUI is "is a form of user interface that allows users to interact with electronic devices through graphical icons and visual indicators such as secondary notation." (Wikpedia). This feature restricts itself to visualization and doesn't include direct user interaction, or am I wrong? |
It only uses Tree-sitter to get the text from the buffer(otherwise it would have to manually check everything line by line).
Just like So, the goal is to provide a good enough preview, instead of trying to support everything(which isn't possible, at least inside a terminal).
Wouldn't it be simpler to create a keybind that gets the text under the cursor(you can use tree-sitter too, if you want)? Then just send it to the terminal to run No idea how
I meant that unlike a GUI which has 100,000s of pixels to draw on the terminal only has a limited number of cells to draw on. So something like 222 can easily mess the rendering. Same goes for anything beyond And aligning text is kind of a pain. There's too many |
@Divyanshg01 basically your So, it looks through a bunch of fallback colors and one of them has a black background. This color is then mixed with other colors resulting in what you are seeing. |
So is there a way to fix it without setting a opaque background of terminal ?? |
You can just link the plugin's highlight groups(see the bottom of the README) to the ones provided by your colorscheme.
The plugin doesn't render anything if you just use [!Tip]. That's due to Tree-sitter thinking that this is a link. Not much I can do(at least without breaking other stuffs). |
Supports simple symbols & some functions. Ref: #138
Since I didn't mention why this issue was closed let me say it here.
|
Supports simple symbols & some functions. Ref: OXY2DEV#138
Loving this plugin guys but It would be even cooler if it can support latex
Any plans or potential work arounds to have latex with this plugin?
The text was updated successfully, but these errors were encountered: