1

I'm not experienced with LaTeX and so I couldn't really judge if this is a trivial fix.

I want to have a proof-statement on it's own line. Currently, things get displayed like this:

Beweis. G1 (a ∗ b) ∗ c = a ∗ (b ∗ c) ∀a, b, c ∈ G

where "Beweis" is the german equivalent of "proof". So what I am aiming for is a display that looks like this:

Beweis. 
G1 (a ∗ b) ∗ c = a ∗ (b ∗ c) ∀a, b, c ∈ G

I came up with this command-definition:

\renewcommand{\proofname}{\vspace{-\baselineskip}\normalfont\bfseries Beweis\newline}

... but it didn't work as I expected it to. Note: I really don't want to alter the way "Beweis" looks (font-size, indentation, etc.), I just want it to be displayed on its own line.

2
  • 4
    Please, don't try to emulate output, but show the code you're using.
    – egreg
    Sep 14, 2023 at 21:10
  • Ok next time I'll add my code, thanks. :) Sep 14, 2023 at 21:14

3 Answers 3

3

Something like this?

enter image description here

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{amsthm}

\begin{document}
\begin{proof} \hfill 

\noindent
$G1 (a * b) * c = a * (b * c) \forall a, b, c \in G$.
\end{proof}
\end{document}
4
  • 2
    Thanks a ton! :) Sep 14, 2023 at 21:12
  • 1
    @Mico This might cause a page break just after "Beweis", which would look weird, isn't it? Sep 15, 2023 at 8:49
  • @MichelFioc - That could be handled nicely by loading the needspace package and issuing an instruction such as \Needspace{3\baselineskip} before begin{proof}.
    – Mico
    Sep 15, 2023 at 10:26
  • 1
    @Mico Another solution is to insert \makeatletter\@afterheading\makeatother before the \par. Sep 15, 2023 at 12:11
3

I suppose you use amsthm package,

In this package proof is defined as :

\newenvironment{proof}[1][\proofname]{\par
  \normalfont
  \topsep6\p@\@plus6\p@ \trivlist
  \item[\hskip\labelsep\itshape
    #1\@addpunct{.}]\ignorespaces
}{%
  \qed\endtrivlist
}

You can change it in the preambule of your document adding this code :

\makeatletter
\renewenvironment{proof}[1][\proofname]{\par  %renew to change
  \normalfont
  \topsep6\p@\@plus6\p@ \trivlist
  \item[\hskip\labelsep\itshape
    #1\@addpunct{.}]\ignorespaces
        \hfill \break                         %change
}{%
  \qed\endtrivlist
}
\makeatother
2

Like this?

enter image description here

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{amsthm,amsmath,amssymb}
\begin{document}
\begin{proof}\ \\ 
$G1 \quad (a * b) * c = a * (b * c), \quad  \forall a, b, c \in G$
\end{proof}
\end{document}
4
  • 1
    Sorry if I didn't specify it correctly. I mean it exactly as I wrote it. After "Beweis", I want G1 (a * b) * c... get displayed on a new line. "Beweis (newline) G1" Sep 14, 2023 at 20:49
  • 2
    @EldinurtheKolibri You can see the modifications.
    – Sebastiano
    Sep 14, 2023 at 21:11
  • 1
    +1. Loading babel with language option ngerman (don't use german unless you're dealing with historical texts...) should make \renewcommand*{\proofname}{Beweis} unnecessary.
    – Mico
    Sep 14, 2023 at 21:13
  • 1
    @Mico Thank you very much. I have taken your suggestion.
    – Sebastiano
    Sep 14, 2023 at 21:18

You must log in to answer this question.

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