TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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}
share|improve this question
up vote 7 down vote accepted

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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