0

This is my code:

\documentclass{article}
     \usepackage[utf8]{inputenc}
  \usepackage{amsmath}
   \usepackage{amssymb}
     \usepackage{amsthm}
   \usepackage{textcomp}
     \usepackage{dsfont}
    \usepackage{graphicx}
     \usepackage[english]{babel}
    \usepackage{hhline}
   \usepackage{fancyvrb}

    \begin{Verbatim}[fontsize=\large]
     $${r \choose r} + {r+1 \choose r} + {r+1 \choose r} + ..... + {n 
    \choose r} = {n+1 \choose r+1}   $$
   \end{Verbatim}

  we will prove this by using induction on n. \\
   $$\sum_{n=1}^{\infty} 2^{-n} = 1$$

as you can see in the picture it's not being displayed for some reason. Can someone help?

N.B: the stuff i wrote is far from done so don't judge me on that one :D

pic

Andrew Swann
  • 95,762
  • 1
    You use verbatim, which displays code, not the result. – TeXnician Dec 03 '17 at 11:00
  • how can i fix that? –  Dec 03 '17 at 11:00
  • 4
    What do you want to fix? Don't use verbatim? Or do you want the code printed next to the output? Do you want to increase the math font size only for that part? What is your question? – TeXnician Dec 03 '17 at 11:02
  • 1
    in addition to other comments, never use \\ before a math display. – David Carlisle Dec 03 '17 at 17:34
  • @DavidCarlisle why not? –  Dec 03 '17 at 18:02
  • 1
    it destroys the layout, you should never use \\at the end of any paragraph (including the partial paragraph before a display) you will get a spurious "white " line of the paragraph which stops the display adapting to the real last line of the paragraph and will give bad line and page breaking behaviour. – David Carlisle Dec 03 '17 at 18:08
  • what would be a good way to separate things away a little bit? can i replace every \ with \bigskip? or is there other options? –  Dec 03 '17 at 18:10

1 Answers1

1

it is fixed by removing verbatim as @TeXnician suggested and doing the following

{\large$${r \choose r} + {r+1 \choose r} + {r+1 \choose r} + ..... + {n 
\choose r} = {n+1 \choose r+1}   $$}:
Torbjørn T.
  • 206,688