考虑以下 MWE:
\documentclass[a4paper]{scrartcl}
% PACKAGES LOADING
\usepackage[dvipsnames]{xcolor}
\usepackage{amsmath, mathtools, amsthm, mathrsfs, amssymb}
\usepackage[framemethod=tikz]{mdframed}
% THEOREM DEFINITION
\newtheoremstyle{mystyle0}{0}{}{\itshape \setlength\parindent{0pt}}{}{\scshape}{}{ }{\thmname{#1} \thmnumber{#2}.\thmnote{#3}}
\theoremstyle{mystyle0}
\newmdtheoremenv[skipabove=20pt,skipbelow=10pt,innerleftmargin=0.0cm,innerrightmargin=0.0cm,innertopmargin=0.0cm,innerbottommargin=0.0cm,backgroundcolor=White!10,linecolor=Black!60,linewidth=0.5mm,hidealllines=true,nobreak=false,roundcorner=2.5pt,startinnercode={\deffootnotemark{}\deffootnote{0pt}{0pt}{}}]{theorem}{Theorem}[]
% REFERENCES SETTINGS
\usepackage[colorlinks=true,urlcolor=blue,linkcolor=black]{hyperref}
\usepackage[capitalise,noabbrev]{cleveref}
\hypersetup{allcolors=Blue}
% DOCUMENT
\begin{document}
\begin{theorem}[A Fancy Theorem Title]\label{theorem1}
A fancy theorem.
\end{theorem}
The following expression, in blue, \nameref{theorem1}, should appear in small caps.
\end{document}
我想\nameref{}
匹配定理名称的样式(即,它应该以小写字母显示定理名称)。我尝试添加\renewcommand{\nameref}{\scshape{\nameref}}
和类似的命令,但都没有用。如下图所示,输出是小写字母。
非常感谢大家抽出时间。
答案1
我找到了解决方案这里。我只需要在序言中加入这一段:
\AtBeginDocument{
\let\namerefOld\nameref
\renewcommand{\nameref}[1]{\textsc{\namerefOld{#1}}}
}