In Custom theorem numbering @egreg provided a way to custome theorem numbering:
\documentclass{article}
%\usepackage{amsthm} %% uncomment to see the difference
\newtheorem{innercustomthm}{Theorem}
\newenvironment{customthm}[1]
{\renewcommand\theinnercustomthm{#1}\innercustomthm}
{\endinnercustomthm}
\begin{document}
\begin{customthm}{8}[Somebody]\label{eight}
Every theorem must be numbered by hand.
\end{customthm}
Here is a reference to theorem~\ref{eight}.
\end{document}
Now I tend to extend such approach to Lemma, Definition, Corollary etc. However I got an error extending to Lemma.
I put in
\newtheorem{innercustomlemma}{Lemma}
\newenvironment{customlemma}[1]
{\renewcommand\theinnercustomlemma{#1}\innercustomlemma}
{\endinnercustomlemma}
at the beginning then
\begin{customlemma}{abc}[abcd]\label{abcde}
abcdef
\end{customthm}
at the body. The error says:
! Undefined control sequence. \customlemma ...heinnercustomlemma {#1}\innercust
omlemma
l.126 \begin{customlemma}{abc}
[abcd]\label{abcde} ?
I wonder what shall I do?
Also, the font inside theorem is italic by default, I wonder if this could be tuned off?
\innercustomlemma; you can see in the question that\innercustis rendered in brown color, whileomlemmais black. Retype it. – egreg Jul 04 '14 at 09:46\usepackage{amsthm}and add\theoremstyle{definition}before the first\newtheoremcommand. But don't do it. – egreg Jul 04 '14 at 10:21