3

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.

Image of lowered down addition signs

1

2 Answers 2

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}

enter image description here

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}
3
  • 4
    yes although amsmath will scream at you for the tex-primitive syntax Package amsmath Warning: Foreign command \atop; so better to use \genfrac I think. Commented Nov 18, 2021 at 17:37
  • @DavidCarlisle Thanks! I hadn't known about \genfrac. I edited in the \genfrac equivalent to the answer.
    – Dan
    Commented Nov 18, 2021 at 17:47
  • thanks +1...... Commented Nov 18, 2021 at 18:10
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...

img

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .