是否可以在類別下使用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.