是否可以在类别下插入指向参考书目本身的交叉引用链接(而不仅仅是指向参考书目中的个别项目) biblatex
,以及hyperref
、和?cleverref
memoir
也就是说,如以下来源所示,可以在哪里创建什么标签以及如何创建,以便\cref{WHAT}
前言中显示的标签指向参考书目?(这样单击该链接就会转到参考书目第一页。)
\documentclass[12pt]{memoir}
\usepackage[backend=bibtex]{biblatex}
\usepackage{hyperref}
\hypersetup{hyperindex,colorlinks, citecolor=red}
\begin{filecontents}{biblatexdoc.bib}
@article{Archimedes200,author = {Archimedes},title = {Pi's the limit },
journal = {Syracuse J. Gastronom.\ Math.}, year = {200BCE},volume = {10},pages={\textsc{CCCXV}--\textsc{CCCXIV}}}
@article{EulerE1776,Author = {Euler, Leonhard},Title = {All about E},
Journal = {Math.\ Psychol.},Year = {1776},Volume = {4},pages={1--2718}}
\end{filecontents}
\addbibresource{biblatexdoc}
\begin{document}
\frontmatter
\tableofcontents
\chapter{Prefarc}
The Bibliography (\cref{WHAT}) includes only works actually cited.
\chapter{Math}
Archimedes~\cite{Archimedes200} and Euler~\cite{EulerE1776} studied the constants, $\pi$ and $e$, respectively.
\printbibliography
\end{document}
答案1
\nameref{WHAT}
似乎是一个比更好的变体\cref{WHAT}
,后者需要一个计数器的标签(嗯,\nameref
也需要这个,但是用包装器伪造标签更容易,比如说,\biblabel
它将\label
在内部使用并自动将超链接添加到参考书目。
\documentclass[12pt]{memoir}
\usepackage[backend=bibtex]{biblatex}
\usepackage{hyperref}
\hypersetup{hyperindex,colorlinks, citecolor=red}
\usepackage{cleveref}
\begin{filecontents}{biblatexdoc.bib}
@article{Archimedes200,author = {Archimedes},title = {Pi's the limit },
journal = {Syracuse J. Gastronom.\ Math.}, year = {200BCE},volume = {10},pages={\textsc{CCCXV}--\textsc{CCCXIV}}}
@article{EulerE1776,Author = {Euler, Leonhard},Title = {All about E},
Journal = {Math.\ Psychol.},Year = {1776},Volume = {4},pages={1--2718}}
\end{filecontents}
\addbibresource{biblatexdoc}
\makeatletter
\newcommand{\biblabel}[1]{%
\phantomsection
\edef\@currentlabel{\bibname}%
\edef\@currentlabelname{\bibname}% Provide the \nameref - anchor name
\label{#1}%
}
\makeatother
\begin{document}
\frontmatter
\tableofcontents
\chapter{Preface}
The \nameref{WHAT} includes only works actually cited.
\chapter{Math}
Archimedes~\cite{Archimedes200} and Euler~\cite{EulerE1776} studied the constants, $\pi$ and $e$, respectively.
\printbibliography\biblabel{WHAT}
\end{document}
更新
支持多个参考书目。
\documentclass[12pt]{memoir}
\usepackage[backend=bibtex]{biblatex}
\usepackage{hyperref}
\hypersetup{hyperindex,colorlinks, citecolor=red}
\usepackage{cleveref}
\begin{filecontents}{biblatexdoc.bib}
@article{Archimedes200,author = {Archimedes},title = {Pi's the limit },
journal = {Syracuse J. Gastronom.\ Math.}, year = {200BCE},volume = {10},pages={\textsc{CCCXV}--\textsc{CCCXIV}}}
@article{EulerE1776,Author = {Euler, Leonhard},Title = {All about E},
Journal = {Math.\ Psychol.},Year = {1776},Volume = {4},pages={1--2718}}
\end{filecontents}
\addbibresource{biblatexdoc}
\makeatletter
\define@key{blx@bib2}{title}{\gdef\blx@thetitle{#1}}
\newcommand{\biblabel}[1]{%
\phantomsection
\edef\@currentlabel{\bibname}%
\@ifundefined{blx@thetitle}{%
\edef\@currentlabelname{\bibname}%
}{%
\edef\@currentlabelname{\blx@thetitle}%
}%
\label{#1}%
}
\makeatother
\begin{document}
\frontmatter
\tableofcontents
\chapter{Preface}
The \nameref{WHAT} includes only works actually cited, however, there is another \nameref{WHATOTHER}.
\chapter{Math}
Archimedes~\cite{Archimedes200} and Euler~\cite{EulerE1776} studied the constants, $\pi$ and $e$, respectively.
\printbibliography[title={My sophisticated bibliography}]\biblabel{WHAT}
\printbibliography[title=Bib2]\biblabel{WHATOTHER}
\end{document}
多页书目更新
\documentclass[12pt]{memoir}
\usepackage[backend=bibtex]{biblatex}
\usepackage{hyperref}
\hypersetup{hyperindex,colorlinks, citecolor=red}
%\usepackage{msc}
\usepackage{cleveref}
\begin{filecontents}{biblatexdoc.bib}
@article{Archimedes200,author = {Archimedes},title = {Pi's the limit },
journal = {Syracuse J. Gastronom.\ Math.}, year = {200BCE},volume = {10},pages={\textsc{CCCXV}--\textsc{CCCXIV}}}
@article{EulerE1776,Author = {Euler, Leonhard},Title = {All about E},
Journal = {Math.\ Psychol.},Year = {1776},Volume = {4},pages={1--2718}}
\end{filecontents}
\addbibresource{biblatexdoc}
\addbibresource{biblatex-examples}
\makeatletter
\define@key{blx@bib2}{title}{\gdef\blx@thetitle{#1}}
\newcommand{\biblabel}[1]{%
\phantomsection
\@ifundefined{blx@thetitle}{%
\edef\@currentlabelname{\bibname}%
\edef\@currentlabel{\bibname}%
}{%
\edef\@currentlabel{\blx@thetitle}%
\edef\@currentlabelname{\blx@thetitle}%
}%
\label{#1}%
}
\newcommand{\biblabelnote}[1]{%
\defbibnote{#1}{\biblabel{#1}}%
}
\makeatother
\begin{document}
\frontmatter
\tableofcontents
\chapter{Preface}
The \nameref{WHAT} includes only works actually cited, however, there is another \nameref{WHATOTHER}.
\chapter{Math}
\nocite{*}
Archimedes~\cite{Archimedes200} and Euler~\cite{EulerE1776} studied the constants, $\pi$ and $e$, respectively.
\biblabelnote{WHAT}
\printbibliography[title={My sophisticated bibliography},prenote={WHAT}]
\biblabelnote{WHATOTHER}
\printbibliography[title=Bib2,prenote={WHATOTHER}]
\end{document}
答案2
另一种可能性(虽然不太复杂;部分被采纳)从这里): 将 放在\label
下方\printbibliography
。在章节 前言 中写:
The \hyperref[WHAT]{Bibliography} includes only works actually cited.