You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are no other images in the document the equations are shown correctly:
However, if there are other images, it seems that the location of the equations does not take
into account the displacement that the images will generate:
Expected behavior
Equations should be positioned in the same line that their source.
Steps to reproduce
Open a file with a content similar to this (you can use any image):
* Test
first equation: $\min_\theta \mathbb{E} -\log p_\theta(x)$
.image ./isomorphism.png
some extra text
second equation: $\min_\theta \mathbb{E} -\log p_\theta(x)$
Potentially conflicting plugins
No response
Other information
No response
Help
None
Implementation help
No response
The text was updated successfully, but these errors were encountered:
jonboh
added
the
bug
Issues related to bugs. Please attach a severity, a priority and category with this label.
label
Mar 26, 2024
The difference is with_virtual_padding vs not. With it, image.nvim controls and updates the position of the image, without it, we have to do it manually, and the code to do that isn't the most robust, it doesn't account for virtual lines above it for example. Which is what causes this issue.
I kinda want to implement this in image.nvim rather than here, so that other people can use this (it will also be easier to just reuse code).
Prerequisites
Neovim Version
NVIM v0.10.0-dev-00e71d3 Build type: Release LuaJIT 2.1.1693350652 Run "nvim -V1 -v" for more info
Neorg setup
I use
nixvim
to configure my neovim, you could run my flake directly to reproduce my editor and test the bug if you are familiar withnix
: https://github.com/jonboh/nixvim/tree/21c034b3dacac692848265092f27cae986a24367Actual behavior
If there are no other images in the document the equations are shown correctly:
![image](https://private-user-images.githubusercontent.com/31407988/316919328-ceaf8218-dffd-4ffe-a26b-2a102792c3a2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg0MjUzMzEsIm5iZiI6MTcxODQyNTAzMSwicGF0aCI6Ii8zMTQwNzk4OC8zMTY5MTkzMjgtY2VhZjgyMTgtZGZmZC00ZmZlLWEyNmItMmExMDI3OTJjM2EyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE1VDA0MTcxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA0ZTU5MGZmNDRjODQyNTI3NjUzMmZiMWVkOTFjYzgxOTQ2ZTlmYjE0YzUyYTE1MTY1NzJmYTkxNmY0NTI1YzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.JjH3-BVHuVcjvmvF_NJ5bPExuBSAOiqbZSH144DroAE)
However, if there are other images, it seems that the location of the equations does not take
![image](https://private-user-images.githubusercontent.com/31407988/316920713-81008604-b3ff-4f77-ad5b-a74765f99d0f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg0MjUzMzEsIm5iZiI6MTcxODQyNTAzMSwicGF0aCI6Ii8zMTQwNzk4OC8zMTY5MjA3MTMtODEwMDg2MDQtYjNmZi00Zjc3LWFkNWItYTc0NzY1Zjk5ZDBmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE1VDA0MTcxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdiMjMzNTBkZWQxYzgwNWQ0N2EyZDU5ZmEyYmJiOTI0YmIwMjE5MTJhMGVhZTBmZmIxYmY4YjE0YzllYjkzNzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.A__fYk0Dc76pwBfqiLTAgc-9zqHOAfjGnu8j057ucjc)
into account the displacement that the images will generate:
Expected behavior
Equations should be positioned in the same line that their source.
Steps to reproduce
Open a file with a content similar to this (you can use any image):
Potentially conflicting plugins
No response
Other information
No response
Help
None
Implementation help
No response
The text was updated successfully, but these errors were encountered: