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?

  • Welcome to TeX.Stackexchange! It should probably be amssymb and not amsymbol – user36296 Nov 2 '17 at 15:27
  • Can you please make a minimal working example (MWE)? \documentclass{book} \usepackage{amssymb} \usepackage[thmmarks]{ntheorem} \theoremsymbol{\ensuremath\square} \newtheorem{Beweis}{Beweis} \begin{document} \begin{Beweis} gwe \end{Beweis} \end{document} gives me a square at the end. – user36296 Nov 2 '17 at 15:28
  • \documentclass[12pt,a4paper,twoside]{article} \usepackage{amssymb} \usepackage[thmmarks]{ntheorem} \theoremsymbol{\ensuremath\square} \theoremseparator{:} \newtheorem{Beweis}{Beweis} \begin{document} \begin{Beweis} Sample Text \end{Beweis} \end{document} Gives me no square – Tom Göbel Nov 2 '17 at 15:39
  • How are you compiling? I tried with pdflatex from texlive2017. – user36296 Nov 2 '17 at 15:46
  • i use sharelatex... – Tom Göbel Nov 2 '17 at 15:51
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 sharelatex.com/project/59fb41e62b588f29fdf49e51 and a proof with a square? – Tom Göbel Nov 2 '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 texdoc.net/texmf-dist/doc/latex/amscls/amsthdoc.pdf – user36296 Nov 2 '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. – Tom Göbel Nov 2 '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 2 '17 at 18:16
  • @barbarabeeton Thank you for the advice! I edited my answer. – user36296 Nov 2 '17 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.