我正在尝试获得如下所示的引用和参考书目:
有一句话,引用了 SCOTT (1991) 的一本书。然后是一些包含 STRATTON et al. 1981 的文本。
参考书目
SCOTT 1991:David A. Scott,《古代和历史金属的金相学和微观结构》,洛杉矶,1991 年。
STRATTON 等。1981 年:Carol Stratton 与 Miriam McNair Scott,《素可泰的艺术。泰国的黄金时代》,牛津、纽约、墨尔本,1981 年。
使用 lockstep 对原始问题的解决方案“在参考书目条目开头添加 [AuthorYear] 块”我已经很接近了,但大写字母和“et al.”不太协调。这是我目前得到的结果:
\begin{filecontents}{Test.bib}
@book{Scott1991,
address = {Los Angeles},
author = {Scott, David A.},
publisher = {Archetype Books},
title = {{Metallography and microstructure of ancient and historic metals}},
year = {1991}
}
@book{Stratton1981,
address = {Oxford, New York, Melbourne},
author = {Stratton, Carol and {McNair Scott}, Miriam},
publisher = {Oxford University Press},
title = {{The Art of Sukhothai. Thailand's Golden Age}},
year = {1981}
}
\end{filecontents}
\documentclass[ngerman]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[%
citestyle=authoryear-comp,%
bibstyle=authortitle-comp,%
backend=bibtex]{biblatex}%
\ExecuteBibliographyOptions{%
maxcitenames=1,%
language=ngerman,%
punctfont=true,%
autopunct=false,%
sorting=nyt}
% -- Publisher, Location, Date
\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
% -- Author-Year-Block at the beginning
\newcounter{mymaxcitenames}
\AtBeginDocument{%
\setcounter{mymaxcitenames}{\value{maxnames}}%
}
\renewbibmacro*{begentry}{%
\printtext[]{%
\begingroup
\defcounter{maxnames}{\value{mymaxcitenames}}%
\printnames{labelname}%
\setunit{\nameyeardelim}%
\usebibmacro{cite:labelyear+extrayear}%
\endgroup
}%
\addcolon\addspace
}
% -- Sorting, dots etc.
\DeclareNameAlias{sortname}{given-family}
% \DeclareNameFormat{labelname}{\MakeUppercase{#1}} % <--- Produces labels in Uppercase but also kills "et al."
\DeclareFieldFormat*{title}{#1\isdot}
\DeclareFieldFormat{parens}{#1}
\DeclareFieldFormat{booktitle}{#1\isdot}
\DefineBibliographyStrings{ngerman}{andothers = {et\addabbrvspace al\adddot}}
\renewcommand{\newunitpunct}{\addcomma\space}
\setlength{\bibitemsep}{\baselineskip}
\setlength{\bibhang}{0pt}
\bibliography{Test.bib}
\begin{document}
There's a sentence, where a book of \textcite{Scott1991} is quoted. Then some text with \cite{Stratton1981} in it.
\printbibliography
\end{document}
我很想得到您的启发,神奇地产生大写的名字和小写的“et al.”:)
^1 借自这里
答案1
只需添加\renewcommand*{\mkbibnamefamily}{\textsc}
到位\renewbibmacro*{begentry}
并\AtEveryCite
\AtEveryCite{\renewcommand*{\mkbibnamefamily}{\textsc}}
\renewbibmacro*{begentry}{%
\printtext{%
\begingroup
\renewcommand*{\mkbibnamefamily}{\textsc}%
\defcounter{maxnames}{\value{mymaxcitenames}}%
\printnames{labelname}%
\setunit{\nameyeardelim}%
\usebibmacro{cite:labelyear+extrayear}%
\endgroup
}%
\addcolon\addspace
}
在 3.3 之前的版本中,biblatex
情况正是如此\mkbibnamelast
。
或者您可以采用另一种方式,设为\textsc
默认设置,然后仅在参考书目标签后更改字体。
\renewcommand*{\mkbibnamefamily}{\textsc}
\renewbibmacro*{begentry}{%
\printtext{%
\begingroup
\defcounter{maxnames}{\value{mymaxcitenames}}%
\printnames{labelname}%
\setunit{\nameyeardelim}%
\usebibmacro{cite:labelyear+extrayear}%
\endgroup
}%
\addcolon\addspace
\renewcommand*{\mkbibnamefamily}[1]{##1}%
}