I am trying to write a continued fraction in the style in the image provided. This involves lowering the + symbol to be on the same part of the page as the denominators of the fraction, but I am not sure how to do this. Any help would be appreciated. Thanks.
Asked
Active
Viewed 444 times
3
-
Link to somewhat related question: amsmath - In math mode, how do I make the fraction bar "invisible"? - TeX - LaTeX Stack Exchange – user202729 Dec 13 '22 at 06:48
2 Answers
9
Use {\atop +} to lower the +
\documentclass{article}
\begin{document}
$a_1+\frac{1}{a_2} {\atop +} \frac{1}{a_3} {\atop +\ \cdots\ +}$
\end{document}
EDIT: As @David Carlisle suggested you could also use \genfrac{}{}{0pt}{}{}{+} from amsmath and get the same result without using a TeX primitive.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$a_1+\frac{1}{a_2} \genfrac{}{}{0pt}{}{}{+} \frac{1}{a_3} \genfrac{}{}{0pt}{}{}{+\ \cdots\ +}$
\end{document}
Dan
- 3,699
-
4yes although
amsmathwill scream at you for the tex-primitive syntaxPackage amsmath Warning: Foreign command \atop;so better to use\genfracI think. – David Carlisle Nov 18 '21 at 17:37 -
@DavidCarlisle Thanks! I hadn't known about
\genfrac. I edited in the\genfracequivalent to the answer. – Dan Nov 18 '21 at 17:47 -
3
Using amsmath to include \text{...} to \raisebox{...}{$+$} by -1.5ex or a suitable depth
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\newcommand{\lp}{\text{\raisebox{-1.5ex}{$,+,$}}}
\newcommand{\ls}[1]{\text{\raisebox{-1.5ex}{#1}}}
\begin{document}
[
a_1 +
\frac{1}{a_2} \lp
\frac{1}{a_3} \lp
\frac{1}{a_3} \lp
\ls{$,\cdots,$} \lp
\frac{1}{a_n}
]
\end{document}
to get something like this...

Partha D.
- 2,250

