Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qed option without value fails in \declaretheoremstyle #47

Open
mbertucci47 opened this issue Oct 6, 2023 · 0 comments
Open

qed option without value fails in \declaretheoremstyle #47

mbertucci47 opened this issue Oct 6, 2023 · 0 comments

Comments

@mbertucci47
Copy link
Collaborator

In thm-amsthm.sty, we have \define@key{thmdef}{qed}[\qedsymbol]{...} so if used without a value, the qed option should default to \qedsymbol. This works if used in \declaretheorem, but not if used in \declaretheoremstyle. Example:

\documentclass{article}
\usepackage{amsthm,thmtools}

% this fails
\declaretheoremstyle[qed]{mythmsty}
\declaretheorem[style=mythmsty]{theorem}
	
% this works
%\declaretheoremstyle[qed=\textdagger]{mythmsty}
%\declaretheorem[style=mythmsty]{theorem}

% this works
%\declaretheorem[qed]{theorem}

\begin{document}

\begin{theorem}
Text
\end{theorem}

\end{document}

Here's the full error:

! Argument of \strip@prefix has an extra }.
<inserted text> 
                \par 
l.5 \declaretheoremstyle[qed]{mythmsty}
                                       
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
\relax
! Paragraph ended before \strip@prefix was complete.
<to be read again> 
                   \par 
l.5 \declaretheoremstyle[qed]{mythmsty}
                                       
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

Package thmtools Info: Key `qed' (with value `\par ')
(thmtools)             is not a known style key.
(thmtools)             Will pass this to every \declaretheorem
(thmtools)             that uses `style=mythmsty' on input line 5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant