I want to use math text in Blender.

For example, I would like to have fractions (A/B) where the letter A is on top of letter B and the division line is horizontal. I also would like to move this fraction around by animations just as I can do it with any other object.

I found here that writing mathematical formulas using latex syntax should be no problem. But I dont really understand how to use it. If I simply write this in text mode, then it doesn't work:enter image description here

So how does it work?

  • 2
    $\begingroup$ The math tags that you link to are about adding formulas to the wiki pages - as part of the documentation. $\endgroup$ – sambler Jan 30 '17 at 17:13
  • 1
    $\begingroup$ A friend and I recently made a Blender add-on called latex2blender that enables users to write LaTeX in Blender. Here is the GitHub wiki page for the add-on: github.com/ghseeli/latex2blender/wiki $\endgroup$ – peterkj Jan 22 '20 at 0:19

Here is how I would do it

  1. Wrap your expression inside a LaTeX document

    \usepackage{lmodern} %or whatever you like 
    \usepackage{amsthm, amssymb, amsfonts} %Useful stuff
    $ <your expression> $
  2. Pipe that to pdflatex, or save it to expression.tex

  3. If you used a pipe:

    pdftocairo -svg texput.pdf expression.svg

    If you used a temporary file:

    pdftocairo -svg expression.pdf expression.svg
  4. Import expression.svg into blender

  5. Remove temporary files created by pdflatex.

This procedure can be converted into an addon. The dirty way of doing it is to modify the svg importer to run steps 1-3. The correct way is to use Python bidings for Poppler to load the pdf directly.

Test case:

\usepackage{lmodern} %or whatever you like 
\usepackage{amsthm, amssymb, amsfonts} %Useful stuff
$\displaystyle\mathcal{F}\left[f\right](\xi)=\int_{-\infty}^\infty   f(x)\exp(\mathrm{i\xi x})\,\mathrm{d}x$

Result (after some tweeks [curve to mesh, remesh, smooth]:



You can get math into blender following these steps

LibO Math

  • Export to pdf File > Export
  • Open the pdf with inkscape

  • Delete the outer border


  • Select the equation
  • Go to Document Properties CtrlShiftD or File > Document Properties and press Resize page to drawing or selection. (This step is optional, however it helps insert the equation at the center of the blender scene and sets the origin near the equation, but you can do all this later in blender)

Document Properties

  • Path > Object to Path

  • Save as .svg

  • Go to Blender and import the .svg.

Equations in blender!

In my case it works like that but I assume that there might be a need to ungroup before converting to paths. If you see that you get only lines but not digits and other text into blender, ungroup the equation CtrlU or CtrlShiftG or right click and then Ungroup or ungroup or Object > Ungroup (There are a lot ways to ungroup 😊 ) before converting to paths.


From what I can see, that link is not a guide to using Latex in Blender, it is a guide on how to write Latex in the Blender Wiki (the old manual). It is not saying that Latex can be written in Blender. The page you linked to is in the Meta category of the Blender Wiki, that is, support pages about the creation of the Blender Wiki itself.

As far as I know, it is not possible to write that type of mathematical syntax in Blender unless you want to write each letter/number/symbol as an individual text object and place them manually.

Another option may be to find a different program that does support Latex and export to a format that is compatible with Blender ie. SVG, but even then, it would not be editable within Blender itself.


Trying to do something similar, I found a path similar to but different from user877329's answer. There's also a link to some code that takes tex files and produces svgs.

You can create a tex file, convert it to a dvi file, and convert that to an svg, which blender can import via bpy.ops.import_curve.svg(). The result will be a collection of curve objects rather than text objects, so you'll have to do any text-related styling from the tex file itself, but if you're working with scripts, that might be easier anyway.

As a starting point for doing this in python, I used functions defined around line 300 of this github file (related to quite a nice math animation YT channel, incidentally). The functions themselves just pass commands to other utilities that do the actual work, but they show a process that could be used to get from tex to svg. tex_to_svg() is the core function, from which you can follow the flow to other functions as you make sense of things and adapt to your needs.

The needed utilities are pdfTex (for tex->dvi) and dvisvgm (for dvi->svg).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.