How do I make this in LaTeX? I keep losing track of the brackets.
2 Answers
The following code is "full" LaTeX:
\documentclass{article}
\usepackage{amsmath} % for "\cfrac" macro
\begin{document}
\[
e=2+\cfrac{1}{1+\cfrac{1}{2+\cfrac{1}{ 1+\cfrac{1}{1+\cfrac{1}{4+\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{6+\cdots}}}}}}}}
\]
\end{document}
If you want, you can copy and paste the math part -- the stuff between \[
and \]
-- into latex2png.com.
-
1I am SO grateful! Thank you very much Mico (and all others helping me out)– JC123Dec 30, 2016 at 18:35
-
2I learned something new today as well: the existence of the site
latex2png.com
!– MicoDec 30, 2016 at 18:36 -
2Our teacher told us we had to use it in our assignments, glad we could learn each other something. I think it's really nice to get into such a respectful and friendly community– JC123Dec 30, 2016 at 18:38
Or, using no packages:
\documentclass{standalone}
\begin{document}
$e=
2+\frac{1}{1+\frac{1}{2+\frac{1}{1+\frac{1}{1+\frac{1}{4+\frac{1}{1+\frac{1}{1+\frac{1}{6+\cdots}}}}}}}
}
$
\end{document}
Yields:
Although \cfrac
works better, this seemed to be what you were originally trying to get.
The copyable code for the website would be:
e=2+\frac{1}{1+\frac{1}{2+\frac{1}{1+\frac{1}{1+\frac{1}{4+\frac{1}{1+\frac{1}{1+\frac{1}{6+\cdots}}}}}}}}
\cfrac
macro provided by theamsmath
package?\cfrac
works at that site, I just triedy = 2+\cfrac{1}{1+\cfrac{1}{2+\cfrac{1}{1+\dots}}}
on that site, it workse=\xcontfrac{2;1,2,1,4,1,1,6+\cfraccdots}
(in math mode, of course).