# Continued fraction including cdots and dfrac

Consider the following image of a snippet of text. I would like to know how this is reproduced, especially with the diagonal '\cdots' and \dfrac.

Here's an attempt to reproduce the screenshot you've posted. The code uses a top-aligned array environment. The amsmath package provides the \dfrac macro. Note that I've tried to assure the correct spacing around the + symbols, something that the screenshot does not do.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\setlength\arraycolsep{0pt} \frac{u_0}{u_1}=\xi_0=a_0+ \begin{array}[t]{ccc} \dfrac{1}{a_1+{}}\\ \ddots\\ & {}+{} & \dfrac{1}{a_{j-1}+\dfrac{1}{a_j}}. \end{array}$
\end{document}

• So simple actually and intuitive... ddots! Nov 19 '15 at 17:33

Is this what you are looking for?

\documentclass{scrartcl}
\usepackage{mathtools}

\begin{document}

$\frac{u_0}{u_1} = \xi_0 = a_0 + \cfrac{1}{a_1 + \cfrac{1}{\dotsb + \cfrac{1}{a_{j-1} + \cfrac{1}{a_j}}}}$

\end{document}


Or this (if you use this multiple times, create a command that expands to the whole \vcenter{..} expression)

$\frac{u_0}{u_1} = \xi_0 = a_0 + \cfrac{1}{a_1 + \cfrac{1}{\vcenter{\hbox{\ddots}} + \cfrac{1}{a_{j-1} + \cfrac{1}{a_j}}}}$


• Almost, note the difference in the dots. Nov 19 '15 at 17:24
• I am specifically interested in how the 'diagonal dots' are done. Nov 19 '15 at 17:27
• You have to use \ddots but since the dots sit quite high, it doesn't look good, I used \vcenter{\hbox{$\ddots$}} to lower it down (in fact, centering the symbol around the math axis). Nov 19 '15 at 17:28