2

I am using theorem environment and want to put reference near the lemma, however, instead of [18] I am getting (18), how I can fix it?

\documentclass{article}
\usepackage{amsthm}% http://ctan.org/pkg/amsthm
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\newtheorem{lemma}{Lemma}%
\AtEndEnvironment{theorem}{\null\hfill\qedsymbol}%
\begin{document}
    \begin{lemma}[18]
        This is an important theorem.
    \end{lemma}
\end{document}
  • Welcome! I'd like to remark that \null\hfill\qedsymbol is not the right way for adding a tombstone at the end of a theorem statement. – egreg Feb 11 at 11:34
2

The default for \thmhead's plain style is to set its argument inside (parentheses). Below is an updated version of \thmhead that sets the note using [brackets] instead.

enter image description here

\documentclass{article}

\usepackage{amsthm}

\newtheorem{lemma}{Lemma}%

\renewcommand{\thmhead}[3]{\thmname{#1}\thmnumber{ #2}\thmnote{ [#3]}}

\begin{document}

\begin{lemma}[18]
This is an important theorem.
\end{lemma}

\end{document}

Note that this will hold for all theorem's defined. If you want a different for other theorems, then you need to set a specific style for each.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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