有没有允许我排版粗体超链接的选项?以下是解释我的问题的 MWE:
\documentclass[a4paper, 11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{hyperref}
\hypersetup{%
colorlinks=true,
linkcolor=black,
citecolor=Magenta}
\begin{filecontents}{biblio.bib}
@book{borgesESP,
author = {Borges, J. L.},
publisher = {Emecé},
year = {1956},
title = {Ficciones},
}
\end{filecontents}
\begin{document}
``Mirrors and fatherhood are abominable'' \cite{borgesESP}
\bibliography{biblio}{}
\bibliographystyle{amsalpha}
\hrulefill
\end{document}
我想让“Bor56”变成粗体。有什么办法吗?
简单的方法(修改\cite
命令)不会给出结果,或者出现错误:
\newcommand{\citebf}[2][]{\cite[#1]{\bf #2}}
认为\bf
在参考标签里面。
答案1
是的,你可以覆盖内核\@cite
宏来让它大胆的。但你可能还想在参考书目中加上标签\@biblabel
——大胆的:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{hyperref}
\hypersetup{%
colorlinks=true,
linkcolor=black,
citecolor=Magenta}
\begin{filecontents}{biblio.bib}
@book{borgesESP,
author = {Borges, J. L.},
publisher = {Emecé},
year = {1956},
title = {Ficciones},
}
\end{filecontents}
\makeatletter
\def\@cite#1#2{[\textbf{#1\if@tempswa , #2\fi}]}
\def\@biblabel#1{[\textbf{#1}]}
\makeatother
\begin{document}
``Mirrors and fatherhood are abominable'' \cite{borgesESP}
\bibliography{biblio}{}
\bibliographystyle{amsalpha}
\end{document}