1

The package thmtools offers the parameter 'continues' for theorems as shown in the example.

\documentclass{article}

\usepackage{amsthm} \usepackage{thmtools} \usepackage{hyperref}

\declaretheoremstyle[ headfont=\bfseries\itshape, notefont=\bfseries\itshape ]{foostyle}

\declaretheorem{foo}[ style=foostyle ]

\begin{document}

\begin{foo}[Bold note]\label{foo}
    This is the first part.
\end{foo}

\begin{foo}[continues=foo]
    This is the second part.
\end{foo}

\end{document}

I would like to customize this 'continues' parameter. Particularly I want to "unbold" the 'continuing from p. 1' (without removing italic or other attributes). I tried to modify \thmcontinues which is defined as

\providecommand\thmcontinues[1]{%
\ifcsname hyperref\endcsname
\hyperref[#1]{continuing}
\else
    continuing
\fi
from p.\,\pageref{#1}%
}

however renewing did not work (at least the following):

\renewcommand\thmcontinues[1]{
    \mdseries\thmcontinues{#1}
}

Any solutions?

1 Answers1

0

The problem with \renewcommand is it essentially just allows you to define a command with a previously used name. You want to keep most of the functionality of \thmcontinues and add \mdseries as well. To do this we create a temporary command, called \thmcontinuesTEMP here, and we then renew \thmcontinues to be this temporary value and the desired \mdseries. To do this use

\let{\thmcontinuseTEMP}{\thmcontinues}
\renewcommand{\thmcontinues}{\mdseries\thmcontinuseTEMP}

in your preamble and then you should get the following output when you run your MWE: removed bold from thmcontinues

Willoughby
  • 3,649
  • This is good to know! Does it mean that if I write renewcommand{\thmcontinues}{...} I cannot use \thmcontinues inside the second brackets anymore? – FriedeFreudeEierkuchen Feb 04 '21 at 13:35
  • Yes, if you try to use \thmcontinues in definition of \renewcommand{\thmcontinues}{...} you will a recursion error, as in the second pair of brackets when you use \thmcontinues it will look for the definition which is in the \renewcommand which then calls \thmcontinues again, etc. until LaTeX gives up. This is the difference between \let and \def. You can still access \thmcontinues behaviour if you use \thmcontiuesTEMP – Willoughby Feb 04 '21 at 16:53