通过反向引用自定义参考书目样式

通过反向引用自定义参考书目样式

我想在每个书目条目的末尾加上句号,然后放在指向引文的下标页码之前。例如,它显示为:

[1] Vladimir I Arnold. Mathematical Methods of Classical Mechanics. Vol. 60. Graduate Texts in Mathematics. Springer Science & Business Media, 2013 (p. 2)

我喜欢将其显示为:

[1] Vladimir I Arnold. Mathematical Methods of Classical Mechanics. Vol. 60. Graduate Texts in Mathematics. Springer Science & Business Media, 2013. (p. 2)

我想对其进行配置,以便单击页码(p. 2)可以将 pdf 查看器带到页面上的特定引用点2

这是我的 MWE:

\documentclass[a4paper]{report}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \input{setup/preamble}
% basics
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{url}
\usepackage{hyperref}
\hypersetup{
    colorlinks,
    linkcolor={black},
    citecolor={black},
    urlcolor={blue!80!black},
    % backref=true, 
    % pagebackref=true
}

% Page Margins
\usepackage[
    margin=2.8cm, 
    % top=2.8cm, bottom=2.8cm,
    % left=1in, right=1in, 
    % headheight=14.5pt
    ]{geometry}

% \usepackage{graphicx}
% \usepackage{float}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{lipsum}

% bibliography
\usepackage[
    backend=biber, 
    backref=true, 
    style=numeric, 
    sortcites=true, 
    sorting=none, 
    defernumbers=true
]{biblatex}       % bibliography  % https://www.overleaf.com/learn/latex/bibliography_management_with_biblatex
\usepackage{xurl}                % handling the urls in bib file and it should be loaded after loading biblatex 

%% Change formatting of back references % https://tex.stackexchange.com/a/606518/114006
\DefineBibliographyStrings{english}{
   backrefpage={p.},
  % backrefpage={},
   backrefpages={pp.}
  % backrefpages={
}
\renewcommand*{\finentrypunct}{}
\usepackage{xpatch}

% \DeclareFieldFormat{backrefparens}{\mkbibparens{#1\addperiod}}
\DeclareFieldFormat{backrefparens}{\raisebox{-4pt}{\scriptsize{\mkbibparens{#1}}}}
\xpatchbibmacro{pageref}{parens}{backrefparens}{}{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{filecontents}{ref.bib}
@book{arnold2013mathematical,
  title = {Mathematical {{Methods}} of {{Classical Mechanics}}},
  author = {Arnold, Vladimir I},
  date = {2013},
  series = {Graduate {{Texts}} in {{Mathematics}}},
  volume = {60},
  publisher = {{Springer Science \& Business Media}}
}
\end{filecontents}

\addbibresource{ref.bib} 

\title{Lecture Notes}
\author{me}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\renewcommand\thepage{Title}
\maketitle
\newpage
\pagenumbering{roman}
\pdfbookmark{\contentsname}{toc}              
\setcounter{tocdepth}{0}
\tableofcontents
\newpage
\pagenumbering{arabic}

% start lectures
\chapter{Sat, Mar 18, 2023}

\lipsum[1] \cite{arnold2013mathematical} 
\lipsum \cite{arnold2013mathematical} 

% \intput{endpage}

% Bibliography
\printbibheading[heading=bibintoc, title={\protect\numberline{}Recommended Resources}] % https://tex.stackexchange.com/a/222961/114006
\printbibliography[type=book,heading=subbibliography,title={Books}] % https://www.overleaf.com/learn/latex/Articles/Getting_started_with_BibLaTeX
\printbibliography[nottype=book,heading=subbibliography,title={Others}]

\end{document}

最初,我也想在书目标签中附加反向引用链接。但我意识到这没有意义,因为可能会出现同一书目条目被多次引用的情况。

答案1

如果我理解正确的话,您可以在用 抑制最后一个点之后通过重新插入它来修复它\renewcommand*{\finentrypunct}{}

我将您的改为\DeclareFieldFormat

\DeclareFieldFormat{backrefparens}{\unskip.~\raisebox{-4pt}{\scriptsize{\mkbibparens{#1}}}}

...还有它似乎上班。

在此处输入图片描述

关于链接回号码,我认为应该是可能的,但它可能会链接到最后的引用......所以我同意现在这样更好。

对于第二个问题,这似乎是使用 hyperref 和 backref 精确反向引用目标(但要注意,这是一个相当古老的答案,而且hyperref最近发生了很大的变化;所以可能有更好的方法和/或答案可能有效或无效)。

相关内容