Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am looking for long division symbol for inline use. For US style there are several choices.

For displayed long division, French style, there is xlop package.

I am looking for the inline version, French style, which, for $x \div y$, would look something like an $x\ L y$ with $y$ inside $L$.

share|improve this question
1  
Almost the opposite of How to Produce a Half-Box Symbol? –  Werner Dec 14 '13 at 18:31

2 Answers 2

up vote 6 down vote accepted

I'd use an array without intercolumn space:

\documentclass{article}

\newcommand{\frenchdiv}[2]{%
  #1\:\begin{array}[t]{@{\vline}l@{}}\,#2\,\\\hline\end{array}%
}

\begin{document}
$\frenchdiv{84}{7}=12$
\end{document}

enter image description here

share|improve this answer
    
What is \vline? Is it similar to |? From your code I understand it is being used as a column separator, right? –  azetina Dec 14 '13 at 19:15
    
@azetina Using \vline avoids undesirable spaces. –  egreg Dec 14 '13 at 20:17

Just for fun. Of course the link @Werner gave you is a good start. Notice that what I did was just to play around with someone else's code. See MWE below:

enter image description here

\documentclass{article}

\newcommand\frenchdiv[2]{%
$\strut#1$\kern.25em\smash{\raise-.35ex\hbox{\rule{0.4pt}{2ex}}}$\mkern-0.72mu
        \underline{\,#2}$}

\begin{document}

\frenchdiv{56}{3678}\quad\frenchdiv{3}{37678}

\end{document}

Taking now the following code an playing around with the node anchors, we have the following MWE:

\documentclass{article}
\usepackage{tikz}

\newcommand\nfrenchdiv[2]{#1\,%
  \tikz[baseline=(n.base)]{\node(n)[inner sep=1pt]{$#2$};
    \draw[line cap=round](n.north west)--(n.south west)--(n.south east);
  }
}

\begin{document}

$\nfrenchdiv{56}{3678}$

\end{document}

Note that this command may not be robust. So, wait for other possible responses and choose the best that suites your needs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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