我正在使用的解决方案卡尔科勒到biblatex:右边距对齐的 pagebackref 引用和结果一样。但是,反向引用列表不会换行,如果条目被引用太频繁,并且反向引用列表超出页边距,则会出现问题。
有没有办法 a) 让它们在页边距之前中断,以及 b) 必要时将下一个 bib 条目向下移动。我还对其他具有视觉吸引力的显示反向引用的方式感兴趣。
平均能量损失
\documentclass{article}
\usepackage{times}
\usepackage{csquotes}
\usepackage{xcolor}
\usepackage[style=numeric-comp,backref=true,backend=biber]{biblatex}
\usepackage{filecontents}
\usepackage{pgffor}
\begin{filecontents}{\jobname.bib}
@book{saad00,
title = {Iterative Methods for Sparse Linear Systems},
year = {2000},
author = {Y. Saad}}
@book{vonNMorg44,
title = {Theory of Games and Economic Behavior},
year = {1944},
author = {J. von Neumann and O. Morgenstern}}
\end{filecontents}
\addbibresource{\jobname.bib}
% pagereference in the right margin
\renewbibmacro*{pageref}{%
\iflistundef{pageref}
{\renewcommand{\finentrypunct}{\addperiod}}
{\renewcommand{\finentrypunct}{\addspace}%
\printtext{\addperiod\hfill\rlap{\hskip15pt\colorbox{blue!5}{\scriptsize\printlist[pageref][-\value{listtotal}]{pageref}}}}}}
\begin{document}
\foreach \n in {0,...,20}{text \cite{vonNMorg44} \newpage text \newpage}
\nocite{saad00}
\printbibliography
\end{document}
答案1
我刚刚在德国 goLaTeX 论坛上回答了一个类似的问题https://golatex.de/viewtopic.php?f=15&t=23075。
该解决方案不仅将后向引用放在使\parbox
列表可拆分的位置,而且还使用了不同的方法在页边距中打印,从而获得更好的结果(它将页边距注释与条目的第一行而不是最后一行对齐)。
\documentclass[british]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{xcolor}
\usepackage[style=numeric-comp,backref=true,backend=biber]{biblatex}
\usepackage{pgffor}
\newlength{\marginwritesep}
\setlength{\marginwritesep}{0.5em}
\newlength{\marginwritewidth}
\setlength{\marginwritewidth}{3cm}
% based on egreg's (https://tex.stackexchange.com/users/4427/egreg)
% answer to https://tex.stackexchange.com/a/123451/35864
% originally CC BY-SA 3.0, but dual-licensed under LPPL
% see https://tex.meta.stackexchange.com/a/3333/35864
\newcommand{\marginwrite}[1]{%
\strut\vadjust{%
\vbox to 0pt{%
\kern-\the\dimexpr\ht\strutbox+\dp\strutbox\relax
\hfill\rlap{\kern\marginwritesep
#1}%
\vss
}%
}%
}
\newcommand*{\simplecolorparbox}[3]{%
\colorbox{#1}{\parbox{#2}{#3}}}
\makeatletter
\renewbibmacro*{begentry}{%
\iflistundef{pageref}
{}
{\marginwrite{%
\simplecolorparbox{blue!5}{\marginwritewidth}{%
\scriptsize\raggedright
\printlist[pageref][-\value{listtotal}]{pageref}}}%
\blx@initunit}}
\makeatother
\renewbibmacro*{pageref}{}%
\addbibresource{biblatex-examples.bib}
\begin{document}
\foreach \n in {0,...,20}{text \cite{sigfridsson} \newpage text \newpage}
\nocite{worman}
\printbibliography
\end{document}