3

I know there are some posts on this but I don't understand. So for instance I want to know which package contains \restatable.

I've tried \show\restatable but I don't understand what the relevant part of the log file

> \restatable=\long macro:
->\thmt@thisistheonetrue \thmt@restatable .
l.482 \show\restatable
                  

means

I've found some posts about latexdef but I don't know how that will work in a document.

Loaded packages:

\usepackage{adpwrapfig}
\usepackage{caption}
\usepackage{comment}
\usepackage{algorithmic}
\usepackage{color}
\usepackage{bbm}
\usepackage{mathbbol}
\usepackage{tabularx}
\usepackage{enumerate}
\newcommand{\mypara}[1]{\noindent{\bfseries #1.}}

\usepackage{thmtools}
\usepackage{xcolor}
\colorlet{agcolor}{blue!70!white}
\colorlet{jkcolor}{green!60!black}
\usepackage[textwidth=20mm]{todonotes}
\usepackage[utf8]{inputenc}
\usepackage[numbers,sort&compress]{natbib}
%\usepackage[bookmarks=true,colorlinks=true,citecolor=blue,linkcolor=red]{hyperref}    
    \renewcommand{\definitionautorefname}{Definition}
    \newcommand{\remarkautorefname}{Remark}
%}
\usepackage[caption=false]{subfig} 

The rest are in the siamart190516.cls

2
  • 1
    Please tell us which packages you load. (Who knows, \restatable may be defined in more than one package...)
    – Mico
    Oct 30, 2023 at 6:45
  • 1
    @Mico added packages
    – Hao S
    Oct 30, 2023 at 7:05

2 Answers 2

5

Using \show you got

->\thmt@thisistheonetrue \thmt@restatable .

which looks like the package prefix in use is thmt. Then looking at your preamble we see thmtools - that looks likely for the prefix. Reading thmtools.sty we see thmt@ in use but no \restatable. However, looking at all of the files that come with thmtools, in thm-restate.sty there is:

\newenvironment{restatable}{%
  \thmt@thisistheonetrue\thmt@restatable
}{%
  \endthmt@restatable
}

This will define \restatable and \endrestatable, so we have found the (likely) source.

2
  • Do you mean thmtools? I don't see a thmt package.
    – Hao S
    Oct 30, 2023 at 7:31
  • 2
    Like I said, we see the prefix thmt and we think 'ah, that might be thmtools: package prefixes in code are often shorter than the full package name
    – Joseph Wright
    Oct 30, 2023 at 7:49
2

One way to get a clue which package defines or redefines a command is to plant \show-commands in various places and look what changes. E.g. this

\documentclass{article}
\show\restatable
\usepackage{tabularx}
\show\restatable
\usepackage{thmtools}
\show\restatable

\begin{document}

\end{document}

gives (shortened)

> \restatable=undefined.
l.24 \show\restatable

?
(.../tabularx.sty)
> \restatable=undefined.
l.26 \show\restatable

?
(.../thmtools.sty  more files ) 
> \restatable=\long macro:
->\thmt@thisistheonetrue \thmt@restatable .
l.28 \show\restatable

and so a good clue that thmtools is involved.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .