Comments (16)
Thanks for the detailed explanation.
To be honest, I have absolutely no experience with Latex. Any assistance on this topic is appreciated.
Is Latex in org only available between /begin{something}
/end{something}
or also outside of it?
Image preview is possible via https://pypi.org/project/ueberzug/ (only on X11), but I'm not even sure how would it be done.
For the publishing, I plan to support all publishing by using the emacs orgmode tools. I know https://github.com/jceb/vim-orgmode supports it so I assume it's possible.
From what I see, fastest thing that could be done is to allow "tex" highlight as part of org. Publishing will come later, and i'm not sure about the previews.
from orgmode.
Any assistance on this topic is appreciated.
Sure, let me know if you need anything else. I have minimal experience making lua plugins but I can try my best.
Is Latex in org only available between /begin{something} /end{something} or also outside of it?
According to the org wiki, latex fragments are identified as any of the following
- Anything encased within
\begin
and\end
- Anything within the LaTeX math delimiters (this is either
$text$
(no whitespaces allowed),$$ text $$
,\( text \)
, or\[ text \]
(a more detailed explanation can be found here: https://orgmode.org/manual/LaTeX-fragments.html#LaTeX-fragments)
Image preview is possible via https://pypi.org/project/ueberzug/ (only on X11), but I'm not even sure how would it be done.
Looks good! I think the only possible way is to create a floating window, start a terminal, and use ueberzug
to display the image. I use this method to display images for my startup dashboard. The only issue is that you would have to keep the preview aligned with scrolling text, and regenerate the preview multiple times (causing lag and performance drops)
For the publishing, I plan to support all publishing by using the emacs orgmode tools. I know https://github.com/jceb/vim-orgmode supports it so I assume it's possible.
I believe the code we need is Here. Its in python so we would need to translate that to lua, but the logic looks quite simple.
from orgmode.
I think, for now, I could add latex highlighting for those fragments (via syntax region), and have publishing be done separately for everything.
For the image preview, do you know if there's a way to generate the image with emacs?
from orgmode.
You can use org-latex-preview
to generate a preview of the latex equation under the cursor. I'm not sure once you generate a preview, how to extract it.
from orgmode.
@shaunsingh I added some basic highlighting options. It's disabled by default. Check here https://github.com/kristijanhusak/orgmode.nvim/blob/master/DOCS.md#org_highlight_latex_and_related.
Let me know how it works for you.
from orgmode.
Seems like it isn't working on my end. I tried both the "native" and "entities" options.
This is my config with packer:
use {
'kristijanhusak/orgmode.nvim',
ft = {'org'},
config = function()
require("orgmode").setup(
{
org_highlight_latex_and_related = 'entities'
}
)
end
}
from orgmode.
Please pull latest master and give it another try.
If it doesn't work, please try without packer's lazy loading.
from orgmode.
I added exporting. See https://github.com/kristijanhusak/orgmode.nvim/blob/master/DOCS.md#org_export.
from orgmode.
Please pull latest master and give it another try.
Thanks, works well now.
I added exporting.
Works as expected. Would you consider also adding pandoc
as an export option? Might be useful for those who don't have emacs installed but would like to export to pdf.
from orgmode.
Yeah, why not. I'll probably group exports to allow more options, and also expose a setting for custom exports.
from orgmode.
I added pandoc exports for several file types (html, tex, pdf). Also, I added an option to add custom exports. See https://github.com/kristijanhusak/orgmode.nvim/blob/master/DOCS.md#org_custom_exports . Let me know how it works.
Regarding the preview, I'm not sure if I'll be adding it. It seems very complicated, especially since Neovim can't show images inline.
I didn't try, but you could maybe use this solution via lsp, and here's the preview.
from orgmode.
Is it possible by any chance to use treesitter for the latex highlighting? The treesitter colors are a little easier to read:
(treesitter on the right)
from orgmode.
I don't think it's possible to inject treesitter for some syntax. Once we have treesitter support in the whole org, we should be able to do this easily.
from orgmode.
@shaunsingh did you had a chance to test features added through this issue? Can this be closed if everything is working as expected?
from orgmode.
Everything works great! The only thing I couldn't get working was the preview with lsp, since the built-in markdown renderer in my gui didn't seem to support mathjax, but that isn't something you can solve
You can close the issue
from orgmode.
Awesome, thanks for the feedback and for testing it.
from orgmode.
Related Issues (20)
- How to change highlighting of folded lines? HOT 6
- Refiling ignores preamble export options HOT 2
- Give an option to change keybinding in calendar popup HOT 4
- Support for org-shiftmetaleft, org-outdent-item and org-shiftmetaright, org-indent-item HOT 5
- Cannot follow an in-file link to a headline with colon in title HOT 1
- (Re-)load agenda file(s)
- org-next-visible-heading goes to invisible headings HOT 4
- org_meta_return doesnt jump below heading content
- Hide tags from headings HOT 1
- Blocks text objects
- Ability to overwrite desc in mappings in settings HOT 2
- Better autocomplete for org-insert-link HOT 2
- Changing existing priority breaks with more than three priorities
- failing unit test HOT 4
- Lag of 0.5-1 sec in large org files HOT 13
- Long Tables fail HOT 2
- ctrl-a/ctrl-x do not reliably modify dates HOT 3
- Hyperlinks format doesn't work HOT 1
- `org_return` passes non-string to `nvim_feedkeys()` HOT 5
- Add 'upstream' luarocks version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orgmode.