在 biblatex 中格式化@techreport

在 biblatex 中格式化@techreport

我在用文章与...类比布拉特克斯。我的代码如下:

\documentclass[12pt,a4paper, british]{article}
\usepackage{babel} % Switch to English style quotation mark, 
                   % remember to add british to document option
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{xpatch}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{hyperref}
\hypersetup{unicode=true}

\usepackage{filecontents}
\begin{filecontents}{test.bib}

@TechReport{Dasgupta2007,
  author      = {Dasgupta, Susmita and Laplante, Benoit and Meisner, Craig %
                 and Wheeler, David and Yan, Jianping},
  title       = {The Impact of Sea Level Rise on Developing Countries: A Comparative Analysis},
  institution = {World Bank},
  year        = {2007},
  type        = {Report},
  number      = {World Bank Policy Research Working paper 4136},
  address     = {Washington DC},
  }
  \end{filecontents}
  %Bibliography configuration
  \usepackage[autostyle]{csquotes}
  \usepackage[style=ext-authoryear-comp, giveninits=true, uniquename=init, backend=biber, %
           maxcitenames=3,maxbibnames=9, sortcites, url=false, isbn=false, % 
           backref=false,articlein=false, innamebeforetitle=true]{biblatex}

  \renewcommand{\labelnamepunct}{\addspace} % Replace dot with comma in reference after Author + Year
  \DeclareFieldFormat{editortype}{\mkbibparens{#1}}
  \DeclareDelimFormat{editortypedelim}{\addspace}
  \DeclareFieldFormat{translatortype}{\mkbibparens{#1}}
  \DeclareDelimFormat{translatortypedelim}{\addspace}
  \DeclareFieldFormat[report]{title}{\mkbibquote{#1}}

  % replace dot “.” by comma “,” after title in biblatex for @article
  \xpatchbibdriver{article}
  {\usebibmacro{title}%
  \newunit}
  {\usebibmacro{title}%
  \printunit{\addcomma\space}}
  {}
  {}

  % remove chapter and pages
  \xpatchbibdriver{incollection}
  {\usebibmacro{chapter+pages}}
  {}
  {}{}

 % add them into the new position
 \xpatchbibmacro{incollection:parent}
 {\usebibmacro{maintitle+booktitle}%
 \newunit\newblock}
 {\usebibmacro{maintitle+booktitle}%
 \newunit\newblock
 \usebibmacro{chapter+pages}}
 {}{}


 \renewcommand*{\intitlepunct}{\addspace}
 \renewbibmacro*{in:}{%
 \setunit{\addcomma\space}%
 \printtext[]{%
 \bibstring{in}\intitlepunct}}

 %format volume and number as follow: volume(number)
 \renewcommand*{\volnumdelim}{\addnbspace}
 \DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

 %format page range of @article and @incollection follow this format: volume(number): page range.
 \renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon} 
 {\addcomma}\addspace}
 \DeclareFieldFormat[article]{pages}{#1}

 %use ":" after year in the intext citation
 \renewcommand*{\postnotedelim}{\addcolon\space}
 \DeclareFieldFormat{postnote}{\mknormrange{#1}}
 \DeclareFieldFormat{multipostnote}{\mknormrange{#1}}

 \addbibresource{test.bib}


 %\nocite{westfahl:frontier,westfahl:space}


 \begin{document}

    \begin{itemize}
      \item This is cited by @technicalreport: \parencite{Dasgupta2007} \\

   \end{itemize}
 \printbibliography

 \end{document}

结果如下: enter image description here

您能告诉我如何删除参考文献中突出显示的“报告”吗?

答案1

type如果您不想看到“报告”,请不要将其放入该字段。相反,请将“世界银行政策研究工作文件”number从仅应包含数字的字段移到该type字段

type = {World Bank Policy Research Working Paper},
number = {4136},

我对 Biber 的版本也确实不喜欢%作者名字中的 。

\documentclass[12pt,a4paper, british]{article}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\hypersetup{unicode=true}

\usepackage{filecontents}
\begin{filecontents}{test.bib}

@TechReport{Dasgupta2007,
  author      = {Dasgupta, Susmita and Laplante, Benoit and Meisner, Craig and Wheeler, David and Yan, Jianping},
  title       = {The Impact of Sea Level Rise on Developing Countries: A Comparative Analysis},
  institution = {World Bank},
  year        = {2007},
  type        = {World Bank Policy Research Working Paper},
  number      = {4136},
  address     = {Washington DC},
  }
\end{filecontents}
%Bibliography configuration
\usepackage[autostyle]{csquotes}
\usepackage[style=ext-authoryear-comp, giveninits=true, uniquename=init, backend=biber, %
            maxcitenames=3,maxbibnames=9, sortcites, url=false, isbn=false, % 
            backref=false,articlein=false, innamebeforetitle=true]{biblatex}

\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addspace}% Replace dot with comma in reference after Author + Year
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat{translatortype}{\mkbibparens{#1}}
\DeclareDelimFormat{translatortypedelim}{\addspace}
\DeclareFieldFormat[report]{title}{\mkbibquote{#1}}

\usepackage{xpatch}
% replace dot “.” by comma “,” after title in biblatex for @article
\xpatchbibdriver{article}
  {\usebibmacro{title}%
   \newunit}
  {\usebibmacro{title}%
   \printunit{\addcomma\space}}
  {}
  {}

% remove chapter and pages
\xpatchbibdriver{incollection}
  {\usebibmacro{chapter+pages}}
  {}
  {}{}

% add them into the new position
\xpatchbibmacro{incollection:parent}
  {\usebibmacro{maintitle+booktitle}%
   \newunit\newblock}
  {\usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{chapter+pages}}
  {}{}


\renewcommand*{\intitlepunct}{\addspace}
\renewbibmacro*{in:}{%
  \setunit{\addcomma\space}%
  \printtext{%
    \bibstring{in}\intitlepunct}}

%format volume and number as follow: volume(number)
\renewcommand*{\volnumdelim}{\addnbspace}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

%format page range of @article and @incollection follow this format: volume(number): page range.
\renewcommand{\bibpagespunct}{%
  \ifentrytype{article}
    {\addcolon} 
    {\addcomma}
  \addspace}
\DeclareFieldFormat[article]{pages}{#1}

%use ":" after year in the intext citation
\renewcommand*{\postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}}

\addbibresource{test.bib}

\begin{document}
\parencite{Dasgupta2007}
\printbibliography
\end{document}

"Dasgupta, S., B. Laplante, C. Meisner, D. Wheeler and J. Yan (2007) ‘The Impact of Sea Level Rise on Developing Countries: A Comparative Analysis’. World Bank Policy Research Working Paper 4136. Washington DC: World Bank."

相关内容