我在 biblatex 中遇到了一些奇怪的行为。参考书目中多条目引文的作者姓名被隐藏,但样式已定义(=authoryear,按照答案:定义围兜样式)并且我关闭了虚线选项(=false,按照答案:使 dashed=false)。
这是我的 MWE:
\documentclass[twoside,12pt]{book}
\usepackage[ pdftex,
pdfauthor={Michael J Lotinga},
pdftitle={The Title},
pdfsubject={The Subject},
pdfkeywords={Some Keywords},
pdfproducer={LaTeX with hyperref},
pdfcreator={pdflatex}
plainpages = false,
pdfpagelabels,
pdfpagelayout = OneColumn, % display single page, advancing flips the page - Sasa Tomic
bookmarks,
bookmarksopen = true,
bookmarksnumbered = true,
breaklinks = true,
linktocpage,
colorlinks = true,
linkcolor = cyan,
urlcolor = blue,
citecolor = magenta,
anchorcolor = green,
hyperindex = true,
hyperfigures]{hyperref}
\usepackage[sorting=nyt,
style=authoryear,
hyperref=true,
backref=true,
maxbibnames=99,
maxcitenames=1,
uniquelist=false,
uniquename = false,
dashed=false,
backend=biber]
{biblatex}
%Redefine citation commands for linking
\DeclareNameAlias{sortname}{last-first}
\DeclareCiteCommand{\cite}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{cite}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\cite}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{citeyear}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\parencite}[\mkbibparens]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{cite}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\parencite}[\mkbibparens]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{citeyear}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\footcite}[\mkbibfootnote]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{ \usebibmacro{cite}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{cite}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\textcite}
{\boolfalse{cbx:parens}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\usebibmacro{textcite}}}
{\ifbool{cbx:parens}
{\bibcloseparen\global\boolfalse{cbx:parens}}
{}%
\multicitedelim}
{\usebibmacro{textcite:postnote}}
\makeatother
\addbibresource{references.bib}
\DefineBibliographyStrings{english}{%
bibliography = {References},% replace "references" with "bibliography" for `book`/`report`
}
\begin{document}
\textcite{Taylor2004a}
\textcite{Taylor2004b}
\printbibliography
\end{document}
这是我的关联 .bib 文件
@proceedings{Taylor2004a,
author = {Thornely-Taylor, R.M.},
title = {The prediction of vibration, groundborne and structure-radiated noise from railways using finite difference
methods},
year = {2004},
maintitle = {Proceedings of the 8th International Workshop on Railway Noise},
eventtitle = {IWRN8},
eventdate = {2004-09-08/2004-09-11},
location = {Buxton, UK},
url = {http://www.ruperttaylor.com/RMTT_IWRN8_6.pdf},
}
@inproceedings{Taylor2004b,
author = {Thornely-Taylor, R.M.},
title = {The prediction of vibration, groundborne and structure-radiated noise from railways using finite difference
methods -- Part 1 -- theory},
maintitle = {Proceedings of the Institute of Acoustics},
year = {2004},
volume = {26},
part = {2},
pages = {69--79},
url = {http://www.ruperttaylor.com/RTT_IOA_SC2004.pdf},
}
以下是我得到的参考书目输出:
我希望输出结果列出每篇参考文献的作者,无论它是否与前一个(或在本例中为后一个)条目相同!有人能提出建议,看看哪里可能出了问题吗?我还有其他参考文献,它们的行为类似,但文章标题不太相似。
任何帮助都将受到赞赏。
答案1
正如我在评论中提到的,编译问题依赖于文件.bib
。此外,正如@moewe 所指出的,类别的使用@proceedings
不包含author
字段。因此,应该将其替换为@inproceedings
或将作者放入editor
字段中。
使用适当的文件语法进行新编译.bib
:
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@inproceedings{Taylor2004a,
author = {Thornely-Taylor, R.M.},
title = {The prediction of vibration, groundborne and structure-radiated noise from railways using finite difference methods},
year = {2004},
maintitle = {Proceedings of the 8th International Workshop on Railway Noise},
eventtitle = {IWRN8},
eventdate = {2004-09-08/2004-09-11},
location = {Buxton, UK},
url = {http://www.ruperttaylor.com/RMTT_IWRN8_6.pdf},
}
@inproceedings{Taylor2004b,
author = {Thornely-Taylor, R.M.},
title = {The prediction of vibration, groundborne and structure-radiated noise from railways using finite difference methods -- Part 1 -- theory},
maintitle = {Proceedings of the Institute of Acoustics},
year = {2004},
volume = {26},
part = {2},
pages = {69--79},
url = {http://www.ruperttaylor.com/RTT_IOA_SC2004.pdf},
}
\end{filecontents}
\addbibresource{\jobname.bib}
主要文件如下:
\begin{document}
\textcite{Taylor2004a}
\textcite{Taylor2004b}
\printbibliography
\end{document}
获得的输出: