I want to create a polynomial division in LatexIt, but am having all sorts of trouble. I have read the polynom documentation and looked at several examples. The examples all use polynom, but all seem to have unique preambles, making it hard to see what's necessary and what's not.

I've currently got the following preamble additions:


and as the main equation:


but am subjected to a litany of error messages on the \polylongdiv{} line.

I use LaTeXit quite a lot, including adding additional packages when needed. Somehow this is eluding me.

  • Welcome to TeX.se. Without seeing the (first) error reported it's hard to tell. Also, before trying things with LaTeXit, (which kind of hides the preamble from you) can you test with a small document using e.g. TeXShop or TeXWorks (both included with MacTeX). That might make it easier to sort out what the problem is and then you can adjust the LaTeXit preamble accordingly.
    – Alan Munn
    Jun 4, 2022 at 18:54
  • 1
    polynom is the only package you should need. There might be some conflict with other package or with the order of packages.
    – FHZ
    Jun 4, 2022 at 18:59
  • 1
    The \polylongdiv command needs to be in display math mode. Syooroubnd the command with \[ and \]. Jun 4, 2022 at 19:08
  • 1
    @HerbSchulz The polynom macros can be used inside or outside math mode. But in the context of using them with LaTeXit, you cannot put them in LaTeXit's "Display" or "Inline" mode, they must be in Text mode. This is different from when you use them in a regular document.
    – Alan Munn
    Jun 6, 2022 at 0:44

1 Answer 1


The polynom commands are supposed to work in both text mode and math mode in regular documents. But for reasons I don't understand, when you use them with LaTeXit, you need to select Text rather than the three math modes (Align, Display, Inline) otherwise you will get a Missing $ inserted error.

All of the examples here: How to draw polynom division? compile with a minimal preamble using LaTeXit in Text mode.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .