我几乎成功地适应了一种biblatex
风格。
以下是最后几个步骤:
\documentclass{article}
\usepackage{filecontents}
\usepackage[T1]{fontenc}
\usepackage[style=authoryear, backend = biber, natbib, maxcitenames = 2, maxbibnames=99, minnames=1, giveninits, style=ext-authoryear, innamebeforetitle=true]{biblatex}
\DeclareNameFormat{family}{%
\usebibmacro{name:family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
\usebibmacro{name:andothers}}
\DeclareNameAlias{sortname}{family-given}
\renewcommand{\postnotedelim}{: }
\DeclareFieldFormat{postnote}{#1}
\DefineBibliographyExtras{british}{%
\DeclareBibstringSet{latin}{andothers,ibidem}%
\DeclareBibstringSetFormat{latin}{\mkbibemph{#1}}%
}
\DeclareFieldFormat[article,inbook,inproceedings,patent,thesis,unpublished,suppbook,suppcollection,suppperiodical]{title}{#1}
\DeclareFieldFormat[incollection]{title}{#1}
\DeclareFieldFormat[incollection]{booktitle}{\mkbibemph{#1}}
\renewbibmacro*{in:}{%
\setunit{\addcomma\space}%
\bibstring{in}%
\space}
\DeclareFieldFormat{pages}{#1}
\usepackage{biblatex}
\renewbibmacro{in:}{%
\ifentrytype{incollection}{\setunit{\addcomma\space}%
\bibstring{in}%
\space}{}}
\AtEveryBibitem{\clearfield{month}}
\AtEveryCitekey{\clearfield{month}}
\renewcommand*{\bibpagespunct}{\addcolon\space}
\AtBeginBibliography{%
\renewcommand*{\finalnamedelim}{%
\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
\addspace\&\space}%
}
\DeclareNameWrapperFormat{sortname}{%
\renewcommand*{\mkbibnamefamily}{\textsc}%
#1%
}
\renewbibmacro*{issue+date}{%
\setunit{\addcomma\space}% NEW
\iffieldundef{issue}
{\usebibmacro{date}}
{\printfield{issue}%
\setunit*{\addspace}%
\usebibmacro{date}}% NEW
\newunit}
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{\printnames[byeditor]{editor}%
\setunit{\addspace}%
\usebibmacro{byeditor+othersstrg}%
\clearname{editor}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}
\DeclareDelimFormat[bib]{innametitledelim}{\addspace}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\usepackage{xpatch}
\xpatchbibmacro{byeditor+othersstrg}{\printtext}{\printtext[parens]}{}{}
\newenvironment{hanglist}[1][\parindent]{%
\begin{list}{}{%
\setlength{\leftmargin}{#1}
\setlength{\labelwidth}{0pt}
\setlength{\labelsep}{0pt}
\setlength{\itemindent}{-#1}}
}{%
\end{list}
}
\begin{filecontents}[force]{\jobname.bib}
@incollection{key,
address = {Vienna},
edition = {Österreichischen Akademie der Wissenschaften},
title = {Cremation burials in {Greece} from the {Late} {Bronze} {Age} to the {Early} {Iron} {Age}: continuity or change?},
booktitle = {Brandbestattungen von der mittleren {Donau} bis zur Ägäis zwischen 1300 und 750 v. {Chr}.},
author = {Ruppenstein, Florian},
editor = {Lochner, M. and Ruppenstein, Florian},
year = {2013},
pages = {185--196},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
This is the good reference \citep{key}.
\printbibliography
\noindent Expected output:
\begin{hanglist}[4ex]
\item
\textsc{Ruppenstein}, F. 2013. Cremation burials in Greece from the Late Bronze Age to the Early Iron Age: continuity or change?, in M. Lochner \& F. Ruppenstein (ed.) \emph{Brandbestattungen von der mittleren Donau bis zur Ägäis zwischen 1300 und 750 v. Chr.}: 185--196. Vienna: Österreichischen Akademie der Wissenschaften.
\end{hanglist}
\end{document}
有人可以帮我完成或者清理一下我的脚本吗?