Biblatex:文内数字引用和边注中的作者年份

Biblatex:文内数字引用和边注中的作者年份

我正在使用tufte-book带有 的类biblatex,我希望文内引用为数字,同时以作者年份样式显示为边注。更具体地说,我希望文中的引用如下所示

乱数假文 [12]

以及相应的边注

[12] 作者等,(年份)。

我尝试使用该natbib软件包执行此操作,但没有得到有效的结果。这就是为什么我转而使用,biblatex希望它的灵活性可以使任务更容易。

以下是一个例子:

\documentclass[nobib,notoc,nofonts,symmetric,justified,titlepage]{tufte-book}
\usepackage[T1]{fontenc}
\usepackage[style=verbose,citestyle=authoryear-ibid,autocite=footnote,backend=biber]{biblatex} 
\addbibresource{references.bib}

\begin{document}
    
I would like citations to appear in-text as [1,2] in the main text, and have a margin note specify the author and year\marginnote{[1] \cite{one}.}\marginnote{[2] \cite{two}.}. In the bibliography, I would like to have the references sorted by their number (which is not the case here).
\printbibliography
    
\end{document}

以及相应的references.bib文件

@article{one,
    author = {John Doe},
    title = {The ABC program system},
    journal = {Journal of Sci. Prog.},
    volume = {2},
    number = {1},
    pages = {5-10},
    year ={2021}
}


@book{two,
    title={A guide to Latex and Biblatex},
    author={Richard Doe},
    year={2000},
    publisher={Some Publisher}
}

答案1

在此处输入图片描述

一个好的解决方法是重新定义\citeauthor,使其显示数字引用,然后引用作者姓名和年份,如下所示

\let \citeauthorX \citeauthor

\renewcommand{\citeauthor}[1]{\cite{#1}\addnbspace\citeauthorX{#1}\addnbspace(\citeyear{#1})}

平均能量损失

\begin{filecontents*}{sample.bib}
    @book{kerr2018introduction,
        title={Introduction to Energy and Climate - Developing a Sustainable Environment},
        author={Julie Kerr},
        edition={1},
        year={2018},
        publisher={CRC Press}
    }
    @book{kanoğlu2010fundamentals,
        title={Fundamentals and Applications of Renewable Energy},
        author={Kanoğlu, Mehmet and Çengel, Yunus and Cimbala, John},
        edition={1},
        year={2020},
        publisher={McGraw Hill}
    }
    @book{twidell2015renewable,
        title={Renewable Energy Resources},
        author={Twidell, John and Weir, Tony},
        edition={3},
        year={2015},
        publisher={Routledge}
    }
\end{filecontents*}

\documentclass[nobib,justified,titlepage]{tufte-book}
\usepackage[T1]{fontenc}
\usepackage[style=numeric,citestyle=numeric,autocite=footnote,backend=biber,sorting=none]{biblatex} 
\addbibresource{sample.bib}

\let \citeauthorX \citeauthor

\renewcommand{\citeauthor}[1]{\cite{#1}\addnbspace\citeauthorX{#1}\addnbspace(\citeyear{#1})}

\begin{document}
    
    I would like citations to appear in-text as \cite{kerr2018introduction,kanoğlu2010fundamentals,twidell2015renewable} in the main text, and have a margin note specify the author and year \marginnote{\citeauthor{kerr2018introduction}.}\marginnote{\citeauthor{kanoğlu2010fundamentals,twidell2015renewable}.}. In the bibliography, I would like to have the references sorted by their number.
    
    \printbibliography[heading=subbibliography]
    
\end{document}

编辑

在此处输入图片描述

另一种变化是定义自定义命令,如下所示

\let \citenumeric \cite
\newcommand{\citem}[1]{\citenumeric{#1}\marginnote{\citenumeric{#1}\addnbspace\citeauthor{#1}\addnbspace(\citeyear{#1})}}

\newcommand{\citemX}[2]{\citenumeric{#1,#2}%
    \marginnote{\citenumeric{#1}\addnbspace\citeauthor{#1}\addnbspace(\citeyear{#1})};\addspace%
    \marginnote{\citenumeric{#2}\addnbspace\citeauthor{#2}\addnbspace(\citeyear{#2})}%
}

平均能量损失

\begin{filecontents*}{sample.bib}
    @book{kerr2018introduction,
        title={Introduction to Energy and Climate - Developing a Sustainable Environment},
        author={Julie Kerr},
        edition={1},
        year={2018},
        publisher={CRC Press}
    }
    @book{kanoğlu2010fundamentals,
        title={Fundamentals and Applications of Renewable Energy},
        author={Kanoğlu, Mehmet and Çengel, Yunus and Cimbala, John},
        edition={1},
        year={2020},
        publisher={McGraw Hill}
    }
    @book{twidell2015renewable,
        title={Renewable Energy Resources},
        author={Twidell, John and Weir, Tony},
        edition={3},
        year={2015},
        publisher={Routledge}
    }
\end{filecontents*}

\documentclass[nobib,justified,titlepage]{tufte-book}
\usepackage[T1]{fontenc}
\usepackage[style=numeric,citestyle=numeric,autocite=footnote,backend=biber,sorting=none]{biblatex} 
\addbibresource{sample.bib}

% Modify citation style
\let \citenumeric \cite
\newcommand{\citem}[1]{\citenumeric{#1}\marginnote{\citenumeric{#1}\addnbspace\citeauthor{#1}\addnbspace(\citeyear{#1})}}

\newcommand{\citemX}[2]{\citenumeric{#1,#2}%
    \marginnote{\citenumeric{#1}\addnbspace\citeauthor{#1}\addnbspace(\citeyear{#1})};\addspace%
    \marginnote{\citenumeric{#2}\addnbspace\citeauthor{#2}\addnbspace(\citeyear{#2})}%
}

\begin{document}
    
    This citation is fine~\citem{kerr2018introduction}, but this one~\citemX{kanoğlu2010fundamentals}{twidell2015renewable} now appears as two separate entries in the margin note, while still having the [2, 3] combined numeric style in-text.
    
    \printbibliography[heading=subbibliography]
    
\end{document}

相关内容