Fraction line with rounded corners

fractionsmath-moderules

I want to make the rounded corners of the fraction line. Is it possible ?
enter image description here

Update:

Or you can add rounded corners to all parts of TeX.

\documentclass{beamer}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{tikz}
%
\newcommand{\thickfrac}[2]{\genfrac{}{}{1.pt}{0}{#1}{#2}}
\newcommand\bigfrac[3][1.0pt]{%
{\thickfrac{\hspace{#1}#2\hspace{#1}}{\hspace{#1}#3\hspace{#1}}}}
\let\oldfrac\frac
\let\frac\bigfrac
%
\begin{document}
\begin{frame}
\[\frac{a+b+c}{a-b-c}\]
\end{frame}

\end{document}

Best Answer

If you use LuaTeX, you can do this by customizing the process_rule callback. When \mathrulesmode=1 is set, this affects all rules TeX generates in math modes and "user rules" (a special type of rule which does not occur in normal documents).

\documentclass{beamer}
\usepackage{amsmath}

\directlua{
  luatexbase.add_to_callback('process_rule', function(r, h, v)
  print(r, h, h)
    h, v = 100 * h / tex.sp'100bp', 100 * v / tex.sp'100bp'
    print(h, v)
    if h > 8 * v then
      pdf.print('direct', string.format('[] 0 d 1 J \csstring\%.5f w 0 \csstring\%.5f m \csstring\%.5f \csstring\%.5f l S', v, v/2, h, v/2))
    elseif v > 8 * h then
      pdf.print('direct', string.format('[] 0 d 1 J \csstring\%.5f w \csstring\%.5f 0 m \csstring\%.5f \csstring\%.5f l S', h, h/2, h/2, v))
      pdf.print('direct', string.format('[] 0 d 1 J \csstring\%.5f w 0 0 m 0 \csstring\%.5f l S', h, v))
    else
      pdf.print('direct', string.format('1 j \csstring\%.5f w 0 0 \csstring\%.5f \csstring\%.5f re f', math.max(h, v)/8, h, v))
    end
  end, 'rounded_rules')
}
\mathrulesmode=1

\begin{document}
\[\frac{\sqrt{a}+b+c}{a-b-c}\]
\end{document}

enter image description here