2

I know the title is a bit weird but I'll try to explain it in a better way here. In the beginning of a chapter I'd like to define some basic terms. Currently I'm using

\newmdtheoremenv{mydef}{Definition}

which results in the following:enter image description here

Is there an easy way to do it without "Definition 1." but "Machine Learning" ?

3

mdframed lacks the possibility to define unnumbered theorems, but it's not difficult to add it.

Next, a common trick for a variable label can be applied.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mdframed}

\NewDocumentCommand\newmdtheoremenvnonumber{O{} m m }{%
  \newtheorem*{#2}{#3}
  \BeforeBeginEnvironment{#2}{%
     \begin{mdframed}[#1]}%
  \AfterEndEnvironment{#2}{%
     \end{mdframed}}%
}

\newmdtheoremenvnonumber{mydefinner}{\mydeflabel}
\newcommand{\mydeflabel}{}
\newenvironment{mydef}[1]
 {\renewcommand\mydeflabel{#1}\begin{mydefinner}}
 {\end{mydefinner}}

\newcommand{\attribution}[1]{\textup{(#1)}}

\begin{document}

\begin{mydef}{Machine Learning}
Machine learning is the field of study that gives computers
the ability to learn without being explicitly programmed.
\attribution{Arthur Samuel, 1959}.
\end{mydef}

\end{document}

enter image description here

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.