# Remove dot after theorem with amsthm and hyperref

I would like to know how to remove the dot that amsthm adds after the number of the theorem (it gives Theorem 1.1. instead of Theorem 1.1 ).

MWE:

\documentclass{article}
\usepackage{hyperref}
\newtheorem{theorem}{Theorem}[section]

\usepackage{xpatch}
\makeatletter
\makeatother

\begin{document}
\section{Introduction}

\begin{theorem}
Let ...
\end{theorem}

\end{document}


gives

while

\documentclass{article}
\usepackage{amsthm}
\usepackage{hyperref}
\newtheorem{theorem}{Theorem}[section]

\usepackage{xpatch}
\makeatletter
\makeatother

\begin{document}
\section{Introduction}

\begin{theorem}
Let ...
\end{theorem}

\end{document}


gives

It turns out that if \usepackage{hyperref} is not included, then adding

\usepackage{xpatch}
\makeatletter
\makeatother


fixes the problem, but when it is then the problem is still there.

I need to use amsthm but I don't want the dot to appear.

• I have already tried the solution given there and it didn't work @samcarter – Minkowski Nov 8 '16 at 16:36
• The solution given there doesn't fix the problem here. Adding hyperref makes that solution not fix the problem @StefanPinnow – Minkowski Nov 8 '16 at 17:20

\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[section]

\usepackage{xpatch}
\makeatletter
\makeatother

\begin{document}
\section{Introduction}

\begin{theorem}
Let ...
\end{theorem}

\end{document}


EDIT:

Including hyperref you have to use the patch at the beginning of the document, see texlive 2016 hyperref/cleverref incompatibility

\documentclass{article}
\usepackage{amsthm}
\usepackage{hyperref}
\newtheorem{theorem}{Theorem}[section]

\usepackage{xpatch}
\makeatletter
\makeatother

\begin{document}
\section{Introduction}

\begin{theorem}
Let ...
\end{theorem}

\end{document}

• You were completely right. The MWE I wrote was fixed with the code you wrote, but in my thesis (where I have this problem) it wasn't fixed. I have been trying to see what is different and I have just found it: if \usepackage{hyperref} is added (I have this package in my thesis) then the problem is still there. How could I fix it? Thanks for your quick answer, by the way. – Minkowski Nov 8 '16 at 16:57
• @Minkowski Just a guess: by changing the order the packages are loaded. But if you want a real answer, make a MWE that shows the problem. – samcarter_is_at_topanswers.xyz Nov 8 '16 at 17:00
• I have just changed the question and the MWE. [The 11th Doctor is actually my Doctor, but the 12th is also fantastic] – Minkowski Nov 8 '16 at 17:04
• @Minkowski For the 11th Doctor you get this new version of my anwser :) – samcarter_is_at_topanswers.xyz Nov 8 '16 at 17:15
• Geronimo! You nailed it! Now it works perfecty. I have to tell you that I have been searching the solution to this problem for months. Thank you very much @samcarter . – Minkowski Nov 8 '16 at 17:25