Tx · LaTeX & TikZ

How to Typeset the French-Style Long-Division Symbol in LaTeX

Published By the 9to5Science editorial team

At a glance

  1. 1. Load wasysym

    Add the wasysym package to your document preamble.

  2. 2. Use the command

    Write \longdiv in math mode where you want the long-division symbol.

  3. 3. Check the layout

    Compile and confirm the symbol’s orientation and spacing in your chosen font.

To insert a French-style long-division symbol in LaTeX, use \longdiv from the wasysym package. Put the command in math mode, just as you would for a relation or other mathematical symbol.

Minimal example

The following complete example compiles with standard LaTeX installations that include wasysym:

\documentclass{article}
\usepackage{wasysym}

\begin{document}
The long-division notation is $17\longdiv 3$.
\end{document}

The package line makes the command available; the expression $17\longdiv 3$ places the symbol between the two numbers. The example inserts a symbol inline with the sentence. You can also use it in a displayed equation:

\[
17\longdiv 3
\]

What the command does—and does not do

\longdiv supplies the long-division glyph. It does not automatically arrange a divisor, dividend, quotient, and remainder as a complete written calculation. If you need the full layout, use a package or a table-based construction intended for long division; a single inline symbol is not enough to produce that structure.

The phrase “French style” can refer to the way a complete division is laid out, and conventions for that layout vary. If you mean the bracket-like long-division mark itself, \longdiv is the direct choice. If you instead mean a particular arrangement of the numbers around that mark, include the arrangement you want and typeset it separately.

Using the symbol in a longer expression

The command works wherever LaTeX is already in math mode. For example:

\documentclass{article}
\usepackage{wasysym}

\begin{document}
For this example, write $17\longdiv 3 = 5$ with remainder $2$.
\end{document}

This is only an example of placing the glyph in a sentence; it does not imply that LaTeX interprets the notation or checks the division. LaTeX typesets the characters and symbols you supply.

If you want to display just the symbol, use \longdiv inside math delimiters, such as $\longdiv$. For a more carefully controlled expression, you can add spacing or other symbols around it, but start with the plain command and adjust only if the result needs it.

Common mistakes

  • Leaving out the package: \longdiv is not a core LaTeX command. Add \usepackage{wasysym} before \begin{document}.
  • Using it in text mode: Put the command inside $...$, \(...\), or a displayed math environment. For example, use $17\longdiv 3$, not 17\longdiv 3 in ordinary text.
  • Expecting a complete calculation: The command produces a glyph, not a multi-line long-division setup with automatically aligned digits.
  • Confusing it with \div: The standard \div command produces the obelus, ÷. That is a division sign, not the long-division bracket.

If the command is undefined after adding the package, check that wasysym is installed in your TeX distribution and that the package line appears in the preamble. For a document that already loads many symbol packages, compile a minimal example first to identify any package interaction.

References

  1. The wasysym package documentation

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.