更改 biblatex 中的部分样式

更改 biblatex 中的部分样式

我是新手biblatex,我想设置我的参考书目。我搜索了一下,找到了一种几乎正确的样式。

有没有简单的方法可以改变 Overleaf 中的部分样式?

下面是我想要对@Incollection、@Inbook、@Book 和@Article 进行更改的图片。

在此处输入图片描述

最后,我让 MWE 制作参考书目和我希望它看起来的手动版本。

\documentclass[a4paper,
oneside,
,
12pt]{memoir}

\usepackage[utf8]{inputenc} 
\usepackage[english]{babel} 

\usepackage{csquotes}
\usepackage[
backend=biber,
style=nature,
sorting=none,
maxbibnames=99
]{biblatex}

´´´
\begin{filecontents}{biblio.bib}
    @incollection{InCol,
        author = {Hrdy, Sarah Blaffer},
        year = {2007},
        pages = {39--68},
        title = {Evolutionary Context of Human Development: The Cooperative Breeding Model},
        publisher ={Oxford University Press, Oxford},
        booktitle = {Family Relationships: An Evolutionary Perspective},
        editor={Salmon, Catherine A and Todd K. Shackelford}
    }
    
    
    @inbook{inBook,
        author = {Creel, S and Creel, N.M},
        chapter = {Demography — Survival and Reproduction},
        title = {The African Wild Dog: Behavior, Ecology, and Conservation},
        year = {2019},
        publisher = {Princeton University Press, New Jersey},
        pages = {145--178}
    }
    
    
    @book{Book,
        author = {Estes, Richard},
        year = {1991},
        title = {The behavior guide to African mammals : including hoofed mammals, carnivores, primates},
        publisher = {University of California Press, Berkeley},
        pages = {134}
    }
    
    
    @article{Article,
        title = {Relatedness and conflict over optimal group size},
        journal = {Trends in Ecology $\&$ Evolution},
        volume = {9},
        number = {4},
        pages = {117--119},
        year = {1994},
        author = {Bruce H. Rannala and Charles R. Brown}
    }
\end{filecontents}



\addbibresource{biblio.bib}



\begin{document}
    
    Four types of citations which needs to be altered:
    \begin{enumerate}
        \item Incollection: \cite{InCol}
        \item Inbook: \cite{inBook}
        \item Book: \cite{Book}
        \item Article : \cite{Article}
    \end{enumerate}
    
    \printbibliography[heading=subbibliography]
    
    
    
    \textbf{How i want it to look}
    
    
    \begin{enumerate}[1.  ]
        \item
        Hrdy, S. B. Evolutionary Context of Human Development: The Cooperative Breeding Model. In: Salmon, C. A. $\&$ Shackelford, T. K. (eds.), \emph{Family Relationships: An Evolutionary Perspective}, pp. 39--68. Oxford University Press, Oxford, 2007 
        \item
        Creel,  S.  $\&$  Creel,  N. Demography -- Survival and Reproduction. In: \emph{The African Wild Dog: Behavior, Ecology, and Conservation}, pp. 145--178. Princeton  University  Press,  New Jersey, 2019
        \item
        Estes,  R. \emph{The behavior guide to African mammals: including hoofed mammals, carnivores, primates}, pp. 134. University  of  California  Press, Berkeley, 1991
        \item 
        Rannala, B. H. $\&$ Brown, C. R. Relatedness and conflict over optimal group size. \emph{Trends in Ecology $\&$ Evolution} \textbf{9}: 117--119, 1994
    \end{enumerate}
    
    
    
    
\end{document}

答案1

如果没有现成的样式满足您的需求,我建议您从标准样式(或我的biblatex-ext包中的样式)开始,而不是从定制的第三方样式开始。标准样式biblatex-ext旨在实现定制,而许多贡献的样式则不是。

下面讨论了一些较容易的修改自定义 biblatex 样式的指南. 部分细节来自在 biblatex 中将编辑姓名后跟 (Ed./Eds.) 和标题前的逗号此书目的参考书目风格是什么?。其他的事情应该可以从所涉及的宏的名称中变得清晰。可以在biblatex文档biblatex-ext文档

如果您对代码有任何疑问,无法通过链接的资源回答,请在评论中提问。

\documentclass[a4paper, oneside, 12pt]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{csquotes}
\usepackage[
  backend=biber,
  style=ext-numeric,
  sorting=none,
  maxbibnames=99,
  giveninits=true,
  innamebeforetitle=true,
  articlein=false,
]{biblatex}

\DeclareNameAlias{author}{sortname}
\DeclareNameAlias{editor}{sortname}
\DeclareNameAlias{translator}{sortname}

\DeclareNameAlias{sortname}{family-given}

\DeclareDelimFormat{finalnamedelim}{\addspace\&\space}

\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}

\DeclareFieldAlias{translatortype}{editortype}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}

\DeclareDelimFormat[bib]{innametitledelim}{\addcomma\space}

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1\isdot}

\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}
\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}
\DeclareFieldFormat[article,periodical]{pages}{#1}
\DeclareFieldFormat{issuedate}{#1}


\renewcommand*{\volnumdelim}{}
\newcommand*{\artbibpagespunct}{\addcolon\space}
\newcommand*{\artbibeidpunct}{\artbibpagespunct}
\newcommand*{\pagedatedelim}{\addcomma\space}

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\jourvoldelim}%
  \iffieldundef{series}
    {}
    {\setunit*{\jourserdelim}%
     \printfield{series}%
     \setunit{\servoldelim}}%
  \printfield{volume}%
  \setunit*{\volnumdelim}%
  \printfield{number}%
  \setunit{\artbibeidpunct}%
  \printfield{eid}%
  \setunit{\artbibpagespunct}%
  \printfield{pages}%
  \clearfield{pages}%
  \setunit{\pagedatedelim}%
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \newunit}

\renewbibmacro*{edition}{%
  \printfield{edition}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \clearfield{pages}%
  \setunit{\bibeidpunct}%
  \printfield{eid}%
  \clearfield{eid}%
}

\renewbibmacro*{pubinstorg+location+date}[1]{%
  \printlist{#1}%
  \setunit*{\publocdelim}%
  \printlist{location}%
  \setunit*{\locdatedelim}%
  \usebibmacro{date}%
  \newunit}

\begin{filecontents}{\jobname.bib}
@incollection{InCol,
  author       = {Hrdy, Sarah Blaffer},
  year         = {2007},
  pages        = {39--68},
  title        = {Evolutionary Context of Human Development},
  subtitle     = {The Cooperative Breeding Model},
  publisher    = {Oxford University Press},
  location     = {Oxford},
  booktitle    = {Family Relationships},
  booksubtitle = {An Evolutionary Perspective},
  editor       = {Salmon, Catherine A. and Todd K. Shackelford}
}
@inbook{inBook,
  author       = {Creel, S. and Creel, N. M.},
  title        = {Demography -- Survival and Reproduction},
  booktitle    = {The {African} Wild Dog},
  booksubtitle = {Behavior, Ecology, and Conservation},
  year         = {2019},
  publisher    = {Princeton University Press},
  location     = {New Jersey},
  pages        = {145--178}
}
@book{Book,
  author    = {Estes, Richard},
  year      = {1991},
  title     = {The Behavior Guide to {African} Mammals},
  subtitle  = {Including Hoofed Mammals, Carnivores, Primates},
  publisher = {University of California Press},
  location  = {Berkeley},
  pages     = {134}
}
@article{Article,
  title   = {Relatedness and Conflict Over Optimal Group Size},
  journal = {Trends in Ecology \& Evolution},
  volume  = {9},
  number  = {4},
  pages   = {117--119},
  year    = {1994},
  author  = {Bruce H. Rannala and Charles R. Brown}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Four types of citations which needs to be altered:
\begin{enumerate}
    \item Incollection: \cite{InCol}
    \item Inbook: \cite{inBook}
    \item Book: \cite{Book}
    \item Article : \cite{Article}
\end{enumerate}

\printbibliography[heading=subbibliography]

\textbf{How I want it to look}
\begin{enumerate}[1.]
  \item
  Hrdy, S. B. Evolutionary Context of Human Development: The Cooperative Breeding Model.
  In: Salmon, C. A. $\&$ Shackelford, T. K. (eds.),
  \emph{Family Relationships: An Evolutionary Perspective}, pp. 39--68.
  Oxford University Press, Oxford, 2007
  \item
  Creel,  S.  $\&$  Creel,  N. Demography -- Survival and Reproduction.
  In: \emph{The African Wild Dog: Behavior, Ecology, and Conservation}, pp. 145--178.
  Princeton  University  Press,  New Jersey, 2019
  \item
  Estes,  R. \emph{The behavior guide to African mammals:
    including hoofed mammals, carnivores, primates}, pp. 134.
  University  of  California  Press, Berkeley, 1991
  \item
  Rannala, B. H. $\&$ Brown, C. R. Relatedness and conflict over optimal group size.
  \emph{Trends in Ecology $\&$ Evolution} \textbf{9}: 117--119, 1994
\end{enumerate}
\end{document}

Hrdy, SB 人类发展的进化背景。合作育种模式。收录于:CA Salmon 和 TK Shackelford(编),《家庭关系。进化视角》,第 39-68 页。牛津大学出版社,牛津,2007 年。Creel, S. 和 Creel, NM 人口统计学 - 生存和繁殖。收录于:《非洲野狗。行为、生态和保护》,第 145-178 页。普林斯顿大学出版社,新泽西州,2019 年。Estes, R.《非洲哺乳动物行为指南》。包括有蹄哺乳动物、食肉动物、灵长类动物》,第 134 页。加州大学出版社,伯克利,1991 年。Rannala, BH 和 Brown, CR 《关联性和最佳群体规模冲突》。《生态与进化趋势》9(4):117-119,1994 年。

相关内容