2

Here is my code:

\documentclass[12pt,a4paper,twoside]{article}

\usepackage{amsmath}
\usepackage{amssymb}

\usepackage[thmmarks]{ntheorem}
\theoremsymbol{\ensuremath\square}
\newtheorem{Beweis}{Beweis}

\begin{document}

\begin{Beweis}
\begin{align*}
test
\end{align*}
\end{Beweis}
\end{document}

But no matter what I do I do not get a square at the end of the proof. What do I do wrong?

curies
  • 199

1 Answers1

1

I suggest to use amsthm. The name of the proof will automatically be translated to "Beweis" thanks to the babel package and it solves your additional problem with the number you mentioned [in your comment][1.

Thanks to barbara beeton for the hint with the qed symbol!

\documentclass[12pt,a4paper,twoside]{article}

\usepackage[ngerman]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}

\begin{document}

\begin{proof}
Es ist (geometrische Reihe):
\begin{align*}
    \sum_{k=0}^{\infty}\Big(\frac{1}{4}\Big)^k=&\frac{1}{1-\frac{1}{4}}\\
    =&\frac{4}{3}\\
    \iff \sum_{k=1}^{\infty}\Big(\frac{1}{4}\Big)^k=&\frac{1}{3}
\end{align*}
Und damit ist bei nur n Viertelungen:
\begin{align*}
    \sum_{k=1}^{\infty}\Big(\frac{1}{4}\Big)^k=\sum_{k=1}^{n}\Big(\frac{1}{4}\Big)^k+\sum_{k=n+1}^{\infty}\Big(\frac{1}{4}\Big)^k=&\frac{1}{3}\\
    \iff \sum_{k=1}^{n}\Big(\frac{1}{4}\Big)^k=&\frac{1}{3}-\sum_{k=n+1}^{\infty}\Big(\frac{1}{4}\Big)^k\qedhere
\end{align*}
\end{proof}
\end{document}

enter image description here

  • The problem with this is that Theorem's won't count with my subsections anymore. Or is it not possible to have both, theorems like in https://www.sharelatex.com/project/59fb41e62b588f29fdf49e51 and a proof with a square? – curies Nov 02 '17 at 16:21
  • @TomGöbel Not sure what you mean by "won't count with my subsections", but you can set up theorem numbering within subsection, have a look at the documentation http://texdoc.net/texmf-dist/doc/latex/amscls/amsthdoc.pdf – samcarter_is_at_topanswers.xyz Nov 02 '17 at 16:27
  • The theorem in sharelatex.com/project/59fb41e62b588f29fdf49e51 gets the number of its subsection "Satz 2.1.1". With your code that doesn't work anymore. So i got one problem fixed but got a new one. – curies Nov 02 '17 at 16:36
  • the square really ought to be on the last line of the final display. with amsthm, you can make that happen by inserting \qedhere before the final \end{align}. (documented in the amsthm user's guide.) – barbara beeton Nov 02 '17 at 18:16
  • @barbarabeeton Thank you for the advice! I edited my answer. – samcarter_is_at_topanswers.xyz Nov 02 '17 at 18:24