How exactly can one achieve French Style Long Division?

French Style Long Division

Is line drawing/table/array formatting my only way here? I'm really new into TeX/LaTeX trying to find my way around it for elementary math, but some things leave me puzzled.

I found out there's a package called polynom to use polynomial division, but which only achieves American style long division. An array solution got closer, and xlop solution was the closest, yet issue with xlop is that you can't use subtitutional/polynomial values like AB/C (or so it seems?). MathML seems to achieve all these elementary math stuff except, well, MathML isn't as much supported yet. So until then, maybe TeX is not my solution at all, even, if so, what would I use?


Trying to define my own command in arrays I've come as close as this, though since I don't know how positioning works yet in arrays:

    \begin{array}{l| l}
    #1 & #2 \\
    #3 & #4 \\
    #5 & \\




enter image description here


you have to use Xlop package (http://ctan.mines-albi.fr/macros/generic/xlop/doc/xlop-doc-fr.pdf)





enter image description here

  • Xlop doesn't print the decimal separator according to french rule, for instance it prints 16.5 instead of 16,5. How to fix that?
    – pzorba75
    May 20 '18 at 2:57
  • 1
    Call with the option decimalsepsymbol={,} see above the solution
    – rpapa
    May 20 '18 at 6:37
  • Trying to achieve showing polynomials and/or placeholder letters as well. May 20 '18 at 23:18

You can probably use TikZ, to create your own division like this:



\matrix (a) [matrix of math nodes, column sep=0pt]
A     & X     & Y   & Z   &  & E \\
       & B     &      &   &  &  \\
       &        & C   &      &   &    \\
       &        &      &  D  &   &   \\
       &       &       &      &    & U  \\
\draw (a-1-6.north west) |- (a-1-6.south east);
\draw (a-1-6.south west) |- (a-5-6.south west);


It will require a bit of tuning to adapt it to your specific example.

enter image description here

Hope that helps.


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.