I want to create the following exercise
environment, for exercises:
That is, insert a black triangle right
symbol, ▸, before the header of the exercise.
To accomplish this, I would prefer to use the two packages amsthm
together with thmtools
and its declaretheoremstyle
command.
In the thmtools
manual, subsection 1.3.1, they say that
There is one important thing you cannot see in this example: there are more keys you can pass to \declaretheoremstyle[.]
(other than
- spaceabove, spacebelow
- headfont
- notefont, notebraces
- bodyfont
- postheadspace
- qed )
So, is there such a key that prepends a glyph to the header?
I am not familiar with plain TeX, and therefore can't answer my own question just by looking at the dtx
and sty
files of the package repository.
So that a MWE would be
\documentclass{book}
\usepackage{fontspec}
\usepackage{amsthm,amssymb,thmtools}
\declaretheoremstyle[
⟨insert glyph before head key = value is ▸⟩
]{mystyle}
\declaretheorem[style=mystyle]{exercise}
\begin{document}
\chapter{Prime numbers}
Lorem ipsum
\section{Dolor sit amet}
Consectetur adipiscing elit.
\begin{exercise}[Euclid]
Prove that for every prime $p$, there is a prime $p^\prime > p$. In particular, the list of primes, $2, 3, 5, 7, \ldots$ , is infinite.
\end{exercise}
\end{document}