Motivation: I want to declare a command \tbc
(without arguments) to use it inside an environment. I want this command to produce a text like Problem 2 continues on the next page, start a new page and produce Problem 2 continued... I use a variety of environments, such as Problem, Question, Exercise, etc, but all use a continuous numbering with the counter theorem
. Naturally, I want my \tbc
to produce Problem 2 when it's used between \begin{problem}
and \end{problem}
, and Question 3 when it's used between \begin{question}
and \end{question}
.
Question: I know that I can get the environment number with \the\value{theorem}
. I can't figure out how to get an environment name.
I am aware that there are other packages for this, but having my own small command allows me to better merge it with the style of my documents.