2

I have the following code in the beginning of the file:

\documentclass[a4paper, 12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[finnish]{babel} % Kieli: Suomi
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{imakeidx}
\usepackage{enumitem}
\makeindex
\newtheoremstyle{special}
    {\topsep}
    {\topsep}
    {\itshape}
    {}
    {\bfseries}
    {$^{\bm\ast}$\kern-1.5pt.}%  Punctuation after theorem head % <-- new
    {.5em}
    {}
\newtheorem{thm}{Theorem}
\newtheorem{lause}[thm]{Lause}
\newtheorem{huom}[thm]{Huomautus}
\theoremstyle{special}
\newtheorem{spthm}[thm]{Teoreema}

\newtheorem{thm*}[thm]{Theorem}
\newtheorem*{dem*}{De Morganin lait}

After that, in a document, I have

\begin{spthm}
This is a special theorem.
\end{spthm}

Now the Texmaker 5.0.3 and pdflatex complains:

! Undefined control sequence.
<inserted text> $^{\bm 
                       \ast }$\kern -1.5pt.
l.483 T
       his is a special theorem.

What is my mistake?

1

Welcome to TeX.SE. I have cleaned a bit your code by to delete \usepackage{amsfonts} and I have improved a strange \bm command without that you use the bm package. I have used this {$\boldsymbol{^\ast}$\kern-1.5pt.} and all your code works correctly.

enter image description here

\documentclass[a4paper, 12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[finnish]{babel} % Kieli: Suomi
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{imakeidx}
\usepackage{enumitem}
\makeindex
\newtheoremstyle{special}
    {\topsep}
    {\topsep}
    {\itshape}
    {}
    {\bfseries}
    {$\boldsymbol{^\ast}$\kern-1.5pt.}%  Punctuation after theorem head % <-- new
    {.5em}
    {}
\newtheorem{thm}{Theorem}
\newtheorem{lause}[thm]{Lause}
\newtheorem{huom}[thm]{Huomautus}
\theoremstyle{special}
\newtheorem{spthm}[thm]{Teoreema}
\newtheorem{thm*}[thm]{Theorem}
\newtheorem*{dem*}{De Morganin lait}

\begin{document}
\begin{spthm}
This is a special theorem.
\end{spthm}
\end{document}

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.