Trouble with complex fractions and parentheses [duplicate]

This question already has an answer here:

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[a4paper, margin=1.2cm,includeheadfoot]{geometry}
\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}


marked as duplicate by Marijn, Phelype Oleinik, TeXnician, Stefan Pinnow, siracusaNov 16 '18 at 23:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

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... :) – Sigur Nov 16 '18 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. – Sebastiano Nov 16 '18 at 16:56
• @Sebastiano, I agree. So wonderful that leads me to see beyond the math... lol – Sigur Nov 16 '18 at 17:20