删除事件日期的括号

删除事件日期的括号

如何删除事件日期的括号?

我努力了:

\documentclass{article}
\usepackage[style=ieee,backend=biber]{biblatex}
\usepackage{xpatch}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@INPROCEEDINGS{A,
 author = {Z}, 
 title = {testing},
 eventdate = {2012-02-01/2012-02-04}
}

\end{filecontents}

\addbibresource{\jobname.bib}

\xpatchbibdriver{inproceedings}
  {\printtext[parens]{\usebibmacro{eventdate}}}
  {\printtext{\usebibmacro{eventdate}}}
  {}
  {}

\begin{document}
  \nocite{*}
  \printbibliography
\end{document}

甚至

\DeclareFieldFormat{eventdate}{#1}
\renewbibmacro*{eventdate}{\printtext{#1}}

但无济于事

答案1

\documentclass{article}
\usepackage[style=ieee,backend=biber]{biblatex}
\usepackage{xpatch}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@INPROCEEDINGS{A,
 author = {Z},
 title = {testing},
 eventdate = {2012-02-01/2012-02-04}
}

\end{filecontents}

\addbibresource{\jobname.bib}

\renewbibmacro*{event+venue+date}{% adapted from biblatex-ieee's ieee.bbx 
  \iffieldundef{eventtitle}
    {}
    {%
      \bibstring{presentedat}%
      \printfield{eventtitle}%
    }%
  \ifboolexpr{
    test {\iffieldundef{venue}}
    and
    test {\iffieldundef{eventyear}}
  }
    {}
    {\setunit*{\addspace}%
     \printtext{%
       \printfield{venue}%
       \setunit*{\addcomma\space}%
       \printeventdate}}%
  \newunit
}

\begin{document}
  \nocite{*}
  \printbibliography
\end{document}

事件日期不带括号

相关内容