TransWikia.com

Continued fraction

TeX - LaTeX Asked on August 3, 2020

I am currently working on my bachelor thesis. I want to visualize a general continued fraction. I concatenate the fractions with the command cfrac. The result is okay, but I rather want the last link (the one right next to the dots) to be a bit more below. Hopefully the picture makes clear what I mean. Do you have any ideas?

Here is a small example of my code:

documentclass[11pt, a4paper, german]{scrartcl}
usepackage[ngerman]{babel}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsthm}
usepackage{amssymb}
usepackage{mathabx}
begin{document}
begin{equation*}
    a_{0}+cfrac{1}{a_1+cfrac{1}{a_2+cfrac{1}{a_3+hspace{0.5cm}ddotshspace{0.5cm}cfrac{1}{a_{n-1}+cfrac{1}{a_n}} }}}
end{equation*}
end{document}

Output

2 Answers

I just applied a raisebox{<len>}{$...$} to the last term.

documentclass[11pt, a4paper, german]{scrartcl}
usepackage[ngerman]{babel}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsthm}
usepackage{amssymb}
usepackage{mathabx}
begin{document}
begin{equation*}
    a_{0}+cfrac{1}{a_1+cfrac{1}{a_2+cfrac{1}{a_3+hspace{0.5cm}ddots
    hspace{0.5cm}raisebox{-3ex}{$cfrac{1}{a_{n-1}+cfrac{1}{a_n}}$} }}}
end{equation*}
end{document}

enter image description here

Answered by Steven B. Segletes on August 3, 2020

I'd lower also the ddots:

documentclass{article}
usepackage{amsmath}
begin{document}

begin{equation*}
a_{0}+cfrac{1}{
  a_1+cfrac{1}{
    a_2+cfrac{1}{
      a_3+begin{array}[t]{c@{;}c@{}}
          [-1.5ex]
          ddots[-1.5ex]
          &{}+cfrac{1}{a_{n-1}+cfrac{1}{a_n}}
          end{array}
      }
    }
  }
end{equation*}

end{document}

enter image description here

Answered by egreg on August 3, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP