在 Latex 中用逗号替换引用中的括号

Replace brackets in references with commas in Latex

我想在参考文献中用逗号替换年份的括号,因为这是《金融杂志》中的标准方法。

在参考文献中,我有这个结构;作者(2020)标题...但我想将其更改为;作者,2020,标题...

这将是一个示例参考书目:

@article{examplesource,
  title={Title of article},
  author={LastName1, FirstName1 and LastName2, FirstName2 and LastName3, FirstName3},
  journal={Journal of Finance},
  volume={40},
  number={1},
  pages={3--73},
  year={2005}}

这是我目前拥有的:

\documentclass{article}

\usepackage[style=ext-authoryear, backend=biber, giveninits=true, uniquelist = false, uniquename=init, isbn=false, maxcitenames=3, dashed=false, maxbibnames=999, doi=false, url=false]{biblatex}

\addbibresource{biblatex-examples.bib}
%\DeclareDelimFormat{nameyeardelim}{\addcomma\space}

\setlength{\bibhang}{15pt}
\DeclareNameAlias{sortname}{family-given}
\renewcommand*{\labelnamepunct}{\addspace}

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

\DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}}

\renewbibmacro*{in:}
    {\ifentrytype{article}
    {\setunit{\addcomma\space}}
    {\printtext{\bibstring{in}\intitlepunct}}}

\DeclareFieldFormat{journaltitlecase}{#1}

\renewbibmacro*{journal}{
  \ifboolexpr{
    test {\iffieldundef{journaltitle}}
    and
    test {\iffieldundef{journalsubtitle}}}
    {\printtext[journaltitle]{
       \printfield[journaltitlecase]{journaltitle}
       \setunit{\subtitlepunct}
       \printfield[journaltitlecase]{journalsubtitle}}}}

\renewbibmacro*{volume+number+eid}{
  \printfield{volume}
  \setunit{\addcomma\space}
  \printfield{eid}}

\DeclareFieldFormat[article,periodical]{volume}{{#1}}

\DeclareFieldFormat{pages}{#1}

\UndeclareInnerCiteDelims{parencite}
\DeclareInnerCiteDelims{parencite}{(}{)}


\begin{document}
\textcite{examplesource} lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua \parencite{examplesource}.

\printbibliography
\end{document}

非常感谢您的帮助!

幸运的是你使用的是 ext-authoryear 样式,所以你可以使用

  • \DeclareFieldFormat{biblabeldate}{#1}去掉括号
  • \DeclareDelimFormat[bib]{nameyeardelim}{\addcomma\space}在年份前加一个逗号
  • \ExecuteBibliographyOptions{innamebeforetitle=true} \DeclareDelimFormat[bib]{nametitledelim}{\addcomma\space}在年份后加一个逗号

\documentclass{article}

\usepackage[style=ext-authoryear, backend=biber, giveninits=true, uniquelist = false, uniquename=init, isbn=false, maxcitenames=3, dashed=false, maxbibnames=999, doi=false, url=false]{biblatex}

\addbibresource{biblatex-examples.bib}
%\DeclareDelimFormat{nameyeardelim}{\addcomma\space}

\setlength{\bibhang}{15pt}
\DeclareNameAlias{sortname}{family-given}
\renewcommand*{\labelnamepunct}{\addspace}

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

\DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}}

\renewbibmacro*{in:}
    {\ifentrytype{article}
    {\setunit{\addcomma\space}}
    {\printtext{\bibstring{in}\intitlepunct}}}

\DeclareFieldFormat{journaltitlecase}{#1}

\renewbibmacro*{journal}{
  \ifboolexpr{
    test {\iffieldundef{journaltitle}}
    and
    test {\iffieldundef{journalsubtitle}}}
    {\printtext[journaltitle]{
       \printfield[journaltitlecase]{journaltitle}
       \setunit{\subtitlepunct}
       \printfield[journaltitlecase]{journalsubtitle}}}}

\renewbibmacro*{volume+number+eid}{
  \printfield{volume}
  \setunit{\addcomma\space}
  \printfield{eid}}

\DeclareFieldFormat[article,periodical]{volume}{{#1}}

\DeclareFieldFormat{pages}{#1}

\UndeclareInnerCiteDelims{parencite}
\DeclareInnerCiteDelims{parencite}{(}{)}

\DeclareFieldFormat{biblabeldate}{#1}
\DeclareDelimFormat[bib]{nameyeardelim}{\addcomma\space}

\ExecuteBibliographyOptions{innamebeforetitle=true} \DeclareDelimFormat[bib]{nametitledelim}{\addcomma\space}



\begin{document}
\textcite{knuth:ct} lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua \parencite{knuth:ct}.

\printbibliography
\end{document}