7

I am currently hunting for errors in my template and these two I cannot solve after reading the log and researching:

First:

! Argument of \strip@prefix has an extra }.
<inserted text> 
                \par 
l.60                postheadspace=\newline]{mystyle}

Second:

! Paragraph ended before \strip@prefix was complete.
<to be read again> 
                   \par 
l.60                postheadspace=\newline]{mystyle}

Minimal example:

\documentclass[a4paper, 12pt, oneside]{book}

        \usepackage{amsthm}
        \usepackage[unq]{unique}
        \usepackage{thmtools}
        \declaretheoremstyle[
                numbered=unless unique,
                %within=chapter,
                headpunct={},
                shaded,
                spacebelow=\parsep,
                spaceabove=\parsep,
                notefont=\normalfont\itshape,
                bodyfont=\itshape,
                postheadspace=\newline]{mystyle}
        \declaretheorem[
                style=mystyle,
                name=Theorem,
                refname={theorem,theorems},
                Refname={Theorem,Theorems}
        ]{FF}

        \usepackage{hyperref}

        \usepackage{cleveref} 
        \crefname{FF}{Theorem}{Theorems}
        \Crefname{FF}{Theorem}{Theorems}

\begin{document}

\begin{FF}\label{ff1}
Test
\end{FF}

Link to \Cref{ff1}.

\begin{FF}\label{ff2}
Test2
\end{FF}

\end{document}
7

The shaded key requires a key-value list (see page 15 of the thmtools documentation); also, the unless unique option seems to require the unique package:

\documentclass[a4paper, 12pt, oneside]{book}

\usepackage{amsthm}
\usepackage[unq]{unique}
\usepackage{thmtools}
\usepackage[unq]{unique}
\usepackage{xcolor}

\declaretheoremstyle[
                numbered=unless unique,
                within=chapter,
                headpunct={},
                shaded={bgcolor=blue!20},
                spacebelow=\parsep,
                spaceabove=\parsep,
                notefont=\normalfont\itshape,
                bodyfont=\itshape,
                postheadspace=\newline
]{mystyle}
\declaretheorem[
                style=mystyle,
                name=Theorem,
                refname={theorem,theorems},
                Refname={Theorem,Theorems}
]{FF}

\usepackage{hyperref}

\usepackage{cleveref} 
\crefname{FF}{Theorem}{Theorems}
\Crefname{FF}{Theorem}{Theorems}

\begin{document}

\begin{FF}\label{ff1}
Test
\end{FF}

Link to \Cref{ff1}.

\begin{FF}\label{ff2}
Test2
\end{FF}

\end{document}

enter image description here

  • Thanks, this works! BTW: you called on the package \usepackage[unq]{unique} twice. – FLW Mar 7 '13 at 13:20

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.