latex2blender is a Blender extension that enables the user to render LaTeX and import it into Blender as a mesh or Grease Pencil object. In particular, this allows the user to add nicely formatted mathematical text in Blender.
This extension works as a normal Blender extension, but it requires the following be installed on your computer.
latex-- The extension uses the local LaTeX installation to compile entered LaTeX code.dvisvgm-- The extension uses this tool to convert LaTeX outputted .dvi into an .svg file
-
If you do not already have LaTeX installed on your computer, please install it. Note, latex2blender calls the command-line utility dvisvgm, which comes bundled with most TeX distributions. If after following these installation steps, latex2blender is still not working, then it is probably because the TeX distribution you have installed does not come with dvisvgm (or dvisvgm is not located in the right folder).
-
Navigate to the latest release and download
latex2blender.zip -
Open Blender. Navigate to
Blender Preferences > Get Extensions. From the drop-down menu in the upper right, clickInstall from disk. Select downloadedlatex2blender.zipfile. The extension is now enabled in theAdd-onstab.
In the 3D Viewport with object mode selected, latex2blender appears as a panel in the sidebar. Type n to open the sidebar and select latex2blender to get started.
latex2blender gives the user the option to use a custom preamble for their LaTeX code in order to load extra packages or user defined LaTeX operators, commands, and macros. This, in combination with the presets functionality, provides the user with high degree of flexibility and reusability. If the user does not opt to use a custom preamble, their code will render using the default preamble. (Note, if using the default preamble, the user does not need to do anything with the default preamble tex file. The link is simply there for reference.)
This code is licensed under GPLv3 in order to be compatible with Blender's licensing.