0

I am making my own definition for proof with the problem that the text is being displayed in italics. This is because \begin{lexproof} is being called within \begin{theorem}.

\newenvironment{lexproof}
   {
     \paragraph{Proof:}
   }
   {\hfill \textdagger}

\newpage \section{Pythagoreas}

\begin{theorem}[Pythagorean theorem] A theorem about right triangles summarised by the equation [ x^2 + y^2 = z^2 ]

\begin{lexproof} To prove it by contradiction try and assume that the statement i s false, proceed from there and at some point you will arrive to a contradiction. \end{lexproof}

\end{theorem}

Veak
  • 1
  • 3
    The amsthm package (\usepackage{amsthm}) defines one, and also provides nice ways of defining new theorem-like environments generally. – frabjous Sep 06 '22 at 23:00
  • Am having a go for my own based on amsthm. Picking up some of the code. What could I try. The original has lot of calls, – Veak Sep 06 '22 at 23:30
  • There's nothing in your example that mentions italic, so it's impossible to say why that might be happening. This question provides several methods to have a colon after proof starting with amsthm. And changing the default box to a dagger can be done with \renewcommand{\qedsymbol}{\textdagger}. – barbara beeton Sep 07 '22 at 01:16
  • 1
    Usually, the proof comes after the theorem and is separate from it. – Teepeemm Sep 07 '22 at 02:11
  • You've changed the question so now my first comment makes no sense. Sigh. Don't do that. Anyway the default theorem style puts its contents in italics, if that's what you mean. You can use definition style instead for no italics. Use \theoremstyle{definition} before \newtheorem{theorem}{Theorem} if you don't want italics. And maybe start reading documentation rather than asking a new question here every hour? – frabjous Sep 07 '22 at 02:19
  • \paragraph is a level 4 section heading following section subsection and subsubsection, do not use it in a theorem – David Carlisle Sep 07 '22 at 07:13
  • @Randy There are reasons why the amsthm definition of proof seems complicated, the main one being that typesetting a proof is a complex task. Don't try reinventing the wheel. – egreg Sep 07 '22 at 08:13

0 Answers0