diff --git a/preamble.tex b/preamble.tex index 5b5bd8df6..014803cf7 100644 --- a/preamble.tex +++ b/preamble.tex @@ -137,20 +137,7 @@ \newcommand{\bibitemtitle}[1]{\emph{#1}} -% henrikt-ma: Introducing semantic macro for 7 definitions spread out over two chapters -% that for unclear reasons use their own style, including numbering. Sorting out if numbered -% definitions should be used more or not at all is part of issue #2570. -% -% Definitions are numbered, but are not suitable for use with \autoref, as \autoref is not aware -% of our custom definitions. (They say there are better alternatives to \autoref, more suited -% for this kind of customization...) To avoid accidental use of \autoref, a definition should -% also avoid use of \doublelabel, and instead use \definitionlabel. Instead of \autoref, the definition -% should be referenced using \definitionref -% -% If we'd like to have definitions spanning over several paragraphs, we should use an environment -% instead of a command, but then we also need to find a way to visualize where the definition ends; -% alternatives that come to mind include boxes, indentation, a right-flushed black square, but the -% big challenge would be to find something that also works well with LaTeXML. +% Environment for definitions. \usepackage{amsthm} \newtheoremstyle{mlsdefinition} {\topsep} % ABOVESPACE @@ -162,8 +149,13 @@ {.75em} % HEADSPACE {Definition~#2. \firstuse{#3}} % CUSTOM-HEAD-SPEC \theoremstyle{mlsdefinition} -\newtheorem{definition}{Definition}[chapter] -\newcommand{\definitionautorefname}{definition} +% In order to show where the definition ends, we put a \qed at the end. This can't be done using \newtheoremstyle, +% so instead we make the 'definition' environment a wrapper around the amsthm-base environment. +\makeatletter +\newtheorem{definition@inner}{Definition}[chapter] +\newcommand{\definition@innerautorefname}{definition} +\newenvironment{definition}{\begin{definition@inner}}{\qed\end{definition@inner}} +\makeatother \setcounter{secnumdepth}{5} % Note: Toc changed for appendex