I'm having trouble using \polynom for variables with negative exponents.

When I run

\polylongdiv[style=A]{1+2z^{-2}+z^{-4}}{z^{-1} - z^{-3}} 

I get something not at all correct.

Is there a more manual way input the answer and the subtracted variables?

  • Welcome to TeX.SE!!
    – manooooh
    Feb 15, 2019 at 5:45
  • 4
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Feb 15, 2019 at 5:56
  • Could you not put w=z^{-1} and rewrite? Feb 15, 2019 at 7:45

1 Answer 1


The polynum package uses internal macros to decide how to perform the long division, and I'm not aware of any high level options to change its behaviour. But of course you can do the long division manually using an array. \cline is useful to draw horizontal lines spanning only part of the array.

The simplest set-up would have you using just two, left-justified columns, the first being empty apart from in the second row for the divisor. Here is example code to get you started:

    \def\arraystretch{1.6} % Stetch the arrary, increasing row separation (looks nicer)
    \begin{array}{ll} % Two left justified colums
    &1+2z^{-2}+1z^{-4}  \\  \cline{2-2} % hoizontal line spanning second column only
    \left.z^{-1} - z^{-3}\right)\, & \\


To achieve a better output, you may want to add additional columns (for example, see this related answer).

You must log in to answer this question.

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