如何避免定理环境(作者年份)参数的括号?

如何避免定理环境(作者年份)参数的括号?

有没有办法避免在定理环境的参数中使用括号?

我想看到的Theorem 1 [1].而不是Theorem 1 ([1]).

这是一个 mwe。

\documentclass{article}
\usepackage{amsthm}
\usepackage{biblatex}

\newtheorem{theorem}{Theorem}

\begin{filecontents*}[overwrite]{general.bib}
@misc{somebody,
  author = {Somebody},
  year = {2000},
  title = {A generic title},
  }
\end{filecontents*}
\addbibresource{general.bib}


\begin{document}
%
\begin{theorem}[Somebody]
This is an amazing theorem.
\end{theorem}
%
\begin{theorem}[\cite{somebody}]
This is an amazing theorem.
\end{theorem}
%
\begin{theorem}\cite{somebody}
This is an amazing theorem.
\end{theorem}

\noindent The following look is what I am trying for.\\

\noindent \textbf{Theorem 4 \cite{somebody}.}
This is an amazing theorem.
%
\printbibliography
%
\end{document}

代码给出以下输出。

在此处输入图片描述

一个解决方案是打印不带括号的引文。因此,它看起来会像Theorem 1 (1).;这不一致。

答案1

您可以为该任务定义一个特殊的定理环境。

\begin{filecontents*}[overwrite]{\jobname.bib}
@misc{somebody,
  author = {Somebody},
  year = {2000},
  title = {A generic title},
  }
\end{filecontents*}

\documentclass{article}
\usepackage{amsthm}
\usepackage{biblatex}

\addbibresource{\jobname.bib}

\newtheorem{theorem}{Theorem}

\newtheoremstyle{noparentheses}
  {\topsep}   % ABOVESPACE
  {\topsep}   % BELOWSPACE
  {\itshape}  % BODYFONT
  {0pt}       % INDENT (empty value is the same as 0pt)
  {\bfseries} % HEADFONT
  {.}         % HEADPUNCT
  {5pt plus 1pt minus 1pt} % HEADSPACE
  {\thmname{#1} \thmnumber{#2} \thmnote{#3}}          % CUSTOM-HEAD-SPEC
\theoremstyle{noparentheses}
\newtheorem{theorem*}[theorem]{Theorem}

\begin{document}

\begin{theorem}[Somebody]
This is an amazing theorem.
\end{theorem}

\begin{theorem*}[\cite{somebody}]
This is an amazing theorem.
\end{theorem*}

\noindent The following look is what I am trying for.

\vspace{\topsep}

\noindent \textbf{Theorem 3 \cite{somebody}.}
\textit{This is an amazing theorem.}

\printbibliography

\end{document}

新的定理样式与默认的相同plain,但它省略了归属周围的括号(使用时最好有一个theorem*)。

在此处输入图片描述

相关内容