This plugin at the current iteration will only work on MacOS. That is because of the hardcoded use of Pinta and it's directory location. Every dependency used is available for Linux aswell, so I might make it useable for Linux if anyone wants it.
LatexImage is a Neovim plugin designed to streamline the process of including graphical content in LaTeX documents. It is particularly useful when taking notes that include graphs, diagrams, and other visual elements. The plugin automates the creation of blank PNG files, allows for easy editing in Pinta, and then inserts the necessary LaTeX \includegraphics
command directly into your Neovim buffer.
- Automatic PNG File Creation: Generates a blank white PNG file for your diagrams or graphs.
- Easy Editing in Pinta: Opens the created PNG file in Pinta for quick and hassle-free editing.
- Seamless LaTeX Integration: Inserts the LaTeX
\includegraphics
code snippet into your current Neovim buffer, referencing the edited image.
- Neovim: The plugin is developed for Neovim, an extensible Vim-based text editor.
- ImageMagick: Utilized for image handling and manipulation.
- Pinta: A simple painting and image editing program used for creating and editing the images.
- Lua: As the plugin is written in Lua, a Lua runtime environment is required.
- Install Dependencies:
- Ensure that Neovim, ImageMagick, and Pinta are installed on your system.
- Install LatexImage Plugin:
- You can install the plugin using your preferred Neovim package manager. For instance, using vim-plug:
Plug 'scarcy/lateximage.nvim'
- You can install the plugin using your preferred Neovim package manager. For instance, using vim-plug:
- Setup Plugin:
- Call the setup function in your Neovim configuration file to initialize the plugin with necessary options.
- Lazy.nvim ```lua {"scarcy/lateximage.nvim", opts = { dir = "path/to/image/directory/" }
- Call the setup function in your Neovim configuration file to initialize the plugin with necessary options.
- Create and Edit Image:
- Use the command
:LatexImage
to create a new image and open it in Pinta.
- Use the command
- Insert Image in LaTeX Document:
- The plugin automatically inserts the
\includegraphics
command at your current cursor position in Neovim.
- The plugin automatically inserts the