使用 biblatex 配置参考书目

使用 biblatex 配置参考书目

因此,我尝试配置参考书目,使其按时间顺序出现(因此参考文献中的第一个引用是(1),它出现在括号()中而不是方括号[]中,并且具有以下格式:这是我引用一些论文(1)和后来的(2)的示例,

参考

1Ho, DD、Neumann, AU、Perelson, AS、Chen, W、Leonard, JM 和 Markowitz, M.HIV-1 感染中血浆病毒体和 CD4 淋巴细胞的快速周转。《自然》373.6510 (1995),第 123-126 页。

因此请注意,作者采用粗体显示,姓氏在前,首字母不带句号,列出所有作者,然后是年份,不带括号。文章周围没有“”,理想情况下,期刊编号也采用粗体显示。

到目前为止,我已经能够将作者加粗、姓氏放在前面、首字母不加句号、列出所有作者和不加“ ”的文章。但是,我无法找到一种方法,让年份紧跟在作者后面,并在引文周围加上括号。而且我不知道如何将期刊编号加粗...

这是我目前的代码:

    \documentclass[12pt]{article}
    \usepackage[style=numeric,subentry,sorting=none,firstinits=true,terseinits=true,url=false,doi=false,isbn=false,maxbibnames=99]{biblatex}

    %make the names of the authors bold:
    \DeclareNameFormat{author}{%
    {\ifthenelse{\value{listcount}>7\AND\value{listcount}<\value
    {liststop}}
    {}
    {\ifthenelse{\iffieldequalstr{usere}{unkauth}\OR\iffieldequalstr
    {usere}{unkauthdate}}
    {\mkbibbrackets{\bfseries{\usebibmacro{name:last-first}{#1}{#4}
    {#5}{#7}?}}}
    {\bfseries{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}}}}}



    %puts first the last name and then the first name
    \DeclareNameAlias{default}{last-first}
    \renewbibmacro{in:}{}
    \AtEveryBibitem{%
    \clearlist{language}%
     }

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

    \begin{document}

     this is an example in which I cite some papers \cite{ho1995} and later on                \cite{ahr2004},

   \printbibliography
    \end{document}

结果如下: 在此处输入图片描述

任何帮助将不胜感激。

答案1

你有没有想过这样的事情?

您将需要xpatch一些宏重新定义的快捷方式。

我不太确定你的\DeclareNameFormat{author},特别是\ifthenelse{\iffieldequalstr{usere}{unkauth}\OR\iffieldequalstr{usere}{unkauthdate},所以我没有复制它。


以下确保biblatex使用括号而不是方括号。

\DeclareCiteCommand{\cite}[\mkbibparens]
{\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
\DeclareFieldFormat{labelnumberwidth}{\mkbibparens{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibparens{#1}}

\AtBeginBibliography{%
  \renewcommand*{\finalnamedelim}{%
    \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
    \addspace\mkbibbold{\bibstring{and}}\space}%
  \renewcommand*{\mkbibnamelast}[1]{\mkbibbold{#1}}%
  \renewcommand*{\mkbibnamefirst}[1]{\mkbibbold{#1}}%
}

确保参考书目中的作者姓名和“和”仅以粗体打印。


\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}用于加粗文章中的卷号。


% remove the \addot if you don't want a dot before the year.
\xapptobibmacro{author}{\adddot\addspace\printfield{year}}{\typeout{successfully patched bibmacro{author} to include year}}{\typeout{failed to patch bibmacro{author} to include year}}
\xapptobibmacro{editor}{\adddot\addspace\printfield{year}}{\typeout{successfully patched bibmacro{editor} to include year}}{\typeout{failed to patch bibmacro{editor} to include year}}

在作者后添加年份(请参阅有关标点符号的注释)。截至目前,完整日期仍按惯例在 中重复numeric;如果您想更改这一点,可以查看biblatex中的authoryear内容\bbx@opt@mergedate@<...>


数学家协会

\documentclass[american, a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{xpatch}
\usepackage[style=numeric,subentry,sorting=none,firstinits=true,terseinits=true,url=false,doi=false,isbn=false,maxbibnames=99]{biblatex}
\addbibresource{\jobname.bib}

\DeclareCiteCommand{\cite}[\mkbibparens]
{\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
\DeclareFieldFormat{labelnumberwidth}{\mkbibparens{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibparens{#1}}

\AtBeginBibliography{%
  \renewcommand*{\finalnamedelim}{%
    \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
    \addspace\mkbibbold{\bibstring{and}}\space}%
  \renewcommand*{\mkbibnamelast}[1]{\mkbibbold{#1}}%
  \renewcommand*{\mkbibnamefirst}[1]{\mkbibbold{#1}}%
}

\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}
\DeclareNameAlias{default}{last-first}
\DeclareFieldFormat
      [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
      {title}{{#1\isdot}}

% remove the \addot if you don't want a dot before the year.
\xapptobibmacro{author}{\adddot\addspace\printfield{year}}{\typeout{successfully patched bibmacro{author} to include year}}{\typeout{failed to patch bibmacro{author} to include year}}
\xapptobibmacro{editor}{\adddot\addspace\printfield{year}}{\typeout{successfully patched bibmacro{editor} to include year}}{\typeout{failed to patch bibmacro{editor} to include year}}

\begin{filecontents}{\jobname.bib}
@article{ho1995,
  author        = {David D. Ho and Avidan U. Neumann and Alan S. Perelson and Wen Chen and John M. Leonard and Martin Markowitz},
  title         = {Rapid turnover of plasma virions and CD4 lymphocytes in HIV-1 infection},
  journal       = {Nature},
  volume        = {373},
  number        = {6510},
  page          = {123-126},
  date          = {1995},
}
@article{testartlong,
  author        = {Arnold Uthor and William Riter and Rita Esearcher and Steven C. Ientist and Stuart T. Udent and Peter R. Ofessor and Lewis E. C. Turer},
  title         = {An Article about Articles},
  journal       = {Journal of Articles},
  volume        = {8},
  number        = {2},
  page          = {1-5},
  date          = {2010},
}
@article{testart,
  author        = {Arnold Uthor and William Riter},
  title         = {A Very Interesting Article},
  journal       = {Journal of Articles},
  volume        = {7},
  number        = {3},
  page          = {1-5},
  date          = {2010},
}
@book{testbook,
  author        = {Walter Ordsmith},
  editor        = {Eddie Ditor},
  title         = {The Work},
  subtitle      = {Subtitle},
  date          = {1983},
}
@online{testonline,
  author        = {Bernie Logger},
  title         = {A Very Opinionated Blog Post},
  url           = {http://example.com},
  year          = {2013},
}
\end{filecontents}

\begin{document}
  Let's cite Ho et\,al. \cite{ho1995}.
  \nocite{*}
  \printbibliography
\end{document}

生产 在此处输入图片描述

相关内容