我正在尝试实现一种 biblatex 风格,它可以执行以下操作:
在这种情况下\parencite{}
我会得到...like that (Smith 2010).
在这种情况下\textcite{}
我会得到Smith (2010) says that...
但在参考文献中我会得到SMITH, J. Bookname.
我怎样才能实现这个目标?
我用\usepackage[style=authoryear, firstinits=true]{biblatex}
我试过了\renewcommand*{\mkbibnamelast}[1]{\MakeUppercase{#1}}
,但这会使文本中的名字变成大写,这是不可取的,尤其是\textcite{}
答案1
您需要仅针对参考书目更改宏,并biblatex
提供一个钩子来以以下形式执行此操作\AtBeginBibliography
:
\documentclass{article}
\usepackage[style=authoryear, firstinits=true]{biblatex}
\addbibresource{biblatex-examples.bib}
\AtBeginBibliography{\renewcommand*{\mkbibnamelast}[1]{\MakeUppercase{#1}}}
\begin{document}
Here is some text \parencite{angenendt}. Note that \textcite{angenendt} mentions something.
\printbibliography
\end{document}
得出的结果为:
编辑
当前版本的biblatex
命名方案略有不同,它们的代码应该是:
\documentclass{article}
\usepackage[style=authoryear, giveninits=true]{biblatex}
\addbibresource{biblatex-examples.bib}
\AtBeginBibliography{\renewcommand*{\mkbibnamefamily}[1]{\MakeUppercase{#1}}}
\begin{document}
Here is some text \parencite{angenendt}. Note that \textcite{angenendt} mentions something.
\printbibliography
\end{document}