# Trouble with complex fractions and parentheses [duplicate]

I'm having trouble finding a way to express this fraction with the amsmath package.

The result I'm getting isn't quite nice. Are there alternative ways to write this fraction?

 \documentclass[10pt,norsk, fleqn]{extarticle}
\usepackage{amsmath}

\begin{document}

$\displaystyle\frac{a}{\displaystyle\frac{b}{\displaystyle\frac{c}{\displaystyle\frac{d}{e}}}}\to\left(\displaystyle\frac{\left(\displaystyle\frac{\left(\displaystyle\frac{\left(\displaystyle\frac{a}{b}\right)}{c}\right)}{d}\right)}{e}\right)$

\end{document}

• Why not inline: (((a/b)/c)/d)/e? Nov 16, 2018 at 15:40
• @Sigur I usually do this. But I would like the expanded "big" version at the beginning of the paragraph. Nov 16, 2018 at 15:42
• Possible dublicate tex.stackexchange.com/questions/131385/… Nov 16, 2018 at 15:53

Both solutions are horrible, but I don't think you can get any better.

\documentclass{article}
\usepackage{amsmath}
\usepackage{array,delarray}

\newcommand{\pfrac}[2]{\begin{array}({@{}>{\displaystyle}c@{}})\frac{#1}{#2}\end{array}}

\newcommand{\leftparen}[1]{%
\raisebox{-\height}{$\left(\vcenter{\hbox{\vphantom{$#1$}}}\right.\kern-\nulldelimiterspace$}%
}
\newcommand{\rightparen}[1]{%
\raisebox{-\height}{$\left.\kern-\nulldelimiterspace\vcenter{\hbox{\vphantom{$#1$}}}\right)$}%
}
\newcommand{\bigfrac}[1]{\raisebox{-\height}{$#1$}}

\begin{document}

$\pfrac{\pfrac{\pfrac{\pfrac{a}{b}}{c}}{d}}{e}$

$\leftparen{\dfrac{\dfrac{\dfrac{\dfrac{a}{b}}{c}}{d}}{e}} \leftparen{\dfrac{\dfrac{\dfrac{a}{b}}{c}}{d}} \leftparen{\dfrac{\dfrac{a}{b}}{c}} \leftparen{\dfrac{a}{b}} \bigfrac{\dfrac{\dfrac{\dfrac{\dfrac{a}{b}}{c}}{d}}{e}} \rightparen{\dfrac{a}{b}} \rightparen{\dfrac{\dfrac{a}{b}}{c}} \rightparen{\dfrac{\dfrac{\dfrac{a}{b}}{c}}{d}} \rightparen{\dfrac{\dfrac{\dfrac{\dfrac{a}{b}}{c}}{d}}{e}}$

\end{document}


• The second one looks like a wireless sign emanating from the tower... :) Nov 16, 2018 at 16:35
• @Sigur Your comment is beautiful. I am not a person who often makes many compliments but the answers of egreg are wonderful. Nov 16, 2018 at 16:56
• @Sebastiano, I agree. So wonderful that leads me to see beyond the math... lol Nov 16, 2018 at 17:20