3

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}
1
  • 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, 2019 at 11:34

1 Answer 1

3

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .