Biblatex 字段 venue+eventdate 不带圆括号

Biblatex 字段 venue+eventdate 不带圆括号

我正在寻找一种解决方案来删除类型引用列表中的圆括号@inproceedings。原始版本如下: 在此处输入图片描述

如您所见,它venue+eventdate周围有圆括号:

(中国上海,2011 年 5 月 9 日)

知道如何删除括号以获得以下内容吗?

上海,中国,2011 年 5 月 9 日

附上MWE:

\documentclass{article}

\usepackage[style=numeric,backend=biber]{biblatex}

\DeclareFieldFormat{eventdate}{%
  \thefield{eventyear}%
  \space
  \mkbibmonth{\thefield{eventmonth}}%
  \space%
  \thefield{eventday}}

\begin{filecontents*}{database.bib}
@inproceedings{Baker2011,
 author = {Baker, Christopher R. and Dolan, John M. and Wang, Shige and Litkouhi, Bakhtiar B.},
 bookpagination = {page},
 booktitle = {2011 IEEE Int. Conf. Robotics and Automation},
 doi = {10.1109/ICRA.2011.5980355},
 eventdate = {2011-05-09/2011-05-13},
 eventtitle = {2011 IEEE International Conference on Robotics and Automation (ICRA 2011)},
 isbn = {978-1-61284-386-5},
 keywords = {software architecture},
 pages = {6071--6077},
 publisher = {IEEE},
 location = {Piscataway, NJ},
 title = {Toward adaptation and reuse of advanced robotic software},
 venue = {Shanghai, China},
 year = {2011}
}
\end{filecontents*}
\bibliography{database}

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

\end{document}

答案1

括号是由event+venue+date宏添加的。您可以更改其定义以删除它们,并添加注释中要求的句号:

\documentclass{article}

\usepackage[style=numeric]{biblatex}

\renewbibmacro*{event+venue+date}{%
  \printfield{eventtitle}%
  \newunit
  \printfield{eventtitleaddon}%
  \newunit
  \printfield{venue}%
  \setunit*{\addcomma\space}%
  \printeventdate
  \newunit}

\makeatletter
\DefineBibliographyExtras{english}{%
  \protected\def\mkbibdatelong#1#2#3{%
     \iffieldbibstring{#1}
       {\bibstring{\thefield{#1}}}
       {\dateeraprintpre{#1}\stripzeros{\thefield{#1}}}%
    \iffieldundef{#2}
      {}
      {\iffieldundef{#1}{}{\space}%
       \mkbibmonth{\thefield{#2}}%
       \iffieldundef{#3}
         {}
         {\nobreakspace}}%
    \iffieldundef{#3}
      {}
      {\stripzeros{\thefield{#3}}}%
  }%
%
  \protected\gdef\lbx@us@mkdaterangetrunc@long#1#2{%
    \begingroup
      \blx@metadateinfo{#2}%
      \iffieldundef{#2year}
        {}
        {\printtext[#2date]{%
           \datecircaprint
           \iffieldundef{#2season}
             {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}%
              \blx@printtime{#2}{}}%
             {\csuse{mkbibseasondate#1}{#2year}{#2season}}%
           \dateeraprint{#2year}%
           \dateuncertainprint
           \iffieldundef{#2endyear}
             {}
             {\iffieldequalstr{#2endyear}{}
                {\mbox{\bibdaterangesep}}
                {\bibdaterangesep
                 \enddatecircaprint
                 \iffieldundef{#2season}
                   {\iffieldsequal{#2year}{#2endyear}
                     {\iffieldsequal{#2month}{#2endmonth}
                        {\csuse{mkbibdate#1}{}{}{#2endday}}
                        {\csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}
                     {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}%
                    \blx@printtime{#2}{end}}
                   {\iffieldsequal{#2year}{#2endyear}
                      {\csuse{mkbibseasondate#1}{}{#2endseason}}
                      {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}}%
                 \enddateuncertainprint
                 \dateeraprint{#2endyear}}}}}%
    \endgroup}%
%
  \protected\gdef\lbx@us@mkdaterangetruncextra@long#1#2{%
    \begingroup
      \blx@metadateinfo{#2}%
      \iffieldundef{#2year}
        {}
        {\printtext[#2date]{%
           \datecircaprint
           \iffieldundef{#2season}
             {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}%
              \blx@printtime{#2}{}}%
             {\csuse{mkbibseasondate#1}{#2year}{#2season}}%
           \dateeraprint{#2year}%
           \dateuncertainprint
           \iffieldundef{#2endyear}
             {\printfield{extradate}}
             {\iffieldequalstr{#2endyear}{}
                {\printfield{extradate}%
                 \mbox{\bibdaterangesep}}
                {\bibdaterangesep
                 \enddatecircaprint
                 \iffieldundef{#2season}
                   {\iffieldsequal{#2year}{#2endyear}
                     {\iffieldsequal{#2month}{#2endmonth}
                        {\csuse{mkbibdate#1}{}{}{#2endday}}
                        {\csuse{mkbibdate#1}{}{#2endmonth}{#2endday}}}
                     {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}%
                    \blx@printtime{#2}{end}}
                   {\iffieldsequal{#2year}{#2endyear}
                      {\csuse{mkbibseasondate#1}{}{#2endseason}}
                      {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}}%
                 \printfield{extradate}%
                 \enddateuncertainprint
                 \dateeraprint{#2endyear}}}}}%
    \endgroup}%
%
}
\makeatletter


\usepackage{filecontents}
\begin{filecontents*}{database.bib}
@inproceedings{Baker2011,
  author         = {Baker, Christopher R. and Dolan, John M. and Wang, Shige and Litkouhi, Bakhtiar B.},
  bookpagination = {page},
  booktitle      = {2011 IEEE Int. Conf. Robotics and Automation},
  doi            = {10.1109/ICRA.2011.5980355},
  eventdate      = {2011-05-09/2011-05-13},
  eventtitle     = {2011 IEEE International Conference on Robotics and Automation (ICRA 2011)},
  isbn           = {978-1-61284-386-5},
  keywords       = {software architecture},
  pages          = {6071--6077},
  publisher      = {IEEE},
  location       = {Piscataway, NJ},
  title          = {Toward adaptation and reuse of advanced robotic software},
  venue          = {Shanghai, China},
  year           = {2011},
}
\end{filecontents*}
\addbibresource{database.bib}

\begin{document}
\nocite{Baker2011}
\printbibliography

\end{document}

Christopher R. Baker 等人。“面向先进机器人软件的适应和重用”。收录于:2011 IEEE 国际机器人与自动化会议。2011 IEEE 国际机器人与自动化会议 (ICRA 2011)。中国上海,2011 年 5 月 9 日至 13 日。新泽西州皮斯卡塔韦:IEEE,2011 年,第 6071-6077 页。ISBN:978-1-61284-386-5。DOI:10.1109/ICRA.2011.5980355。

请注意,日期格式是使用适当的特定语言命令而不是通过字段格式更改的。由于格式从美国更改mm dd yyyy为 ISO,yyyy mm dd因此必须调整两个辅助宏,这意味着代码乍一看可能有点让人不知所措。请注意结束日期不再被隐藏。

相关内容