2

I'm writing my thesis and I encountered a problem while trying to use amsthm and particularly trying to define new environments using \newtheorem.

\documentclass[12pt]{report}
\linespread{1.5}
\title{Title}

\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage[english]{babel}
\usepackage{biblatex}
\usepackage{enumitem}
    
\usepackage{amsmath,amssymb,amsfonts,amsthm}
\usepackage{dsfont}
\usepackage{theorem}
\usepackage{xcolor}
\usepackage{mathtools}
\usepackage{array}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[cal=boondox]{mathalfa}

% % THEOREM ENVIRONMENTS


\theoremstyle{plain}
\newtheorem{thm}{Theorem}
\newtheorem{lem}{Lemma}
\newtheorem{claim}{Claim}
\newtheorem{assert}{Assertion}
\newtheorem{cor}{Corollary}
\newtheorem{prop}{Proposition}

\theoremstyle{definition}
\newtheorem{defn}{Definition}
\newtheorem{scheme}{Scheme}
\newtheorem{example}{Example}
\newtheorem{algo}{Algorithm}
\newtheorem{property}{Property}

\theoremstyle{remark}
\newtheorem{remark}{Remark}

I get two types of errors:

  1. Runaway arguemnt ?

    {thm}{Theorem}\newtheorem {lem}{Lemma}\newtheorem {claim}{Claim}\newtheorem \ETC. ! Paragraph ended before @xnthm was complete. \par l.41

    I suspect you've forgotten a `}', causing me to apply this control sequence to too much text. How can we recover? My plan is to forget the whole thing and hope for the best.

  2. LaTeX Error: Environment remark (for example) undefined

I suspect to first error causes the second error... Any of you have any idea how to solve it ?

I noticed that when i delete the amsthm package the errors disappears but as expected amsthm features disappear also...

2
  • Welcome to TeX.SE.
    – Mico
    Commented Apr 6 at 12:46
  • 1
    Please, add a MWE. It need to be complete with the necessary code to reproduce your issue. Furthermore you use two theorem incompatible packages, that's the issue
    – Mane32
    Commented Apr 6 at 15:19

1 Answer 1

4

Don't load theorem on top of amsthm. As you've discovered (though only somewhat indirectly), they're not compatible with each other.

My advice: Load just the amsthm package.

3
  • I get a lot of new and less clear errors after deleting the theorem package... like 'missing { ' when using the remark environment: \begin{remark} hi \end{remark}
    – Euler
    Commented Apr 6 at 14:16
  • 1
    @Euler - Since you've posted no code in the body of the test document, it's not possible to evaluate what you're doing. For sure, if I (a) don't load theorem and (b) make your code compilable by adding \begin{document} \begin{remark} Hi. \end{remark \end{document} to your code snippet, I don't get any errors.
    – Mico
    Commented Apr 6 at 14:33
  • 1
    You are right... after deleting the theorem package and incorporating all the packages to my code I noticed that everything is working now!
    – Euler
    Commented Apr 6 at 14:47

You must log in to answer this question.

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