GeneralCommand \def already defined (newtheorem)

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Plato
Posts: 6
Joined: Wed Nov 19, 2014 7:08 pm

Command \def already defined (newtheorem)

Post by Plato »

Code: Select all

%Preamble
\documentclass[11pt,a4paper]{article}
\usepackage{amssymb,amsmath,amsthm}
\usepackage[dutch]{babel}
\setlength{\parindent}{0cm}
\setlength{\parskip}{0cm}
\theoremstyle{definition}
\newtheorem{def}{Definitie}
\begin{document}
\begin{titlepage}
Hey guys, I am writing about lineair algebra and of course I wish to use definitions, theorems, corollaries, lemmas, remarks etc.
I'm kind of new to LaTeX, and every time I command LaTeX to create automatical definitions for me, I get the error:

"! LaTeX Error: Command \def already defined.
or name \end... illegal, see p. 192 of the manual."

I don't know what I'm doing wrong, I use the commands:
\begin{def}
...
\end{def}

I've tried to remove amssymb and amsmath from the packages (and only keeping amsthm) but that doesn't fix it either.

Any help would be appreciated, thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Command \def already defined (newtheorem)

Post by Johannes_B »

Hi and welcome,

\def is an internal primitive and used in many many many instances. It defines new macros.

Use another word to call your definitions, like dfn or defi or defn or ... Or write the complete word, a good editor can help you in saving typing time.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Dyexz
Posts: 3
Joined: Mon Nov 17, 2014 11:53 am

Command \def already defined (newtheorem)

Post by Dyexz »

you could try something like:

Code: Select all

\usepackage{amssymb,amsmath,amsthm}
\usepackage[dutch]{babel}
\setlength{\parindent}{0cm}
\setlength{\parskip}{0cm}
\theoremstyle{break}           % "break" style makes a linebreak after the header of "Definition X.X"
\newtheorem{defn}[]{Definitie} % you can put chapter or section into the [] to define how the definitions are numbered
\newenvironment{definition}{\begin{defn}}{\end{defn}}  % this creates an environment where you use the commands \begin{defn} \end{defn} when creating a definition
Plato
Posts: 6
Joined: Wed Nov 19, 2014 7:08 pm

Re: Command \def already defined (newtheorem)

Post by Plato »

Thanks both, that fixed it.
Post Reply