To create a continued fraction that truly symbolizes the endless, ever-ongoing nature of an infinite continued fraction, I have taken up this following "notation," where the font size shrinks with every step of the fraction:
I generated it with the following code, compiled with amsmath
and graphicx
:
$1+\dfrac{1}{2+
\dfrac{1}{\scalebox{.9}{2+{}}
\dfrac{\hfill\scalebox{.9}{1}\hfill}{\scalebox{.8}{2+{}}
\dfrac{\hfill\scalebox{.8}{1}\hfill}{\scalebox{.7}{2+{}}
\dfrac{\hfill\scalebox{.7}{1}\hfill}{\scalebox{.6}{2+{}}
\dfrac{\hfill\scalebox{.6}{1}\hfill}{\scalebox{.5}{2+{}}
\dfrac{\hfill\scalebox{.5}{1}\hfill}{\scalebox{.4}{2+{}}
\dfrac{\hfill\scalebox{.4}{1}\hfill}{\scalebox{.3}{2+{}}
\dfrac{\hfill\scalebox{.3}{1}\hfill}{\scalebox{.2}{2+{}}
}}}}}}}}}$
While I think that the design is decent for now, I would like to know how to fix a few problems in the appearance of the continued fraction, and why these problems arise:
- The spacing of the plus operators get further and further distant from the fraction bar as the descent continues. How can I change my code to make the plus operators look more natural?
- The numerators seem to be drifting away from the fraction bars. How can I refine the spacing between fractions? I suspect this has something to do with
\scalebox
not changing the size of the box of the fraction's numerator, and only scaling the text, but I haven't figured out how to improve this. Also, if this is the case, why does\scalebox
do this?
Also, I feel that my code is in general very inefficient, considering that I need to employ so many braces at the end; solutions that alter the structure of my code are welcome.