2

This question already has an answer here:

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

enter image description here

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

enter image description here

 \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, siracusa Nov 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.

5

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}

enter image description here

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

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