I wonder what the LaTeX code for the expression looks like.
Any help is appreciated.
Math & Science ⇒ Sum in the Form of continued Fractions
Sum in the Form of continued Fractions
- Attachments
-
- 02.gif (2.15 KiB) Viewed 3725 times
Last edited by elim on Sun Jan 16, 2011 12:27 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Sum in the Form of continued Fractions
The amsmath package offers the \genfrac command which can be used for some new definitions.
See the amsmath manual for details.
Best regards and welcome to the board
Thorsten
Code: Select all
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools} % loads »amsmath«
\newcommand*{\fplus}{\genfrac{}{}{0pt}{}{}{+}}
\newcommand*{\fdots}{\genfrac{}{}{0pt}{}{}{\cdots}}
\begin{document}
\[
\frac{4}{\pi}=1+\frac{1^2}{2}\fplus\frac{3^2}{2}\fplus\frac{5^2}{2}\fplus\frac{7^2}{2}\fplus\fdots
\]
\end{document}
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Sum in the Form of continued Fractions
Thanks a lot Thorsten! Your code works very well. I'll read the manual and digest this.