![Как сделать текст из \cite[]{} некурсивным в теореме, используя amsthm и класс article?](https://rvso.com/image/476241/%D0%9A%D0%B0%D0%BA%20%D1%81%D0%B4%D0%B5%D0%BB%D0%B0%D1%82%D1%8C%20%D1%82%D0%B5%D0%BA%D1%81%D1%82%20%D0%B8%D0%B7%20%5Ccite%5B%5D%7B%7D%20%D0%BD%D0%B5%D0%BA%D1%83%D1%80%D1%81%D0%B8%D0%B2%D0%BD%D1%8B%D0%BC%20%D0%B2%20%D1%82%D0%B5%D0%BE%D1%80%D0%B5%D0%BC%D0%B5%2C%20%D0%B8%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D1%83%D1%8F%20amsthm%20%D0%B8%20%D0%BA%D0%BB%D0%B0%D1%81%D1%81%20article%3F.png)
У меня есть tex-файл:
\documentclass[11pt]{amsart}
\usepackage{amssymb,amsthm,enumitem,mathtools,fullpage,microtype}
\usepackage[hypertexnames=false]{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=blue,
urlcolor=red,
citecolor=magenta
}
\usepackage[noabbrev,capitalize,nameinlink]{cleveref}
\usepackage{autonum}
\numberwithin{equation}{section}
\newtheorem{theorem}{Theorem}[section]
\theoremstyle{definition}
\newtheorem{assumption}[theorem]{Assumption}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\TT}{\mathbb{T}}
\setlist{font=\normalfont}
\begin{document}
\section{Introduction}
\begin{assumption} \label{main_assmpt1}
There exist constants $C>0, \alpha \in (0, 1), \beta \in (0, 1)$ such that for $t \in \TT$ and $x, y \in \RR^d$:
\begin{enumerate}[label=(A\arabic*)]
\item $\nu$ has a density $\ell_\nu \in C^\alpha_b (\RR^d)$.
\item $a_t$ is invertible.
\end{enumerate}
\end{assumption}
\begin{theorem}
Let \cref{main_assmpt1} hold.
\begin{enumerate}
\item \cite[Theorem 2.1]{mckean1966class} ...
\end{enumerate}
\end{theorem}
\begin{thebibliography}{10}
\bibitem{mckean1966class}
Henry~P McKean~Jr.
\newblock A class of markov processes associated with nonlinear parabolic
equations.
\newblock {\em Proceedings of the National Academy of Sciences},
56(6):1907--1911, 1966.
\end{thebibliography}
\end{document}
Мне особенно нравится некурсивное название цитируемой теоремы:
Когда я перешел с \documentclass[11pt]{amsart}
на \documentclass[11pt]{article}
, я потерял этот желаемый внешний вид:
Не могли бы вы объяснить, как сохранить эту эстетическую особенность в классе article
?
решение1
amsart
использует:
\def\@citestyle{\m@th\upshape\mdseries}
\let\citeform\@firstofone
\def\@cite#1#2{{%
\@citestyle[\citeform{#1}\if@tempswa, #2\fi]}}
для явного задания cites \upshape
. Команда LaTeX по умолчанию cite не делает ничего подобного. \@cite
Определение LaTeX по умолчанию:
\def\@cite#1#2{[{#1\if@tempswa , #2\fi}]}
Итак, внутри теоремы шрифт тела теоремы используется и для цитирования. Но вы можете переопределить его аналогично, скопировав код amsart
:
\documentclass[11pt]{article}
\usepackage{amsthm}
\usepackage{amssymb,enumitem,mathtools,fullpage,microtype}
\usepackage[hypertexnames=false]{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=blue,
urlcolor=red,
citecolor=magenta
}
\usepackage[noabbrev,capitalize,nameinlink]{cleveref}
\usepackage{autonum}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\TT}{\mathbb{T}}
\setlist{font=\normalfont}
\numberwithin{equation}{section}
\newtheorem{theorem}{Theorem}[section]
\theoremstyle{definition}
\newtheorem{assumption}[theorem]{Assumption}
\makeatletter
\def\@citestyle{\m@th\upshape\mdseries}
\let\citeform\@firstofone
\def\@cite#1#2{{%
\@citestyle[\citeform{#1}\if@tempswa, #2\fi]}}
\makeatother
\begin{document}
\section{Introduction}
\begin{assumption} \label{main_assmpt1}
There exist constants $C>0, \alpha \in (0, 1), \beta \in (0, 1)$ such that for $t \in \TT$ and $x, y \in \RR^d$:
\begin{enumerate}[label=(A\arabic*)]
\item $\nu$ has a density $\ell_\nu \in C^\alpha_b (\RR^d)$.
\item $a_t$ is invertible.
\end{enumerate}
\end{assumption}
\begin{theorem}
Let \cref{main_assmpt1} hold.
\begin{enumerate}
\item \cite[Theorem 2.1]{mckean1966class} ...
\end{enumerate}
\end{theorem}
\begin{thebibliography}{10}
\bibitem{mckean1966class}
Henry~P McKean~Jr.
\newblock A class of markov processes associated with nonlinear parabolic
equations.
\newblock {\em Proceedings of the National Academy of Sciences},
56(6):1907--1911, 1966.
\end{thebibliography}
\end{document}
Примечания:
Код выше работает, если вы действительно делаете свою библиографию вручную. Если вы используете пакет вроде
biblatex
, пожалуйста, ознакомьтесь с руководством этого пакета для получения дополнительной информации о форматировании ссылок. И да, я бы рекомендовал использовать такой пакет, т.е.biblatex
.Если вы хотите, чтобы не только ссылки, но и остальная часть текста теоремы не использовали курсивное начертание, следует либо
\newtheoremstyle
определить соответствующий стиль, либо использовать, например,\theoremstyle{definition}
.Если вы, например, используете
natbib
вы можете вместо этого использовать что-то вроде\bibpunct{\upshape\mdseries[}{]}{,}{n}{}{,}
.natbib
Более подробную информацию о смотрите в руководстве\bibpunct
.