Skip to content

Commit

Permalink
Mark the end of a definition with \qed
Browse files Browse the repository at this point in the history
This is a very simple solution to start with.  For PDF output, there are definitely more advanced variants to consider, but the question is what would also work well (look good) with LaTeXML.
  • Loading branch information
henrikt-ma committed Jun 24, 2020
1 parent ef9b92e commit 7f0f712
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions preamble.tex
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7f0f712

Please sign in to comment.