1
\documentclass[final,a4paper,11pt,oneside,openany]{memoir}

\usepackage[naustrian]{babel}

\usepackage[thmmarks]{ntheorem}
\usepackage{thm-restate}

\newcounter{reqcounter}
\newtheorem{RQ}[reqcounter]{Neu}

\begin{document}

\begin{restatable}{RQ}{rqFenster}
Fenster mit 3-Scheiben Isolierverglasung, mit Rolladen und Fensterbank. \\
\textit{Farbe: Innen Weiß, Außen weiß; Beschlag: Silber.}
\end{restatable}

\rqFenster

\end{document}

produces a document as I would expect but also gives a warning:

Latexmk: List of undefined refs and citations:
  Label `thmt@@rqFenster' multiply defined
  Label `thmt@@rqFenster@data' multiply defined
Latexmk: Summary of warnings from last run of (pdf)latex:
  Latex found 2 multiply defined reference(s)

am I using it incorrectly?

Is it also possible to somehow indicate that it is actually a restated theorem? E.g. putting the same number again but then a subnumber to indicate how often it was restated?

Neu 1.1 Fenster mit 3-Scheiben Isolierverglasung, mit Rolladen und Fenster-
bank.
Farbe: Innen Weiß, Außen weiß; Beschlag: Silber.
Neu 1.2 Fenster mit 3-Scheiben Isolierverglasung, mit Rolladen und Fenster-
bank.
Farbe: Innen Weiß, Außen weiß; Beschlag: Silber.

Or is it even possible to change which theorem is being used in restating? E.g. I want to restate the theorem with the same text but not as RQ but as RQopt?

\rqFenster[RQopt] % make rqFenster now being like:

\begin{restatable}{RQopt}{rqFenster}
Fenster mit 3-Scheiben Isolierverglasung, mit Rolladen und Fensterbank. \\
\textit{Farbe: Innen Weiß, Außen weiß; Beschlag: Silber.}
\end{restatable}

So basically I would like some insights what the restating mechanism can do or if there is any way to extend the restating mechanism. It looks strange to me that only the starred version works?

1

The purpose of thm-restate is to restate the theorem with the same number.

You can define the business yourself.

\documentclass[final,a4paper,11pt,oneside,openany]{memoir}

\usepackage[naustrian]{babel}

\usepackage[thmmarks]{ntheorem}

\ExplSyntaxOn

\prop_new:N \g_markus_restate_prop

\NewDocumentEnvironment{torestate}{mmo+b}
 {% #1 = theorem type, #2 = key for restating, #3 = attribution, #4 = the contents
  % state the theorem
  \IfNoValueTF{#3}{\begin{#1}}{\begin{#1}[#3]}#4\end{#1}
  % save the contents
  \prop_gput:Nnn \g_markus_restate_prop { #2-type } { #1 }
  \IfValueT{#3}
   {
    \prop_gput:Nnn \g_markus_restate_prop { #2-attr } { [#3] }
   }
  \prop_gput:Nnn \g_markus_restate_prop { #2-text } { #4 }
 }{}

\NewDocumentCommand{\restate}{mo}
 {% #1 = key for restating, #2 = optional label
  \use:e
   {
    \exp_not:N \begin{ \prop_item:Nn \g_markus_restate_prop { #1-type } }
    \prop_item:Nn \g_markus_restate_prop { #1-attr }
   }
  \IfValueT{#2}{ \label{#2} }
  \prop_item:Nn \g_markus_restate_prop { #1-text }
  \use:e { \exp_not:N \end{ \prop_item:Nn \g_markus_restate_prop { #1-type } } }
 }

\ExplSyntaxOff
  
\newtheorem{RQ}{Neu}


\begin{document}

\begin{torestate}{RQ}{rqFenster}
Fenster mit 3-Scheiben Isolierverglasung, mit Rolladen und Fensterbank. \\
\textit{Farbe: Innen Weiß, Außen weiß; Beschlag: Silber.}
\end{torestate}

\begin{torestate}{RQ}{somekey}[With attribution]
Whatever
\end{torestate}

\restate{rqFenster}[xyz]

Cross-reference: \ref{xyz}

\restate{somekey}

\end{document}

enter image description here

2
  • Thank you for the answer, this would be exactly what I need but I get an error: LaTeX3 Error: Unknown argument type 'b' for the command '\environment torestate'. Furthermore, I think the packages xparse and expl3 are needed?
    – markus23
    May 13 at 10:39
  • @markus23 You should update your TeX system first.
    – egreg
    May 13 at 11:59
0

You should be using the starred version of rqFenster. I don't know how to adjust the theorem numbering but perhaps instead you could use some introductory text as below.

% theoremnumprob.tex  SE 591359

\documentclass[final,a4paper,11pt,oneside,openany]{memoir}
\usepackage{lipsum}

\usepackage[naustrian]{babel}

\usepackage[thmmarks]{ntheorem}
\usepackage{thm-restate}

\newcounter{reqcounter}
\newtheorem{RQ}[reqcounter]{Neu}

\begin{document}

\begin{restatable}{RQ}{rqFenster}
Fenster mit 3-Scheiben Isolierverglasung, mit Rolladen und Fensterbank. \\
\textit{Farbe: Innen Weiß, Außen weiß; Beschlag: Silber.}
\end{restatable}

\lipsum[1]

 Remembering theorem \ref{thmt@@rqFenster} on page \pageref{thmt@@rqFenster}.
\rqFenster*

\end{document}

enter image description here

2
  • Thank you for your answer! I know about the starred version but this is not what I want: I would like to get a new number. I'll improve the question. But what you basically say is that there is no way to use the un-starred version (and get a new number or change anything else) and the starred version (and an exact duplication of the text I already had) is the only possible way to restate theorems?
    – markus23
    Apr 5 at 5:16
  • @markus23 My answer to your original question was based on my reading of the package manual. I have no idea about how to adjust the theorem numbering so I said nothing about how it could or could not be done. Apr 6 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.