Closed glyh closed 1 month ago
I don't know if it's related to #1438, it seems not?
I don't know if it's related to #1438, it seems not?
it's not. that PR is to fix a single issue. You're asking for a bunch of new features it seems like
Source is hidden when the formula is rendered
This already works. and is the default, you probably don't have conceallevel set properly.
Have the formula using corresponding colors, if it's inside some text then the formula should be rendered using text's color. If it's inside a title, it should be rendered with a title's color.
Well then I guess you expect the math to always be blue? That's how math displays when it's in headers, or bolded, or anything really. I also think this would be an additional performance hit for no real gain.
The around text is aligned so that there's not a lot of space between the formula and the adjacent text.
wdym? text is concealed so there is no additional space between the image and the adjacent text. This might be a misunderstanding related to the conceallevel issue at the top of this list.
The rendered Latex takes care of line breaks. When the formula is rendered in 2 lines the issue is resolved automagically like in markdown.
This is a lot harder than you think it is. It would be really hacky in the current implementation, let alone the upcoming one which will support typst.
for a single line of latex, if it exceeded the right end of the editor it should be rendered in the next line.
Near impossible with the current implementation due to how much work image.nvim is doing for us.
For now it seems that for latex formula to render correctly, all forward slashes should be double quoted. Is there a point for that or is that a bug?
not a bug, \
is the escape char in the norg file format. So typing \$
will produce a $
in norg. (This is easy to see when you have the concealer turned on btw). So \\
is needed to produce a \
. I recommend using this syntax: $| \frac{1}{2} |$
where everything between the |
is verbatim.
typst support is around the corner
Thanks, I initially disabled conceal level config as it messes up my other files that uses foldmarkers, I'll try to see if I can fix it.
Also I guess I'll split this into separte feature requests for what makes sense.
Thanks, I initially disabled conceal level config as it messes up my other files that uses foldmarkers, I'll try to see if I can fix it.
you can set it just for norg files with a filetype plugin.
:h ftplugin
tldr: create a file in your config at: nvim/ftplugin/norg.lua
and add this to it (along with anything else you might want to set for norg files only):
vim.opt_local.conceallevel = 2
@glyh to make sure you see that
Yeah I saw it, thank you!
Prerequisites
Neovim Version
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713773202 Run "nvim -V1 -v" for more info
Neorg setup
Actual behavior
Expected behavior
Source is hidden when the formula is rendered
Have the formula using corresponding colors, if it's inside some text then the formula should be rendered using text's color. If it's inside a title, it should be rendered with a title's color.
The around text is aligned so that there's not a lot of space between the formula and the adjacent text.
The rendered Latex takes care of line breaks. When the formula is rendered in 2 lines the issue is resolved automagically like in markdown.
for a single line of latex, if it exceeded the right end of the editor it should be rendered in the next line.
For now it seems that for latex formula to render correctly, all forward slashes should be double quoted. Is there a point for that or is that a bug?
Steps to reproduce
Follow the cookbook with latex support.
Potentially conflicting plugins
image.nvim?
Other information
None.
Help
Yes, but I don't know how to start. I would need guidance (check question below)
Implementation help
No response